Skip to content

Commit 0ba26b3

Browse files
committed
Set initial inlier metric value to -FLT_MAX to ensure correctness of first iteration.
1 parent 433d6c1 commit 0ba26b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/ximgproc/src/sparse_match_interpolators.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,7 @@ void EdgeAwareInterpolatorImpl::ransacInterpolation(vector<SparseMatch>& matches
835835
float* weighted_inlier_nums = new float[match_num];
836836
float* eps = new float[match_num];
837837
for(int i=0;i<match_num;i++)
838-
weighted_inlier_nums[i] = -1E+10F;
838+
weighted_inlier_nums[i] = -std::numeric_limits<float>::max();
839839

840840
for(int i=0;i<ransac_num_stripes;i++)
841841
rngs[i] = RNG(0);

0 commit comments

Comments
 (0)