classPiiImageUnwarpOperation
#include <PiiImageUnwarpOperation.h>
An operation that straightens cylindrically warped images.
Inherits PiiDefaultOperation
Description
See PiiImage::unwarpCylinder().
Inputs
Outputs
Properties
|
double
|
The distance between camera aperture and cylinder center. |
|
double
|
The location of the optical center in the image. |
|
double
|
The focal length of the camera in pixels. |
|
double
|
The maximum angle of the unwarped sector, in degrees. |
|
double
|
Physical radius of the cylinder. |
Constructors and destructor
Public member functions
|
double
|
( )
|
|
double
|
( )
|
|
virtual void
|
(
Checks the operation for execution. |
|
double
|
( )
|
|
double
|
( )
|
|
double
|
( )
|
|
void
|
(
|
|
void
|
(
|
|
void
|
(
|
|
void
|
(
|
|
void
|
(
|
Protected member functions
|
virtual void
|
( )
Executes one round of processing. |
Property details
-
double cameraDistance
[read, write]The distance between camera aperture and cylinder center.
Default is 1. Set this value to 0 to make the operation to automatically calculate distance.
-
double center
[read, write]The location of the optical center in the image.
The default is NaN, which positions the optical center to the center of the input image.
-
double focalLength
[read, write]The focal length of the camera in pixels.
Default is 1e100.
-
double maxSectorAngle
[read, write]The maximum angle of the unwarped sector, in degrees.
See PiiImage::unwarpCylinder() for details. The default value is 0 (no limit).
-
double radius
[read, write]Physical radius of the cylinder.
Default is 0, which causes the radius to be calculated automatically.
Function details
-
PiiImageUnwarpOperation
() -
double cameraDistance
() -
double center
() -
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 focalLength
() -
double maxSectorAngle
() -
double radius
() -
void setCameraDistance
(- double cameraDistance
-
void setCenter
(- double center
-
void setFocalLength
(- double focalLength
-
void setMaxSectorAngle
(- double maxSectorAngle
-
void setRadius
(- double radius
-
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.
Add a note
Not a single note added yet. Be the first, add yours.