Last active
November 2, 2022 01:46
-
-
Save VasanthKumarB/588944f47e6a1664b43e to your computer and use it in GitHub Desktop.
MSER opencv C++ example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <opencv2/imgproc/imgproc.hpp> | |
#include <opencv2/highgui/highgui.hpp> | |
#include "opencv2/features2d/features2d.hpp" | |
#include <iostream> | |
using namespace cv; | |
using namespace std; | |
int main(int argc, char *argv[]) | |
{ | |
Mat img = imread(argv[1], 1); | |
Ptr<MSER> ms = MSER::create(); | |
vector<vector<Point> > regions; | |
vector<cv::Rect> 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; | |
} |
how can i extract MSER features to use it in any matching technique
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thank you !