mirror of
https://github.com/opencv/opencv_contrib.git
synced 2025-10-19 02:16:34 +08:00
fix vs2010 build error
This commit is contained in:
@@ -1066,7 +1066,7 @@ void DISOpticalFlowImpl::calc(InputArray I0, InputArray I1, InputOutputArray flo
|
|||||||
Mat uxy[] = {Ux[finest_scale], Uy[finest_scale]};
|
Mat uxy[] = {Ux[finest_scale], Uy[finest_scale]};
|
||||||
merge(uxy, 2, U);
|
merge(uxy, 2, U);
|
||||||
resize(U, flowMat, flowMat.size());
|
resize(U, flowMat, flowMat.size());
|
||||||
flowMat *= pow(2, finest_scale);
|
flowMat *= 1 << finest_scale;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DISOpticalFlowImpl::collectGarbage()
|
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 flowX( size, CV_32F, 0.0f );
|
||||||
Mat flowY( 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 i = 0; i < basisSize.width; ++i )
|
||||||
for ( int j = 0; j < basisSize.height; ++j )
|
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 );
|
calcOpticalFlowPyrLK( to, from, predictedFeatures, backwardFeatures, predictedStatus, predictedError );
|
||||||
|
|
||||||
size_t j = 0;
|
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 )
|
for ( size_t i = 0; i < predictedFeatures.size(); ++i )
|
||||||
{
|
{
|
||||||
if ( predictedStatus[i] )
|
if ( predictedStatus[i] )
|
||||||
|
@@ -547,7 +547,7 @@ Vec2f LearningBasedWBImpl::predictIlluminant(vector<Vec2f> features)
|
|||||||
int local_model_size = num_features * feature_model_size;
|
int local_model_size = num_features * feature_model_size;
|
||||||
int feature_model_size_leaf = 2 * num_tree_nodes;
|
int feature_model_size_leaf = 2 * num_tree_nodes;
|
||||||
int local_model_size_leaf = num_features * feature_model_size_leaf;
|
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> consensus_r, consensus_g;
|
||||||
vector<float> all_r, all_g;
|
vector<float> all_r, all_g;
|
||||||
|
Reference in New Issue
Block a user