fixed some warning under VS2008
This commit is contained in:
parent
10f954ae5d
commit
c09254cf67
@ -196,7 +196,7 @@ void convertBGRImageToOpponentColorSpace( const Mat& bgrImage, vector<Mat>& oppo
|
||||
MatConstIterator_<char> rIt = bgrChannels[2].begin<char>();
|
||||
MatConstIterator_<char> gIt = bgrChannels[1].begin<char>();
|
||||
MatIterator_<char> dstIt = opponentChannels[0].begin<char>();
|
||||
float factor = 1.f / sqrt(2.0);
|
||||
float factor = 1.f / sqrt(2.f);
|
||||
for( ; dstIt != opponentChannels[0].end<char>(); ++rIt, ++gIt, ++dstIt )
|
||||
{
|
||||
int value = static_cast<int>( static_cast<float>(static_cast<int>(*gIt)-static_cast<int>(*rIt)) * factor );
|
||||
@ -211,7 +211,7 @@ void convertBGRImageToOpponentColorSpace( const Mat& bgrImage, vector<Mat>& oppo
|
||||
MatConstIterator_<char> gIt = bgrChannels[1].begin<char>();
|
||||
MatConstIterator_<char> bIt = bgrChannels[0].begin<char>();
|
||||
MatIterator_<char> dstIt = opponentChannels[1].begin<char>();
|
||||
float factor = 1.f / sqrt(6.0);
|
||||
float factor = 1.f / sqrt(6.f);
|
||||
for( ; dstIt != opponentChannels[1].end<char>(); ++rIt, ++gIt, ++bIt, ++dstIt )
|
||||
{
|
||||
int value = static_cast<int>( static_cast<float>(static_cast<int>(*rIt) + static_cast<int>(*gIt) - 2*static_cast<int>(*bIt)) *
|
||||
@ -227,7 +227,7 @@ void convertBGRImageToOpponentColorSpace( const Mat& bgrImage, vector<Mat>& oppo
|
||||
MatConstIterator_<char> gIt = bgrChannels[1].begin<char>();
|
||||
MatConstIterator_<char> bIt = bgrChannels[0].begin<char>();
|
||||
MatIterator_<char> dstIt = opponentChannels[2].begin<char>();
|
||||
float factor = 1.f / sqrt(3.0);
|
||||
float factor = 1.f / sqrt(3.f);
|
||||
for( ; dstIt != opponentChannels[2].end<char>(); ++rIt, ++gIt, ++bIt, ++dstIt )
|
||||
{
|
||||
int value = static_cast<int>( static_cast<float>(static_cast<int>(*rIt) + static_cast<int>(*gIt) + static_cast<int>(*bIt)) *
|
||||
|
@ -229,7 +229,7 @@ struct IntersectAreaCounter
|
||||
{
|
||||
float rx1 = minx + i*dr;
|
||||
float rx2 = rx1 - diff.x;
|
||||
for( float ry1 = miny; ry1 <= maxy; ry1 += dr )
|
||||
for( float ry1 = (float)miny; ry1 <= (float)maxy; ry1 += dr )
|
||||
{
|
||||
float ry2 = ry1 - diff.y;
|
||||
//compute the distance from the ellipse center
|
||||
@ -276,6 +276,7 @@ struct SIdx
|
||||
UsedFinder(const SIdx& _used) : used(_used) {}
|
||||
const SIdx& used;
|
||||
bool operator()(const SIdx& v) const { return (v.i1 == used.i1 || v.i2 == used.i2); }
|
||||
UsedFinder& operator=(const UsedFinder&);
|
||||
};
|
||||
};
|
||||
|
||||
@ -312,14 +313,14 @@ static void computeOneToOneMatchedOverlaps( const vector<EllipticKeyPoint>& keyp
|
||||
{
|
||||
EllipticKeyPoint keypoint2a = EllipticKeyPoint( kp2.center, Scalar(fac*kp2.ellipse[0], fac*kp2.ellipse[1], fac*kp2.ellipse[2]) );
|
||||
//find the largest eigenvalue
|
||||
int maxx = ceil(( keypoint1a.boundingBox.width > (diff.x+keypoint2a.boundingBox.width)) ?
|
||||
int maxx = (int)ceil(( keypoint1a.boundingBox.width > (diff.x+keypoint2a.boundingBox.width)) ?
|
||||
keypoint1a.boundingBox.width : (diff.x+keypoint2a.boundingBox.width));
|
||||
int minx = floor((-keypoint1a.boundingBox.width < (diff.x-keypoint2a.boundingBox.width)) ?
|
||||
int minx = (int)floor((-keypoint1a.boundingBox.width < (diff.x-keypoint2a.boundingBox.width)) ?
|
||||
-keypoint1a.boundingBox.width : (diff.x-keypoint2a.boundingBox.width));
|
||||
|
||||
int maxy = ceil(( keypoint1a.boundingBox.height > (diff.y+keypoint2a.boundingBox.height)) ?
|
||||
int maxy = (int)ceil(( keypoint1a.boundingBox.height > (diff.y+keypoint2a.boundingBox.height)) ?
|
||||
keypoint1a.boundingBox.height : (diff.y+keypoint2a.boundingBox.height));
|
||||
int miny = floor((-keypoint1a.boundingBox.height < (diff.y-keypoint2a.boundingBox.height)) ?
|
||||
int miny = (int)floor((-keypoint1a.boundingBox.height < (diff.y-keypoint2a.boundingBox.height)) ?
|
||||
-keypoint1a.boundingBox.height : (diff.y-keypoint2a.boundingBox.height));
|
||||
int mina = (maxx-minx) < (maxy-miny) ? (maxx-minx) : (maxy-miny) ;
|
||||
|
||||
|
@ -86,7 +86,7 @@ if(NOT EXISTS ${CUDA_NPP_LIBRARIES} OR NOT EXISTS ${CUDA_NPP_INCLUDES}/npp.h)
|
||||
if(NPP_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "NPP headers/libraries are not found. Specify CUDA_NPP_LIBRARY_ROOT_DIR.")
|
||||
elseif(NOT CUDA_FIND_QUIETLY)
|
||||
message("NPP headers/libraries are not found or CUDA_NPP_LIBRARY_ROOT_DIR not specified.")
|
||||
message("NPP headers/libraries are not found. Please specify CUDA_NPP_LIBRARY_ROOT_DIR in CMake or set $NPP_ROOT_DIR.")
|
||||
endif()
|
||||
else()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user