Ask Your Question

Revision history [back]

About OPENCV 3.4.1 headerfile

image description

Hello. I'm rookie on opencv.(I started Opencv in 3days ago). So, I seek your Understanding although I'm not good at making a code.

This code is example that I used for Opencv learning.

As you see, the function SiftFeatureDetector and SiftDescriptionExtractor is undefined. I Searched Google to solve this problem, but it hasn't resolved yet. I Guess, the headerfile that defined SiftFeatureDetector and SiftDescriptionExtractor isn't exist in my PC. But I didn't find that.

So, Is there another problem except headerfile? And what can I do to solve this problem?

click to hide/show revision 2
None

updated 2018-07-12 06:24:59 -0600

berak gravatar image

About OPENCV 3.4.1 headerfile

image description

Hello. I'm rookie on opencv.(I started Opencv in 3days ago). So, I seek your Understanding although I'm not good at making a code.

This code is example that I used for Opencv learning.

As you see, the function SiftFeatureDetector and SiftDescriptionExtractor is undefined. I Searched Google to solve this problem, but it hasn't resolved yet. I Guess, the headerfile that defined SiftFeatureDetector and SiftDescriptionExtractor isn't exist in my PC. But I didn't find that.

So, Is there another problem except headerfile? And what can I do to solve this problem?

About OPENCV 3.4.1 headerfile

Hello. I'm rookie on opencv.(I started Opencv in 3days ago). So, I seek your Understanding although I'm not good at making a code.

#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/features2d/features2d.hpp> 
#include <opencv2/flann/flann.hpp> 
#include <vector>

using namespace cv;

#define RED Scalar(0,0,255)

int main()
{
Mat img1=imread("model3.jpg",CV_LOAD_IMAGE_GRAYSCALE); 
Mat img2=imread("scene.jpg",CV_LOAD_IMAGE_GRAYSCALE);
assert(img1.data && img2.data);

SiftFeatureDetector detector(0.3); 
std::vector<KeyPoint> keypoint1, keypoint2; 

detector.detect(img1,keypoint1); 
detector.detect(img2,keypoint2);

Mat disp;
drawKeypoints(img1,keypoint1,disp,RED,DrawMatchesFlags::DRAW_RICH_KEYPOINTS); 
namedWindow("Keypoint"); imshow("Keypoint",disp);

SiftDescriptorExtractor extractor; 
Mat descriptor1, descriptor2; 
extractor.compute(img1,keypoint1,descriptor1); 
extractor.compute(img2,keypoint2,descriptor2);

waitKey();
return 0;
}

This code is example that I used for Opencv learning.

And this is error message

Error (active)  E0020  identifier "SiftFeatureDetector" is undefined    error3_6
Error (active)  E0020  identifier "SiftDescriptorExtractor" is undefined    error3_6

As you see, the function SiftFeatureDetector and SiftDescriptionExtractor is undefined. I Searched Google to solve this problem, but it hasn't resolved yet. I Guess, the headerfile that defined SiftFeatureDetector and SiftDescriptionExtractor isn't exist in my PC. But I didn't find that.

So, Is there another problem except headerfile? And what can I do to solve this problem?