How to use FeatureDetector in OpenCV C++? -
i using vs 2008 opencv 2.1 installed per installation guide. featuredetector/surffeaturedetector listed classes in documentation, considered "syntax error : identifier 'surffeaturedetector"
this pretty entirety of code.
#include "cv.h" #include "highgui.h" ptr<featuredetector> *detect = new surffeaturedetector();
i've tried bunch of random combinations work. how can initialize featuredetector?
i think have installation problem, try resinstalling here: sourceforge.net/projects/opencvlibrary/files/opencv-win/2.2
anther other option precompiler has __opencv_old_cv_h__
defined. try undefining before #include "cv.h"
when type #include "cv.h"
automatically should include featurs2d. in fact cv.h includes following:
#include "opencv2/core/core_c.h" #include "opencv2/core/core.hpp" #include "opencv2/imgproc/imgproc_c.h" #include "opencv2/imgproc/imgproc.hpp" #include "opencv2/video/tracking.hpp" #include "opencv2/features2d/features2d.hpp" #include "opencv2/flann/flann.hpp" #include "opencv2/calib3d/calib3d.hpp" #include "opencv2/objdetect/objdetect.hpp" #include "opencv2/legacy/compat.hpp"
Comments
Post a Comment