Merge pull #173 request from cuda-geek/fix-sc-arm

This commit is contained in:
marina.kolpakova 2012-11-23 14:21:51 +04:00
commit 5c2d59066f

View File

@ -90,8 +90,13 @@ struct Feature
Feature(const cv::FileNode& fn) : channel((int)fn[SC_F_CHANNEL]) Feature(const cv::FileNode& fn) : channel((int)fn[SC_F_CHANNEL])
{ {
cv::FileNode rn = fn[SC_F_RECT]; cv::FileNode rn = fn[SC_F_RECT];
cv::FileNodeIterator r_it = rn.end(); cv::FileNodeIterator r_it = rn.begin();
rect = cv::Rect(*(--r_it), *(--r_it), *(--r_it), *(--r_it));
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 // 1 / area
rarea = 1.f / ((rect.width - rect.x) * (rect.height - rect.y)); rarea = 1.f / ((rect.width - rect.x) * (rect.height - rect.y));