2015-08-13 60 views
0

我是OpenCV的初学者。我有问题实现FAST在Vsual Studio中的版本与版本OpenCV 3.0。我曾尝试以下实施C++Opencv 3.0 FAST拐角检测

src = imread("../images/right.jpg", CV_LOAD_IMAGE_GRAYSCALE); 
Ptr<FastFeatureDetector> detector = FastFeatureDetector::create(TRESHOLD); 
vector<KeyPoint> keypointsD; 

用(但两者的实现都BAD

detector->detect(src, keypointsD); 
drawKeypoints(src, keypointsD, output); 
imshow(window_name, output); 

FAST(src, keypointsD, TRESHOLD, true); //fast detector 
drawKeypoints(src, keypointsD, output); 
imshow(window_name, output); 

你能帮我做任何例子或者我该做什么坏事?

回答

0

你确定,你必须做一个探测器?我有以下的例子是编译:

Mat src; Mat tmp; Mat dst; 
vector<KeyPoint> keypoints; 

src = imread(imageName, -1); 
FAST(src,keypoints,0,false); 

if(keypoints.size() > 0){ 
cout << keypoints.size() << endl; 

当然这只是我的代码片段,其实我拍摄影像,并与while循环做一个因素,直到keypoints.size < = 0缩减它。但它拥有你所需要的一切,我认为。当我编译我的代码时,它给了我找到的关键点数。

实施例:

83742 
42064 
23470 
13255 
7290 
3877 
1947 
915 
404 
151 
74 
24