mirror of
https://github.com/opencv/opencv_contrib.git
synced 2025-10-17 07:04:18 +08:00
Correction of some warnings
This commit is contained in:
@@ -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 );
|
||||
}
|
||||
}
|
||||
@@ -504,9 +499,9 @@ void BinaryDescriptor::computeImpl( const Mat& imageSrc, std::vector<KeyLine>& k
|
||||
descriptors = cv::Mat( keylines.size(), NUM_OF_BANDS * 8, CV_32FC1 );
|
||||
|
||||
/* fill output matrix with descriptors */
|
||||
for ( int k = 0; k < (int)sl.size(); k++ )
|
||||
for ( int k = 0; k < (int) sl.size(); k++ )
|
||||
{
|
||||
for ( int lineC = 0; lineC < (int)sl[k].size(); lineC++ )
|
||||
for ( int lineC = 0; lineC < (int) sl[k].size(); lineC++ )
|
||||
{
|
||||
/* get original index of keypoint */
|
||||
int lineOctave = ( sl[k][lineC] ).octaveCount;
|
||||
@@ -530,14 +525,14 @@ void BinaryDescriptor::computeImpl( const Mat& imageSrc, std::vector<KeyLine>& k
|
||||
|
||||
else
|
||||
{
|
||||
std::cout << "Descrittori float" <<std::endl;
|
||||
std::cout << "Descrittori float" << std::endl;
|
||||
/* get a pointer to correspondent row in output matrix */
|
||||
float* pointerToRow = descriptors.ptr<float>( originalIndex );
|
||||
|
||||
/* get LBD data */
|
||||
std::vector<float> desVec = sl[k][lineC].descriptor;
|
||||
|
||||
for ( int count = 0; count < (int)desVec.size(); count++ )
|
||||
for ( int count = 0; count < (int) desVec.size(); count++ )
|
||||
{
|
||||
*pointerToRow = desVec[count];
|
||||
pointerToRow++;
|
||||
|
Reference in New Issue
Block a user