FlowEngine 7.530
Photogrammetry Software Development Kit
|
Stores a camera object to feed the Structure from Motion parameters. More...
#include <CameraInterface.h>
Public Member Functions | |
virtual FLE_DLL | ~CameraInterface ()=default |
Default virtual destructor. | |
virtual FLE_DLL bool | isReconstructed () const =0 |
virtual FLE_DLL ReconstructionID | reconstructionId () const =0 |
virtual FLE_DLL Result | loadImage (ConstStringBuffer filePath)=0 |
virtual FLE_DLL Result | loadMask (ConstStringBuffer filePath, const SettingsInterface &settings)=0 |
virtual FLE_DLL void | resetMask ()=0 |
Resets the mask of this camera. | |
virtual FLE_DLL Result | loadPreviousFrame (ConstStringBuffer filePath)=0 |
virtual FLE_DLL Result | loadPivotFrame (ConstStringBuffer filePath)=0 |
virtual FLE_DLL Result | getImageFilePath (StringBuffer outImageFilePath) const =0 |
virtual FLE_DLL Size | getImageFilePathLength () const =0 |
virtual FLE_DLL Result | getPPM (Buffer< double > outPPM) const =0 |
virtual FLE_DLL Result | getR (Buffer< double > outR) const =0 |
virtual FLE_DLL Result | getT (Point3 &outTranslation) const =0 |
virtual FLE_DLL void | getCameraCalibration (CameraCalibrationInterface &outCameraCalibration) const =0 |
virtual FLE_DLL void | getDimensions (int &outWidth, int &outHeight) const =0 |
virtual FLE_DLL void | setCameraCalibration (const CameraCalibrationInterface &cameraCalibration)=0 |
virtual FLE_DLL Result | setPPM (ConstBuffer< double > ppm)=0 |
virtual FLE_DLL Result | setR (ConstBuffer< double > rot)=0 |
virtual FLE_DLL Result | setT (ConstBuffer< double > translation)=0 |
virtual FLE_DLL Result | orientWithControlPointConstraints (ConstBuffer< ControlPointConstraintInterface * > controlPoints, bool adjustInternalParameters, bool adjustRadialDistortion)=0 |
virtual FLE_DLL Result | projectPoint (const Point3 &point, Point2 &outImageCoords) const =0 |
virtual FLE_DLL Result | computeGroundSampleDistance (double &outMin, double &outMax, double &outMean) const =0 |
virtual FLE_DLL Result | loadFromXmp (ConstStringBuffer filePath)=0 |
virtual FLE_DLL Result | saveToXmp (ConstStringBuffer filePath) const =0 |
virtual FLE_DLL Result | saveUndistortedImage (ConstStringBuffer filePath, Size width=0, Size height=0, Size channelBitDepth=0) const =0 |
virtual FLE_DLL Result | generateSTMap (Image &inOutImage) const =0 |
Public Member Functions inherited from FlowEngine::NamedObjectInterface | |
virtual FLE_DLL | ~NamedObjectInterface ()=default |
Default virtual destructor. | |
virtual FLE_DLL Size | getNameLength () const =0 |
virtual FLE_DLL Result | getName (StringBuffer outName) const =0 |
virtual FLE_DLL Result | setName (ConstStringBuffer name)=0 |
Stores a camera object to feed the Structure from Motion parameters.
Every camera is bounded to an image and possibly a mask file.
|
virtualdefault |
Default virtual destructor.
|
pure virtual |
Calculates this camera ground sample distance (GSD) statistics. Computation is done based on its relative sparse point cloud.
[out] | outMin | the minimum GSD of this camera. |
[out] | outMax | the maximum GSD of this camera. |
[out] | outMean | the mean GSD of this camera. |
|
pure virtual |
Generates a distortion map based on the dimensions of this camera image and its camera calibration. Colours in the red and green channel describe the way the individual pixels are warped to apply or remove lens distortion from an image. Blue channel is zero. Values are in the [0.0, 1.0] range.
[in,out] | inOutImage | a buffer that will receive the ST-Map data. The buffer must be big enough to receive a 3-channel float image of the same dimensions of this camera's image. |
inOutImage
buffer was filled with the ST-Map data.inOutImage
has invalid dimensions or its data buffer is not valid.inOutImage
data buffer is not big enough.
|
pure virtual |
Returns the camera calibration associated with this camera.
[in,out] | outCameraCalibration | a valid CameraCalibration object that receives the data |
|
pure virtual |
Returns the camera image dimensions.
[in,out] | outWidth | the width in pixels |
[in,out] | outHeight | the height in pixels |
|
pure virtual |
Returns the camera image file path
[in,out] | outImageFilePath | buffer that receives the UTF-8 encoded path to the image file. The buffer must be at least getImageFilePathLength() long |
|
pure virtual |
Returns the camera image file path length
|
pure virtual |
Returns the camera projection matrix (PPM) composed as A * [R t] (3x4). This function is not available in the free version of the SDK.
[out] | outPPM | buffer that receives ppm matrix elements in row-major order. The buffer must be at least 12 elements big. |
|
pure virtual |
Returns the camera rotation R (3x3). This function is not available in the free version of the SDK.
[out] | outR | buffer that receives rotation matrix elements in row-major order. The buffer must be at least 9 elements big. |
|
pure virtual |
Returns the camera translation. This function is not available in the free version of the SDK.
[out] | outTranslation | the camera translation |
|
pure virtual |
Check if the cameras has a valid reconstruction
|
pure virtual |
Loads camera parameters from an XMP file.
[in] | filePath | string buffer that contains the UTF-8 file path |
filePath
is not a valid string buffer.filePath
does not point to an existing file.
|
pure virtual |
Loads an image from disk. The camera source image file path is updated accordingly.
[in] | filePath | string buffer containing the UTF-8 encoded path to the image file. |
filePath
is not a valid string buffer.filePath
does not point to an existing file.
|
pure virtual |
Set and load the mask from file. The mask can be a .bim or image file. The mask must be of the same size as the input image size.
[in] | filePath | UTF-8 encoded path to the mask file |
[in] | settings | the settings that will be queried for configuration parameters. |
|
pure virtual |
Set the previous frame path and load the image (used by FlowEngineInterface::adaptMeshWithOpticalFlow)
[in] | filePath | string buffer containing the UTF-8 encoded path to the image file. This (along with the previous frame) will make the camera object suitable for optical flow computation FlowEngineInterface::adaptMeshWithOpticalFlow. |
filePath
is not a valid string buffer.filePath
does not point to an existing file.
|
pure virtual |
Set the previous frame path and load the image (used by FlowEngineInterface::adaptMeshWithOpticalFlow)
[in] | filePath | string buffer containing the UTF-8 encoded path to the image file. This (along with the pivot frame) will make the camera object suitable for optical flow computation FlowEngineInterface::adaptMeshWithOpticalFlow. |
filePath
is not a valid string buffer.filePath
does not point to an existing file.
|
pure virtual |
Orients the camera given a set of control points.
[in] | controlPoints | a buffer of control points that will be used for adjustment. They must have a valid world position. |
[in] | adjustInternalParameters | adjust the internal parameters (focal, principal point and radial distortion). |
[in] | adjustRadialDistortion | adjust the radial distortion. |
controlPoints
is not a valid buffer orcontrolPoints
does not contains valid instances.controlPoints
is not at least 3 elements long.filePath
does not point to an existing file.
|
pure virtual |
Projects a point in the image plane using the current camera parameters.
[in] | point | 3D point containing x-y-z. |
[out] | outImageCoords | 2D image coordinates x-y in the image. |
point
projection is inside the image frame.point
contains a non-finite value.point
projection is outside the image frame. outImageCoords
is not modified.
|
pure virtual |
|
pure virtual |
Resets the mask of this camera.
|
pure virtual |
Saves the camera parameters to an XMP file.
[in] | filePath | string buffer that contains the UTF-8 file path. |
filePath
is not a valid string buffer.
|
pure virtual |
Save the undistorted version of this camera image to the specified file path.
[in] | filePath | string buffer that contains the UTF-8 encoded path to save the image to. Can be any extension supported by ImageMagick. |
[in] | width | (optional) the output image width. When left to default (zero), the output image will keep the original width. |
[in] | height | (optional) the output image height. When left to default (zero), the output image will keep the original height. |
[in] | channelBitDepth | (optional) the output image bitdepth. When left to default (zero), it will be automatically choosen from the format. |
filePath
is not a valid string buffer.
|
pure virtual |
Set the camera calibration associated with this camera
[in] | cameraCalibration | a valid CameraCalibration object |
|
pure virtual |
Set the camera extrinsic parameters Rotation and translation are extracted with the given ppm
[in] | ppm | a 12 element buffer of doubles. Data is read in row-major order |
|
pure virtual |
Set the camera Rotation R matrix
[in] | rot | a 9 element buffer of doubles. Data is read in row-major order |
|
pure virtual |
Set the camera translation t vector
[in] | translation | a 3 element buffer of doubles. Data is read in row-major order |