From f4d01175b860e41b20bed7baa339c4b5a1f99163 Mon Sep 17 00:00:00 2001 From: lluis Date: Wed, 4 Sep 2013 20:22:05 +0200 Subject: [PATCH] fixed a bug in the calculation of the number of inflexion points feature --- modules/objdetect/src/erfilter.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/objdetect/src/erfilter.cpp b/modules/objdetect/src/erfilter.cpp index 00a85d9..d3384e2 100644 --- a/modules/objdetect/src/erfilter.cpp +++ b/modules/objdetect/src/erfilter.cpp @@ -805,7 +805,11 @@ ERStat* ERFilterNM::er_tree_filter ( InputArray image, ERStat * stat, ERStat *pa findContours( region, contours, hierarchy, RETR_TREE, CHAIN_APPROX_NONE, Point(0, 0) ); //TODO check epsilon parameter of approxPolyDP (set empirically) : we want more precission // if the region is very small because otherwise we'll loose all the convexities +<<<<<<< HEAD approxPolyDP( Mat(contours[0]), contour_poly, min(rect.width,rect.height)/17, true ); +======= + approxPolyDP( Mat(contours[0]), contour_poly, (float)min(rect.width,rect.height)/17, true ); +>>>>>>> fixed a bug in the calculation of the number of inflexion points feature bool was_convex = false; -- 2.7.4