* Add area granulometry (not used for the moment)
[master-thesis.git] / Parasitemia / Parasitemia / KMeans.fs
index 55b899d..afb6daf 100644 (file)
@@ -37,8 +37,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()