This is my first foray into the world of Computer Vision! In this project, I am tracking an object of a particular color, taken from a live webcam feed. The color can be given by the user.
The following colors are supported:
How does it work?
The program will take in an input image continuously and transform it to HSV space. Then create a mask such that only those parts of the image which were initially green will be seen in the mask.
Erode the mask, then dilate it to remove the noise.
Find contours in the mask. Choose the largest contour based on the area of the contour.
Find out the the coordinates of one point of the rectangle along with the height and width of the rectangle. Draw the rectangle on the output image.