Object Tracker

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?

Even i don't know. It just works.
  1. 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.

  2. Erode the mask, then dilate it to remove the noise.

  3. Find contours in the mask. Choose the largest contour based on the area of the contour.

  4. 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.