GSoC2011SfM
0.1
Google Summer of Code 2011: Structure from motion
|
This class modelizes the images graph connections. More...
#include <TracksOfPoints.h>
Public Member Functions | |
ImagesGraphConnection () | |
bool | isGraphCreated (int nbImages) |
void | initStructure (int nb_images) |
void | addLink (int first_image, int second_image) |
int | getNumbersOfLinks (int first_image, int second_image) |
int | getHighestLink (int &first_image, int &second_image, int max_number=1e9) |
void | getOrderedLinks (std::vector< ImageLink > &outList, int min_number=0, int max_number=1e9) |
void | getImagesRelatedTo (int first_image, std::vector< ImageLink > &outList, int min_number=0, int max_number=1e9) |
Protected Member Functions | |
void | orderedIdx (int i1, int i2, int idx[2]) |
Protected Attributes | |
cv::SparseMat | images_graph_ |
This class modelizes the images graph connections.
Definition at line 256 of file TracksOfPoints.h.
OpencvSfM::ImagesGraphConnection::ImagesGraphConnection | ( | ) | [inline] |
Create an empty image graph
Definition at line 289 of file TracksOfPoints.h.
void OpencvSfM::ImagesGraphConnection::addLink | ( | int | first_image, |
int | second_image | ||
) | [inline] |
Add a new link between two images
first_image | first image |
second_image | second image |
Definition at line 318 of file TracksOfPoints.h.
Referenced by OpencvSfM::SequenceAnalyzer::constructImagesGraph().
int OpencvSfM::ImagesGraphConnection::getHighestLink | ( | int & | first_image, |
int & | second_image, | ||
int | max_number = 1e9 |
||
) |
get the highest link
first_image | [ out ] first image |
second_image | [ out ] second image |
max_number | [ in ] maximum allowed links between images |
Definition at line 502 of file TracksOfPoints.cpp.
Referenced by OpencvSfM::EuclideanEstimator::computeReconstruction().
void OpencvSfM::ImagesGraphConnection::getImagesRelatedTo | ( | int | first_image, |
std::vector< ImageLink > & | outList, | ||
int | min_number = 0 , |
||
int | max_number = 1e9 |
||
) |
get the related images to the first parameter
first_image | [ in ] first image index |
outList | [ in/out ] ordered vector of links between images |
min_number | minimum allowed links between images |
max_number | maximum allowed links between images |
Definition at line 553 of file TracksOfPoints.cpp.
Referenced by OpencvSfM::EuclideanEstimator::computeReconstruction().
int OpencvSfM::ImagesGraphConnection::getNumbersOfLinks | ( | int | first_image, |
int | second_image | ||
) | [inline] |
get the numbers of links between two images
first_image | first image |
second_image | second image |
Definition at line 330 of file TracksOfPoints.h.
void OpencvSfM::ImagesGraphConnection::getOrderedLinks | ( | std::vector< ImageLink > & | outList, |
int | min_number = 0 , |
||
int | max_number = 1e9 |
||
) |
get the highest link
outList | [ out ] ordered vector of links between images |
min_number | minimum allowed links between images |
max_number | maximum allowed links between images |
Definition at line 526 of file TracksOfPoints.cpp.
Referenced by OpencvSfM::EuclideanEstimator::computeReconstruction().
void OpencvSfM::ImagesGraphConnection::initStructure | ( | int | nb_images | ) | [inline] |
Prepare this structure to store the graph of correspondances
nb_images | number of images to store |
Definition at line 307 of file TracksOfPoints.h.
Referenced by OpencvSfM::SequenceAnalyzer::constructImagesGraph().
bool OpencvSfM::ImagesGraphConnection::isGraphCreated | ( | int | nbImages | ) | [inline] |
Use this function to test if the graph is already builded
nbImages | number of images the graph should store |
Definition at line 296 of file TracksOfPoints.h.
void OpencvSfM::ImagesGraphConnection::orderedIdx | ( | int | i1, |
int | i2, | ||
int | idx[2] | ||
) | [inline, protected] |
Use this function to create an ordered image index:
i1 | [in] first image index |
i2 | [in] second image index |
idx | [out] index of this image link where idx[0]<idx[1] |
Definition at line 272 of file TracksOfPoints.h.
cv::SparseMat OpencvSfM::ImagesGraphConnection::images_graph_ [protected] |
Sparse upper triangular matrix for image graph. ( i,j ) value represent the numbers of points matches between image i and j. of course ( i,j ) equal ( j,i ) so only ( i,j ) with i<j are stored.
Definition at line 264 of file TracksOfPoints.h.
Referenced by getHighestLink(), getImagesRelatedTo(), and getOrderedLinks().