Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

OpenCv for Python: Tracking an object Steps to do it properly..... 1 Capture live video from Webcam 2 Display live video 3 convert BGR to

OpenCv for Python:

Tracking an object

Steps to do it properly.....

1 Capture live video from Webcam

2 Display live video

3 convert BGR to HSV

4 Display the HSV video

5 Click on HSV video and capture the HSV values at the location clicked, and a few other local values of the item you are going to track.

A. use a MouseCallback to print the HSV values.

6 Using Sliders create scalers for the min and max values you want to track

A. a Scalar will be a numpy array (np.array) that takes 3 values for minH, minS, and minV.......then a second scalar to catch the other three Max values

B. create 6 trackbars, createTrackbar with callback methods to set your six variables

7 Us the OpenCV inRange method to find the values between the scalars from HSV image and the result will go to a grayscale image (make it a binary image, white/black).

8 Dilate, erode the grayscale image to get a better representation of the object you are tracking.

9 Display the original image and the binary image where everything is black except for the object you are tracking. The tracked object will be white.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Pro SQL Server Wait Statistics

Authors: Enrico Van De Laar

1st Edition

1484211391, 9781484211397

Students also viewed these Databases questions

Question

What is paper chromatography?

Answered: 1 week ago

Question

Explain the cost of capital.

Answered: 1 week ago

Question

Define capital structure.

Answered: 1 week ago

Question

Question How are IRAs treated for state tax law purposes?

Answered: 1 week ago