Skip to content

Proposal by for how to solve all our RANSAC problems#84

Open
StephanPreibisch wants to merge 1 commit into
axtimwalde:masterfrom
StephanPreibisch:master
Open

Proposal by for how to solve all our RANSAC problems#84
StephanPreibisch wants to merge 1 commit into
axtimwalde:masterfrom
StephanPreibisch:master

Conversation

@StephanPreibisch

@StephanPreibisch StephanPreibisch commented Aug 20, 2025

Copy link
Copy Markdown
Contributor

@axtimwalde code is self-explanatory ;)

Co-authored-by: minnerbe <innerbergerm@hhmi.org>
@StephanPreibisch

Copy link
Copy Markdown
Contributor Author

Linking the previous discussion: #82

@axtimwalde axtimwalde left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does not address circles of more than two as discussed in #82 (or I am missing something).

{
++i;
continue A;
break; // the while loop

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the for loop now?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this now goes back to the for loop, should be equivalent to continue A: since there is no code after the while-loop anymore.

// make sure we do not only keep the last model, since the
// second last can be the better (defined as num inliers) one
// now we need to make sure it is enough inliers
if ( isGood && m.betterThan( copy ) && tempInliers.size() >= minNumInliers )

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This only works for circles between two models, do we have a guarantee that there aren't circles with three or four models?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should work for all cases, it just makes sure we always remember the best model (as long as |inliers| >= minNumInliers, which can grow in the while-loop. The break condition is still the old one <, which worked well.

@StephanPreibisch

StephanPreibisch commented Aug 20, 2025

Copy link
Copy Markdown
Contributor Author

lets find time to discuss this in person, we thought everything is addressed ... but we may miss something

@StephanPreibisch

StephanPreibisch commented Aug 20, 2025

Copy link
Copy Markdown
Contributor Author

The returned set is actually good, since the best RANSAC model can be retrieved - even though it cannot be re-computed from the points itself - we made this more clear in the docs (this was the original issue from 4 years ago)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants