Commit 918645d1 authored by Bleach's avatar Bleach Committed by Maksim Shabunin

fix vs2010 build error

parent 503a1dcb
......@@ -1066,7 +1066,7 @@ void DISOpticalFlowImpl::calc(InputArray I0, InputArray I1, InputOutputArray flo
Mat uxy[] = {Ux[finest_scale], Uy[finest_scale]};
merge(uxy, 2, U);
resize(U, flowMat, flowMat.size());
flowMat *= pow(2, finest_scale);
flowMat *= 1 << finest_scale;
}
void DISOpticalFlowImpl::collectGarbage()
......
......@@ -226,7 +226,7 @@ void reduceToFlow( const Mat &w1, const Mat &w2, Mat &flow, const Size &basisSiz
Mat flowX( size, CV_32F, 0.0f );
Mat flowY( size, CV_32F, 0.0f );
const float mult = sqrt( size.area() ) * 0.5;
const float mult = sqrt( static_cast<float>(size.area()) ) * 0.5;
for ( int i = 0; i < basisSize.width; ++i )
for ( int j = 0; j < basisSize.height; ++j )
......@@ -296,7 +296,7 @@ void OpticalFlowPCAFlow::removeOcclusions( UMat &from, UMat &to, std::vector<Poi
calcOpticalFlowPyrLK( to, from, predictedFeatures, backwardFeatures, predictedStatus, predictedError );
size_t j = 0;
const float threshold = occlusionsThreshold * sqrt( from.size().area() );
const float threshold = occlusionsThreshold * sqrt( static_cast<float>(from.size().area()) );
for ( size_t i = 0; i < predictedFeatures.size(); ++i )
{
if ( predictedStatus[i] )
......
......@@ -547,7 +547,7 @@ Vec2f LearningBasedWBImpl::predictIlluminant(vector<Vec2f> features)
int local_model_size = num_features * feature_model_size;
int feature_model_size_leaf = 2 * num_tree_nodes;
int local_model_size_leaf = num_features * feature_model_size_leaf;
tree_depth = (int)round(log(num_tree_nodes) / log(2));
tree_depth = cvRound( (log(static_cast<float>(num_tree_nodes)) / log(2.0f)) );
vector<float> consensus_r, consensus_g;
vector<float> all_r, all_g;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment