Skip to content

Contours detection and masking demonstration for color tracking.

Notifications You must be signed in to change notification settings

anodicpassion/Color-Tracking

Repository files navigation

Color-Tracking!

Breif

Screenshot 2023-03-18 at 6 42 26 PM Screenshot 2023-03-18 at 6 41 45 PM

This project tracks the orange circles in the video using color tracking and contours detections.

Installation

You can simply install the project with the help of requirements.txt included.
Just use the following commands:

1] https://github.com/pratik-suhas-pawar/Color-Tracking.git
2] pip install -r requirements.txt

How does it works

The main aim is to detect orange circles in the given video. To begin with, we will detect the color orange.
Step 1] Converting video frame into HSV Color space.
             cv2.cvtColor(src, cv2.COLOR_BGR2HSV)
Step 2] Getting the desired color and creating its mask.
             cv2.inRange(src, lower, upper)

Nextly, we will detect the edges and find the contors.
Step 3] Bluring the video frame
             cv2.GaussianBlur(src, kernel, sigmaX)
Step 4] Finding the edges
             cv2.Canny(src, thresh_1, thresh_2, edges)

Averaging x and y coordinates and draw rectangle
Step 5] Drewing the rectangle
             cv2.rectangle(src, pt_1, pt_2, color, thickness)

About

Contours detection and masking demonstration for color tracking.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages