1
0
mirror of https://github.com/opencv/opencv_contrib.git synced 2025-10-19 19:44:14 +08:00

removes hardcoded filename for ERFilter used in feedback loop by adding a dummy classifier

This commit is contained in:
lluis
2014-07-30 20:34:38 +02:00
parent 157e08f3f2
commit bbca7b0c7f
2 changed files with 22 additions and 4 deletions

View File

@@ -32,6 +32,7 @@ int main(int argc, const char * argv[])
if (argc < 2) show_help_and_exit(argv[0]);
namedWindow("grouping",WINDOW_NORMAL);
Mat src = imread(argv[1]);
// Extract channels to be processed individually
@@ -59,16 +60,13 @@ int main(int argc, const char * argv[])
// Detect character groups
cout << "Grouping extracted ERs ... ";
cout << "image size "<< src.cols << "x" << src.rows << endl;
vector< vector<Vec2i> > region_groups;
vector<Rect> groups_boxes;
erGrouping(src, channels, regions, region_groups, groups_boxes, ERGROUPING_ORIENTATION_HORIZ);
//erGrouping(src, channels, regions, region_groups, groups_boxes, ERGROUPING_ORIENTATION_ANY, "./trained_classifier_erGrouping.xml", 0.5);
// draw groups
cout << "image size "<< src.cols << "x" << src.rows << endl;
groups_draw(src, groups_boxes);
cout << "image size "<< src.cols << "x" << src.rows << endl;
imshow("grouping",src);
cout << "Done!" << endl << endl;