Skip to main content

MatchGraph

Struct MatchGraph 

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

대응 그래프.

Implementations§

Source§

impl MatchGraph

Source

pub fn new() -> Self

빈 그래프.

Source

pub fn add_image(&mut self, image_id: ImageId, num_points2d: usize)

노드 추가(2D 점 수만큼 빈 대응 목록). 이미 있으면 무시.

Source

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

영상 노드가 있는지.

Source

pub fn num_images(&self) -> usize

영상 노드 수.

Source

pub fn pair_count(&self) -> usize

짝 수.

Source

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

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

Source

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

영상의 2D 점 수.

Source

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

대응이 하나라도 있는 2D 점 수.

Source

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

영상이 속한 짝들의 매칭 수 합.

Source

pub fn match_count_between(&self, id1: ImageId, id2: ImageId) -> usize

두 영상 사이 매칭 수.

Source

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

두 영상 사이 짝이 있는지.

Source

pub fn image_pairs(&self) -> Vec<(PairId, usize)>

(짝 id, 매칭 수), 짝 id 오름차순.

Source

pub fn insert_two_view( &mut self, id1: ImageId, id2: ImageId, tvg: &TwoViewGeometry, ) -> AddPairStats

짝 추가. 매칭은 (id1 의 인덱스, id2 의 인덱스). 두 영상 노드가 있어야 한다(없으면 아무것도 안 함). 기하는 작은 id → 큰 id 방향으로 저장.

Source

pub fn from_store(store: &FeatureStore, opts: &MatchGraphOptions) -> Self

저장소에서 구성.

Source

pub fn update_from_store( &mut self, store: &FeatureStore, opts: &MatchGraphOptions, ) -> usize

저장소에 새로 기록된 짝만 반영(증분). 새 영상 노드도 필요 시 추가. 반환: 새로 추가된 짝 수.

Source

pub fn find_correspondences( &self, image_id: ImageId, point2d_idx: Point2DIdx, ) -> &[Correspondence]

(영상, 2D 점)의 직접 대응.

Source

pub fn has_correspondences( &self, image_id: ImageId, point2d_idx: Point2DIdx, ) -> bool

(영상, 2D 점)에 대응이 있는지.

Source

pub fn in_two_view_track( &self, image_id: ImageId, point2d_idx: Point2DIdx, ) -> bool

두 뷰 관측: 대응이 정확히 1개이고 상대도 정확히 1개.

Source

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

두 영상 사이 매칭: 영상1 2D 점 오름차순.

Source

pub fn transitive_matches( &self, image_id: ImageId, point2d_idx: Point2DIdx, depth: usize, ) -> Vec<Correspondence>

추이적 대응(너비 우선, 깊이 t). 시작 관측과 이미 본 관측 제외.

Source

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

(id1 → id2) 방향 두 뷰 기하(인라이어 제외).

Source

pub fn replace_two_view( &mut self, id1: ImageId, id2: ImageId, tvg: &TwoViewGeometry, ) -> bool

(id1 → id2) 방향 기하로 갱신.

Source

pub fn union_find_tracks<F>(&self, pair_filter: F) -> Vec<Vec<Correspondence>>
where F: Fn(ImageId, ImageId) -> bool,

합집합-찾기 트랙(연결 성분). pair_filter(작은 id, 큰 id) 가 참인 짝만 사용. 각 성분은 (영상, 점) 오름차순, 성분 목록은 첫 원소 오름차순. 길이 1 성분은 없다.

Trait Implementations§

Source§

impl Clone for MatchGraph

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 Debug for MatchGraph

Source§

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

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

impl Default for MatchGraph

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