Skip to content

Commit

Permalink
Merge pull request #16 from liurs1990/master
Browse files Browse the repository at this point in the history
fix the calcLBP bug when samples is bigger than 8, for example: 16
  • Loading branch information
nourani committed Dec 11, 2017
2 parents 4544eca + 84d437f commit ef08b28
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions LBP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -416,20 +416,20 @@ LBP & LBP::calcLBP( Mat d_img, double radius, bool borderCopy ) {

}
delete[] spoints;
result.convertTo( result, CV_8U );
// endTime = clock();
// times.push_back( (endTime - startTime) );
// cout << "lbp calc took " << times.back() << " cycles" << endl;

// startTime = clock();
// Apply mapping if it is defined
if( type != LBP_MAPPING_NONE ) {
MatIterator_<unsigned char> it = result.begin<unsigned char>(), it_end = result.end<
unsigned char>();
MatIterator_<double> it = result.begin<double>(), it_end = result.end<
double>();
for( ; it != it_end; ++it ) {
*it = table[(*it)];
}
}
result.convertTo( result, CV_8U );
// endTime = clock();
// times.push_back( (endTime - startTime) );
// cout << "mapping took " << times.back() << " cycles" << endl;
Expand Down

0 comments on commit ef08b28

Please sign in to comment.