pub struct MarkerScalePrior {
pub diameter_min_px: f32,
pub diameter_max_px: f32,
}Expand description
Scale prior for marker diameter in detector working pixels.
The detector uses this range to derive proposal radii, outer-edge search
windows, ellipse validation bounds, and completion ROI. When the marker
scale prior is set via DetectConfig::set_marker_scale_prior or a
constructor, all scale-dependent parameters are auto-derived.
A single known size can be expressed with
MarkerScalePrior::from_nominal_diameter_px. For scenes where markers
vary in apparent size, use MarkerScalePrior::new with a range.
Fields§
§diameter_min_px: f32Minimum expected marker outer diameter in pixels.
diameter_max_px: f32Maximum expected marker outer diameter in pixels.
Implementations§
Source§impl MarkerScalePrior
impl MarkerScalePrior
Sourcepub fn new(diameter_min_px: f32, diameter_max_px: f32) -> Self
pub fn new(diameter_min_px: f32, diameter_max_px: f32) -> Self
Construct a scale prior from a diameter range in pixels.
Sourcepub fn from_nominal_diameter_px(diameter_px: f32) -> Self
pub fn from_nominal_diameter_px(diameter_px: f32) -> Self
Construct a fixed-size scale prior from one diameter hint.
Sourcepub fn diameter_range_px(self) -> [f32; 2]
pub fn diameter_range_px(self) -> [f32; 2]
Return the normalized diameter range [min, max] in pixels.
Sourcepub fn nominal_diameter_px(self) -> f32
pub fn nominal_diameter_px(self) -> f32
Return nominal diameter (midpoint of [min, max]) in pixels.
Sourcepub fn nominal_outer_radius_px(self) -> f32
pub fn nominal_outer_radius_px(self) -> f32
Return nominal outer radius in pixels.
Sourcepub fn normalized(self) -> Self
pub fn normalized(self) -> Self
Return a normalized copy with finite, ordered, non-degenerate bounds.
Trait Implementations§
Source§impl Clone for MarkerScalePrior
impl Clone for MarkerScalePrior
Source§fn clone(&self) -> MarkerScalePrior
fn clone(&self) -> MarkerScalePrior
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MarkerScalePrior
impl Debug for MarkerScalePrior
Source§impl Default for MarkerScalePrior
impl Default for MarkerScalePrior
Source§impl<'de> Deserialize<'de> for MarkerScalePriorwhere
MarkerScalePrior: Default,
impl<'de> Deserialize<'de> for MarkerScalePriorwhere
MarkerScalePrior: Default,
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>,
Source§impl Serialize for MarkerScalePrior
impl Serialize for MarkerScalePrior
impl Copy for MarkerScalePrior
Auto Trait Implementations§
impl Freeze for MarkerScalePrior
impl RefUnwindSafe for MarkerScalePrior
impl Send for MarkerScalePrior
impl Sync for MarkerScalePrior
impl Unpin for MarkerScalePrior
impl UnsafeUnpin for MarkerScalePrior
impl UnwindSafe for MarkerScalePrior
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<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().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.