Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Configuration Guide

All radsym algorithms are controlled through plain structs with public fields and sensible defaults. This page collects every config struct, organized by pipeline stage.

Proposal stage

FrstConfig

FieldTypeDefaultDescription
radiiVec<u32>[3, 5, 7, 9, 11]Discrete radii to test (pixels)
alphaf322.0Radial strictness exponent
gradient_thresholdf320.0Minimum gradient magnitude for voting
polarityPolarityBothTarget polarity (Bright, Dark, Both)
smoothing_factorf320.5Gaussian sigma = factor * radius

RsdConfig

FieldTypeDefaultDescription
radiiVec<u32>[3, 5, 7, 9, 11]Discrete radii to test (pixels)
gradient_thresholdf320.0Minimum gradient magnitude for voting
polarityPolarityBothTarget polarity
smoothing_factorf320.5Gaussian sigma = factor * radius

NmsConfig

FieldTypeDefaultDescription
radiususize5Suppression half-window size (pixels)
thresholdf320.0Minimum response to consider
max_detectionsusize1000Budget cap on returned peaks

HomographyRerankConfig

FieldTypeDefaultDescription
min_radiusf326.0Minimum image-space radius to evaluate
max_radiusf320.0Maximum radius (0.0 = auto)
radius_stepf322.0Coarse radius sweep step (pixels)
ray_countusize64Image-space rays for edge acquisition
radial_search_innerf320.6Inner factor for radial search
radial_search_outerf321.45Outer factor for radial search
size_prior_sigmaf320.22Gaussian size prior width
center_prior_sigma_fractionf320.45Center prior sigma as fraction of image size

Scoring stage

AnnulusSamplingConfig

FieldTypeDefaultDescription
num_angular_samplesusize64Angular sample count around annulus
num_radial_samplesusize9Radial sample count across annulus width

ScoringConfig

FieldTypeDefaultDescription
samplingAnnulusSamplingConfig(see above)Annulus sampling parameters
annulus_marginf320.3Fractional width around hypothesized radius
min_samplesusize8Minimum samples to avoid degeneracy
weight_ringnessf320.6Weight for gradient alignment component
weight_coveragef320.4Weight for angular coverage component

Refinement stage

RadialCenterConfig

FieldTypeDefaultDescription
patch_radiususize12Half-width of the analysis patch (pixels)
gradient_thresholdf321e-4Minimum gradient magnitude for fit

CircleRefineConfig

FieldTypeDefaultDescription
max_iterationsusize10Maximum refinement iterations
convergence_tolf320.1Stop when center shift < this (pixels)
annulus_marginf320.3Annulus width as fraction of radius
radial_centerRadialCenterConfig(see above)Sub-step center config
samplingAnnulusSamplingConfig(see above)Sub-step sampling config

EllipseRefineConfig

FieldTypeDefaultDescription
max_iterationsusize5Maximum refinement iterations
convergence_tolf320.1Convergence threshold (pixels)
annulus_marginf320.3Annulus margin for diagnostics
radial_centerRadialCenterConfig(see above)Seed stabilization config
samplingAnnulusSamplingConfig(see above)Legacy sampling config
min_alignmentf320.3Minimum alignment for diagnostics
ray_countusize96Angular sectors for edge acquisition
radial_search_innerf320.6Inner radius factor for initial search
radial_search_outerf321.45Outer radius factor for initial search
normal_search_half_widthf326.0Normal search window (pixels)
min_inlier_coveragef320.6Minimum sector coverage of inliers
max_center_shift_fractionf320.4Max center shift / seed radius
max_axis_ratiof321.8Maximum allowed a/b ratio

HomographyEllipseRefineConfig

FieldTypeDefaultDescription
max_iterationsusize5Maximum refinement iterations
convergence_tolf320.1Convergence threshold (rectified pixels)
radial_centerRadialCenterConfig(see above)Image-space seed stabilization
ray_countusize96Image-space rays for edge acquisition
radial_search_innerf320.6Inner radius factor
radial_search_outerf321.45Outer radius factor
normal_search_half_widthf326.0Normal search window (pixels)
min_inlier_coveragef320.45Minimum rectified angular coverage
max_center_shift_fractionf320.4Max center shift / rectified radius
max_radius_change_fractionf320.6Max radius change / rectified radius

Tuning tips

Small targets (radius < 10 px): Use tight radii in FrstConfig (e.g., [3, 5, 7]), reduce patch_radius in RadialCenterConfig, and lower normal_search_half_width in EllipseRefineConfig.

Noisy images: Increase gradient_threshold in FrstConfig/RsdConfig to suppress votes from noise. Increase smoothing_factor for broader peaks that survive noise.

High-precision localization: Increase ray_count in EllipseRefineConfig for denser angular sampling. Decrease convergence_tol to force more refinement iterations. Use a larger patch_radius in RadialCenterConfig.

Real-time budgets: Use RsdConfig instead of FrstConfig for faster proposal generation. Set max_detections in NmsConfig to limit downstream work. Reduce ray_count and max_iterations in refinement configs.

Strong perspective distortion: Use the homography-aware path (HomographyEllipseRefineConfig) when a calibrated homography is available. Otherwise, increase max_axis_ratio in EllipseRefineConfig to permit more eccentric ellipses.