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

This class can be used to view the differents object involved in current structure from motion process. More...

#include <Visualizer.h>

List of all members.

Public Member Functions

 Visualizer (std::string name="3D Viewer")
void addCamera (const PointOfView &camera, std::string name="camera", int viewport=0)
void add3DPoints (const std::vector< cv::Vec3d > &points, std::string name="cloud", int viewport=0)
void add3DPointsColored (const std::vector< cv::Vec3d > &points, const std::vector< unsigned int > &colors, std::string name="cloud", int viewport=0)
void runInteract ()

Protected Attributes

boost::shared_ptr
< pcl::visualization::PCLVisualizer > 
viewer
 The PCL viewer.

Detailed Description

This class can be used to view the differents object involved in current structure from motion process.

You can add to visualization 3D points, cameras, pictures... This class use PCL as back end, but it's hidden!

Definition at line 20 of file Visualizer.h.


Constructor & Destructor Documentation

OpencvSfM::Visualizer::Visualizer ( std::string  name = "3D Viewer")

Use this constructor to create a new window

Parameters:
nameThe title of the new window

Definition at line 14 of file Visualizer.cpp.


Member Function Documentation

void OpencvSfM::Visualizer::add3DPoints ( const std::vector< cv::Vec3d > &  points,
std::string  name = "cloud",
int  viewport = 0 
)

Use this function to add a new point cloud to the visualizer

Parameters:
pointslist of 3d points
nameThe name of the printed object
viewportidx of the wanted viewport

Definition at line 104 of file Visualizer.cpp.

Referenced by OpencvSfM::EuclideanEstimator::viewEstimation().

void OpencvSfM::Visualizer::add3DPointsColored ( const std::vector< cv::Vec3d > &  points,
const std::vector< unsigned int > &  colors,
std::string  name = "cloud",
int  viewport = 0 
)

Use this function to add a new point cloud with color to the visualizer

Parameters:
pointslist of 3d points
colorslist of colors (RGB packed)
nameThe name of the printed object
viewportidx of the wanted viewport

Definition at line 127 of file Visualizer.cpp.

Referenced by OpencvSfM::EuclideanEstimator::viewEstimation().

void OpencvSfM::Visualizer::addCamera ( const PointOfView camera,
std::string  name = "camera",
int  viewport = 0 
)

Use this function to add a new camera to the visualizer

Parameters:
camerainfo about the wanted camera
nameThe name of the printed object
viewportidx of the wanted viewport

Definition at line 22 of file Visualizer.cpp.

Referenced by OpencvSfM::EuclideanEstimator::viewEstimation().

void OpencvSfM::Visualizer::runInteract ( )

Once geometry is added, you can used this function to enable user interaction

Definition at line 165 of file Visualizer.cpp.

Referenced by OpencvSfM::EuclideanEstimator::viewEstimation().


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