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>

List of all members.

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

typedef std::vector<HuginBase::UIntSet> HuginGraph::ImageGraph::Components

stores the components of the graph

Definition at line 50 of file ImageGraph.h.

typedef std::vector<HuginBase::UIntSet> HuginGraph::ImageGraph::GraphList

stores adjacency list for graph

Definition at line 48 of file ImageGraph.h.


Constructor & Destructor Documentation

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

constructor, build internal representation of graph

Definition at line 33 of file ImageGraph.cpp.

References HuginBase::PanoramaData::getCtrlPoints(), HuginBase::PanoramaData::getImage(), HuginBase::PanoramaData::getNrOfImages(), m_graph, and HuginBase::ControlPoint::X_Y.

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

constructor, build graph from overlap

Definition at line 70 of file ImageGraph.cpp.

References HuginBase::CalculateImageOverlap::getNrOfImages(), HuginBase::CalculateImageOverlap::getOverlap(), and m_graph.


Member Function Documentation

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.

Referenced by AutoPanoSiftMultiRow::automatch(), main(), PanoDetector::matchMultiRow(), and MainFrame::RunAssistant().

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(), and m_graph.

Referenced by AutoPanoSiftMultiRow::automatch(), HuginQueue::GetAssistantCommandQueueUserDefined(), PanoOperation::CleanControlPointsOperation::GetInternalCommand(), main(), and PanoDetector::matchMultiRow().

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:
forceAllComponents if 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(), and m_graph.

Referenced by HuginBase::AutoOptimise::autoOptimise(), and HuginBase::getEstimatedBlendingOrder().


Member Data Documentation

GraphList HuginGraph::ImageGraph::m_graph [private]

Definition at line 73 of file ImageGraph.h.

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


The documentation for this class was generated from the following files:
Generated on 20 Apr 2018 for Hugintrunk by  doxygen 1.4.7