pub struct DetectConfig {Show 22 fields
pub marker_scale: MarkerScalePrior,
pub outer_estimation: OuterEstimationConfig,
pub proposal: ProposalConfig,
pub seed_proposals: SeedProposalParams,
pub edge_sample: EdgeSampleConfig,
pub decode: DecodeConfig,
pub marker_spec: MarkerSpec,
pub inner_fit: InnerFitConfig,
pub outer_fit: OuterFitConfig,
pub circle_refinement: CircleRefinementMethod,
pub projective_center: ProjectiveCenterParams,
pub completion: CompletionParams,
pub max_aspect_ratio: f64,
pub dedup_radius: f64,
pub use_global_filter: bool,
pub ransac_homography: RansacHomographyConfig,
pub board: BoardLayout,
pub self_undistort: SelfUndistortConfig,
pub id_correction: IdCorrectionConfig,
pub inner_as_outer_recovery: InnerAsOuterRecoveryConfig,
pub h_reproj_confidence_alpha: f32,
pub proposal_downscale: ProposalDownscale,
/* private fields */
}Expand description
Top-level detection configuration.
Contains all parameters that control the detection pipeline. Use one of the recommended constructors rather than constructing directly:
DetectConfig::from_target— default scale priorDetectConfig::from_target_and_scale_prior— explicit scale rangeDetectConfig::from_target_and_marker_diameter— fixed diameter hint
These constructors auto-derive scale-dependent parameters (proposal radii, edge search windows, validation bounds) from the board geometry and marker scale prior. Individual fields can be tuned after construction.
Fields§
§marker_scale: MarkerScalePriorMarker diameter prior (range) in working-frame pixels.
outer_estimation: OuterEstimationConfigOuter edge estimation configuration (anchored on marker_scale).
proposal: ProposalConfigProposal generation configuration.
seed_proposals: SeedProposalParamsSeed-injection controls for multi-pass proposal generation.
edge_sample: EdgeSampleConfigRadial edge sampling configuration.
decode: DecodeConfigMarker decode configuration.
marker_spec: MarkerSpecMarker geometry specification and estimator controls.
inner_fit: InnerFitConfigRobust inner ellipse fitting controls shared across pipeline stages.
outer_fit: OuterFitConfigRobust outer ellipse fitting controls shared across pipeline stages.
circle_refinement: CircleRefinementMethodPost-fit circle refinement method selector.
projective_center: ProjectiveCenterParamsProjective-center recovery controls.
completion: CompletionParamsHomography-guided completion controls.
max_aspect_ratio: f64Maximum aspect ratio (a/b) for a valid ellipse.
dedup_radius: f64NMS dedup radius for final markers (pixels).
use_global_filter: boolEnable global homography filtering (requires board spec).
ransac_homography: RansacHomographyConfigRANSAC homography configuration.
board: BoardLayoutBoard layout: marker positions and geometry.
self_undistort: SelfUndistortConfigSelf-undistort estimation controls.
id_correction: IdCorrectionConfigStructural ID verification and correction using hex neighborhood consensus.
inner_as_outer_recovery: InnerAsOuterRecoveryConfigAutomatic recovery for markers where the inner edge was incorrectly fitted as the outer ellipse.
h_reproj_confidence_alpha: f32Soft confidence penalty alpha for H-reprojection error.
After the final homography is estimated, each marker’s confidence is
multiplied by 1 / (1 + alpha * h_reproj_err_px). Markers with small
reprojection errors are unaffected; geometrically inconsistent markers
(e.g. 5 px error) are penalised by roughly 1 / (1 + 0.2 * 5) = 0.5.
Set to 0.0 to disable the penalty. Default: 0.2.
proposal_downscale: ProposalDownscaleOptional image downscaling before proposal generation.
When markers are large, running proposals on a smaller image is much
faster while proposal coordinates are approximate anyway (downstream
stages refine at full resolution). Default: Off.
Implementations§
Source§impl DetectConfig
impl DetectConfig
Sourcepub fn from_target_and_scale_prior(
board: BoardLayout,
marker_scale: MarkerScalePrior,
) -> Self
pub fn from_target_and_scale_prior( board: BoardLayout, marker_scale: MarkerScalePrior, ) -> Self
Build a configuration with scale-dependent parameters derived from a marker diameter range and a runtime target layout.
This is the recommended constructor for library users. After calling it, individual fields can be overridden as needed.
Sourcepub fn from_target(board: BoardLayout) -> Self
pub fn from_target(board: BoardLayout) -> Self
Build a configuration from target layout and default marker scale prior.
Sourcepub fn from_target_and_marker_diameter(
board: BoardLayout,
diameter_px: f32,
) -> Self
pub fn from_target_and_marker_diameter( board: BoardLayout, diameter_px: f32, ) -> Self
Build a configuration from target layout and a fixed marker diameter hint.
Sourcepub fn set_marker_scale_prior(&mut self, marker_scale: MarkerScalePrior)
pub fn set_marker_scale_prior(&mut self, marker_scale: MarkerScalePrior)
Update marker scale prior and re-derive all scale-coupled parameters.
Sourcepub fn set_marker_diameter_hint_px(&mut self, diameter_px: f32)
pub fn set_marker_diameter_hint_px(&mut self, diameter_px: f32)
Update marker scale prior from a fixed marker diameter hint.
Trait Implementations§
Source§impl Clone for DetectConfig
impl Clone for DetectConfig
Source§fn clone(&self) -> DetectConfig
fn clone(&self) -> DetectConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DetectConfig
impl Debug for DetectConfig
Auto Trait Implementations§
impl Freeze for DetectConfig
impl RefUnwindSafe for DetectConfig
impl Send for DetectConfig
impl Sync for DetectConfig
impl Unpin for DetectConfig
impl UnsafeUnpin for DetectConfig
impl UnwindSafe for DetectConfig
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.