Home OpenCV CPP code example for describing and matching MSER regions
 I want to use MSER features for matching two images. Opencv documentations have code examples for SIFT feature based matching here. Is there a similar example using MSER class ? I understand that MSER detect regions instead of points like in SIFT. I have the below code that detects the MSER regions for one image. But, once I detect such regions for two images, how to I match them? I do not know how to describe the regions and how to do a match between two images. Please help me out to add code to perform these operations. #include #include #include "opencv2/features2d/features2d.hpp" #include using namespace cv; using namespace std; int main(int argc, char *argv[]) { Mat img = imread(argv[1], 1); Ptr ms = MSER::create(); vector > regions; vector mser_bbox; ms->detectRegions(img, regions, mser_bbox); for (int i = 0; i < regions.size(); i++) { rectangle(img, mser_bbox[i], CV_RGB(0, 255, 0)); } imshow("mser", img); waitKey(0); return 0; }