classPiiUndistortOperation
#include <PiiUndistortOperation.h>
Corrects lens distortion.
Inherits PiiDefaultOperation
Description
Inputs
Outputs
Properties
|
All intrinsic camera parameters represented as a 1-by-8 PiiMatrix<double>. |
|
|
double
|
The x coordinate of the principal point. |
|
double
|
Same as |
|
double
|
The horizontal focal length of the camera in pixels. |
|
double
|
The vertical focal length of the camera in pixels. |
|
The type of interpolation. |
|
|
double
|
2nd order radial distortion factor. |
|
double
|
4th order radial distortion factor. |
|
double
|
First tangential distortion factor. |
|
double
|
Second tangential distortion factor. |
Constructors and destructor
Public member functions
|
virtual void
|
(
Checks the operation for execution. |
Protected member functions
|
( )
|
|
|
double
|
( )
|
|
double
|
( )
|
|
double
|
( )
|
|
double
|
( )
|
|
( )
|
|
|
virtual void
|
( )
Executes one round of processing. |
|
double
|
( )
|
|
double
|
( )
|
|
void
|
|
|
void
|
(
|
|
void
|
(
|
|
void
|
(
|
|
void
|
(
|
|
void
|
|
|
void
|
(
|
|
void
|
(
|
|
void
|
(
|
|
void
|
(
|
|
double
|
( )
|
|
double
|
( )
|
Property details
-
PiiVariant cameraParameters
[read, write]All intrinsic camera parameters represented as a 1-by-8 PiiMatrix<double>.
The matrix stores the focal length (x,y), principal point (x,y), radial distortion (k1, k2), and tangential distortion (p1, p2), in this order.
-
double centerX
[read, write]The x coordinate of the principal point.
If this value is NaN (the default), the operation will place the principal point at the center of the image.
-
double centerY
[read, write]Same as
centerX, but for the y coordinate. -
double focalX
[read, write]The horizontal focal length of the camera in pixels.
The default value is 1000.
-
double focalY
[read, write]The vertical focal length of the camera in pixels.
The default value is 1000.
-
Pii::Interpolation interpolation
[read, write]The type of interpolation.
The default value is
Pii::LinearInterpolation, which results in better image quality but slower operation. Set toPii::NearestNeighborInterpolationto speed up calculations at the expense of image quality. -
double radial2nd
[read, write]2nd order radial distortion factor.
The default value is zero.
-
double radial4th
[read, write]4th order radial distortion factor.
The default value is zero.
-
double tangential1st
[read, write]First tangential distortion factor.
The default value is zero.
-
double tangential2nd
[read, write]Second tangential distortion factor.
The default value is zero.
Function details
-
PiiUndistortOperation
() -
virtual void check
(- bool reset
[virtual]Checks the operation for execution.
This function creates a suitable flow controller by calling createFlowController(). It then sets the flow controller to the active processor and sets the processor as the input controller for all inputs.
If you change socket groupings in your overridden implementation, please call PiiDefaultOperation::check() after that. Otherwise, your new groupings will not be in effect.
Reimplemented from PiiDefaultOperation.
-
-
double centerX
()[protected] -
double centerY
()[protected] -
double focalX
()[protected] -
double focalY
()[protected] -
-
virtual void process
()[protected, virtual]Executes one round of processing.
This function is invoked by the processor if the necessary preconditions for a new processing round are met. This function does all the necessary calculations to create output objects and sends them to output sockets.
Calls to process(), syncEvent(), and setProperty() are synchronized and cannot occur simultaneously. PiiDefaultOperation ensures this by locking processLock() for reading before calling process().
Note: With time-consuming operations, one should occasionally check that the operation hasn't been interrupted, i.e. that state() returns
Running.Exceptions
- PiiExecutionException
-
whenever an unrecoverable error occurs during a processing round, the operation is interrupted, or finishes execution due to end of input data.
Reimplemented from PiiDefaultOperation.
-
double radial2nd
()[protected] -
double radial4th
()[protected] -
-
void setCenterX
(- double centerX
[protected] -
void setCenterY
(- double centerY
[protected] -
void setFocalX
(- double focalX
[protected] -
void setFocalY
(- double focalY
[protected] -
-
void setRadial2nd
(- double radial2nd
[protected] -
void setRadial4th
(- double radial4th
[protected] -
void setTangential1st
(- double tangential1st
[protected] -
void setTangential2nd
(- double tangential2nd
[protected] -
double tangential1st
()[protected] -
double tangential2nd
()[protected]
Add a note
Not a single note added yet. Be the first, add yours.