From: lluis Date: Sat, 20 Jul 2013 09:13:38 +0000 (+0200) Subject: fixed some warnings on build 4285 X-Git-Tag: submit/tizen_ivi/20141117.190038~2^2~991^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6adba094638e1b548f32a5b8cc90c3c1f7e0114a;p=profile%2Fivi%2Fopencv.git fixed some warnings on build 4285 --- diff --git a/modules/objdetect/src/erfilter.cpp b/modules/objdetect/src/erfilter.cpp index 002aa52..b9581b7 100644 --- a/modules/objdetect/src/erfilter.cpp +++ b/modules/objdetect/src/erfilter.cpp @@ -259,7 +259,6 @@ void ERFilterNM::er_tree_extract( cv::InputArray image ) quads[2][0] = (1<<2)|(1<<1); quads[2][1] = (1<<3)|(1); quads[2][3] = 255; - quads[2][4] = 255; // masks to know if a pixel is accessible and if it has been already added to some region @@ -267,8 +266,8 @@ void ERFilterNM::er_tree_extract( cv::InputArray image ) vector accumulated_pixel_mask(width * height); // heap of boundary pixels - vector boundary_pixes[(255/thresholdDelta)+1]; - vector boundary_edges[(255/thresholdDelta)+1]; + vector boundary_pixes[256]; + vector boundary_edges[256]; // add a dummy-component before start er_stack.push_back(new ERStat); @@ -453,23 +452,23 @@ void ERFilterNM::er_tree_extract( cv::InputArray image ) { for (int q=0; q<4; q++) { - if ( (quad_before[0] == quads[p][q]) ) - if ((p<2)||(q<2)) C_before[p]++; - if ( (quad_before[1] == quads[p][q]) ) - if ((p<2)||(q<2)) C_before[p]++; - if ( (quad_before[2] == quads[p][q]) ) - if ((p<2)||(q<2)) C_before[p]++; - if ( (quad_before[3] == quads[p][q]) ) - if ((p<2)||(q<2)) C_before[p]++; - - if ( (quad_after[0] == quads[p][q]) ) - if ((p<2)||(q<2)) C_after[p]++; - if ( (quad_after[1] == quads[p][q]) ) - if ((p<2)||(q<2)) C_after[p]++; - if ( (quad_after[2] == quads[p][q]) ) - if ((p<2)||(q<2)) C_after[p]++; - if ( (quad_after[3] == quads[p][q]) ) - if ((p<2)||(q<2)) C_after[p]++; + if ( (quad_before[0] == quads[p][q]) && ((p<2)||(q<2)) ) + C_before[p]++; + if ( (quad_before[1] == quads[p][q]) && ((p<2)||(q<2)) ) + C_before[p]++; + if ( (quad_before[2] == quads[p][q]) && ((p<2)||(q<2)) ) + C_before[p]++; + if ( (quad_before[3] == quads[p][q]) && ((p<2)||(q<2)) ) + C_before[p]++; + + if ( (quad_after[0] == quads[p][q]) && ((p<2)||(q<2)) ) + C_after[p]++; + if ( (quad_after[1] == quads[p][q]) && ((p<2)||(q<2)) ) + C_after[p]++; + if ( (quad_after[2] == quads[p][q]) && ((p<2)||(q<2)) ) + C_after[p]++; + if ( (quad_after[3] == quads[p][q]) && ((p<2)||(q<2)) ) + C_after[p]++; } }