* Add an exact method to compute an ellipse from three points and two tangents.
[master-thesis.git] / Parasitemia / Parasitemia / KMeans.fs
index 55b899d..98352fe 100644 (file)
@@ -6,7 +6,6 @@ open System.Drawing
 open Emgu.CV
 open Emgu.CV.Structure
 
-
 type Result = {
     fg: Image<Gray, byte>
     mean_bg: float32
@@ -37,8 +36,9 @@ let kmeans (img: Image<Gray, float32>) : Result =
     let fgData = fg.Data
 
     for i in 1 .. nbIteration do
-        if d_bg <> null
-        then
+        match d_bg with
+        | null -> ()
+        | _ ->
             d_bg.Dispose()
             d_fg.Dispose()