Welcome to AI Vision USB Camera repository
7.harris corner detection
harris corner detection
Corner points are widely used in image processing, such as image matching (FPM feature point matching), camera calibration, etc. The basic idea of the algorithm is to use a fixed window to slide in any direction on the image, and compare the two situations before and after sliding, the degree of change in pixel grayscale in the window,If there is sliding in any direction and there is a large grayscale change, then we can think that there is a corner point in the window.
1. Use
Code path:~/yahboomcar_ws/src/opencv_apps/launch
- Start the camera
roslaunch yahboomcar_visual opencv_apps.launch img_flip:=false
- img_flip parameter: whether the image needs to be flipped horizontally, the default is false.
[usb_cam-test.launch] file opens the [web_video_server] node by default, and you can directly use the [IP:8080] web page to view images in real time.
- Start the corner detection function of Opencv_apps
xroslaunch opencv_apps corner_harris.launch # harris corner detection
Each functional case will have a parameter [debug_view], Boolean type, whether to use Opencv to display images, which is displayed by default.
xThe reason for closing debug_view is that it will generate errors on the terminal, but the actual effect has not been affected
- Local View Screen
Enter the following command and select the corresponding topic to see the effect:
xxxxxxxxxxrqt_image_view
- LAN View Screen
In the same local area network, enter IP+port (8080) in the browser, for example:
x192.168.2.150:8080 # IP is the IP of the host computer
2. Effect display
You can see that the camera will mark the corners of the captured image.
