Use cvRound to suppress Windows warnings

pull/255/head
Seon-Wook Park 10 years ago
parent 964cb360de
commit 58cecb8cf4
  1. 2
      modules/xphoto/src/grayworld_white_balance.cpp
  2. 2
      modules/xphoto/test/test_grayworld.cpp

@ -67,7 +67,7 @@ namespace cv { namespace xphoto {
// Calculate sum of pixel values of each channel
const uchar* src_data = src.ptr<uchar>(0);
unsigned long sum1 = 0, sum2 = 0, sum3 = 0;
unsigned int thresh255 = round(thresh * 255);
unsigned int thresh255 = cvRound(thresh * 255);
int i = 0;
#if CV_SIMD128
v_uint8x16 v_inB, v_inG, v_inR;

@ -20,7 +20,7 @@ namespace cvtest {
const uchar* src_data = src.ptr<uchar>(0);
unsigned long sum1 = 0, sum2 = 0, sum3 = 0;
int i = 0;
unsigned int minRGB, maxRGB, thresh255 = round(thresh * 255);
unsigned int minRGB, maxRGB, thresh255 = cvRound(thresh * 255);
for ( ; i < N3; i += 3 )
{
minRGB = std::min(src_data[i], std::min(src_data[i + 1], src_data[i + 2]));

Loading…
Cancel
Save