diff --git a/modules/text/src/erfilter.cpp b/modules/text/src/erfilter.cpp index 78f9a3704..6de5352ad 100644 --- a/modules/text/src/erfilter.cpp +++ b/modules/text/src/erfilter.cpp @@ -3494,7 +3494,7 @@ bool isValidPair(Mat &grey, Mat &lab, Mat &mask, vector &channels, vector< Point center_i(i->rect.x+i->rect.width/2, i->rect.y+i->rect.height/2); Point center_j(j->rect.x+j->rect.width/2, j->rect.y+j->rect.height/2); - float centroid_angle = (float)atan2(center_j.y-center_i.y, center_j.x-center_i.x); + float centroid_angle = (float)atan2((float)(center_j.y-center_i.y), (float)(center_j.x-center_i.x)); int avg_width = (i->rect.width + j->rect.width) / 2; float norm_distance = (float)(j->rect.x-(i->rect.x+i->rect.width))/avg_width; diff --git a/modules/xphoto/src/dct_image_denoising.cpp b/modules/xphoto/src/dct_image_denoising.cpp index 757a7a4ee..6afa1ccb9 100644 --- a/modules/xphoto/src/dct_image_denoising.cpp +++ b/modules/xphoto/src/dct_image_denoising.cpp @@ -137,9 +137,9 @@ namespace xphoto { CV_Assert( src.type() == CV_MAKE_TYPE(CV_32F, 3) ); - cv::Matx33f mt(cvInvSqrt(3), cvInvSqrt(3), cvInvSqrt(3), - cvInvSqrt(2), 0.0f, -cvInvSqrt(2), - cvInvSqrt(6), -2.0f*cvInvSqrt(6), cvInvSqrt(6)); + cv::Matx33f mt(cvInvSqrt(3.0f), cvInvSqrt(3.0f), cvInvSqrt(3.0f), + cvInvSqrt(2.0f), 0.0f, -cvInvSqrt(2.0f), + cvInvSqrt(6.0f), -2.0f*cvInvSqrt(6.0f), cvInvSqrt(6.0f)); cv::transform(src, dst, mt); diff --git a/modules/xphoto/src/simple_color_balance.cpp b/modules/xphoto/src/simple_color_balance.cpp index 5298ce6e1..f755e71b1 100644 --- a/modules/xphoto/src/simple_color_balance.cpp +++ b/modules/xphoto/src/simple_color_balance.cpp @@ -75,7 +75,7 @@ namespace xphoto ++depth; int bins = 16; // number of bins at each histogram level - int nElements = int( pow(bins, depth) ); + int nElements = int( pow((float)bins, (float)depth) ); // number of elements in histogram tree for (size_t i = 0; i < src.size(); ++i)