From 361dff4ee43c99a51ccdc915fbdcb29e01bc25cf Mon Sep 17 00:00:00 2001 From: Dikay900 Date: Fri, 28 Nov 2014 19:49:58 +0100 Subject: [PATCH] fix already defined macro variable --- modules/line_descriptor/src/binary_descriptor.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/line_descriptor/src/binary_descriptor.cpp b/modules/line_descriptor/src/binary_descriptor.cpp index 2d2929f9c..f5739b661 100644 --- a/modules/line_descriptor/src/binary_descriptor.cpp +++ b/modules/line_descriptor/src/binary_descriptor.cpp @@ -756,7 +756,7 @@ int BinaryDescriptor::OctaveKeyLines( cv::Mat& image, ScaleLines &keyLines ) /* some variables' declarations */ float rho1, rho2, tempValue; - float direction, near, length; + float direction, diffNear, length; unsigned int octaveID, lineIDInOctave; /*more than one octave image, organize lines in scale space. @@ -784,8 +784,8 @@ int BinaryDescriptor::OctaveKeyLines( cv::Mat& image, ScaleLines &keyLines ) /*nearThreshold depends on the distance of the image coordinate origin to current line. *so nearThreshold = rho1 * nearThresholdRatio, where nearThresholdRatio = 1-cos(10*pi/180) = 0.0152*/ tempValue = (float) ( rho1 * 0.0152 ); - float nearThreshold = ( tempValue > 6 ) ? ( tempValue ) : 6; - nearThreshold = ( nearThreshold < 12 ) ? nearThreshold : 12; + float diffNearThreshold = ( tempValue > 6 ) ? ( tempValue ) : 6; + diffNearThreshold = ( diffNearThreshold < 12 ) ? diffNearThreshold : 12; /* compute scaled lenght of current line */ dx = fabs( edLineVec_[octaveCount]->lineEndpoints_[lineCurId][0] - edLineVec_[octaveCount]->lineEndpoints_[lineCurId][2] ); //x1-x2 @@ -831,10 +831,10 @@ int BinaryDescriptor::OctaveKeyLines( cv::Mat& image, ScaleLines &keyLines ) /* get known term from equation to be compared */ rho2 = (float) ( scale[octaveID] * fabs( edLineVec_[octaveID]->lineEquations_[lineIDInOctave][2] ) ); /* compute difference between known ters */ - near = fabs( rho1 - rho2 ); + diffNear = fabs( rho1 - rho2 ); /* two lines are not close in the image */ - if( near > nearThreshold ) + if( diffNear > diffNearThreshold ) { continue; }