Welcome to DOFBOT Pro repository
8.harris corner detection
8. harris corner detection
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.
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.
8.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: Whether the image needs to be horizontally flipped; the default value is false.
Step 2: Enable Opencv_apps
xxxxxxxxxxroslaunch opencv_apps corner_harris.launch #harris corner detectionEach 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.
8.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.
8.3 Effect Display
You can see that the camera will mark the corner points of the captured image.
