Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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

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?