pub struct FeatureStore { /* private fields */ }Expand description
메모리 특징 저장소.
Implementations§
Source§impl FeatureStore
impl FeatureStore
Sourcepub fn add_camera(&self, camera: Camera) -> Result<CameraId>
pub fn add_camera(&self, camera: Camera) -> Result<CameraId>
카메라 추가. camera_id 가 무효값이면 “최대 id + 1”(빈 저장소에서 1)을 발급.
Sourcepub fn update_camera(&self, camera: Camera) -> Result<()>
pub fn update_camera(&self, camera: Camera) -> Result<()>
기존 카메라 덮어쓰기(없으면 오류).
Sourcepub fn num_cameras(&self) -> usize
pub fn num_cameras(&self) -> usize
카메라 수.
Sourcepub fn add_image(&self, name: &str, camera_id: CameraId) -> Result<ImageId>
pub fn add_image(&self, name: &str, camera_id: CameraId) -> Result<ImageId>
영상 추가(이름 고유, 카메라 존재 필요). id 는 “최대 id + 1”(빈 저장소에서 1).
Sourcepub fn add_image_with_id(
&self,
image_id: ImageId,
name: &str,
camera_id: CameraId,
) -> Result<ImageId>
pub fn add_image_with_id( &self, image_id: ImageId, name: &str, camera_id: CameraId, ) -> Result<ImageId>
지정 id 로 영상 추가.
Sourcepub fn image(&self, id: ImageId) -> Option<StoreImage>
pub fn image(&self, id: ImageId) -> Option<StoreImage>
영상 조회.
Sourcepub fn image_id_by_name(&self, name: &str) -> Option<ImageId>
pub fn image_id_by_name(&self, name: &str) -> Option<ImageId>
이름 → 영상 id.
Sourcepub fn image_by_name(&self, name: &str) -> Option<StoreImage>
pub fn image_by_name(&self, name: &str) -> Option<StoreImage>
이름으로 영상 조회.
Sourcepub fn images(&self) -> Vec<StoreImage>
pub fn images(&self) -> Vec<StoreImage>
모든 영상(id 오름차순).
Sourcepub fn num_images(&self) -> usize
pub fn num_images(&self) -> usize
영상 수.
Sourcepub fn exists_image(&self, id: ImageId) -> bool
pub fn exists_image(&self, id: ImageId) -> bool
영상이 있는지.
Sourcepub fn set_pose_prior(&self, image_id: ImageId, prior: PosePrior)
pub fn set_pose_prior(&self, image_id: ImageId, prior: PosePrior)
영상 사전 위치 설정.
Sourcepub fn pose_prior(&self, image_id: ImageId) -> Option<PosePrior>
pub fn pose_prior(&self, image_id: ImageId) -> Option<PosePrior>
영상 사전 위치 조회.
Sourcepub fn set_keypoints(&self, image_id: ImageId, kps: Vec<Keypoint>)
pub fn set_keypoints(&self, image_id: ImageId, kps: Vec<Keypoint>)
키포인트 기록(덮어씀).
Sourcepub fn set_descriptors(&self, image_id: ImageId, d: Descriptors)
pub fn set_descriptors(&self, image_id: ImageId, d: Descriptors)
기술자 기록(덮어씀).
Sourcepub fn descriptors(&self, image_id: ImageId) -> Option<Arc<Descriptors>>
pub fn descriptors(&self, image_id: ImageId) -> Option<Arc<Descriptors>>
기술자 조회(공유).
Sourcepub fn exists_keypoints(&self, image_id: ImageId) -> bool
pub fn exists_keypoints(&self, image_id: ImageId) -> bool
키포인트가 있는지.
Sourcepub fn exists_descriptors(&self, image_id: ImageId) -> bool
pub fn exists_descriptors(&self, image_id: ImageId) -> bool
기술자가 있는지.
Sourcepub fn num_keypoints(&self, image_id: ImageId) -> usize
pub fn num_keypoints(&self, image_id: ImageId) -> usize
영상의 키포인트 수(없으면 0).
Sourcepub fn largest_keypoint_count(&self) -> usize
pub fn largest_keypoint_count(&self) -> usize
영상별 키포인트 수의 최댓값.
Sourcepub fn write_matches(
&self,
id1: ImageId,
id2: ImageId,
matches: &[FeatureMatch],
) -> Result<()>
pub fn write_matches( &self, id1: ImageId, id2: ImageId, matches: &[FeatureMatch], ) -> Result<()>
원시 매칭 기록(덮어씀). (id1, id2) 순서의 인덱스 쌍을 받는다.
Sourcepub fn read_matches(
&self,
id1: ImageId,
id2: ImageId,
) -> Option<Arc<Vec<FeatureMatch>>>
pub fn read_matches( &self, id1: ImageId, id2: ImageId, ) -> Option<Arc<Vec<FeatureMatch>>>
(id1, id2) 방향으로 원시 매칭 조회.
Sourcepub fn exists_matches(&self, id1: ImageId, id2: ImageId) -> bool
pub fn exists_matches(&self, id1: ImageId, id2: ImageId) -> bool
원시 매칭이 있는지.
Sourcepub fn delete_matches(&self, id1: ImageId, id2: ImageId)
pub fn delete_matches(&self, id1: ImageId, id2: ImageId)
원시 매칭 삭제.
Sourcepub fn put_two_view(
&self,
id1: ImageId,
id2: ImageId,
tvg: &TwoViewGeometry,
) -> Result<()>
pub fn put_two_view( &self, id1: ImageId, id2: ImageId, tvg: &TwoViewGeometry, ) -> Result<()>
두 뷰 기하 기록(덮어씀). (id1 → id2) 방향 기하를 받는다.
Sourcepub fn get_two_view(
&self,
id1: ImageId,
id2: ImageId,
) -> Option<Arc<TwoViewGeometry>>
pub fn get_two_view( &self, id1: ImageId, id2: ImageId, ) -> Option<Arc<TwoViewGeometry>>
(id1 → id2) 방향 두 뷰 기하.
Sourcepub fn contains_two_view(&self, id1: ImageId, id2: ImageId) -> bool
pub fn contains_two_view(&self, id1: ImageId, id2: ImageId) -> bool
두 뷰 기하가 있는지.
Sourcepub fn remove_two_view(&self, id1: ImageId, id2: ImageId)
pub fn remove_two_view(&self, id1: ImageId, id2: ImageId)
두 뷰 기하 삭제.
Sourcepub fn two_view_geometries(&self) -> Vec<(PairId, Arc<TwoViewGeometry>)>
pub fn two_view_geometries(&self) -> Vec<(PairId, Arc<TwoViewGeometry>)>
저장된 모든 두 뷰 기하(짝 id 오름차순, 저장 방향 = 작은 id → 큰 id).
Sourcepub fn two_view_geometries_since(
&self,
since: usize,
) -> (Vec<(PairId, Arc<TwoViewGeometry>)>, usize)
pub fn two_view_geometries_since( &self, since: usize, ) -> (Vec<(PairId, Arc<TwoViewGeometry>)>, usize)
로그 위치 since 이후 기록된 짝들과 새 로그 위치. 증분 대응 그래프 갱신용.
Sourcepub fn num_two_view_geometries(&self) -> usize
pub fn num_two_view_geometries(&self) -> usize
저장된 두 뷰 기하 수.
Sourcepub fn num_matched_pairs(&self) -> usize
pub fn num_matched_pairs(&self) -> usize
원시 매칭이 저장된 짝 수.
Sourcepub fn retain_copy(&self, keep: impl Fn(&StoreImage) -> bool) -> FeatureStore
pub fn retain_copy(&self, keep: impl Fn(&StoreImage) -> bool) -> FeatureStore
keep 이 참인 영상만 남긴 새 저장소. 카메라는 모두, 영상 id·짝 자료·기하 기록 순서는 그대로 유지한다.
큰 자료(키포인트·기술자·매칭·기하)는 Arc 로 공유하므로 복사가 싸다. 점진 처리의 되감기용.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for FeatureStore
impl RefUnwindSafe for FeatureStore
impl Send for FeatureStore
impl Sync for FeatureStore
impl Unpin for FeatureStore
impl UnsafeUnpin for FeatureStore
impl UnwindSafe for FeatureStore
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
Mutably borrows from an owned value. Read more
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> ⓘ
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 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> ⓘ
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 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>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
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
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
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.