pub struct ProjectionCorrespondenceBuilder<M, S = AllLandmarksSelector> { /* private fields */ }Expand description
ORB-SLAM3-style projection-guided correspondence building: instead of
matching every candidate landmark descriptor against every query
descriptor (CorrespondenceBuilder’s all-vs-all search), each candidate
landmark is projected into the query image with a pose prior and matched
only against the query keypoints that fall within search_radius_px of
the projection. This trades the appearance-only search for a much
smaller, geometrically-gated candidate window per landmark, which both
disambiguates repeated/near-duplicate descriptors (only one is ever in
the window) and is materially cheaper when the map is large.
Implementations§
Source§impl<M> ProjectionCorrespondenceBuilder<M, AllLandmarksSelector>where
M: Matcher,
impl<M> ProjectionCorrespondenceBuilder<M, AllLandmarksSelector>where
M: Matcher,
Source§impl<M, S> ProjectionCorrespondenceBuilder<M, S>where
M: Matcher,
S: CandidateSelector,
impl<M, S> ProjectionCorrespondenceBuilder<M, S>where
M: Matcher,
S: CandidateSelector,
pub const fn with_candidate_selector(matcher: M, candidate_selector: S) -> Self
Sourcepub fn build_with_pose_prior(
&self,
query: &QueryImage,
map: &VisualMap,
descriptor_store: &LandmarkDescriptorStore,
pose_prior: &Pose,
search_radius_px: f64,
) -> Result<CorrespondenceSet, CorrespondenceBuildError>
pub fn build_with_pose_prior( &self, query: &QueryImage, map: &VisualMap, descriptor_store: &LandmarkDescriptorStore, pose_prior: &Pose, search_radius_px: f64, ) -> Result<CorrespondenceSet, CorrespondenceBuildError>
Build correspondences by projecting each candidate landmark with
pose_prior and matching its descriptor only against query keypoints
within search_radius_px (Euclidean, in pixels) of the projection.
Landmarks that project behind the camera, outside the image bounds,
or land in a keypoint-free window contribute no correspondence and
are silently skipped (mirroring how CorrespondenceBuilder silently
drops descriptor pairs the matcher rejects). Reuses the caller’s
Matcher for the actual per-window nearest-neighbour decision, so
ratio-test and cross-check semantics are unchanged from the
appearance-global path.
Sourcepub fn build_with_pose_prior_and_query_landmark_ratio(
&self,
query: &QueryImage,
map: &VisualMap,
descriptor_store: &LandmarkDescriptorStore,
pose_prior: &Pose,
search_radius_px: f64,
max_query_landmark_distance_ratio: Option<f32>,
) -> Result<CorrespondenceSet, CorrespondenceBuildError>
pub fn build_with_pose_prior_and_query_landmark_ratio( &self, query: &QueryImage, map: &VisualMap, descriptor_store: &LandmarkDescriptorStore, pose_prior: &Pose, search_radius_px: f64, max_query_landmark_distance_ratio: Option<f32>, ) -> Result<CorrespondenceSet, CorrespondenceBuildError>
Projection matching with an optional reverse ambiguity gate. The
matcher’s normal ratio test operates landmark -> keypoints in one
projection window. max_query_landmark_distance_ratio additionally
requires the winning landmark for a query keypoint to be strictly
better than the second-best landmark whose projection window contains
that keypoint. This rejects repeated-texture collisions between
overlapping windows before PnP.
Trait Implementations§
Auto Trait Implementations§
impl<M, S> Forget for ProjectionCorrespondenceBuilder<M, S>
impl<M, S> Freeze for ProjectionCorrespondenceBuilder<M, S>
impl<M, S> Move for ProjectionCorrespondenceBuilder<M, S>
impl<M, S> RefUnwindSafe for ProjectionCorrespondenceBuilder<M, S>where
M: RefUnwindSafe,
S: RefUnwindSafe,
impl<M, S> Send for ProjectionCorrespondenceBuilder<M, S>
impl<M, S> Sync for ProjectionCorrespondenceBuilder<M, S>
impl<M, S> Unpin for ProjectionCorrespondenceBuilder<M, S>
impl<M, S> UnsafeUnpin for ProjectionCorrespondenceBuilder<M, S>where
M: UnsafeUnpin,
S: UnsafeUnpin,
impl<M, S> UnwindSafe for ProjectionCorrespondenceBuilder<M, S>where
M: UnwindSafe,
S: UnwindSafe,
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<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.