OpenCV4 daily practice day3: Run OpenCV sample program (object tracking)

step1: Prepare the camera, or use the computer's own camera. The Intel D435i is used here.
Insert picture description here
step2: Find the object tracking demo that comes with OpenCV- camshiftdemo.cpp , and add it to the VS2015 source file. Step3
Insert picture description here
: camshiftdemo.cpp's help file mentions that to run the program, you need to specify the camera number. (If not specified, the default camera number=0)
Insert picture description here
View—Property Manager—Double-click "Debug|x64"—Debug—Command Parameters—Enter camera number:0 (although the default is 0)
Insert picture description here
step4: Read camshiftdemo. The key description in cpp, such as pause, exit, etc.
Insert picture description here
step5: Run the program and the window screen seen by the camera will appear.
Insert picture description here
step6: track the selected area in the screen, and the running result (GIF animation)
Insert picture description here
evaluation: OpenCV4 official object tracking The algorithm effect is still possible.

Guess you like

Origin blog.csdn.net/weixin_43297891/article/details/114290914