Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

difference between detect()/compute() and detectAndCompute()

Hi everyone,

In the last couple of months, I am experimenting with the features extraction algorithms. I notice that there are two ways in computing the features and I was wondering what is the difference between:

std::vector<cv::KeyPoint> keypoint;
cv::Mat descriptors;

detector_->detect(frame_, keypoint);
descriptor_->compute(frame_, keypoint, descriptors);

and:

std::vector<cv::KeyPoint> keypoint;
cv::Mat descriptors;

detector_->detectAndCompute(features_frame_, cv::noArray(),keypoint,descriptors)

when using the Feature2D class (http://docs.opencv.org/3.1.0/d0/d13/classcv_1_1Feature2D.html#gsc.tab=0). Is there a reason to use the second call, instead of the first?

With kind regards

Vasilis