GSoC2011SfM  0.1
Google Summer of Code 2011: Structure from motion
Public Member Functions | Protected Member Functions | Protected Attributes
OpencvSfM::ImagesGraphConnection Class Reference

This class modelizes the images graph connections. More...

#include <TracksOfPoints.h>

List of all members.

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_

Detailed Description

This class modelizes the images graph connections.

Definition at line 256 of file TracksOfPoints.h.


Constructor & Destructor Documentation

OpencvSfM::ImagesGraphConnection::ImagesGraphConnection ( ) [inline]

Create an empty image graph

Definition at line 289 of file TracksOfPoints.h.


Member Function Documentation

void OpencvSfM::ImagesGraphConnection::addLink ( int  first_image,
int  second_image 
) [inline]

Add a new link between two images

Parameters:
first_imagefirst image
second_imagesecond 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

Parameters:
first_image[ out ] first image
second_image[ out ] second image
max_number[ in ] maximum allowed links between images
Returns:
numbers of links between first image and second image

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

Parameters:
first_image[ in ] first image index
outList[ in/out ] ordered vector of links between images
min_numberminimum allowed links between images
max_numbermaximum 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

Parameters:
first_imagefirst image
second_imagesecond image
Returns:
numbers of links between first image and 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

Parameters:
outList[ out ] ordered vector of links between images
min_numberminimum allowed links between images
max_numbermaximum 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

Parameters:
nb_imagesnumber 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

Parameters:
nbImagesnumber of images the graph should store
Returns:
true if graph is build

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:

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


Member Data Documentation

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


The documentation for this class was generated from the following files:
 All Classes Functions Variables