let matchingScoreThreshold1 = 0.6
// All ellipses with a score below this are removed.
-let matchingScoreThreshold2 = 2.
+let matchingScoreThreshold2 = 600.
type private EllipseScoreFlaggedKd (matchingScore: float, e: Ellipse) =
let mutable matchingScore = matchingScore
let matchingScore = 2.0 * commonArea / (areaE + areaOther)
if matchingScore >= matchingScoreThreshold1
then
- other.AddMatchingScore(matchingScore)
- e.AddMatchingScore(matchingScore)
+ other.AddMatchingScore(matchingScore * e.Ellipse.Perimeter)
+ e.AddMatchingScore(matchingScore * other.Ellipse.Perimeter)
| _ -> ()
// 3) Sort ellipses by their score.