Commit 2231018c authored by Alexander Alekhin's avatar Alexander Alekhin

Merge remote-tracking branch 'upstream/3.4' into merge-3.4

parents 84860f21 25a01dc4
...@@ -504,7 +504,7 @@ void BinaryDescriptor::detectImpl( const Mat& imageSrc, std::vector<KeyLine>& ke ...@@ -504,7 +504,7 @@ void BinaryDescriptor::detectImpl( const Mat& imageSrc, std::vector<KeyLine>& ke
/* delete undesired KeyLines, according to input mask */ /* delete undesired KeyLines, according to input mask */
if( !mask.empty() ) if( !mask.empty() )
{ {
for ( size_t keyCounter = 0; keyCounter < keylines.size(); keyCounter++ ) for ( size_t keyCounter = 0; keyCounter < keylines.size(); )
{ {
KeyLine& kl = keylines[keyCounter]; KeyLine& kl = keylines[keyCounter];
...@@ -517,6 +517,8 @@ void BinaryDescriptor::detectImpl( const Mat& imageSrc, std::vector<KeyLine>& ke ...@@ -517,6 +517,8 @@ void BinaryDescriptor::detectImpl( const Mat& imageSrc, std::vector<KeyLine>& ke
if( mask.at < uchar > ( (int) kl.startPointY, (int) kl.startPointX ) == 0 && mask.at < uchar > ( (int) kl.endPointY, (int) kl.endPointX ) == 0 ) if( mask.at < uchar > ( (int) kl.startPointY, (int) kl.startPointX ) == 0 && mask.at < uchar > ( (int) kl.endPointY, (int) kl.endPointX ) == 0 )
keylines.erase( keylines.begin() + keyCounter ); keylines.erase( keylines.begin() + keyCounter );
else
keyCounter++;
} }
} }
...@@ -1342,17 +1344,6 @@ int BinaryDescriptor::computeLBD( ScaleLines &keyLines, bool useDetectionData ) ...@@ -1342,17 +1344,6 @@ int BinaryDescriptor::computeLBD( ScaleLines &keyLines, bool useDetectionData )
}/* end for(short lineIDInSameLine = 0; lineIDInSameLine<sameLineSize; }/* end for(short lineIDInSameLine = 0; lineIDInSameLine<sameLineSize;
lineIDInSameLine++) */ lineIDInSameLine++) */
cv::Mat appoggio = cv::Mat( 1, 32, CV_32FC1 );
float* pointerToRow = appoggio.ptr<float>( 0 );
for ( int g = 0; g < 32; g++ )
{
/* get LBD data */
float* des_Vec = &keyLines[lineIDInScaleVec][0].descriptor.front();
*pointerToRow = des_Vec[g];
pointerToRow++;
}
}/* end for(short lineIDInScaleVec = 0; }/* end for(short lineIDInScaleVec = 0;
lineIDInScaleVec<numOfFinalLine; lineIDInScaleVec++) */ lineIDInScaleVec<numOfFinalLine; lineIDInScaleVec++) */
......
...@@ -835,7 +835,7 @@ void EdgeAwareInterpolatorImpl::ransacInterpolation(vector<SparseMatch>& matches ...@@ -835,7 +835,7 @@ void EdgeAwareInterpolatorImpl::ransacInterpolation(vector<SparseMatch>& matches
float* weighted_inlier_nums = new float[match_num]; float* weighted_inlier_nums = new float[match_num];
float* eps = new float[match_num]; float* eps = new float[match_num];
for(int i=0;i<match_num;i++) for(int i=0;i<match_num;i++)
weighted_inlier_nums[i] = -1E+10F; weighted_inlier_nums[i] = -std::numeric_limits<float>::max();
for(int i=0;i<ransac_num_stripes;i++) for(int i=0;i<ransac_num_stripes;i++)
rngs[i] = RNG(0); rngs[i] = RNG(0);
......
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