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
Förstner-style gradient-based refiner.
The Förstner operator fits a subpixel corner location by solving a weighted least-squares system on the image gradient structure tensor within a local window. The thresholds below control when the system is well-conditioned enough to yield a reliable estimate.
Reference: Förstner, W. & Gülch, E. (1987). “A fast operator for detection and precise location of distinct points, corners and centres of circular features.”
Fields§
§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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ForstnerConfig
impl Debug for ForstnerConfig
Source§impl Default for ForstnerConfig
impl Default for ForstnerConfig
impl Copy for ForstnerConfig
Auto Trait Implementations§
impl Freeze for ForstnerConfig
impl RefUnwindSafe for ForstnerConfig
impl Send for ForstnerConfig
impl Sync for ForstnerConfig
impl Unpin for ForstnerConfig
impl UnsafeUnpin for ForstnerConfig
impl UnwindSafe for ForstnerConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more