pub struct LocalizationPipeline<M = BruteForceMatcher, S = AllLandmarksSelector, E = PnPRansac> {
pub matcher: M,
pub candidate_selector: S,
pub pose_estimator: E,
pub config: LocalizationConfig,
}Fields§
§matcher: M§candidate_selector: S§pose_estimator: E§config: LocalizationConfigImplementations§
Source§impl<M> LocalizationPipeline<M, AllLandmarksSelector, PnPRansac>
impl<M> LocalizationPipeline<M, AllLandmarksSelector, PnPRansac>
pub fn new(matcher: M, config: LocalizationConfig) -> Self
Source§impl<M, S> LocalizationPipeline<M, S, PnPRansac>
impl<M, S> LocalizationPipeline<M, S, PnPRansac>
pub fn with_candidate_selector( matcher: M, candidate_selector: S, config: LocalizationConfig, ) -> Self
Source§impl<M, S, E> LocalizationPipeline<M, S, E>
impl<M, S, E> LocalizationPipeline<M, S, E>
pub const fn with_pose_estimator( matcher: M, candidate_selector: S, pose_estimator: E, config: LocalizationConfig, ) -> Self
pub fn localize( &self, query: &QueryImage, map: &VisualMap, ) -> LocalizationResult
pub fn localize_with_provider<P>(
&self,
query: &QueryImage,
provider: &P,
) -> LocalizationResultwhere
P: MapProvider + DescriptorProvider,
pub fn localize_image_with_extractor<X>(
&self,
image: &X::Image,
camera: Camera,
map: &VisualMap,
extractor: &X,
) -> Result<LocalizationResult, X::Error>where
X: FeatureExtractor,
pub fn localize_image_with_extractor_and_provider<X, P>( &self, image: &X::Image, camera: Camera, provider: &P, extractor: &X, ) -> Result<LocalizationResult, X::Error>
pub fn localize_image_with_extractor_and_descriptor_store<X>(
&self,
image: &X::Image,
camera: Camera,
map: &VisualMap,
descriptor_store: &LandmarkDescriptorStore,
extractor: &X,
) -> Result<LocalizationResult, X::Error>where
X: FeatureExtractor,
pub fn localize_frame( &self, frame: &Frame, map: &VisualMap, ) -> LocalizationResult
pub fn localize_frame_with_provider<P>(
&self,
frame: &Frame,
provider: &P,
) -> LocalizationResultwhere
P: MapProvider + DescriptorProvider,
pub fn localize_frame_image_with_extractor<X>(
&self,
frame_id: FrameId,
camera_id: CameraId,
image: &X::Image,
map: &VisualMap,
extractor: &X,
) -> Result<FrameLocalizationResult, X::Error>where
X: FeatureExtractor,
pub fn localize_frame_image_with_extractor_and_provider<X, P>( &self, frame_id: FrameId, camera_id: CameraId, image: &X::Image, provider: &P, extractor: &X, ) -> Result<FrameLocalizationResult, X::Error>
pub fn localize_frame_image_with_extractor_and_descriptor_store<X>(
&self,
frame_id: FrameId,
camera_id: CameraId,
image: &X::Image,
map: &VisualMap,
descriptor_store: &LandmarkDescriptorStore,
extractor: &X,
) -> Result<FrameLocalizationResult, X::Error>where
X: FeatureExtractor,
pub fn localize_frames( &self, frames: &[Frame], map: &VisualMap, ) -> Vec<FrameLocalizationResult>
pub fn localize_frame_with_descriptor_store( &self, frame: &Frame, map: &VisualMap, descriptor_store: &LandmarkDescriptorStore, ) -> LocalizationResult
pub fn localize_frame_with_candidate_selector_and_descriptor_store<S2>(
&self,
frame: &Frame,
map: &VisualMap,
descriptor_store: &LandmarkDescriptorStore,
candidate_selector: S2,
) -> LocalizationResultwhere
S2: CandidateSelector + Clone,
pub fn localize_frames_with_descriptor_store( &self, frames: &[Frame], map: &VisualMap, descriptor_store: &LandmarkDescriptorStore, ) -> Vec<FrameLocalizationResult>
pub fn localize_with_candidate_selector_and_descriptor_store<S2>(
&self,
query: &QueryImage,
map: &VisualMap,
descriptor_store: &LandmarkDescriptorStore,
candidate_selector: S2,
) -> LocalizationResultwhere
S2: CandidateSelector + Clone,
pub fn localize_with_candidate_selector_and_descriptor_store_and_pose_prior<S2>(
&self,
query: &QueryImage,
map: &VisualMap,
descriptor_store: &LandmarkDescriptorStore,
candidate_selector: S2,
pose_prior: Option<&Pose>,
) -> LocalizationResultwhere
S2: CandidateSelector + Clone,
pub fn localize_with_descriptor_store( &self, query: &QueryImage, map: &VisualMap, descriptor_store: &LandmarkDescriptorStore, ) -> LocalizationResult
Sourcepub fn localize_frame_with_projection_window_and_descriptor_store(
&self,
frame: &Frame,
map: &VisualMap,
descriptor_store: &LandmarkDescriptorStore,
pose_prior: &Pose,
candidate_radius: Option<f64>,
search_radius_px: f64,
) -> LocalizationResult
pub fn localize_frame_with_projection_window_and_descriptor_store( &self, frame: &Frame, map: &VisualMap, descriptor_store: &LandmarkDescriptorStore, pose_prior: &Pose, candidate_radius: Option<f64>, search_radius_px: f64, ) -> LocalizationResult
ORB-SLAM3-style projection-guided variant of
[Self::localize_frame_with_pose_prior_and_descriptor_store]: instead
of an appearance-global descriptor search restricted to a radius
candidate set, each candidate landmark is projected into the frame
with pose_prior and matched only against query keypoints within
search_radius_px pixels of the projection (see
ProjectionCorrespondenceBuilder). Falls through to the existing
pose-estimation-and-quality-gate path unchanged.
pub fn localize_frame_with_projection_window_descriptor_store_and_query_landmark_ratio( &self, frame: &Frame, map: &VisualMap, descriptor_store: &LandmarkDescriptorStore, pose_prior: &Pose, candidate_radius: Option<f64>, search_radius_px: f64, max_query_landmark_distance_ratio: Option<f32>, ) -> LocalizationResult
pub fn localize_with_projection_window_and_descriptor_store<S2>(
&self,
query: &QueryImage,
map: &VisualMap,
descriptor_store: &LandmarkDescriptorStore,
candidate_selector: S2,
pose_prior: &Pose,
search_radius_px: f64,
) -> LocalizationResultwhere
S2: CandidateSelector + Clone,
pub fn localize_with_projection_window_descriptor_store_and_query_landmark_ratio<S2>(
&self,
query: &QueryImage,
map: &VisualMap,
descriptor_store: &LandmarkDescriptorStore,
candidate_selector: S2,
pose_prior: &Pose,
search_radius_px: f64,
max_query_landmark_distance_ratio: Option<f32>,
) -> LocalizationResultwhere
S2: CandidateSelector + Clone,
Sourcepub fn refine_frame_pose_with_local_map_and_descriptor_store(
&self,
frame: &Frame,
map: &VisualMap,
local_map_descriptor_store: &LandmarkDescriptorStore,
estimated: &LocalizationResult,
refinement_search_radius_px: f64,
) -> Option<LocalizationResult>
pub fn refine_frame_pose_with_local_map_and_descriptor_store( &self, frame: &Frame, map: &VisualMap, local_map_descriptor_store: &LandmarkDescriptorStore, estimated: &LocalizationResult, refinement_search_radius_px: f64, ) -> Option<LocalizationResult>
Stage-3 local-map refinement: given an already-successful estimated
localization for frame, project local_map_descriptor_store’s
landmarks with the ESTIMATED pose, harvest additional correspondences
within refinement_search_radius_px, and re-run pose estimation over
the union with estimated’s own inlier correspondences (duplicates
by landmark id are dropped, preferring the already-known-good inlier
entry). Returns None when estimated carries no pose or the
combined correspondence set is too small for the estimator to run;
callers are responsible for accept/reject decisions (this method does
not compare inlier counts against estimated).
Sourcepub fn revise_frame_pose_with_local_map_and_descriptor_store(
&self,
frame: &Frame,
map: &VisualMap,
local_map_descriptor_store: &LandmarkDescriptorStore,
estimated: &LocalizationResult,
refinement_search_radius_px: f64,
) -> Option<LocalizationResult>
pub fn revise_frame_pose_with_local_map_and_descriptor_store( &self, frame: &Frame, map: &VisualMap, local_map_descriptor_store: &LandmarkDescriptorStore, estimated: &LocalizationResult, refinement_search_radius_px: f64, ) -> Option<LocalizationResult>
DROID-style correspondence-revision primitive for the sparse tracker:
discard the previous 2D-3D assignment, project the local map with the
latest pose, rebuild a fresh one-to-one correspondence set, and solve
PnP again. Repeating this operation alternates correspondence and pose
updates while preserving the existing robust estimator and quality
gate. Unlike Self::refine_frame_pose_with_local_map_and_descriptor_store,
query keypoints may switch to a different landmark between iterations.
Sourcepub fn localize_correspondences(
&self,
camera: &Camera,
correspondence_set: CorrespondenceSet,
) -> LocalizationResult
pub fn localize_correspondences( &self, camera: &Camera, correspondence_set: CorrespondenceSet, ) -> LocalizationResult
Pose estimation and quality gate over correspondences built outside
the pipeline, e.g. by BinaryLandmarkIndex: the same tail as every
localize_* method, so results are gated identically.
Trait Implementations§
Auto Trait Implementations§
impl<M, S, E> Forget for LocalizationPipeline<M, S, E>
impl<M, S, E> Freeze for LocalizationPipeline<M, S, E>
impl<M, S, E> Move for LocalizationPipeline<M, S, E>
impl<M, S, E> RefUnwindSafe for LocalizationPipeline<M, S, E>
impl<M, S, E> Send for LocalizationPipeline<M, S, E>
impl<M, S, E> Sync for LocalizationPipeline<M, S, E>
impl<M, S, E> Unpin for LocalizationPipeline<M, S, E>
impl<M, S, E> UnsafeUnpin for LocalizationPipeline<M, S, E>
impl<M, S, E> UnwindSafe for LocalizationPipeline<M, S, E>
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.