From 6ccd7aca4c85f9ab896a5437cb75afd000abd440 Mon Sep 17 00:00:00 2001 From: "marina.kolpakova" Date: Thu, 22 Nov 2012 13:25:46 +0400 Subject: [PATCH] fix tests for arm --- modules/objdetect/src/softcascade.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/objdetect/src/softcascade.cpp b/modules/objdetect/src/softcascade.cpp index 8f37c1be18..0ee7c0fd48 100644 --- a/modules/objdetect/src/softcascade.cpp +++ b/modules/objdetect/src/softcascade.cpp @@ -90,8 +90,13 @@ struct Feature Feature(const cv::FileNode& fn) : channel((int)fn[SC_F_CHANNEL]) { cv::FileNode rn = fn[SC_F_RECT]; - cv::FileNodeIterator r_it = rn.end(); - rect = cv::Rect(*(--r_it), *(--r_it), *(--r_it), *(--r_it)); + cv::FileNodeIterator r_it = rn.begin(); + + int x = *r_it++; + int y = *r_it++; + int w = *r_it++; + int h = *r_it++; + rect = cv::Rect(x, y, w, h); // 1 / area rarea = 1.f / ((rect.width - rect.x) * (rect.height - rect.y));