projects
/
master-thesis.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cb90b01
)
Cleaning.
author
Greg Burri
<greg.burri@gmail.com>
Thu, 21 Jan 2016 16:34:55 +0000
(17:34 +0100)
committer
Greg Burri
<greg.burri@gmail.com>
Thu, 21 Jan 2016 16:34:55 +0000
(17:34 +0100)
Parasitemia/ParasitemiaCore/EEOver.fs
patch
|
blob
|
history
Parasitemia/ParasitemiaCore/ImgTools.fs
patch
|
blob
|
history
Parasitemia/ParasitemiaCore/KdTree.fs
patch
|
blob
|
history
Parasitemia/ParasitemiaCore/MatchingEllipses.fs
patch
|
blob
|
history
Parasitemia/ParasitemiaCore/Types.fs
patch
|
blob
|
history
Parasitemia/ParasitemiaUI/ParasitemiaUI.fsproj
patch
|
blob
|
history
diff --git
a/Parasitemia/ParasitemiaCore/EEOver.fs
b/Parasitemia/ParasitemiaCore/EEOver.fs
index
7db9687
..
eb8ac0b
100644
(file)
--- a/
Parasitemia/ParasitemiaCore/EEOver.fs
+++ b/
Parasitemia/ParasitemiaCore/EEOver.fs
@@
-207,7
+207,6
@@
let private threeintpts (xint: float[]) (yint: float[]) (a1: float) (b1: float)
()
twointpts xint yint a1 b1 phi_1 a2 b2 h2_tr k2_tr phi_2 aa bb cc dd ee ff
()
twointpts xint yint a1 b1 phi_1 a2 b2 h2_tr k2_tr phi_2 aa bb cc dd ee ff
-
let private fourintpts (xint: float[]) (yint: float[]) (a1: float) (b1: float) (phi_1: float) (a2: float) (b2: float) (h2_tr: float) (k2_tr: float) (phi_2: float) (aa: float) (bb: float) (cc: float) (dd: float) (ee: float) (ff: float) : float =
let a1b1 = a1 * b1
let a2b2 = a2 * b2
let private fourintpts (xint: float[]) (yint: float[]) (a1: float) (b1: float) (phi_1: float) (a2: float) (b2: float) (h2_tr: float) (k2_tr: float) (phi_2: float) (aa: float) (bb: float) (cc: float) (dd: float) (ee: float) (ff: float) : float =
let a1b1 = a1 * b1
let a2b2 = a2 * b2
@@
-690,7
+689,6
@@
let EEOverlapArea (e1: Types.Ellipse) (e2: Types.Ellipse) : (float32 * float32[]
#endif
i <- i + 1
#endif
i <- i + 1
-
if returnValue = -1.0
then
None
if returnValue = -1.0
then
None
diff --git
a/Parasitemia/ParasitemiaCore/ImgTools.fs
b/Parasitemia/ParasitemiaCore/ImgTools.fs
index
cc15af7
..
44a6c86
100644
(file)
--- a/
Parasitemia/ParasitemiaCore/ImgTools.fs
+++ b/
Parasitemia/ParasitemiaCore/ImgTools.fs
@@
-43,7
+43,7
@@
let histogramImg (img: Image<Gray, float32>) (nbSamples: int) : Histogram =
img.MinMax(min, max, minLocation, maxLocation)
float32 (!min).[0], float32 (!max).[0]
img.MinMax(min, max, minLocation, maxLocation)
float32 (!min).[0], float32 (!max).[0]
- let bin (x: float32) : int =
+ let
inline
bin (x: float32) : int =
let p = int ((x - min) / (max - min) * float32 nbSamples)
if p >= nbSamples then nbSamples - 1 else p
let p = int ((x - min) / (max - min) * float32 nbSamples)
if p >= nbSamples then nbSamples - 1 else p
@@
-67,7
+67,7
@@
let histogramMat (mat: Matrix<float32>) (nbSamples: int) : Histogram =
mat.MinMax(min, max, minLocation, maxLocation)
float32 !min, float32 !max
mat.MinMax(min, max, minLocation, maxLocation)
float32 !min, float32 !max
- let bin (x: float32) : int =
+ let
inline
bin (x: float32) : int =
let p = int ((x - min) / (max - min) * float32 nbSamples)
if p >= nbSamples then nbSamples - 1 else p
let p = int ((x - min) / (max - min) * float32 nbSamples)
if p >= nbSamples then nbSamples - 1 else p
@@
-90,7
+90,7
@@
let histogram (values: float32 seq) (nbSamples: int) : Histogram =
if v < min then min <- v
if v > max then max <- v
if v < min then min <- v
if v > max then max <- v
- let bin (x: float32) : int =
+ let
inline
bin (x: float32) : int =
let p = int ((x - min) / (max - min) * float32 nbSamples)
if p >= nbSamples then nbSamples - 1 else p
let p = int ((x - min) / (max - min) * float32 nbSamples)
if p >= nbSamples then nbSamples - 1 else p
@@
-201,7
+201,6
@@
let findEdges (img: Image<Gray, float32>) : Matrix<byte> * Image<Gray, float32>
let thresholdHigh, thresholdLow =
let sensibilityHigh = 0.1f
let sensibilityLow = 0.0f
let thresholdHigh, thresholdLow =
let sensibilityHigh = 0.1f
let sensibilityLow = 0.0f
- use magnitudesByte = magnitudes.Convert<byte>()
let threshold, _, _ = otsu (histogramMat magnitudes 300)
threshold + (sensibilityHigh * threshold), threshold - (sensibilityLow * threshold)
let threshold, _, _ = otsu (histogramMat magnitudes 300)
threshold + (sensibilityHigh * threshold), threshold - (sensibilityLow * threshold)
diff --git
a/Parasitemia/ParasitemiaCore/KdTree.fs
b/Parasitemia/ParasitemiaCore/KdTree.fs
index
94a3921
..
4513208
100644
(file)
--- a/
Parasitemia/ParasitemiaCore/KdTree.fs
+++ b/
Parasitemia/ParasitemiaCore/KdTree.fs
@@
-67,8
+67,8
@@
type Tree<'a when 'a :> I2DCoords> =
member this.Search (searchRegion: Region) : 'a list =
let rec valuesFrom (tree: Tree<'a>) : 'a list =
match tree with
member this.Search (searchRegion: Region) : 'a list =
let rec valuesFrom (tree: Tree<'a>) : 'a list =
match tree with
- | Leaf v -> [v]
| Node (_, part1, part2) -> (valuesFrom part1) @ (valuesFrom part2)
| Node (_, part1, part2) -> (valuesFrom part1) @ (valuesFrom part2)
+ | Leaf v -> [v]
let rec searchWithRegion (tree: Tree<'a>) (currentRegion: Region) (depth: int) : 'a list =
match tree with
let rec searchWithRegion (tree: Tree<'a>) (currentRegion: Region) (depth: int) : 'a list =
match tree with
diff --git
a/Parasitemia/ParasitemiaCore/MatchingEllipses.fs
b/Parasitemia/ParasitemiaCore/MatchingEllipses.fs
index
4cc3d2b
..
c7a0627
100644
(file)
--- a/
Parasitemia/ParasitemiaCore/MatchingEllipses.fs
+++ b/
Parasitemia/ParasitemiaCore/MatchingEllipses.fs
@@
-47,7
+47,7
@@
type MatchingEllipses (radius: float32) =
let tree = KdTree.Tree.BuildTree (List.ofSeq ellipses)
// 2) Compute the matching score of each ellipses.
let tree = KdTree.Tree.BuildTree (List.ofSeq ellipses)
// 2) Compute the matching score of each ellipses.
- let windowSize = radius /
2
.f
+ let windowSize = radius /
3
.f
for e in ellipses do
e.Processed <- true
let areaE = e.Ellipse.Area
for e in ellipses do
e.Processed <- true
let areaE = e.Ellipse.Area
diff --git
a/Parasitemia/ParasitemiaCore/Types.fs
b/Parasitemia/ParasitemiaCore/Types.fs
index
7bfbd7f
..
946c2c7
100644
(file)
--- a/
Parasitemia/ParasitemiaCore/Types.fs
+++ b/
Parasitemia/ParasitemiaCore/Types.fs
@@
-86,4
+86,4
@@
type MaybeBuilder () =
member this.Return (x) =
Some x
member this.Return (x) =
Some x
-let maybe =
new
MaybeBuilder()
\ No newline at end of file
+let maybe = MaybeBuilder()
\ No newline at end of file
diff --git
a/Parasitemia/ParasitemiaUI/ParasitemiaUI.fsproj
b/Parasitemia/ParasitemiaUI/ParasitemiaUI.fsproj
index
0859274
..
483888f
100644
(file)
--- a/
Parasitemia/ParasitemiaUI/ParasitemiaUI.fsproj
+++ b/
Parasitemia/ParasitemiaUI/ParasitemiaUI.fsproj
@@
-68,7
+68,6
@@
<Resource Include="Resources\chuv_logo.png" />
<Resource Include="Resources\hes-so_logo.png" />
<Resource Include="Resources\icon.ico" />
<Resource Include="Resources\chuv_logo.png" />
<Resource Include="Resources\hes-so_logo.png" />
<Resource Include="Resources\icon.ico" />
- <Resource Include="Resources\p5-type5-tiling.png" />
<Resource Include="XAML\NumericUpDown.xaml" />
<Compile Include="XAML\NumericUpDown.xaml.fs" />
<Resource Include="XAML\ImageSourcePreview.xaml" />
<Resource Include="XAML\NumericUpDown.xaml" />
<Compile Include="XAML\NumericUpDown.xaml.fs" />
<Resource Include="XAML\ImageSourcePreview.xaml" />