FlowEngine  4.301
Photogrammetry Software Development Kit
FlowEngine::CameraInterface Class Referenceabstract

#include <CameraInterface.h>

Public Member Functions

virtual FLE_DLL ~CameraInterface ()=default
 Default virtual destructor. More...
 
virtual FLE_DLL bool isReconstructed () const =0
 
virtual FLE_DLL Result loadImage (ConstStringBuffer filePath)=0
 
virtual FLE_DLL Result loadMask (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 Result getCameraCalibration (CameraCalibrationInterface &outCameraCalibration) const =0
 
virtual FLE_DLL Result getDimensions (int &outWidth, int &outHeight) const =0
 
virtual FLE_DLL Result 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 projectPoint (const Point3 &pt, Point2 &outImageCoords) 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 inImageSavePath, Size inOutputWidth=0, Size inOutputHeight=0) const =0
 

Detailed Description

Stores a camera object to feed the Structure from Motion parameters. Every camera is bounded to an image and possibly a mask file.

Constructor & Destructor Documentation

◆ ~CameraInterface()

virtual FLE_DLL FlowEngine::CameraInterface::~CameraInterface ( )
virtualdefault

Default virtual destructor.

Member Function Documentation

◆ getCameraCalibration()

virtual FLE_DLL Result FlowEngine::CameraInterface::getCameraCalibration ( CameraCalibrationInterface outCameraCalibration) const
pure virtual

Retrieves the camera calibration associated with this camera

Parameters
[in,out]outCameraCalibrationa valid CameraCalibration object that receives the data

◆ getDimensions()

virtual FLE_DLL Result FlowEngine::CameraInterface::getDimensions ( int &  outWidth,
int &  outHeight 
) const
pure virtual

Retrieves the camera image dimensions

Parameters
[in,out]outWidththe width in pixels
[in,out]outHeightthe height in pixels

◆ getImageFilePath()

virtual FLE_DLL Result FlowEngine::CameraInterface::getImageFilePath ( StringBuffer  outImageFilePath) const
pure virtual

Retrieves the camera image file path

Parameters
[in,out]outImageFilePathbuffer that receives the UTF-8 encoded path to the image file. The buffer must be at least getImageFilePathLength() long

◆ getImageFilePathLength()

virtual FLE_DLL Size FlowEngine::CameraInterface::getImageFilePathLength ( ) const
pure virtual

Retrieves the camera image file path length

Returns
the number of characters required to hold the image file path string (excluding the termination character)

◆ getPPM()

virtual FLE_DLL Result FlowEngine::CameraInterface::getPPM ( Buffer< double >  outPPM) const
pure virtual

Retrieves the camera projection matrix (PPM) composed as A * [R t] (3x4). This function is not available in the free version of the SDK.

Parameters
[out]outPPMbuffer that receives ppm matrix elements in row-major order. The buffer must be at least 12 elements big.

◆ getR()

virtual FLE_DLL Result FlowEngine::CameraInterface::getR ( Buffer< double >  outR) const
pure virtual

Retrieves the camera rotation R (3x3). This function is not available in the free version of the SDK.

Parameters
[out]outRbuffer that receives rotation matrix elements in row-major order. The buffer must be at least 9 elements big.

◆ getT()

virtual FLE_DLL Result FlowEngine::CameraInterface::getT ( Point3 outTranslation) const
pure virtual

Retrieves the camera translation. This function is not available in the free version of the SDK.

Parameters
[out]outTranslationthe camera translation

◆ isReconstructed()

virtual FLE_DLL bool FlowEngine::CameraInterface::isReconstructed ( ) const
pure virtual

Check if the cameras has a valid reconstruction

Returns
true if the camera is reconstructed (i.e. sees some points)

◆ loadFromXmp()

virtual FLE_DLL Result FlowEngine::CameraInterface::loadFromXmp ( ConstStringBuffer  filePath)
pure virtual

Loads camera parameters from an XMP file

Parameters
[in]filePathpointer to a string that receives UTF-8 file path.

◆ loadImage()

virtual FLE_DLL Result FlowEngine::CameraInterface::loadImage ( ConstStringBuffer  filePath)
pure virtual

Set and load the camera image file path.

Parameters
[in]filePathUTF-8 encoded path to the image file

◆ loadMask()

virtual FLE_DLL Result FlowEngine::CameraInterface::loadMask ( ConstStringBuffer  filePath)
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.

Parameters
[in]filePathUTF-8 encoded path to the mask file

◆ projectPoint()

virtual FLE_DLL Result FlowEngine::CameraInterface::projectPoint ( const Point3 pt,
Point2 outImageCoords 
) const
pure virtual

Projects a point in the image plane using the current camera parameters

Parameters
[in]pt3D point containing x-y-z
[out]outImageCoords2D image coordinates x-y in the image

◆ saveToXmp()

virtual FLE_DLL Result FlowEngine::CameraInterface::saveToXmp ( ConstStringBuffer  filePath) const
pure virtual

Save the camera parameters to an XMP file. This function is not available in the free version of the SDK.

Parameters
[in]filePathpointer to a string that receives UTF-8 file path.

◆ saveUndistortedImage()

virtual FLE_DLL Result FlowEngine::CameraInterface::saveUndistortedImage ( ConstStringBuffer  inImageSavePath,
Size  inOutputWidth = 0,
Size  inOutputHeight = 0 
) const
pure virtual

Save the current undistorted image save path. Returns GenericError if the camera calibration or the loaded image are not valid. This feature is not available in FlowEngineFree.

Parameters
[in]inImageSavePathfilePath UTF-8 encoded path to the image file. Can be any extension supported by ImageMagick
[in]inOutputWidththe output image width. If set to 0, the image image will have the original dimension.
[in]inOutputHeightthe output image height. If set to 0, the image image will have the original dimension.

◆ setCameraCalibration()

virtual FLE_DLL Result FlowEngine::CameraInterface::setCameraCalibration ( const CameraCalibrationInterface cameraCalibration)
pure virtual

Set the camera calibration associated with this camera

Parameters
[in]cameraCalibrationa valid CameraCalibration object

◆ setPPM()

virtual FLE_DLL Result FlowEngine::CameraInterface::setPPM ( ConstBuffer< double >  ppm)
pure virtual

Set the camera extrinsic parameters Rotation and translation are extracted with the given ppm

Parameters
[in]ppma 12 element buffer of doubles. Data is read in row-major order

◆ setR()

virtual FLE_DLL Result FlowEngine::CameraInterface::setR ( ConstBuffer< double >  rot)
pure virtual

Set the camera translation t vector

Parameters
[in]rota 9 element buffer of doubles. Data is read in row-major order

◆ setT()

virtual FLE_DLL Result FlowEngine::CameraInterface::setT ( ConstBuffer< double >  translation)
pure virtual

Set the camera Rotation R matrix

Parameters
[in]translationa 3 element buffer of doubles. Data is read in row-major order