#include <NViewMatches.h>
Public Member Functions | |
NViewMatches () | |
NViewMatches (vcl_istream &s) | |
NViewMatches (const char *filename) | |
NViewMatches (int nviews, int min_overlap=2) | |
~NViewMatches () | |
int | nviews () const |
bool | load (vcl_istream &) |
bool | load (const char *filename) |
bool | save (vcl_ostream &) |
bool | save (const char *filename) |
void | clear () |
int | count_matches (const NViewMatch &match) |
Count how many matches are consistent with match . | |
vcl_vector< int > | get_matches (const NViewMatch &match) |
Return an array of the indices that match the given match . | |
int | incorporate_triplet (int base_view, int c1, int c2, int c3) |
Build an NViewMatch from the triplet (base_view..base_view+2), and incorporate. | |
int | incorporate (const NViewMatch &matches) |
Add a new nview match to the set. | |
void | remove_inconsistencies () |
NViewMatch | make_triplet_match (int base_view, int c1, int c2, int c3) |
Build an NViewMatch from the triplet (base_view..base_view+2). | |
Private Attributes | |
int | nviews_ |
int | min_overlap_ |
Definition at line 56 of file NViewMatches.h.
NViewMatches::NViewMatches | ( | ) |
Definition at line 83 of file NViewMatches.cxx.
NViewMatches::NViewMatches | ( | vcl_istream & | s | ) |
Definition at line 88 of file NViewMatches.cxx.
NViewMatches::NViewMatches | ( | const char * | filename | ) |
Definition at line 93 of file NViewMatches.cxx.
NViewMatches::NViewMatches | ( | int | nviews, |
int | min_overlap = 2 |
||
) |
Definition at line 98 of file NViewMatches.cxx.
NViewMatches::~NViewMatches | ( | ) |
Definition at line 103 of file NViewMatches.cxx.
void NViewMatches::clear | ( | ) |
Definition at line 108 of file NViewMatches.cxx.
int NViewMatches::count_matches | ( | const NViewMatch & | match | ) |
Count how many matches are consistent with match
.
Definition at line 166 of file NViewMatches.cxx.
vcl_vector< int > NViewMatches::get_matches | ( | const NViewMatch & | match | ) |
Return an array of the indices that match the given match
.
Definition at line 176 of file NViewMatches.cxx.
int NViewMatches::incorporate | ( | const NViewMatch & | newtrack | ) |
Add a new nview match to the set.
If it is just an update of an existing match (filling in a wildcard), merge it. Otherwise add it at the end.
If the new match is consistent with two existing consistent matches then all 3 are merged.
If the new match is consistent with two existing inconsistent matches they are both removed.
Returns the index of the match into which the new match was merged, or the index of the new match if it was consistent with nothing. Returns -1 if inconsistency was found.
Definition at line 199 of file NViewMatches.cxx.
int NViewMatches::incorporate_triplet | ( | int | base_view, |
int | c1, | ||
int | c2, | ||
int | c3 | ||
) |
Build an NViewMatch from the triplet (base_view..base_view+2), and incorporate.
Definition at line 255 of file NViewMatches.cxx.
bool NViewMatches::load | ( | vcl_istream & | s | ) |
Definition at line 123 of file NViewMatches.cxx.
bool NViewMatches::load | ( | const char * | filename | ) |
Definition at line 113 of file NViewMatches.cxx.
NViewMatch NViewMatches::make_triplet_match | ( | int | base_view, |
int | c1, | ||
int | c2, | ||
int | c3 | ||
) |
Build an NViewMatch from the triplet (base_view..base_view+2).
Definition at line 244 of file NViewMatches.cxx.
int NViewMatches::nviews | ( | ) | const [inline] |
Definition at line 74 of file NViewMatches.h.
void NViewMatches::remove_inconsistencies | ( | ) |
Definition at line 267 of file NViewMatches.cxx.
bool NViewMatches::save | ( | vcl_ostream & | s | ) |
Definition at line 152 of file NViewMatches.cxx.
bool NViewMatches::save | ( | const char * | filename | ) |
Definition at line 159 of file NViewMatches.cxx.
int NViewMatches::min_overlap_ [private] |
Definition at line 60 of file NViewMatches.h.
int NViewMatches::nviews_ [private] |
Definition at line 59 of file NViewMatches.h.