Correction of some warnings

pull/38/head
biagio montesano 11 years ago
parent 8ee8a2d776
commit df38bca305
  1. 2
      modules/line_descriptor/include/opencv2/line_descriptor/descriptor.hpp
  2. 11
      modules/line_descriptor/src/binary_descriptor.cpp

@ -75,7 +75,7 @@ struct CV_EXPORTS KeyLine
/* coordinates of the middlepoint */
CV_PROP_RW
Point pt;
Point2f pt;
/* the response, by which the strongest keylines have been selected.
It's represented by the ratio between line's length and maximum between

@ -39,19 +39,14 @@
//
//M*/
#include "precomp.hpp"
#define NUM_OF_BANDS 9
//using namespace cv;
namespace cv
{
/* combinations of internal indeces for binary descriptor extractor */
static const int combinations[32][2] =
{
@ -265,7 +260,7 @@ int BinaryDescriptor::descriptorSize() const
static inline int get2Pow( int i )
{
if( i >= 0 && i <= 7 )
return pow( 2, i );
return pow( 2, (double) i );
else
{
@ -372,7 +367,7 @@ void BinaryDescriptor::detectImpl( const Mat& imageSrc, std::vector<KeyLine>& ke
kl.octave = osl.octaveCount;
kl.size = ( osl.endPointX - osl.startPointX ) * ( osl.endPointY - osl.startPointY );
kl.response = osl.lineLength / max( images_sizes[osl.octaveCount].width, images_sizes[osl.octaveCount].height );
kl.pt = Point( ( osl.endPointX + osl.startPointX ) / 2, ( osl.endPointY + osl.startPointY ) / 2 );
kl.pt = Point2f( ( osl.endPointX + osl.startPointX ) / 2, ( osl.endPointY + osl.startPointY ) / 2 );
/* store KeyLine */
keylines.push_back( kl );
@ -386,7 +381,7 @@ void BinaryDescriptor::detectImpl( const Mat& imageSrc, std::vector<KeyLine>& ke
for ( size_t keyCounter = 0; keyCounter < keylines.size(); keyCounter++ )
{
KeyLine kl = keylines[keyCounter];
if( mask.at<uchar>( kl.startPointY, kl.startPointX ) == 0 && mask.at<uchar>( kl.endPointY, 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 );
}
}

Loading…
Cancel
Save