pub struct ScaleTiers(pub Vec<ScaleTier>);Expand description
An ordered set of scale tiers for multi-scale adaptive detection.
Each tier runs one full detection pass (fit + decode + projective centers). Results from all tiers are merged with size-consistency-aware dedup, then global filter, completion, and final H refit run once on the merged pool.
Use the preset constructors for common scenarios:
ScaleTiers::four_tier_wide— 8–220 px, full range (27:1 ratio)ScaleTiers::two_tier_standard— 14–100 px, moderate variation (7:1)ScaleTiers::single— single-pass equivalent, no merge overheadScaleTiers::from_detected_radii— built from a scale-probe result
See crate::Detector::detect_adaptive and
crate::Detector::detect_multiscale.
Tuple Fields§
§0: Vec<ScaleTier>Implementations§
Source§impl ScaleTiers
impl ScaleTiers
Sourcepub fn four_tier_wide() -> Self
pub fn four_tier_wide() -> Self
Four overlapping tiers covering 8–220 px (27:1 diameter ratio).
Tier boundaries: [8,24], [20,60], [50,130], [110,220] px.
Each tier has ratio ≤ 3:1. Overlapping boundaries ensure markers in
the 20–24, 50–60, and 110–130 px range are detected by two tiers.
Use when marker apparent size is unknown or spans a very wide range.
Sourcepub fn two_tier_standard() -> Self
pub fn two_tier_standard() -> Self
Two overlapping tiers covering 14–100 px (~7:1 diameter ratio).
Tier boundaries: [14,42], [36,100] px. Faster than
four_tier_wide for moderate scale variation.
Sourcepub fn single(prior: MarkerScalePrior) -> Self
pub fn single(prior: MarkerScalePrior) -> Self
Single tier wrapping the given prior — no multi-scale overhead.
Equivalent to single-pass detection. Use when marker scale is approximately known.
Sourcepub fn from_detected_radii(probe_radii: &[f32]) -> Self
pub fn from_detected_radii(probe_radii: &[f32]) -> Self
Construct tiers from dominant code-band radii estimated by the scale probe.
Clusters probe_radii into groups where max/min ≤ 3.0, converts each
cluster to an outer-ring diameter estimate (probe radii land in the code
band at ~0.8× the outer ring radius), and pads each tier by ±30 %.
Falls back to single(MarkerScalePrior::default()) when probe_radii
is empty or contains no finite positive values.
Trait Implementations§
Source§impl Clone for ScaleTiers
impl Clone for ScaleTiers
Source§fn clone(&self) -> ScaleTiers
fn clone(&self) -> ScaleTiers
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ScaleTiers
impl Debug for ScaleTiers
Source§impl<'de> Deserialize<'de> for ScaleTiers
impl<'de> Deserialize<'de> for ScaleTiers
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for ScaleTiers
impl RefUnwindSafe for ScaleTiers
impl Send for ScaleTiers
impl Sync for ScaleTiers
impl Unpin for ScaleTiers
impl UnsafeUnpin for ScaleTiers
impl UnwindSafe for ScaleTiers
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.