fixed hundreds of warnings from MSVC 2010.
This commit is contained in:
@@ -191,7 +191,7 @@ void FAST(InputArray _img, std::vector<KeyPoint>& keypoints, int threshold, bool
|
||||
Mat img = _img.getMat();
|
||||
const int K = 8, N = 16 + K + 1;
|
||||
int i, j, k, pixel[N];
|
||||
makeOffsets(pixel, img.step);
|
||||
makeOffsets(pixel, (int)img.step);
|
||||
for(k = 16; k < N; k++)
|
||||
pixel[k] = pixel[k - 16];
|
||||
|
||||
@@ -200,7 +200,7 @@ void FAST(InputArray _img, std::vector<KeyPoint>& keypoints, int threshold, bool
|
||||
threshold = std::min(std::max(threshold, 0), 255);
|
||||
|
||||
#if CV_SSE2
|
||||
__m128i delta = _mm_set1_epi8(128), t = _mm_set1_epi8(threshold), K16 = _mm_set1_epi8(K);
|
||||
__m128i delta = _mm_set1_epi8(-128), t = _mm_set1_epi8((char)threshold), K16 = _mm_set1_epi8((char)K);
|
||||
#endif
|
||||
uchar threshold_tab[512];
|
||||
for( i = -255; i <= 255; i++ )
|
||||
@@ -279,7 +279,7 @@ void FAST(InputArray _img, std::vector<KeyPoint>& keypoints, int threshold, bool
|
||||
{
|
||||
cornerpos[ncorners++] = j+k;
|
||||
if(nonmax_suppression)
|
||||
curr[j+k] = cornerScore(ptr+k, pixel, threshold);
|
||||
curr[j+k] = (uchar)cornerScore(ptr+k, pixel, threshold);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -317,7 +317,7 @@ void FAST(InputArray _img, std::vector<KeyPoint>& keypoints, int threshold, bool
|
||||
{
|
||||
cornerpos[ncorners++] = j;
|
||||
if(nonmax_suppression)
|
||||
curr[j] = cornerScore(ptr, pixel, threshold);
|
||||
curr[j] = (uchar)cornerScore(ptr, pixel, threshold);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -339,7 +339,7 @@ void FAST(InputArray _img, std::vector<KeyPoint>& keypoints, int threshold, bool
|
||||
{
|
||||
cornerpos[ncorners++] = j;
|
||||
if(nonmax_suppression)
|
||||
curr[j] = cornerScore(ptr, pixel, threshold);
|
||||
curr[j] = (uchar)cornerScore(ptr, pixel, threshold);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@@ -536,7 +536,7 @@ void FlannBasedMatcher::read( const FileNode& fn)
|
||||
FileNode ip = fn["indexParams"];
|
||||
CV_Assert(ip.type() == FileNode::SEQ);
|
||||
|
||||
for(size_t i = 0; i < ip.size(); ++i)
|
||||
for(int i = 0; i < (int)ip.size(); ++i)
|
||||
{
|
||||
CV_Assert(ip[i].type() == FileNode::MAP);
|
||||
std::string name = (std::string)ip[i]["name"];
|
||||
@@ -561,7 +561,7 @@ void FlannBasedMatcher::read( const FileNode& fn)
|
||||
indexParams->setString(name, (std::string) ip[i]["value"]);
|
||||
break;
|
||||
case CV_MAKETYPE(CV_USRTYPE1,2):
|
||||
indexParams->setBool(name, (int) ip[i]["value"]);
|
||||
indexParams->setBool(name, (int) ip[i]["value"] != 0);
|
||||
break;
|
||||
case CV_MAKETYPE(CV_USRTYPE1,3):
|
||||
indexParams->setAlgorithm((int) ip[i]["value"]);
|
||||
@@ -575,7 +575,7 @@ void FlannBasedMatcher::read( const FileNode& fn)
|
||||
FileNode sp = fn["searchParams"];
|
||||
CV_Assert(sp.type() == FileNode::SEQ);
|
||||
|
||||
for(size_t i = 0; i < sp.size(); ++i)
|
||||
for(int i = 0; i < (int)sp.size(); ++i)
|
||||
{
|
||||
CV_Assert(sp[i].type() == FileNode::MAP);
|
||||
std::string name = (std::string)sp[i]["name"];
|
||||
@@ -600,7 +600,7 @@ void FlannBasedMatcher::read( const FileNode& fn)
|
||||
searchParams->setString(name, (std::string) ip[i]["value"]);
|
||||
break;
|
||||
case CV_MAKETYPE(CV_USRTYPE1,2):
|
||||
searchParams->setBool(name, (int) ip[i]["value"]);
|
||||
searchParams->setBool(name, (int) ip[i]["value"] != 0);
|
||||
break;
|
||||
case CV_MAKETYPE(CV_USRTYPE1,3):
|
||||
searchParams->setAlgorithm((int) ip[i]["value"]);
|
||||
|
@@ -191,8 +191,8 @@ inline void _bitreset(unsigned long * a, unsigned long b)
|
||||
|
||||
struct MSERParams
|
||||
{
|
||||
MSERParams( int _delta, int _minArea, int _maxArea, float _maxVariation,
|
||||
float _minDiversity, int _maxEvolution, double _areaThreshold,
|
||||
MSERParams( int _delta, int _minArea, int _maxArea, double _maxVariation,
|
||||
double _minDiversity, int _maxEvolution, double _areaThreshold,
|
||||
double _minMargin, int _edgeBlurSize )
|
||||
: delta(_delta), minArea(_minArea), maxArea(_maxArea), maxVariation(_maxVariation),
|
||||
minDiversity(_minDiversity), maxEvolution(_maxEvolution), areaThreshold(_areaThreshold),
|
||||
@@ -201,8 +201,8 @@ struct MSERParams
|
||||
int delta;
|
||||
int minArea;
|
||||
int maxArea;
|
||||
float maxVariation;
|
||||
float minDiversity;
|
||||
double maxVariation;
|
||||
double minDiversity;
|
||||
int maxEvolution;
|
||||
double areaThreshold;
|
||||
double minMargin;
|
||||
|
@@ -785,7 +785,7 @@ void ORB::operator()( InputArray _image, InputArray _mask, vector<KeyPoint>& _ke
|
||||
vector<Mat> imagePyramid(nlevels), maskPyramid(nlevels);
|
||||
for (int level = 0; level < nlevels; ++level)
|
||||
{
|
||||
float scale = 1/getScale(level, firstLevel, scale);
|
||||
float scale = 1/getScale(level, firstLevel, scaleFactor);
|
||||
Size sz(cvRound(image.cols*scale), cvRound(image.rows*scale));
|
||||
Size wholeSize(sz.width + border*2, sz.height + border*2);
|
||||
Mat temp(wholeSize, image.type()), masktemp;
|
||||
@@ -810,10 +810,11 @@ void ORB::operator()( InputArray _image, InputArray _mask, vector<KeyPoint>& _ke
|
||||
}
|
||||
else
|
||||
{
|
||||
float sf = scaleFactor;
|
||||
resize(imagePyramid[level-1], imagePyramid[level], sz, 1./sf, 1./sf, INTER_LINEAR);
|
||||
resize(imagePyramid[level-1], imagePyramid[level], sz,
|
||||
1./scaleFactor, 1./scaleFactor, INTER_LINEAR);
|
||||
if (!mask.empty())
|
||||
resize(maskPyramid[level-1], maskPyramid[level], sz, 1./sf, 1./sf, INTER_LINEAR);
|
||||
resize(maskPyramid[level-1], maskPyramid[level], sz,
|
||||
1./scaleFactor, 1./scaleFactor, INTER_LINEAR);
|
||||
copyMakeBorder(imagePyramid[level], temp, border, border, border, border,
|
||||
BORDER_REFLECT_101+BORDER_ISOLATED);
|
||||
}
|
||||
|
@@ -57,7 +57,7 @@ computeIntegralImages( const Mat& matI, Mat& matS, Mat& matT, Mat& _FT )
|
||||
|
||||
const uchar* I = matI.ptr<uchar>();
|
||||
int *S = matS.ptr<int>(), *T = matT.ptr<int>(), *FT = _FT.ptr<int>();
|
||||
int istep = matI.step, step = matS.step/sizeof(S[0]);
|
||||
int istep = (int)matI.step, step = (int)(matS.step/sizeof(S[0]));
|
||||
|
||||
for( x = 0; x <= cols; x++ )
|
||||
S[x] = T[x] = FT[x] = 0;
|
||||
|
Reference in New Issue
Block a user