Fix remaining windows build warnings

This commit is contained in:
Andrey Kamaev 2012-10-24 20:27:20 +04:00
parent 12747068b5
commit 673aa91bac
3 changed files with 10 additions and 4 deletions

View File

@ -119,7 +119,7 @@ PERF_TEST_P( TestWarpPerspectiveNear_t, WarpPerspectiveNear,
resize(src, src, size); resize(src, src, size);
int shift = src.cols*0.04; int shift = static_cast<int>(src.cols*0.04);
Mat srcVertices = (Mat_<Vec2f>(1, 4) << Vec2f(0, 0), Mat srcVertices = (Mat_<Vec2f>(1, 4) << Vec2f(0, 0),
Vec2f(static_cast<float>(size.width-1), 0), Vec2f(static_cast<float>(size.width-1), 0),
Vec2f(static_cast<float>(size.width-1), static_cast<float>(size.height-1)), Vec2f(static_cast<float>(size.width-1), static_cast<float>(size.height-1)),

View File

@ -728,8 +728,14 @@ double icvEvalHidHaarClassifierAVX( CvHidHaarClassifier* classifier,
sum = _mm256_add_ps(sum,_mm256_load_ps(tmp)); sum = _mm256_add_ps(sum,_mm256_load_ps(tmp));
__m256 left = _mm256_set_ps(nodes[7]->left, nodes[6]->left, nodes[5]->left, nodes[4]->left, nodes[3]->left, nodes[2]->left, nodes[1]->left, nodes[0]->left ); __m256 left = _mm256_set_ps(static_cast<float>(nodes[7]->left), static_cast<float>(nodes[6]->left),
__m256 right = _mm256_set_ps(nodes[7]->right,nodes[6]->right,nodes[5]->right,nodes[4]->right,nodes[3]->right,nodes[2]->right,nodes[1]->right,nodes[0]->right); static_cast<float>(nodes[5]->left), static_cast<float>(nodes[4]->left),
static_cast<float>(nodes[3]->left), static_cast<float>(nodes[2]->left),
static_cast<float>(nodes[1]->left), static_cast<float>(nodes[0]->left));
__m256 right = _mm256_set_ps(static_cast<float>(nodes[7]->right),static_cast<float>(nodes[6]->right),
static_cast<float>(nodes[5]->right),static_cast<float>(nodes[4]->right),
static_cast<float>(nodes[3]->right),static_cast<float>(nodes[2]->right),
static_cast<float>(nodes[1]->right),static_cast<float>(nodes[0]->right));
_mm256_store_si256((__m256i*)idxV, _mm256_cvttps_epi32(_mm256_blendv_ps(right, left, _mm256_cmp_ps(sum, t, _CMP_LT_OQ)))); _mm256_store_si256((__m256i*)idxV, _mm256_cvttps_epi32(_mm256_blendv_ps(right, left, _mm256_cmp_ps(sum, t, _CMP_LT_OQ))));

View File

@ -64,7 +64,7 @@ static void read_imgList(const string& filename, vector<Mat>& images) {
static Mat formatImagesForPCA(const vector<Mat> &data) static Mat formatImagesForPCA(const vector<Mat> &data)
{ {
Mat dst(data.size(), data[0].rows*data[0].cols, CV_32F); Mat dst(static_cast<int>(data.size()), data[0].rows*data[0].cols, CV_32F);
for(unsigned int i = 0; i < data.size(); i++) for(unsigned int i = 0; i < data.size(); i++)
{ {
Mat image_row = data[i].clone().reshape(1,1); Mat image_row = data[i].clone().reshape(1,1);