#[non_exhaustive]pub struct ForstnerConfig {
pub radius: i32,
pub min_trace: f32,
pub min_det: f32,
pub max_condition_number: f32,
pub max_offset: f32,
}Expand description
Configuration for the ForstnerRefiner.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.radius: i32Half-size of the local gradient window (full window is
2*radius+1). A radius of 2 gives a 5×5 patch — large enough to
capture the gradient structure around a corner while staying
local.
min_trace: f32Minimum trace of the structure tensor (sum of eigenvalues). Rejects flat regions where gradient energy is too low. The value 25.0 corresponds roughly to an average gradient magnitude of ~5 per pixel in a 5×5 window (5² = 25), filtering out textureless areas.
min_det: f32Minimum determinant of the structure tensor (product of eigenvalues). Guards against singular or near-singular systems where the least-squares solution is numerically unstable. 1e-3 is a conservative floor that rejects only truly degenerate cases.
max_condition_number: f32Maximum ratio of the larger to the smaller eigenvalue. A high condition number indicates an edge rather than a corner (one dominant gradient direction). The threshold 50.0 is permissive — standard Harris/Förstner literature suggests values in the 10–100 range depending on noise level and corner sharpness.
max_offset: f32Maximum displacement (in pixels) from the initial integer seed to the refined subpixel location. Offsets larger than ~1.5 px suggest the seed was mislocated and the refinement is extrapolating rather than interpolating; such results are rejected.
Trait Implementations§
Source§impl Clone for ForstnerConfig
impl Clone for ForstnerConfig
Source§fn clone(&self) -> ForstnerConfig
fn clone(&self) -> ForstnerConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more