Skip to main content

LocalizationPipeline

Struct LocalizationPipeline 

Source
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: LocalizationConfig

Implementations§

Source§

impl<M> LocalizationPipeline<M, AllLandmarksSelector, PnPRansac>
where M: Matcher + Clone,

Source

pub fn new(matcher: M, config: LocalizationConfig) -> Self

Source§

impl<M, S> LocalizationPipeline<M, S, PnPRansac>

Source

pub fn with_candidate_selector( matcher: M, candidate_selector: S, config: LocalizationConfig, ) -> Self

Source§

impl<M, S, E> LocalizationPipeline<M, S, E>

Source

pub const fn with_pose_estimator( matcher: M, candidate_selector: S, pose_estimator: E, config: LocalizationConfig, ) -> Self

Source

pub fn localize( &self, query: &QueryImage, map: &VisualMap, ) -> LocalizationResult

Source

pub fn localize_with_provider<P>( &self, query: &QueryImage, provider: &P, ) -> LocalizationResult

Source

pub fn localize_image_with_extractor<X>( &self, image: &X::Image, camera: Camera, map: &VisualMap, extractor: &X, ) -> Result<LocalizationResult, X::Error>

Source

pub fn localize_image_with_extractor_and_provider<X, P>( &self, image: &X::Image, camera: Camera, provider: &P, extractor: &X, ) -> Result<LocalizationResult, X::Error>

Source

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>

Source

pub fn localize_frame( &self, frame: &Frame, map: &VisualMap, ) -> LocalizationResult

Source

pub fn localize_frame_with_provider<P>( &self, frame: &Frame, provider: &P, ) -> LocalizationResult

Source

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>

Source

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>

Source

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>

Source

pub fn localize_frames( &self, frames: &[Frame], map: &VisualMap, ) -> Vec<FrameLocalizationResult>

Source

pub fn localize_frame_with_descriptor_store( &self, frame: &Frame, map: &VisualMap, descriptor_store: &LandmarkDescriptorStore, ) -> LocalizationResult

Source

pub fn localize_frame_with_candidate_selector_and_descriptor_store<S2>( &self, frame: &Frame, map: &VisualMap, descriptor_store: &LandmarkDescriptorStore, candidate_selector: S2, ) -> LocalizationResult

Source

pub fn localize_frames_with_descriptor_store( &self, frames: &[Frame], map: &VisualMap, descriptor_store: &LandmarkDescriptorStore, ) -> Vec<FrameLocalizationResult>

Source

pub fn localize_with_candidate_selector_and_descriptor_store<S2>( &self, query: &QueryImage, map: &VisualMap, descriptor_store: &LandmarkDescriptorStore, candidate_selector: S2, ) -> LocalizationResult

Source

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>, ) -> LocalizationResult

Source

pub fn localize_with_descriptor_store( &self, query: &QueryImage, map: &VisualMap, descriptor_store: &LandmarkDescriptorStore, ) -> LocalizationResult

Source

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.

Source

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

Source

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, ) -> LocalizationResult

Source

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>, ) -> LocalizationResult

Source

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).

Source

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.

Source

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§

Source§

impl<M: Clone, S: Clone, E: Clone> Clone for LocalizationPipeline<M, S, E>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<M: Debug, S: Debug, E: Debug> Debug for LocalizationPipeline<M, S, E>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for LocalizationPipeline<BruteForceMatcher, AllLandmarksSelector, PnPRansac>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<M, S, E> Forget for LocalizationPipeline<M, S, E>

§

impl<M, S, E> Freeze for LocalizationPipeline<M, S, E>
where M: Freeze, S: Freeze, E: Freeze,

§

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>
where E: Send, S: Send, M: Send,

§

impl<M, S, E> Sync for LocalizationPipeline<M, S, E>
where E: Sync, S: Sync, M: Sync,

§

impl<M, S, E> Unpin for LocalizationPipeline<M, S, E>
where E: Unpin, S: Unpin, M: Unpin,

§

impl<M, S, E> UnsafeUnpin for LocalizationPipeline<M, S, E>

§

impl<M, S, E> UnwindSafe for LocalizationPipeline<M, S, E>
where M: UnwindSafe, S: UnwindSafe, E: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V