Point Cloud Library (PCL)  1.6.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Public Attributes
pcl::visualization::Camera Class Reference

Camera class holds a set of camera parameters together with the window pos/size. More...

#include <pcl/visualization/common/common.h>

List of all members.

Public Member Functions

void computeViewMatrix (Eigen::Matrix4d &view_mat) const
 Computes View matrix for Camera (Based on gluLookAt)
void computeProjectionMatrix (Eigen::Matrix4d &proj) const
 Computes Projection Matrix for Camera.
template<typename PointT >
void cvtWindowCoordinates (const PointT &pt, Eigen::Vector4d &window_cord)
 converts point to window coordiantes
template<typename PointT >
void cvtWindowCoordinates (const PointT &pt, Eigen::Vector4d &window_cord, const Eigen::Matrix4d &composite_mat)
 converts point to window coordiantes

Public Attributes

double focal [3]
double pos [3]
double view [3]
double clip [2]
double fovy
double window_size [2]
double window_pos [2]

Detailed Description

Camera class holds a set of camera parameters together with the window pos/size.

Definition at line 79 of file common.h.


Member Function Documentation

void pcl::visualization::Camera::computeProjectionMatrix ( Eigen::Matrix4d &  proj) const

Computes Projection Matrix for Camera.

Parameters:
[out]projthe resultant matrix
void pcl::visualization::Camera::computeViewMatrix ( Eigen::Matrix4d &  view_mat) const

Computes View matrix for Camera (Based on gluLookAt)

Parameters:
[out]view_matthe resultant matrix
template<typename PointT >
void pcl::visualization::Camera::cvtWindowCoordinates ( const PointT pt,
Eigen::Vector4d &  window_cord 
)

converts point to window coordiantes

Parameters:
[in]ptxyz point to be converted
[out]window_cordvector containing the pts' window X,Y, Z and 1

This function computes the projection and view matrix every time. It is very inefficient to use this for every point in the point cloud!

template<typename PointT >
void pcl::visualization::Camera::cvtWindowCoordinates ( const PointT pt,
Eigen::Vector4d &  window_cord,
const Eigen::Matrix4d &  composite_mat 
)

converts point to window coordiantes

Parameters:
[in]ptxyz point to be converted
[out]window_cordvector containing the pts' window X,Y, Z and 1
[in]composite_matcomposite transformation matrix (proj*view)

Use this function to compute window coordinates with a precomputed transformation function. The typical composite matrix will be the projection matrix * the view matrix. However, additional matrices like a camera disortion matrix can also be added.


Member Data Documentation

Definition at line 92 of file common.h.

Definition at line 83 of file common.h.

Definition at line 95 of file common.h.

Definition at line 86 of file common.h.

Definition at line 89 of file common.h.

Definition at line 101 of file common.h.

Definition at line 100 of file common.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines