#include <PlanarVisualizationModel.h>
Public Member Functions | |
void | draw (cv::Mat &img, const cv::Mat &cTo, const cv::Mat &A, const cv::Mat &K=cv::Mat()) const |
void | draw (cv::Mat &img, const cv::Mat &sHm, unsigned int face_idx) const |
PlanarVisualizationModel (const std::vector< ObjectModel::Face > &faces, const MetaFile::MetaData::tDimensions::tPlanar &dim) | |
virtual | ~PlanarVisualizationModel () |
Protected Attributes | |
MetaFile::MetaData::tDimensions::tPlanar | m_dim |
std::vector< cv::Mat > | m_face_images |
Images for visualization (colour and bw) | |
std::vector< cv::Mat > | m_face_images_bw |
std::vector< cv::Mat > | m_inv_A |
Definition at line 42 of file PlanarVisualizationModel.h.
PlanarVisualizationModel::PlanarVisualizationModel | ( | const std::vector< ObjectModel::Face > & | faces, |
const MetaFile::MetaData::tDimensions::tPlanar & | dim | ||
) |
Creates the visualization model
faces | faces present in the model. Only the image and the camera info is used |
dim | geometry and size information of the object and the faces |
Definition at line 47 of file PlanarVisualizationModel.cpp.
virtual PlanarVisualizationModel::~PlanarVisualizationModel | ( | ) | [inline, virtual] |
Definition at line 57 of file PlanarVisualizationModel.h.
void PlanarVisualizationModel::draw | ( | cv::Mat & | img, |
const cv::Mat & | cTo, | ||
const cv::Mat & | A, | ||
const cv::Mat & | K = cv::Mat() |
||
) | const [virtual] |
Draws the model in the given image
img | target image |
cTo | transformation from (c)amera to (o)bject |
A | intrinsic parameters of the camera that took image img |
K | distortion coefficient vector |
Implements VisualizationModel.
Definition at line 77 of file PlanarVisualizationModel.cpp.
void PlanarVisualizationModel::draw | ( | cv::Mat & | img, |
const cv::Mat & | sHm, | ||
unsigned int | face_idx | ||
) | const |
Draws only one face of the model in the given image according to a homography
img | target image |
sHm | homography to convert model points into img points |
face_idx | index of the face to draw |
Definition at line 226 of file PlanarVisualizationModel.cpp.
Transformations from origin of object to faces, dimensions of the object and dimensions of the faces
Definition at line 90 of file PlanarVisualizationModel.h.
std::vector<cv::Mat> PlanarVisualizationModel::m_face_images [protected] |
Images for visualization (colour and bw)
Definition at line 82 of file PlanarVisualizationModel.h.
std::vector<cv::Mat> PlanarVisualizationModel::m_face_images_bw [protected] |
Definition at line 82 of file PlanarVisualizationModel.h.
std::vector<cv::Mat> PlanarVisualizationModel::m_inv_A [protected] |
Inverse matrix of the intrinsic parameters of the cameras that took each image (double format)
Definition at line 86 of file PlanarVisualizationModel.h.