// Ellipse.A is always equal or greater than Ellipse.B.
// Ellipse.Alpha is between 0 and Pi.
let ellipse (p1x: float) (p1y: float) (m1: float) (p2x: float) (p2y: float) (m2: float) (p3x: float) (p3y: float) : Types.Ellipse option =
- let accuracy_extremum_search_1 = 7 // 3
- let accuracy_extremum_search_2 = 7 // 4
+ let accuracy_extremum_search_1 = 8 // 3
+ let accuracy_extremum_search_2 = 8 // 4
// p3 as the referencial.
let p1x = p1x - p3x
let find (edges: Matrix<byte>)
- (xDir: Image<Gray, float>)
- (yDir: Image<Gray, float>)
+ (xGradient: Image<Gray, float>)
+ (yGradient: Image<Gray, float>)
(config: Config) : MatchingEllipses =
- let r1, r2 = config.scale * config.minRBCSize, config.scale * config.maxRBCSize
- let windowSize = roundInt (config.factorWindowSize * r2)
- let factorNbPick = config.factorNbPick
+ let r1, r2 = config.RBCMinRadius, config.RBCMaxRadius
+ let windowSize = roundInt (config.Parameters.factorWindowSize * r2)
+ let factorNbPick = config.Parameters.factorNbPick
let increment = windowSize / 4
let currentElements = List<(int * int)>()
let edgesData = edges.Data
- let xDirData = xDir.Data
- let yDirData = yDir.Data
+ let xDirData = xGradient.Data
+ let yDirData = yGradient.Data
let rng = Random(42)