Skip to main content

FeatureStore

Struct FeatureStore 

Source
pub struct FeatureStore { /* private fields */ }
Expand description

메모리 특징 저장소.

Implementations§

Source§

impl FeatureStore

Source

pub fn new() -> Self

빈 저장소.

Source

pub fn add_camera(&self, camera: Camera) -> Result<CameraId>

카메라 추가. camera_id 가 무효값이면 “최대 id + 1”(빈 저장소에서 1)을 발급.

Source

pub fn update_camera(&self, camera: Camera) -> Result<()>

기존 카메라 덮어쓰기(없으면 오류).

Source

pub fn camera(&self, id: CameraId) -> Option<Camera>

카메라 조회(복사).

Source

pub fn cameras(&self) -> Vec<Camera>

카메라 전체(id 순).

Source

pub fn num_cameras(&self) -> usize

카메라 수.

Source

pub fn add_image(&self, name: &str, camera_id: CameraId) -> Result<ImageId>

영상 추가(이름 고유, 카메라 존재 필요). id 는 “최대 id + 1”(빈 저장소에서 1).

Source

pub fn add_image_with_id( &self, image_id: ImageId, name: &str, camera_id: CameraId, ) -> Result<ImageId>

지정 id 로 영상 추가.

Source

pub fn image(&self, id: ImageId) -> Option<StoreImage>

영상 조회.

Source

pub fn image_id_by_name(&self, name: &str) -> Option<ImageId>

이름 → 영상 id.

Source

pub fn image_by_name(&self, name: &str) -> Option<StoreImage>

이름으로 영상 조회.

Source

pub fn images(&self) -> Vec<StoreImage>

모든 영상(id 오름차순).

Source

pub fn image_ids(&self) -> Vec<ImageId> ⓘ

영상 id 목록(오름차순).

Source

pub fn num_images(&self) -> usize

영상 수.

Source

pub fn exists_image(&self, id: ImageId) -> bool

영상이 있는지.

Source

pub fn set_pose_prior(&self, image_id: ImageId, prior: PosePrior)

영상 사전 위치 설정.

Source

pub fn pose_prior(&self, image_id: ImageId) -> Option<PosePrior>

영상 사전 위치 조회.

Source

pub fn set_keypoints(&self, image_id: ImageId, kps: Vec<Keypoint>)

키포인트 기록(덮어씀).

Source

pub fn set_descriptors(&self, image_id: ImageId, d: Descriptors)

기술자 기록(덮어씀).

Source

pub fn keypoints(&self, image_id: ImageId) -> Option<Arc<Vec<Keypoint>>>

키포인트 조회(공유).

Source

pub fn descriptors(&self, image_id: ImageId) -> Option<Arc<Descriptors>>

기술자 조회(공유).

Source

pub fn exists_keypoints(&self, image_id: ImageId) -> bool

키포인트가 있는지.

Source

pub fn exists_descriptors(&self, image_id: ImageId) -> bool

기술자가 있는지.

Source

pub fn num_keypoints(&self, image_id: ImageId) -> usize

영상의 키포인트 수(없으면 0).

Source

pub fn largest_keypoint_count(&self) -> usize

영상별 키포인트 수의 최댓값.

Source

pub fn write_matches( &self, id1: ImageId, id2: ImageId, matches: &[FeatureMatch], ) -> Result<()>

원시 매칭 기록(덮어씀). (id1, id2) 순서의 인덱스 쌍을 받는다.

Source

pub fn read_matches( &self, id1: ImageId, id2: ImageId, ) -> Option<Arc<Vec<FeatureMatch>>>

(id1, id2) 방향으로 원시 매칭 조회.

Source

pub fn exists_matches(&self, id1: ImageId, id2: ImageId) -> bool

원시 매칭이 있는지.

Source

pub fn delete_matches(&self, id1: ImageId, id2: ImageId)

원시 매칭 삭제.

Source

pub fn put_two_view( &self, id1: ImageId, id2: ImageId, tvg: &TwoViewGeometry, ) -> Result<()>

두 뷰 기하 기록(덮어씀). (id1 → id2) 방향 기하를 받는다.

Source

pub fn get_two_view( &self, id1: ImageId, id2: ImageId, ) -> Option<Arc<TwoViewGeometry>>

(id1 → id2) 방향 두 뷰 기하.

Source

pub fn contains_two_view(&self, id1: ImageId, id2: ImageId) -> bool

두 뷰 기하가 있는지.

Source

pub fn remove_two_view(&self, id1: ImageId, id2: ImageId)

두 뷰 기하 삭제.

Source

pub fn two_view_geometries(&self) -> Vec<(PairId, Arc<TwoViewGeometry>)>

저장된 모든 두 뷰 기하(짝 id 오름차순, 저장 방향 = 작은 id → 큰 id).

Source

pub fn two_view_geometries_since( &self, since: usize, ) -> (Vec<(PairId, Arc<TwoViewGeometry>)>, usize)

로그 위치 since 이후 기록된 짝들과 새 로그 위치. 증분 대응 그래프 갱신용.

Source

pub fn num_two_view_geometries(&self) -> usize

저장된 두 뷰 기하 수.

Source

pub fn num_matched_pairs(&self) -> usize

원시 매칭이 저장된 짝 수.

Source

pub fn retain_copy(&self, keep: impl Fn(&StoreImage) -> bool) -> FeatureStore

keep 이 참인 영상만 남긴 새 저장소. 카메라는 모두, 영상 id·짝 자료·기하 기록 순서는 그대로 유지한다. 큰 자료(키포인트·기술자·매칭·기하)는 Arc 로 공유하므로 복사가 싸다. 점진 처리의 되감기용.

Source

pub fn save(&self, path: impl AsRef<Path>) -> Result<()>

자체 이진 형식으로 저장(리틀 엔디언).

Source

pub fn load(path: impl AsRef<Path>) -> Result<Self>

save 형식 읽기.

Trait Implementations§

Source§

impl Default for FeatureStore

Source§

fn default() -> Self

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

Auto Trait Implementations§

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> 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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 more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
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, 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.