mirror of
https://github.com/opencv/opencv_contrib.git
synced 2025-10-20 21:40:49 +08:00
corrected text detection once again to match the new MSER interface
This commit is contained in:
@@ -191,8 +191,9 @@ int main(int argc, char* argv[])
|
|||||||
{
|
{
|
||||||
//Extract MSER
|
//Extract MSER
|
||||||
vector<vector<Point> > contours;
|
vector<vector<Point> > contours;
|
||||||
|
vector<Rect> bboxes;
|
||||||
Ptr<MSER> mser = MSER::create(21,(int)(0.00002*grey.cols*grey.rows),(int)(0.05*grey.cols*grey.rows),1,0.7);
|
Ptr<MSER> mser = MSER::create(21,(int)(0.00002*grey.cols*grey.rows),(int)(0.05*grey.cols*grey.rows),1,0.7);
|
||||||
mser->detectAndStore(grey, contours);
|
mser->detectRegions(grey, contours, bboxes);
|
||||||
|
|
||||||
//Convert the output of MSER to suitable input for the grouping/recognition algorithms
|
//Convert the output of MSER to suitable input for the grouping/recognition algorithms
|
||||||
if (contours.size() > 0)
|
if (contours.size() > 0)
|
||||||
|
Reference in New Issue
Block a user