#include <opencv2/opencv.hpp>
#include<opencv2/core/core.hpp>
#include"opencv2/highgui/highgui.hpp"
#include<opencv2/imgproc/imgproc.hpp>
#include<iostream>
#include<time.h>
#include<vector>
using namespace std;
using namespace cv;
int main()
{
Mat srcImage = imread("C:/Users/离子键/source/repos/Project8/1.jpg",0);
imshow("原始图",srcImage);
Mat cornerStrength;
cornerHarris(srcImage,cornerStrength,10,3,0.01);
Mat harrisCorner;
threshold(cornerStrength,harrisCorner,0.00001,255,THRESH_BINARY);
imshow("角点检测后的效果图",harrisCorner);
waitKey();
return 0;
}
运行结果如图:
原版介绍: