#[repr(C, align(32))]pub struct DetectionBatch {
pub corners: [[Point2f; 4]; 1024],
pub homographies: [Matrix3x3; 1024],
pub ids: [u32; 1024],
pub payloads: [u64; 1024],
pub error_rates: [f32; 1024],
pub poses: [Pose6D; 1024],
pub status_mask: [CandidateState; 1024],
pub funnel_status: [FunnelStatus; 1024],
pub corner_covariances: [[f32; 16]; 1024],
}Expand description
A batched state container for fiducial marker detections using a Structure of Arrays (SoA) layout. This structure is designed for high-performance SIMD processing and zero heap allocations.
Fields§
§corners: [[Point2f; 4]; 1024]Flattened array of sub-pixel quad vertices (4 corners per candidate).
homographies: [Matrix3x3; 1024]The 3x3 projection matrices.
ids: [u32; 1024]The decoded IDs of the tags.
payloads: [u64; 1024]The extracted bitstrings.
error_rates: [f32; 1024]The MSE or Log-Likelihood Ratio confidence scores.
poses: [Pose6D; 1024]Translation vectors and unit quaternions.
status_mask: [CandidateState; 1024]A dense byte-array tracking the lifecycle of each candidate.
funnel_status: [FunnelStatus; 1024]Detailed status from the fast-path funnel.
corner_covariances: [[f32; 16]; 1024]Four 2x2 corner covariance matrices per quad (16 floats). Layout: [c0_xx, c0_xy, c0_yx, c0_yy, c1_xx, …]
Implementations§
Source§impl DetectionBatch
impl DetectionBatch
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new DetectionBatch with all fields initialized to zero (Empty state).
Sourcepub fn partition(&mut self, n: usize) -> usize
pub fn partition(&mut self, n: usize) -> usize
Partitions the batch so that all Valid candidates are at the front [0..V].
Returns the number of valid candidates V.
Sourcepub fn reassemble(&self, v: usize) -> Vec<Detection>
pub fn reassemble(&self, v: usize) -> Vec<Detection>
Reassemble the batched SoA data into a list of discrete Detection objects.
Source§impl DetectionBatch
impl DetectionBatch
Sourcepub fn view(&self, v: usize) -> DetectionBatchView<'_>
pub fn view(&self, v: usize) -> DetectionBatchView<'_>
Returns a borrowed view of the first v candidates in the batch.
Sourcepub fn view_with_telemetry(
&self,
v: usize,
n: usize,
telemetry: Option<TelemetryPayload>,
) -> DetectionBatchView<'_>
pub fn view_with_telemetry( &self, v: usize, n: usize, telemetry: Option<TelemetryPayload>, ) -> DetectionBatchView<'_>
Returns a borrowed view with telemetry data.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DetectionBatch
impl RefUnwindSafe for DetectionBatch
impl Send for DetectionBatch
impl Sync for DetectionBatch
impl Unpin for DetectionBatch
impl UnsafeUnpin for DetectionBatch
impl UnwindSafe for DetectionBatch
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.