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
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
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 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)
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)
+ | Leaf v -> [v]
let rec searchWithRegion (tree: Tree<'a>) (currentRegion: Region) (depth: int) : 'a list =
match tree with
<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" />