Hugin trunk 0.1
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Attributes | List of all members
HuginGraph::ImageGraph Class Reference

class to work with images graphs created from a HuginBase::Panorama class it creates a graph based on control points and linked images positions and provides function to work with it More...

#include <ImageGraph.h>

Public Types

typedef std::vector< HuginBase::UIntSetGraphList
 stores adjacency list for graph
 
typedef std::vector< HuginBase::UIntSetComponents
 stores the components of the graph
 

Public Member Functions

 ImageGraph (const HuginBase::PanoramaData &pano, bool ignoreLinkedPosition=false)
 constructor, build internal representation of graph
 
 ImageGraph (const HuginBase::CalculateImageOverlap &overlap)
 constructor, build graph from overlap
 
Components GetComponents ()
 find all connected components
 
bool IsConnected ()
 check if all images are connected
 
void VisitAllImages (const size_t startImg, bool forceAllComponents, BreadthFirstSearchVisitor *visitor)
 visit all images via a breadth first search algorithm for each visited images, the functor visitor is called with HuginBase::UIntSet which contains all neighbors in the graph
 

Private Attributes

GraphList m_graph
 

Detailed Description

class to work with images graphs created from a HuginBase::Panorama class it creates a graph based on control points and linked images positions and provides function to work with it

Definition at line 44 of file ImageGraph.h.

Member Typedef Documentation

◆ Components

stores the components of the graph

Definition at line 50 of file ImageGraph.h.

◆ GraphList

stores adjacency list for graph

Definition at line 48 of file ImageGraph.h.

Constructor & Destructor Documentation

◆ ImageGraph() [1/2]

HuginGraph::ImageGraph::ImageGraph ( const HuginBase::PanoramaData pano,
bool  ignoreLinkedPosition = false 
)

◆ ImageGraph() [2/2]

HuginGraph::ImageGraph::ImageGraph ( const HuginBase::CalculateImageOverlap overlap)

constructor, build graph from overlap

Definition at line 70 of file ImageGraph.cpp.

References m_graph, and threshold().

Member Function Documentation

◆ GetComponents()

ImageGraph::Components HuginGraph::ImageGraph::GetComponents ( )

find all connected components

Returns
number of components if you want to know, if all images are connected use IsConnected() instead

Definition at line 101 of file ImageGraph.cpp.

References m_graph, and threshold().

◆ IsConnected()

bool HuginGraph::ImageGraph::IsConnected ( )

check if all images are connected

Returns
true, if all images are connected, otherwise false it uses an optimized depth first search and breaks out if a a second components is found. If you need all components use GetComponents() instead

Definition at line 128 of file ImageGraph.cpp.

References HuginGraph::DepthFirstSearch(), m_graph, and threshold().

◆ VisitAllImages()

void HuginGraph::ImageGraph::VisitAllImages ( const size_t  startImg,
bool  forceAllComponents,
BreadthFirstSearchVisitor visitor 
)

visit all images via a breadth first search algorithm for each visited images, the functor visitor is called with HuginBase::UIntSet which contains all neighbors in the graph

Parameters
forceAllComponentsif true all images are visited, if false only the images connected with startImg are visited

Definition at line 176 of file ImageGraph.cpp.

References HuginGraph::BreadthFirstSearchVisit(), m_graph, and threshold().

Member Data Documentation

◆ m_graph

GraphList HuginGraph::ImageGraph::m_graph
private

Definition at line 73 of file ImageGraph.h.

Referenced by GetComponents(), ImageGraph(), ImageGraph(), IsConnected(), and VisitAllImages().


The documentation for this class was generated from the following files: