Commit bd447c0f authored by oqtvs's avatar oqtvs

Fixed issue 975 - fixed visual studio 2010 build errors on module xfeatures2d

parent 0b3b096f
......@@ -232,7 +232,7 @@ static void computeGradientMaps( const Mat& im,
break;
case ASSIGN_HARD_MAGN:
gradMap[index].at<uchar>(i,j) = (uchar) round( gradMagnitude );
gradMap[index].at<uchar>(i,j) = (uchar) cvRound( gradMagnitude );
break;
case ASSIGN_BILINEAR:
......@@ -240,8 +240,8 @@ static void computeGradientMaps( const Mat& im,
index2 = ( index2 == orientQuant ) ? 0 : index2;
binCenter = ( index + 0.5f ) * binSize;
weight = 1 - abs( theta - binCenter ) / binSize;
gradMap[index ].at<uchar>(i,j) = (uchar) round( 255 * weight );
gradMap[index2].at<uchar>(i,j) = (uchar) round( 255 * ( 1 - weight ) );
gradMap[index ].at<uchar>(i,j) = (uchar) cvRound( 255 * weight );
gradMap[index2].at<uchar>(i,j) = (uchar) cvRound( 255 * ( 1 - weight ) );
break;
case ASSIGN_SOFT:
......@@ -251,7 +251,7 @@ static void computeGradientMaps( const Mat& im,
binCenter = ( index2 + 0.5f ) * binSize;
weight = cos( theta - binCenter );
weight = ( weight < 0 ) ? 0 : weight;
gradMap[index2].at<uchar>(i,j) = (uchar) round( 255 * weight );
gradMap[index2].at<uchar>(i,j) = (uchar) cvRound( 255 * weight );
}
break;
......@@ -262,7 +262,7 @@ static void computeGradientMaps( const Mat& im,
binCenter = ( index2 + 0.5f ) * binSize;
weight = cos( theta - binCenter );
weight = ( weight < 0 ) ? 0 : weight;
gradMap[index2].at<uchar>(i,j) = (uchar) round( gradMagnitude * weight );
gradMap[index2].at<uchar>(i,j) = (uchar) cvRound( gradMagnitude * weight );
}
break;
} // end switch
......
......@@ -104,7 +104,7 @@ void Pyramid::build(const Mat& img, bool DOG)
Size imgSize = img.size();
int minSize = MIN(imgSize.width, imgSize.height);
int octavesN = MIN(params.octavesN, int(floor(log((double) minSize)/log(2))));
int octavesN = MIN(params.octavesN, int(floor(log((double) minSize)/log((float)2))));
float sigma0 = params.sigma0;
float sigma = sigma0;
int layersN = params.layersN + 3;
......
......@@ -397,7 +397,7 @@ namespace cv
break;
case REGULAR:
{
int gridSize = (int)ceil(sqrt(count));
int gridSize = (int)ceil(sqrt((float)count));
const float step = 1.0f / gridSize;
const float halfStep = step / 2;
float x = halfStep;
......
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