pub struct BoardEstimator {
pub config: Arc<AprilGridTopology>,
pub solver: RobustPoseSolver,
/* private fields */
}Expand description
Estimator for multi-tag AprilGrid board poses.
Bridges the [DetectionBatch] SoA layout and AprilGridTopology marker
geometry with the tag-layout-agnostic RobustPoseSolver. All heavy pose
mathematics lives in the solver; this struct is responsible only for
constructing the flat PointCorrespondences view and retaining the
pre-allocated scratch buffers needed to do so without heap allocation.
Fields§
§config: Arc<AprilGridTopology>Configuration of the board layout.
solver: RobustPoseSolverThe underlying robust pose solver (contains LO-RANSAC config).
Implementations§
Source§impl BoardEstimator
impl BoardEstimator
Sourcepub fn new(config: Arc<AprilGridTopology>) -> Self
pub fn new(config: Arc<AprilGridTopology>) -> Self
Creates a new BoardEstimator.
Performs a single one-time heap allocation to back the scratch buffers.
Reuse the same BoardEstimator across frames to amortise this cost and
guarantee zero per-estimate() allocations.
config is wrapped in Arc so multiple estimators or frames can share
the same board geometry without cloning the marker table.
Sourcepub fn with_lo_ransac_config(self, cfg: LoRansacConfig) -> Self
pub fn with_lo_ransac_config(self, cfg: LoRansacConfig) -> Self
Builder: override the LO-RANSAC configuration.
Sourcepub fn estimate(
&mut self,
batch: &DetectionBatchView<'_>,
intrinsics: &CameraIntrinsics,
) -> Option<BoardPose>
pub fn estimate( &mut self, batch: &DetectionBatchView<'_>, intrinsics: &CameraIntrinsics, ) -> Option<BoardPose>
Estimates the board pose from a batch of detections.
Returns None if fewer than 4 valid tags match the board layout or if
LO-RANSAC cannot find a consensus set.
Auto Trait Implementations§
impl Freeze for BoardEstimator
impl RefUnwindSafe for BoardEstimator
impl Send for BoardEstimator
impl Sync for BoardEstimator
impl Unpin for BoardEstimator
impl UnsafeUnpin for BoardEstimator
impl UnwindSafe for BoardEstimator
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> 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.