Subclass of vtkCamera so we can just set the relevant intrinsic matrix, the size of the image used in camera calibration, and the size of the actual window to get a calibrated camera view of the rendered scene. So, compared with vtkOpenGLCamera, this class ignores all the stuff to do with orthographic or perspective projection, and just uses the matrix and image/window size.
More...
|
| vtkTypeMacro (vtkOpenGLMatrixDrivenCamera, vtkOpenGLCamera) |
|
virtual void | PrintSelf (ostream &os, vtkIndent indent) override |
|
void | Render (vtkRenderer *ren) override |
|
| vtkSetMacro (UseCalibratedCamera, bool) |
|
| vtkGetMacro (UseCalibratedCamera, bool) |
|
void | SetCalibratedImageSize (const int &width, const int &height, double pixelaspect=1.0) |
| Set the size of the image in pixels that was used while calibrating the camera model. More...
|
|
void | SetActualWindowSize (const int &width, const int &height) |
| Set the window/widget size currently used. More...
|
|
void | SetIntrinsicParameters (const double &fx, const double &fy, const double &cx, const double &cy) |
| Set the intrinsic parameters as determined from camera calibration. More...
|
|
Subclass of vtkCamera so we can just set the relevant intrinsic matrix, the size of the image used in camera calibration, and the size of the actual window to get a calibrated camera view of the rendered scene. So, compared with vtkOpenGLCamera, this class ignores all the stuff to do with orthographic or perspective projection, and just uses the matrix and image/window size.
- See also
- http://sightations.wordpress.com/2010/08/03/simulating-calibrated-cameras-in-opengl/
-
http://jamesgregson.blogspot.co.uk/2011/11/matching-calibrated-cameras-with-opengl.html
-
http://strawlab.org/2011/11/05/augmented-reality-with-OpenGL/
where the last of these links seemed most intuitive to my way of thinking.
vtkOpenGLMatrixDrivenCamera::vtkOpenGLMatrixDrivenCamera |
( |
| ) |
|
|
protected |
vtkOpenGLMatrixDrivenCamera::~vtkOpenGLMatrixDrivenCamera |
( |
| ) |
|
|
inlineprotected |
void vtkOpenGLMatrixDrivenCamera::PrintSelf |
( |
ostream & |
os, |
|
|
vtkIndent |
indent |
|
) |
| |
|
overridevirtual |
void vtkOpenGLMatrixDrivenCamera::Render |
( |
vtkRenderer * |
ren | ) |
|
|
override |
void vtkOpenGLMatrixDrivenCamera::SetActualWindowSize |
( |
const int & |
width, |
|
|
const int & |
height |
|
) |
| |
Set the window/widget size currently used.
- Parameters
-
width | in pixels. |
height | in pixels. |
void vtkOpenGLMatrixDrivenCamera::SetCalibratedImageSize |
( |
const int & |
width, |
|
|
const int & |
height, |
|
|
double |
pixelaspect = 1.0 |
|
) |
| |
Set the size of the image in pixels that was used while calibrating the camera model.
- Parameters
-
width | in pixels. |
height | in pixels. |
pixelaspect | is the width of a single pixel divided by its height. |
void vtkOpenGLMatrixDrivenCamera::SetIntrinsicParameters |
( |
const double & |
fx, |
|
|
const double & |
fy, |
|
|
const double & |
cx, |
|
|
const double & |
cy |
|
) |
| |
Set the intrinsic parameters as determined from camera calibration.
- Parameters
-
fx | scale factor of combined focal length * effective pixel size in horizontal direction. |
fy | scale factor of combined focal length * effective pixel size in vertical direction. |
cx | centre of projection in x axis. |
cy | centre of projection in y axis. |
vtkOpenGLMatrixDrivenCamera::vtkGetMacro |
( |
UseCalibratedCamera |
, |
|
|
bool |
|
|
) |
| |
vtkOpenGLMatrixDrivenCamera::vtkSetMacro |
( |
UseCalibratedCamera |
, |
|
|
bool |
|
|
) |
| |
The documentation for this class was generated from the following files: