Skip to content
This repository was archived by the owner on Nov 19, 2020. It is now read-only.
This repository was archived by the owner on Nov 19, 2020. It is now read-only.

Ransac - possible bug in calculation of 'N' if pInlier = 0 #286

@thorpey33

Description

@thorpey33

Hi,

I'm relatively new to Ransac but I've stumbled across an odd bug;

In the case that the distances function returns 0 inliers on it's first attempt (i.e. before bestInliers is set) then N evaluates to '-Infinty' (not sure why -Infinity rather than +Infinity?) causing the while loop to end on its first attempt (as then count > -Infinity).

Propose for line 332 :
((bestInliers == null && inliers.Length > 0) || inliers.Length > maxInliers) (... or something more elegant!)

Cheers,

James

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions