3.Color tracking

1.Start program

Input following command:

image-20230620172501968

After successful startup, the above screen will be displayed, and the program will initially load the HSV value, and then display the processed image. Press the [r] button to reselect the color and use the mouse to box out the color to be tracked. The selected area can only have one color. After selecting the color to be tracked, the program completes the image processing and presses the spacebar to start tracking. The terminal that starts colorTracker will display.

image-20230620172941673

 

View communication between nodes, input following command.

image-20230620174452246

3.2 Code

Code path:

3.2.1、colorHSV.py

This program mainly has the following functions:

Some core codes are as follows:

3.2.2、colorTracker.py

The main function of this program is to receive/Current_ Point and depth image topic data, calculate speed size, and then publish speed data.