Visualization Library 2.1.0

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
CalibratedCamera.hpp
Go to the documentation of this file.
1 #ifndef CalibratedCamera_INCLUDE_ONCE
2 #define CalibratedCamera_INCLUDE_ONCE
3 
4 #include <vlGraphics/Camera.hpp>
5 
6 namespace vl
7 {
8  //-----------------------------------------------------------------------------
9  // CalibratedCamera
10  //-----------------------------------------------------------------------------
29  {
31 
32  public:
34 
44  void setCalibratedImageSize(int width, int height, float pixelaspect = 1.0);
45 
56  void setIntrinsicParameters(float fx, float fy, float cx, float cy);
57 
69  void setScreenSize(int width, int height);
70 
72  int imageWidth() const { return mImageWidth; }
73 
75  int imageHeight() const { return mImageHeight; }
76 
78  int screenWidth() const { return mScreenWidth; }
79 
81  int screenHeight() const { return mScreenHeight; }
82 
84  float pixelAspectRatio() const { return mPixelAspectRatio; }
85 
90  void updateCalibration();
91 
92  protected:
98  float mFx;
99  float mFy;
100  float mCx;
101  float mCy;
102  };
103 }
104 
105 #endif
int imageWidth() const
Image width in pixels.
int screenHeight() const
Screen height in pixels.
#define VL_INSTRUMENT_CLASS(ClassName, BaseClass)
Definition: TypeInfo.hpp:122
Visualization Library main namespace.
int imageHeight() const
Image height in pixels.
Calibrated camera for augmented reality.
float pixelAspectRatio() const
The width of a single pixel divided by its height.
int screenWidth() const
Image width in pixels.
Represents a virtual camera defining, among other things, the point of view from which scenes can be ...
Definition: Camera.hpp:49