From 5da6a31b9e2ecf9953f21179778428d2285c845f Mon Sep 17 00:00:00 2001 From: Stephan Preibisch Date: Mon, 14 Jun 2021 15:31:01 -0400 Subject: [PATCH] the current version sometimes ends up with pointmatches having a higher error than epsilon if one re-fits the model using the inliers. It has to iterate until the number of inliers didn't change once --- mpicbg/src/main/java/mpicbg/models/AbstractModel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mpicbg/src/main/java/mpicbg/models/AbstractModel.java b/mpicbg/src/main/java/mpicbg/models/AbstractModel.java index 8b0ba066..af90efc2 100644 --- a/mpicbg/src/main/java/mpicbg/models/AbstractModel.java +++ b/mpicbg/src/main/java/mpicbg/models/AbstractModel.java @@ -323,7 +323,7 @@ final public < P extends PointMatch >boolean ransac( int numInliers = 0; boolean isGood = m.test( candidates, tempInliers, epsilon, minInlierRatio ); - while ( isGood && numInliers < tempInliers.size() ) + while ( isGood && numInliers != tempInliers.size() ) { numInliers = tempInliers.size(); try { m.fit( tempInliers ); }