Commit 361dff4e authored by Dikay900's avatar Dikay900

fix already defined macro variable

parent 36fbabf2
...@@ -756,7 +756,7 @@ int BinaryDescriptor::OctaveKeyLines( cv::Mat& image, ScaleLines &keyLines ) ...@@ -756,7 +756,7 @@ int BinaryDescriptor::OctaveKeyLines( cv::Mat& image, ScaleLines &keyLines )
/* some variables' declarations */ /* some variables' declarations */
float rho1, rho2, tempValue; float rho1, rho2, tempValue;
float direction, near, length; float direction, diffNear, length;
unsigned int octaveID, lineIDInOctave; unsigned int octaveID, lineIDInOctave;
/*more than one octave image, organize lines in scale space. /*more than one octave image, organize lines in scale space.
...@@ -784,8 +784,8 @@ int BinaryDescriptor::OctaveKeyLines( cv::Mat& image, ScaleLines &keyLines ) ...@@ -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. /*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*/ *so nearThreshold = rho1 * nearThresholdRatio, where nearThresholdRatio = 1-cos(10*pi/180) = 0.0152*/
tempValue = (float) ( rho1 * 0.0152 ); tempValue = (float) ( rho1 * 0.0152 );
float nearThreshold = ( tempValue > 6 ) ? ( tempValue ) : 6; float diffNearThreshold = ( tempValue > 6 ) ? ( tempValue ) : 6;
nearThreshold = ( nearThreshold < 12 ) ? nearThreshold : 12; diffNearThreshold = ( diffNearThreshold < 12 ) ? diffNearThreshold : 12;
/* compute scaled lenght of current line */ /* compute scaled lenght of current line */
dx = fabs( edLineVec_[octaveCount]->lineEndpoints_[lineCurId][0] - edLineVec_[octaveCount]->lineEndpoints_[lineCurId][2] ); //x1-x2 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 ) ...@@ -831,10 +831,10 @@ int BinaryDescriptor::OctaveKeyLines( cv::Mat& image, ScaleLines &keyLines )
/* get known term from equation to be compared */ /* get known term from equation to be compared */
rho2 = (float) ( scale[octaveID] * fabs( edLineVec_[octaveID]->lineEquations_[lineIDInOctave][2] ) ); rho2 = (float) ( scale[octaveID] * fabs( edLineVec_[octaveID]->lineEquations_[lineIDInOctave][2] ) );
/* compute difference between known ters */ /* compute difference between known ters */
near = fabs( rho1 - rho2 ); diffNear = fabs( rho1 - rho2 );
/* two lines are not close in the image */ /* two lines are not close in the image */
if( near > nearThreshold ) if( diffNear > diffNearThreshold )
{ {
continue; continue;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment