X-Git-Url: http://git.euphorik.ch/?p=master-thesis.git;a=blobdiff_plain;f=Parasitemia%2FParasitemiaCore%2FEllipse.fs;h=1059e3bcd370bc51eaf56185eed4bc03aba4d73f;hp=e65100b343f46ddba67e4d3f00898c9bb06f3706;hb=c4a76a01f62568c6353396ff85551a3151fc5236;hpb=94fbffc758bf0299b077e344ebcbecca408ae564 diff --git a/Parasitemia/ParasitemiaCore/Ellipse.fs b/Parasitemia/ParasitemiaCore/Ellipse.fs index e65100b..1059e3b 100644 --- a/Parasitemia/ParasitemiaCore/Ellipse.fs +++ b/Parasitemia/ParasitemiaCore/Ellipse.fs @@ -261,8 +261,8 @@ let private areVectorsValid (p1x: float32) (p1y: float32) (p2x: float32) (p2y: f let find (edges: Matrix) - (xGradient: Image) - (yGradient: Image) + (xGradient: Matrix) + (yGradient: Matrix) (config: Config) : MatchingEllipses = let r1, r2 = config.RBCRadius.Min, config.RBCRadius.Max @@ -334,7 +334,7 @@ let find (edges: Matrix) squaredDistance p1xf p1yf p3xf p3yf >= squaredMinimumDistance && squaredDistance p2xf p2yf p3xf p3yf >= squaredMinimumDistance then - match areVectorsValid (float32 p1xf) (float32 p1yf) (float32 p2xf) (float32 p2yf) -xDirData.[p1.Y, p1.X, 0] -yDirData.[p1.Y, p1.X, 0] -xDirData.[p2.Y, p2.X, 0] -yDirData.[p2.Y, p2.X, 0] with + match areVectorsValid (float32 p1xf) (float32 p1yf) (float32 p2xf) (float32 p2yf) -xDirData.[p1.Y, p1.X] -yDirData.[p1.Y, p1.X] -xDirData.[p2.Y, p2.X] -yDirData.[p2.Y, p2.X] with | Some (m1, m2) -> match ellipse2 p1xf p1yf (float m1) p2xf p2yf (float m2) p3xf p3yf with | Some e when e.Cx > 0.f && e.Cx < w_f - 1.f && e.Cy > 0.f && e.Cy < h_f - 1.f &&