2023年12月24日发(作者:人教版优学数学试卷)

2 goodFeaturesToTrack( src_gray, 3 corners, 4 maxCorners, 5 qualityLevel, 6 minDistance, 7 Mat(), 8 blockSize, 9 useHarrisDetector,10 k );11

12 /// Draw corners detected13 cout<<\"** Number of corners detected: \"<<()<

17 corners[i],18 r,19 Scalar(m(0,255),20 m(0,255),21 m(0,255)), -1, 8, 0 );22 }23 /// Show what you got24 namedWindow( source_window, CV_WINDOW_AUTOSIZE );25 imshow( source_window, copy );3、特征点检测 1 //--Detect the keypoints using SURF Detector 2 int minHessian = 400; 3

4 SurfFeatureDetector detector( minHessian ); 5

6 std::vector keypoints_1, keypoints_2; 7

8 ( img_1, keypoints_1 ); 9 ( img_2, keypoints_2 );10

11 //-- Draw keypoints12 Mat img_keypoints_1; Mat img_keypoints_2;13

14 drawKeypoints( img_1, keypoints_1, img_keypoints_1, Scalar::all(-1), DrawMatchesFlags::DEFAULT );15 drawKeypoints( img_2, keypoints_2, img_keypoints_2, Scalar::all(-1), DrawMatchesFlags::DEFAULT );16

17 //-- Show detected (drawn) keypoints18 imshow(\"Keypoints 1\", img_keypoints_1 );19 imshow(\"Keypoints 2\", img_keypoints_2 );


更多推荐

数学试卷,特征,作者