this post uses OPENCV 2.2 and a simple change of the extract feature will allow use on version 2.3 class atsSURF { public: cv::Mat extractPoints(cv::Mat img) { int minHessian = 500; cv::SurfFeatureDetector detector(minHessian); std::vector<cv::KeyPoint> keypoints; detector.detect(img,keypoints,img); //opencv 2.2 //detector.detect(img,keypoints); //opencv 2.3 cv::SurfDescriptorExtractor extractor; cv::Mat descriptor; extractor.compute(img,keypoints,descriptor); thisDescriptor = descriptor; thisKeypoints = keypoints; cv::Mat outim = img; cv::drawKeypoints(img,keypoints,outim,Scalar::all(-1), cv::DrawMatchesFlags::DEFAULT); return outim; } private: cv::Mat thisDescriptor; std::vector<cv::KeyPoint> thisKeypoints; }; to run from the main function int main(int argc, char* argv[]) { char code = (char)-1; atsImages im(&