Welcome to DOFBOT Pro repository
9.Target tracking algorithm
9.Target tracking algorithm
This section is a dedicated course for the Jetson-Nano mainboard. The Orin mainboard does not have a ROS1 environment and cannot run the following programs. The startup commands for this section are run on the Jetson-Nano host machine (mainboard). Simply open a terminal directly on the mainboard and enter the course commands; there is no need to run them in Docker.
Locating objects in consecutive frames of a video is called tracking. In OpenCV, you can use traditional target tracking algorithms (such as mean tracking, Kalman filtering, etc.)Or target trackers based on deep learning (such as MOSSE, CSRT, etc.) for target tracking. Deep learning object trackers generally perform better in accuracy and robustness
9.1 Use
Source code launch file path:~/dofbot_ws/src/opencv_apps/launch
Step 1: Start the camera
roslaunch dofbot_visual opencv_apps.launch img_flip:=false
- The
img_flipparameter determines whether the image needs to be horizontally flipped; the default value isfalse.
Step 2: Enable Opencv_apps functionality
xxxxxxxxxxroslaunch opencv_apps camshift.launch # target tracking algorithmEach feature case has a parameter debug_view, a boolean value indicating whether to use OpenCV to display images; the default is to display them.
Set it to False if you don't need to display them, for example...
xxxxxxxxxxroslaunch opencv_apps contour_moments.launch debug_view:=FalseHowever, after starting it this way, some cases may not be displayed in other ways because in the source code, some [debug_view] settings are set to [False], which will turn off image processing.
9.2 Display Method
- rqt_image_view
Enter the following command and select the corresponding topic.
xxxxxxxxxxrqt_image_view
- opencv
The system displays the default value; no action is required.
9.3 Effect Display
You can see an adjustable window appearing on the screen, along with a red border that follows it.
