projects
/
master-thesis.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cleaning.
[master-thesis.git]
/
Parasitemia
/
Parasitemia
/
ParasitesMarker2.fs
diff --git
a/Parasitemia/Parasitemia/ParasitesMarker2.fs
b/Parasitemia/Parasitemia/ParasitesMarker2.fs
index
03af2b6
..
17a032d
100644
(file)
--- a/
Parasitemia/Parasitemia/ParasitesMarker2.fs
+++ b/
Parasitemia/Parasitemia/ParasitesMarker2.fs
@@
-7,8
+7,8
@@
open Emgu.CV.Structure
type Result = {
darkStain: Image<Gray, byte>
type Result = {
darkStain: Image<Gray, byte>
-
stai
n: Image<Gray, byte>
-
infectio
n: Image<Gray, byte> }
+
infectio
n: Image<Gray, byte>
+
stai
n: Image<Gray, byte> }
// Create three binary markers :
// * 'Dark stain' corresponds to the colored pixel, it's independent of the size of the areas.
// Create three binary markers :
// * 'Dark stain' corresponds to the colored pixel, it's independent of the size of the areas.
@@
-32,16
+32,18
@@
let find (filteredGreen: Image<Gray, byte>) (filteredGreenFloat: Image<Gray, flo
let maxLocation = ref <| [| Point() |]
diff.MinMax(min, max, minLocation, maxLocation)
let maxLocation = ref <| [| Point() |]
diff.MinMax(min, max, minLocation, maxLocation)
- diff._ThresholdBinary((!max).[0] * threshold |> Gray, Gray(255.))
+ let valueThreshold = if (!max).[0] * threshold < 0.1 * (median_bg - median_fg) then 0.1 * (median_bg - median_fg) else (!max).[0] * threshold
+
+ diff._ThresholdBinary(Gray(valueThreshold), Gray(255.))
diff, closed
diff, closed
- let
parasitesMarker, filteredGreenWithoutParasites = marker (int config.Parasite
Area) config.Parameters.infectionLevel
+ let
infectionMarker, filteredGreenWithoutInfection = marker (int config.Infection
Area) config.Parameters.infectionLevel
let stainMarker, filteredGreenWithoutStain = marker (int config.StainArea) config.Parameters.stainLevel
{ darkStain = darkStain
let stainMarker, filteredGreenWithoutStain = marker (int config.StainArea) config.Parameters.stainLevel
{ darkStain = darkStain
-
stain = parasites
Marker
-
infectio
n = stainMarker },
- filteredGreenWithout
Parasites
,
+
infection = infection
Marker
+
stai
n = stainMarker },
+ filteredGreenWithout
Infection
,
filteredGreenWithoutStain
filteredGreenWithoutStain