pub struct MatchGraph { /* private fields */ }Expand description
대응 그래프.
Implementations§
Source§impl MatchGraph
impl MatchGraph
Sourcepub fn add_image(&mut self, image_id: ImageId, num_points2d: usize)
pub fn add_image(&mut self, image_id: ImageId, num_points2d: usize)
노드 추가(2D 점 수만큼 빈 대응 목록). 이미 있으면 무시.
Sourcepub fn exists_image(&self, image_id: ImageId) -> bool
pub fn exists_image(&self, image_id: ImageId) -> bool
영상 노드가 있는지.
Sourcepub fn num_images(&self) -> usize
pub fn num_images(&self) -> usize
영상 노드 수.
Sourcepub fn pair_count(&self) -> usize
pub fn pair_count(&self) -> usize
짝 수.
Sourcepub fn num_points2d(&self, image_id: ImageId) -> usize
pub fn num_points2d(&self, image_id: ImageId) -> usize
영상의 2D 점 수.
Sourcepub fn observation_count_of(&self, image_id: ImageId) -> usize
pub fn observation_count_of(&self, image_id: ImageId) -> usize
대응이 하나라도 있는 2D 점 수.
Sourcepub fn match_count_of(&self, image_id: ImageId) -> usize
pub fn match_count_of(&self, image_id: ImageId) -> usize
영상이 속한 짝들의 매칭 수 합.
Sourcepub fn match_count_between(&self, id1: ImageId, id2: ImageId) -> usize
pub fn match_count_between(&self, id1: ImageId, id2: ImageId) -> usize
두 영상 사이 매칭 수.
Sourcepub fn exists_image_pair(&self, id1: ImageId, id2: ImageId) -> bool
pub fn exists_image_pair(&self, id1: ImageId, id2: ImageId) -> bool
두 영상 사이 짝이 있는지.
Sourcepub fn image_pairs(&self) -> Vec<(PairId, usize)>
pub fn image_pairs(&self) -> Vec<(PairId, usize)>
(짝 id, 매칭 수), 짝 id 오름차순.
Sourcepub fn insert_two_view(
&mut self,
id1: ImageId,
id2: ImageId,
tvg: &TwoViewGeometry,
) -> AddPairStats
pub fn insert_two_view( &mut self, id1: ImageId, id2: ImageId, tvg: &TwoViewGeometry, ) -> AddPairStats
짝 추가. 매칭은 (id1 의 인덱스, id2 의 인덱스). 두 영상 노드가 있어야 한다(없으면 아무것도 안 함). 기하는 작은 id → 큰 id 방향으로 저장.
Sourcepub fn from_store(store: &FeatureStore, opts: &MatchGraphOptions) -> Self
pub fn from_store(store: &FeatureStore, opts: &MatchGraphOptions) -> Self
저장소에서 구성.
Sourcepub fn update_from_store(
&mut self,
store: &FeatureStore,
opts: &MatchGraphOptions,
) -> usize
pub fn update_from_store( &mut self, store: &FeatureStore, opts: &MatchGraphOptions, ) -> usize
저장소에 새로 기록된 짝만 반영(증분). 새 영상 노드도 필요 시 추가. 반환: 새로 추가된 짝 수.
Sourcepub fn find_correspondences(
&self,
image_id: ImageId,
point2d_idx: Point2DIdx,
) -> &[Correspondence]
pub fn find_correspondences( &self, image_id: ImageId, point2d_idx: Point2DIdx, ) -> &[Correspondence]
(영상, 2D 점)의 직접 대응.
Sourcepub fn has_correspondences(
&self,
image_id: ImageId,
point2d_idx: Point2DIdx,
) -> bool
pub fn has_correspondences( &self, image_id: ImageId, point2d_idx: Point2DIdx, ) -> bool
(영상, 2D 점)에 대응이 있는지.
Sourcepub fn in_two_view_track(
&self,
image_id: ImageId,
point2d_idx: Point2DIdx,
) -> bool
pub fn in_two_view_track( &self, image_id: ImageId, point2d_idx: Point2DIdx, ) -> bool
두 뷰 관측: 대응이 정확히 1개이고 상대도 정확히 1개.
Sourcepub fn matches_between(&self, id1: ImageId, id2: ImageId) -> Vec<FeatureMatch>
pub fn matches_between(&self, id1: ImageId, id2: ImageId) -> Vec<FeatureMatch>
두 영상 사이 매칭: 영상1 2D 점 오름차순.
Sourcepub fn transitive_matches(
&self,
image_id: ImageId,
point2d_idx: Point2DIdx,
depth: usize,
) -> Vec<Correspondence>
pub fn transitive_matches( &self, image_id: ImageId, point2d_idx: Point2DIdx, depth: usize, ) -> Vec<Correspondence>
추이적 대응(너비 우선, 깊이 t). 시작 관측과 이미 본 관측 제외.
Sourcepub fn two_view_geometry(
&self,
id1: ImageId,
id2: ImageId,
) -> Option<TwoViewGeometry>
pub fn two_view_geometry( &self, id1: ImageId, id2: ImageId, ) -> Option<TwoViewGeometry>
(id1 → id2) 방향 두 뷰 기하(인라이어 제외).
Sourcepub fn replace_two_view(
&mut self,
id1: ImageId,
id2: ImageId,
tvg: &TwoViewGeometry,
) -> bool
pub fn replace_two_view( &mut self, id1: ImageId, id2: ImageId, tvg: &TwoViewGeometry, ) -> bool
(id1 → id2) 방향 기하로 갱신.
Sourcepub fn union_find_tracks<F>(&self, pair_filter: F) -> Vec<Vec<Correspondence>>
pub fn union_find_tracks<F>(&self, pair_filter: F) -> Vec<Vec<Correspondence>>
합집합-찾기 트랙(연결 성분). pair_filter(작은 id, 큰 id) 가 참인 짝만 사용.
각 성분은 (영상, 점) 오름차순, 성분 목록은 첫 원소 오름차순. 길이 1 성분은 없다.
Trait Implementations§
Source§impl Clone for MatchGraph
impl Clone for MatchGraph
Source§impl Debug for MatchGraph
impl Debug for MatchGraph
Auto Trait Implementations§
impl Freeze for MatchGraph
impl RefUnwindSafe for MatchGraph
impl Send for MatchGraph
impl Sync for MatchGraph
impl Unpin for MatchGraph
impl UnsafeUnpin for MatchGraph
impl UnwindSafe for MatchGraph
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.