The VLIntrinsicDataWrapper is a wrapper for an IntrinsicData object. IntrinsicData objects represent the intrinsic camera parameters (focal length, principal point, skew and distortion parameters).
More...
Inherits IDisposable.
|
| VLIntrinsicDataWrapper (IntPtr handle, bool owner) |
| Constructor of VLIntrinsicDataWrapper. More...
|
|
| VLIntrinsicDataWrapper (int width, int height, double fxNorm, double fyNorm, double cxNorm, double cyNorm, double skewNorm) |
|
VLIntrinsicDataWrapper | Clone () |
| Creates a copy of this object and returns a Wrapper of it. More...
|
|
IntPtr | getHandle () |
|
void | Dispose () |
| Explicitly releases references to unmanaged resources. More...
|
|
int | GetWidth () |
| Returns the width of the intrinsic camera calibration. More...
|
|
int | GetHeight () |
| Returns the height of the intrinsic camera calibration. More...
|
|
double | GetFxNorm () |
| Returns the normalized focal length of the intrinsic camera calibration in x direction. More...
|
|
double | GetFyNorm () |
| Returns the normalized focal length of the intrinsic camera calibration in y direction. More...
|
|
double | GetSkewNorm () |
| Returns the normalized skew of the intrinsic camera calibration. More...
|
|
double | GetCxNorm () |
| Returns the normalized x-component of the principal point. More...
|
|
double | GetCyNorm () |
| Returns the normalized y-component of the principal point. More...
|
|
bool | GetCalibrated () |
| Returns whether the intrinsic parameters are valid. More...
|
|
double | GetCalibrationError () |
| Returns the calibration error. More...
|
|
bool | GetRadialDistortion (double[] k) |
| Retrieves the radial distortion parameters. More...
|
|
bool | SetRadialDistortion (double[] k) |
| Sets the radial distortion parameters. More...
|
|
bool | GetProjectionMatrix (float nearFact, float farFact, int screenWidth, int screenHeight, VLRenderRotation renderRotation, int mode, float[] matrix) |
| Computed the projection matrix from the intrinsic camera parameters. More...
|
|
The VLIntrinsicDataWrapper is a wrapper for an IntrinsicData object. IntrinsicData objects represent the intrinsic camera parameters (focal length, principal point, skew and distortion parameters).
- See also
- VLDataSetWrapper.GetIntrinsicData
◆ VLIntrinsicDataWrapper() [1/2]
VLIntrinsicDataWrapper.VLIntrinsicDataWrapper |
( |
IntPtr |
handle, |
|
|
bool |
owner |
|
) |
| |
|
inline |
Constructor of VLIntrinsicDataWrapper.
Don't call this constructor directly. Use the VLAbstractApplicationWrapper.GetDataSet and VLDataSetWrapper.GetIntrinsicData methods instead.
- Parameters
-
handle | Handle to the native object. |
owner | true , if the VLIntrinsicDataWrapper is the owner of the native object; false , otherwise. |
◆ VLIntrinsicDataWrapper() [2/2]
VLIntrinsicDataWrapper.VLIntrinsicDataWrapper |
( |
int |
width, |
|
|
int |
height, |
|
|
double |
fxNorm, |
|
|
double |
fyNorm, |
|
|
double |
cxNorm, |
|
|
double |
cyNorm, |
|
|
double |
skewNorm |
|
) |
| |
|
inline |
◆ Clone()
Creates a copy of this object and returns a Wrapper of it.
- Returns
- A wrapper of a copy of this object.
◆ Dispose()
void VLIntrinsicDataWrapper.Dispose |
( |
| ) |
|
|
inline |
◆ GetCalibrated()
bool VLIntrinsicDataWrapper.GetCalibrated |
( |
| ) |
|
|
inline |
Returns whether the intrinsic parameters are valid.
A intrinsic camera calibration used for tracking should always be valid.
- Returns
true
, if the intrinsic calibration is valid; false
otherwise.
◆ GetCalibrationError()
double VLIntrinsicDataWrapper.GetCalibrationError |
( |
| ) |
|
|
inline |
Returns the calibration error.
The reprojection error in pixel. This is interesting for evaluating the quality of a camera calibration.
- Returns
- NormalizedThe reprojection error in pixel.
◆ GetCxNorm()
double VLIntrinsicDataWrapper.GetCxNorm |
( |
| ) |
|
|
inline |
Returns the normalized x-component of the principal point.
The x-component was normalized through a division by the width of the camera calibration.
- Returns
- Normalized x-component of the principal point.
◆ GetCyNorm()
double VLIntrinsicDataWrapper.GetCyNorm |
( |
| ) |
|
|
inline |
Returns the normalized y-component of the principal point.
The y-component was normalized through a division by the height of the camera calibration.
- Returns
- Normalized y-component of the principal point.
◆ GetFxNorm()
double VLIntrinsicDataWrapper.GetFxNorm |
( |
| ) |
|
|
inline |
Returns the normalized focal length of the intrinsic camera calibration in x direction.
The focal length in x direction was normalized through a division by the width of the camera calibration.
- Returns
- Normalized focal length in x direction.
◆ GetFyNorm()
double VLIntrinsicDataWrapper.GetFyNorm |
( |
| ) |
|
|
inline |
Returns the normalized focal length of the intrinsic camera calibration in y direction.
The focal length in y direction was normalized through a division by the height of the camera calibration.
- Returns
- Normalized focal length in y direction.
◆ getHandle()
IntPtr VLIntrinsicDataWrapper.getHandle |
( |
| ) |
|
|
inline |
◆ GetHeight()
int VLIntrinsicDataWrapper.GetHeight |
( |
| ) |
|
|
inline |
Returns the height of the intrinsic camera calibration.
- Returns
- The height in pixels.
◆ GetProjectionMatrix()
bool VLIntrinsicDataWrapper.GetProjectionMatrix |
( |
float |
nearFact, |
|
|
float |
farFact, |
|
|
int |
screenWidth, |
|
|
int |
screenHeight, |
|
|
VLRenderRotation |
renderRotation, |
|
|
int |
mode, |
|
|
float [] |
matrix |
|
) |
| |
|
inline |
Computed the projection matrix from the intrinsic camera parameters.
The returned matrix is stored in the following order (column-major order):
- Returns
true
, if the projection matrix was gotten successfully; false
otherwise.
- Parameters
-
nearFact | Value for the near clipping plane. |
farFact | Value for the far clipping plane. |
screenWidth | Width of the screen. |
screenHeight | Height of the screen. |
renderRotation | How the rendering is rotated relative to the orientation of the images received from the VisionLib. E.g., if the rendering happens in landscape-left mode and the images are also in landscape-left mode, then VLRenderRotation.CCW0 should be used. If the rendering happens in portrait mode, but the images are in landscape-left mode, then VLRenderRotation.CCW270 should be used. A default rotation for a given ScreenRotation can be obtained from VLUnityCameraHelper.GetRenderRotation. |
mode | The mode defines how to handle mismatching aspect ratios. Right now the mode value is ignored, but later we will support different modes like 'cover' (scale the projection surface up until it covers the whole screen) and 'contain' (scale the projection surface down until it is completely contained inside the screen). |
matrix | Float array with 16 elements for storing the projection matrix. |
◆ GetRadialDistortion()
bool VLIntrinsicDataWrapper.GetRadialDistortion |
( |
double [] |
k | ) |
|
|
inline |
Retrieves the radial distortion parameters.
- Returns
true
, on success; false
otherwise.
- Parameters
-
k | Double array with 5 elements for storing the distortion parameters. |
◆ GetSkewNorm()
double VLIntrinsicDataWrapper.GetSkewNorm |
( |
| ) |
|
|
inline |
Returns the normalized skew of the intrinsic camera calibration.
The skew was normalized through a division by the width of the camera calibration.
- Returns
- Normalized skew.
◆ GetWidth()
int VLIntrinsicDataWrapper.GetWidth |
( |
| ) |
|
|
inline |
Returns the width of the intrinsic camera calibration.
- Returns
- The width in pixels.
◆ SetRadialDistortion()
bool VLIntrinsicDataWrapper.SetRadialDistortion |
( |
double [] |
k | ) |
|
|
inline |
Sets the radial distortion parameters.
- Returns
true
, on success; false
otherwise.
- Parameters
-
t | Double array with 5 elements, which contains the distortion parameters. |