pub trait CornerRefiner: Sealed {
// Required methods
fn radius(&self) -> i32;
fn refine(
&mut self,
seed_xy: [f32; 2],
ctx: RefineContext<'_>,
) -> RefineResult;
}Expand description
Trait implemented by the built-in subpixel refinement backends.
§Stability
This trait is sealed via a private supertrait bound and cannot
be implemented outside this crate. The built-in implementors are
CenterOfMassRefiner, ForstnerRefiner, SaddlePointRefiner,
and the Refiner dispatcher. It is not a public extension point:
select a backend through RefinerKind rather than implementing
this trait.
Required Methods§
Sourcefn radius(&self) -> i32
fn radius(&self) -> i32
Half-width of the patch the refiner needs around the seed,
in input-image pixels. The caller must ensure the seed is at
least this many pixels away from every image border before
calling refine; violating this
contract yields RefineStatus::OutOfBounds.
Sourcefn refine(&mut self, seed_xy: [f32; 2], ctx: RefineContext<'_>) -> RefineResult
fn refine(&mut self, seed_xy: [f32; 2], ctx: RefineContext<'_>) -> RefineResult
Attempt to refine the subpixel position of a corner candidate.
seed_xy is the initial [x, y] position in input-image pixels
(origin at the top-left corner of the top-left pixel). Returns a
RefineResult whose status indicates whether the position was
updated.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".