Whats the difference between SiftFeatureDetector() and Ptr. They both apparently have the same function. The opencv tutorial uses SiftFeatureDetector but when clicking on the official documentation they use Ptr and have no mention of SiftFeatureDetector(), so I cant read up on it. as in the tutorial they used this: int minHessian = 400; SurfFeatureDetector detector( minHessian );
and I dont know what the minHessian is supposed to do.
Also I tried them both on the same image and they both have the same result, then why are they different?
int _tmain(int argc, _TCHAR* argv[])
{
//initModule_nonfree();
Mat img;
img = imread("c:\\box.png", 0);
//cvtColor( img, gry, CV_BGR2GRAY );
//SiftFeatureDetector detector;
//vector<KeyPoint> keypoints;
//detector.detect(img, keypoints);
Ptr<FeatureDetector> feature_detector = FeatureDetector::create("SIFT");
vector<KeyPoint> keypoints;
feature_detector->detect(img, keypoints);
Mat output;
drawKeypoints(img, keypoints, output, Scalar::all(-1));
namedWindow("meh", CV_WINDOW_AUTOSIZE);
imshow("meh", output);
waitKey(0);
return 0;
}
Thank you