#include "stdafx.h"
#include<opencv2\highgui\highgui.hpp>
#include<opencv\cv.h>
#include<opencv2\core\core.hpp>
#include<opencv2\opencv.hpp>
#include "opencv2/imgproc/imgproc.hpp"
#include<iostream>
#include "imgproc/imgproc.hpp"
using namespace cv;
using namespace std;
int main()
{
string name = "原图";
Mat qq = imread("D:\\test11.jpg");
//imshow(name, qq);
cvtColor(qq, qq, CV_RGB2GRAY);
vector<KeyPoint>detectKeyPoint;
clock_t st, ed;
st = clock();
Mat keyPointImage1, keyPointImage2;
SimpleBlobDetector::Params params;
params.minArea = 6;
params.maxArea = 50;
params.filterByCircularity = true;
Ptr<SimpleBlobDetector> sbd = SimpleBlobDetector::create(params);
sbd->detect(qq, detectKeyPoint);
drawKeypoints(qq, detectKeyPoint, keyPointImage1, Scalar(0, 0, 255), DrawMatchesFlags::DRAW_RICH_KEYPOINTS);
imshow("keyPoint image1", keyPointImage1);
ed = clock();
cout << st << "\n\r" << ed;
waitKey(0);
return 0;
}