Change the parasite detection method.
[master-thesis.git] / Parasitemia / Parasitemia / MatchingEllipses.fs
index 99e3cb5..2196122 100644 (file)
@@ -13,19 +13,17 @@ open Utils
 let matchingScoreThreshold1 = 0.6
 
 // All ellipsee with a score below this is removed.
-let matchingScoreThreshold2 = 1. / 100.
+let matchingScoreThreshold2 = 2.
 
 type private EllipseScoreFlaggedKd (matchingScore: float, e: Ellipse) =
     let mutable matchingScore = matchingScore
-    let perimeter = e.Perimeter
 
     member this.Ellipse = e
 
     member this.MatchingScore = matchingScore
 
-    // The score is proportional to the perimeter because large ellipse will receive more votes.
     member this.AddMatchingScore(score: float) =
-        matchingScore <- matchingScore + score / perimeter
+        matchingScore <- matchingScore + score
 
     member val Processed = false with get, set
     member val Removed = false with get, set