#[non_exhaustive]pub struct RefineResult {
pub x: f32,
pub y: f32,
pub score: f32,
pub status: RefineStatus,
}Expand description
Result of refining a single corner candidate.
Coordinates are in the input image pixel frame, with the origin
at the top-left corner of the top-left pixel (i.e. pixel (0, 0) has
its center at (0.0, 0.0)). Both x and y are subpixel values
in pixels — no normalization or scaling is applied by the refiner
itself.
Check status before using x and y:
only RefineStatus::Accepted guarantees that the refiner moved
the position. For all other statuses the coordinates are copied
unchanged from the input seed.
The score field measures how well the local
image structure supports the refined position. Its meaning depends on
the active refiner:
- CenterOfMass:
scoreis the sum of positive response weights in the patch (Σ wwherew = response.clamp(0, ∞)). Higher is stronger; units match the ChESS response scale. A score of0.0means no positive response was found. - Förstner:
scoreisdet(T) / (trace(T)² + ε)whereTis the structure tensor. Ranges roughly in(0, 0.25]; higher means the patch has balanced gradient energy in both directions (closer to a true corner). The value0.0is returned on all failure paths. - SaddlePoint:
scoreissqrt(|det(H)|)whereHis the fitted quadratic Hessian. Larger magnitude indicates a sharper saddle (steeper curvature); no absolute scale is defined.
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.x: f32Refined subpixel x coordinate in input-image pixels. Valid only
when status is
RefineStatus::Accepted; otherwise equals the input seed x.
y: f32Refined subpixel y coordinate in input-image pixels. Valid only
when status is
RefineStatus::Accepted; otherwise equals the input seed y.
score: f32Refiner-specific quality score. Higher values indicate stronger
evidence for the refined position. See the RefineResult docs
for per-refiner definitions. Always 0.0 on OutOfBounds and
may be 0.0 on other non-Accepted statuses.
status: RefineStatusWhether the refiner accepted, rejected, or could not process this
candidate. See RefineStatus.
Implementations§
Source§impl RefineResult
impl RefineResult
Trait Implementations§
Source§impl Clone for RefineResult
impl Clone for RefineResult
Source§fn clone(&self) -> RefineResult
fn clone(&self) -> RefineResult
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for RefineResult
Auto Trait Implementations§
impl Freeze for RefineResult
impl RefUnwindSafe for RefineResult
impl Send for RefineResult
impl Sync for RefineResult
impl Unpin for RefineResult
impl UnsafeUnpin for RefineResult
impl UnwindSafe for RefineResult
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