projection
Public Member Functions | List of all members
projection::Homography Class Reference

#include <Homography.hpp>

Public Member Functions

cv::Mat getVirtualImage ()
 
void clearVirtualImage ()
 clear the virtual image More...
 
void init (int rows, int cols, float focal, const Eigen::Isometry3f &vcam2plane)
 
void addImage (cv::Mat image, const ::Eigen::Isometry3f &cam2plane, const Eigen::Matrix3f &camMat)
 
Eigen::Matrix3f calcHomography (const Eigen::Matrix3f &R, const Eigen::Vector3f &t, const Eigen::Vector3f &n, float d) const
 
Eigen::Matrix3f calcHomography (const Eigen::Isometry3f &trans, const Eigen::Vector3f &n, float dist) const
 
Eigen::Matrix3f calcHomography (const Eigen::Isometry3f &camA2plane, const Eigen::Isometry3f &camB2plane) const
 

Detailed Description

Holds the view of a virtual camera, to a plane, for which images from other viewpoints can be added. These images will be projected onto the plane. This can be used e.g. for Birds-eye views.

Member Function Documentation

void Homography::addImage ( cv::Mat  image,
const ::Eigen::Isometry3f &  cam2plane,
const Eigen::Matrix3f &  camMat 
)
Eigen::Matrix3f Homography::calcHomography ( const Eigen::Matrix3f &  R,
const Eigen::Vector3f &  t,
const Eigen::Vector3f &  n,
float  d 
) const
Eigen::Matrix3f Homography::calcHomography ( const Eigen::Isometry3f &  trans,
const Eigen::Vector3f &  n,
float  dist 
) const
Eigen::Matrix3f Homography::calcHomography ( const Eigen::Isometry3f &  camA2plane,
const Eigen::Isometry3f &  camB2plane 
) const

Calculate the homography transform between two cameras, for which the transform to a common reference is given. The xy plane of the reference frame is used as the projection surface.

Parameters
camA2plane- current frame
camB2plane- desired frame
Returns
homography which transforms current to desired frame
void Homography::clearVirtualImage ( )

clear the virtual image

cv::Mat Homography::getVirtualImage ( )
Returns
cv::Mat object of the virtual camera view
void Homography::init ( int  rows,
int  cols,
float  focal,
const Eigen::Isometry3f &  vcam2plane 
)

Initialize virtual camera

Parameters
rowsin the target image
colsin the target image
focallength of the virtual camera
vcam2planetranformation from the vcam frame to the projection plane

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