* Add area granulometry (not used for the moment)
[master-thesis.git] / Parasitemia / Parasitemia / MainAnalysis.fs
index 9f91a6d..043eb73 100644 (file)
@@ -19,9 +19,13 @@ let doAnalysis (img: Image<Bgr, byte>) (name: string) (config: Config) : Cell li
 
     logTime "areaOpen 1" (fun () -> ImgTools.areaOpenF filteredGreen config.Parameters.initialAreaOpen)
 
-    config.RBCRadius <- logTime "Granulometry" (fun() -> Granulometry.findRadius (filteredGreen.Convert<Gray, byte>()) (10, 100) 0.3 |> float32)
+    let r1 = logTime "Granulometry (morpho)" (fun() -> Granulometry.findRadiusByClosing (filteredGreen.Convert<Gray, byte>()) (10, 80) 0.5 |> float32)
+    // let r2 = logTime "Granulometry (area)" (fun() -> Granulometry.findRadiusByAreaClosing filteredGreen (10, 80) |> float32)
+    // log (sprintf "r1: %A, r2: %A" r1 r2)
+    config.RBCRadius <- r1
 
     let secondAreaOpen = int <| config.RBCArea / 3.f
+
     if secondAreaOpen > config.Parameters.initialAreaOpen
     then
         logTime "areaOpen 2" (fun () -> ImgTools.areaOpenF filteredGreen secondAreaOpen)