-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
_filterTooCloseCandidates was occasionally not choosing the biggest contour of a candidate group. Firstly, if the biggest contour of a candidate group happened to be the first candidate of that group, it would never be chosen due to the comparison loop skipping it. Secondly, contour sizes were being compared by their circumference (via counting the number of points in a contour) rather than area. In some cases it is possible for a smaller candidate to have more points than a bigger one. This was fixed by comparing the contour area as defined by the contour's corners.
- Loading branch information
1 parent
7f6004e
commit 068b6c7
Showing
1 changed file
with
22 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters