Ask Your Question
1

MSER operator() is different from FeatureDetector::detect() function?

asked 2013-05-01 09:31:09 -0600

zhfkt gravatar image

Hi,

I am using cv::MSER to get the keypoints of images in opencv. Now I have found 2 ways to do this operation of extracting keypoints from the image.

The one is operator() function in MSER class.

void operator()( const Mat& image, vector<vector<Point> >& msers, const Mat&mask ) const;

The other is virtual function in FeatureDetector::detect()

void FeatureDetector::detect( const Mat& image, vector<KeyPoint>& keypoints,const Mat& mask=Mat() ) const;

What the strange thing is the second parameters in two function are totally different.One is vector<vector<point> > type in MSER class,and the other is vector<keypoint> in FeatureDetector::detect(). In fact, I also find this in source code:

/*! Maximal Stable Extremal Regions class.*/
/*The class implements MSERalgorithm introduced by J. Matas. */
/*Unlike SIFT, SURF and many other detectorsin OpenCV, this is salient region detector, */
/*not the salient point detector.It returns the regions, each of those is encoded as a contour.*/

It seems that MSERalgorithm returns the area other than the point of a image.And I think the type vector<vector<point> > can represent the area of the image,not the type vector<keypoint>,which just stands.for the vector array of a image.

So my question is: Is virtual function detect() in FeatureDetector Class compatible with operator() in MSER Class?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-05-02 05:15:24 -0600

Guanta gravatar image

Yes, operator() is actually be used in detect(). Note that detect() of the FeatureDetector class effectively calls detectImpl(). So, having a look at MserFeatureDetector::detectImpl() of mser.cpp, you will see how the contourpoints are translated to keypoints: basically an ellipse is fitted to the contour, the center is used as the point of the keypoint and its diameter gets its size. The keypoint orientation and response is obviously not encoded.

edit flag offensive delete link more

Comments

I don't understand how SIFT::detectImpl method works. Can anyone explain me, please?

Paco_87 gravatar imagePaco_87 ( 2016-12-13 04:39:34 -0600 )edit

Please read Lowe's SIFT paper for an explanation, another nice explanation is on vlfeat.org, but I guess there are plenty more out there.

Guanta gravatar imageGuanta ( 2016-12-27 17:00:21 -0600 )edit

Question Tools

Stats

Asked: 2013-05-01 09:31:09 -0600

Seen: 907 times

Last updated: May 02 '13