pub struct MarkerSpec {
pub r_inner_expected: f32,
pub inner_search_halfwidth: f32,
pub inner_grad_polarity: GradPolarity,
pub radial_samples: usize,
pub theta_samples: usize,
pub aggregator: AngularAggregator,
pub min_theta_coverage: f32,
pub min_theta_consistency: f32,
}Expand description
Marker spec in outer-normalized radius units.
NOTE: Defaults are derived from the synthetic renderer in tools/gen_synth.py
and the current edge sampler semantics in ring::edge_sample::sample_edges.
In gen_synth.py the default synthetic marker uses:
- outer_radius = pitch_mm * 0.6
- inner_radius = pitch_mm * 0.4
- ring_half_thickness = outer_radius * 0.12
The edge sampler finds the boundary of the merged dark band under blur, so the expected (inner_edge / outer_edge) ratio in outer-normalized units is: r_inner_expected = (inner_radius - ring_half_thickness) / (outer_radius + ring_half_thickness)
Fields§
§r_inner_expected: f32Expected inner radius as fraction of outer radius.
inner_search_halfwidth: f32Allowed deviation in normalized radius around r_inner_expected.
inner_grad_polarity: GradPolarityExpected sign of dI/dr at the inner edge.
radial_samples: usizeNumber of radii samples per theta.
Same convention as crate::OuterEstimationConfig::radial_samples, calibrated
independently for the inner estimation stage.
theta_samples: usizeNumber of theta samples (rays) for inner-scale estimation.
Unlike the outer estimator (where ray count is set to edge_sample.n_rays
at the call site), this value is used directly — the inner scan is not
coupled to the edge-sampling resolution.
aggregator: AngularAggregatorAggregator across theta.
Same convention as crate::OuterEstimationConfig::aggregator, applied to the
inner radial profile.
min_theta_coverage: f32Minimum fraction of theta samples required for a valid estimate.
Same convention as crate::OuterEstimationConfig::min_theta_coverage, calibrated
independently for the inner estimation stage.
min_theta_consistency: f32Minimum fraction of theta samples that must agree on the inner edge location (used as a quality gate).
Same convention as crate::OuterEstimationConfig::min_theta_consistency; the
inner estimator uses a more permissive default (0.25) than the outer (0.35)
because the inner edge is less anchored to a scale prior.
Kept separate from min_theta_coverage: “coverage” is about in-bounds
sampling, while “consistency” is about peak agreement.
Implementations§
Source§impl MarkerSpec
impl MarkerSpec
Sourcepub fn search_window(&self) -> [f32; 2]
pub fn search_window(&self) -> [f32; 2]
Return normalized radial search window around r_inner_expected.
Trait Implementations§
Source§impl Clone for MarkerSpec
impl Clone for MarkerSpec
Source§fn clone(&self) -> MarkerSpec
fn clone(&self) -> MarkerSpec
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MarkerSpec
impl Debug for MarkerSpec
Source§impl Default for MarkerSpec
impl Default for MarkerSpec
Source§impl<'de> Deserialize<'de> for MarkerSpecwhere
MarkerSpec: Default,
impl<'de> Deserialize<'de> for MarkerSpecwhere
MarkerSpec: 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>,
Auto Trait Implementations§
impl Freeze for MarkerSpec
impl RefUnwindSafe for MarkerSpec
impl Send for MarkerSpec
impl Sync for MarkerSpec
impl Unpin for MarkerSpec
impl UnsafeUnpin for MarkerSpec
impl UnwindSafe for MarkerSpec
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.