Use float32 to reduce memory footprint.
[master-thesis.git] / Parasitemia / Parasitemia / Granulometry.fs
index db299dc..0ef862b 100644 (file)
@@ -10,8 +10,8 @@ open Utils
 
 // 'range': a minimum and maximum radius.
 // 'scale': <= 1.0, to speed up the process.
-let findRadius (img: Image<Gray, byte>) (range: int * int) (scale: float) : int =
-    use scaledImg = if scale = 1.0 then img else img.Resize(scale, CvEnum.Inter.Area)
+let findRadius (img: Image<Gray, 'TDepth>) (range: int * int) (scale: float) : int =
+    use scaledImg = if scale = 1. then img else img.Resize(scale, CvEnum.Inter.Area)
 
     let r1, r2 = range
     let r1', r2' = roundInt (float r1 * scale), roundInt (float r2 * scale)