Colour Detection in HSV
Hi, Today, I tried detecting the puck using OpenCV's built-in algorithms to detect a specified colour within the camera frame. Methods used: 1. Applied Gaussian Blur to blur the frame to remove small noises within the camera frame. 2. Converted OpenCV's default colour format from BGR to HSV which allowed the camera to detect a range of a specified colour e.g. from light red to dark red. 3. Used trackbars to recognise the colour of the puck in real-time. I plan on using the values found in this test script in my final script where I don't have to change anything. 3 trackbars were moved to control Hue, Saturation and Value of the lower range of red, whilst the other 3 trackbars is to control the higher range of red. Video of a simple red colour detection by manually finding HSV values As shown in the video above, the camera cannot detect the red puck very well. One of the main reason is the glos...