X-Git-Url: http://git.euphorik.ch/?p=master-thesis.git;a=blobdiff_plain;f=Parasitemia%2FParasitemia%2FConfig.fs;h=e583160921842b152fb45d1ee3dbf5c62e55592f;hp=5bb993694f72a71d7e3f4df7e644ade1937a4393;hb=807437584bdd3d7b7b33be8282472f81f8cce606;hpb=8013d6a586604e443332e6e9a715c86df444a875 diff --git a/Parasitemia/Parasitemia/Config.fs b/Parasitemia/Parasitemia/Config.fs index 5bb9936..e583160 100644 --- a/Parasitemia/Parasitemia/Config.fs +++ b/Parasitemia/Parasitemia/Config.fs @@ -9,41 +9,44 @@ type Debug = | DebugOn of string // Output directory. type Parameters = { - initialAreaOpen: int + initialAreaOpen: int // Area of the first initial opening to remove the central illumination of RBC. + ratioSecondAreaOpen: float32 // The area of the second opening is 'ratioSecondAreaOpen' * mean RBC area. It's applied only if greater than 'initialAreaOpen'. - minRbcRadius: float32 - maxRbcRadius: float32 + minRbcRadius: float32 // Factor of the mean RBC radius. + maxRbcRadius: float32 // Factor of the mean RBC radius. - preFilterSigma: float + preFilterSigma: float // To remove the high frequency noise. // Ellipse. - factorNbPick: float + factorNbPick: float // The number of computed ellipse per edge pixel. // Parasites detection. darkStainLevel: float // Lower -> more sensitive. Careful about illumination on the borders. - maxDarkStainRatio: float + maxDarkStainRatio: float // When a cell must own less than this ratio to be a RBC. stainArea: float32 // Factor of a RBC area. 0.5 means the half of RBC area. stainLevel: float // > 1 - maxStainRatio: float // [0, 1] + maxStainRatio: float // When a cell must own less than this ratio to be a RBC. infectionArea: float32 // Factor of a RBC area. 0.5 means the half of RBC area. infectionLevel: float // > 1 standardDeviationMaxRatio: float // The standard deviation of the pixel values of a cell can't be greater than standardDeviationMaxRatio * global standard deviation - minimumCellArea: float32 // Factor of the nominal RBC area. + minimumCellAreaFactor: float32 // Factor of the mean RBC area. } type Config (param: Parameters) = member this.Parameters = param member val Debug = DebugOff with get, set + + // Mean RBC radius. member val RBCRadius = 30.f with get, set member this.RBCMinRadius = this.RBCRadius + param.minRbcRadius * this.RBCRadius member this.RBCMaxRadius = this.RBCRadius + param.maxRbcRadius * this.RBCRadius member this.RBCArea = PI * this.RBCRadius ** 2.f - member this.RBCMinArea = param.minimumCellArea * this.RBCArea + member this.RBCMinArea = param.minimumCellAreaFactor * this.RBCArea member this.InfectionArea = param.infectionArea * this.RBCArea member this.StainArea = param.stainArea * this.RBCArea