Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType > Class Template Referenceabstract

Base class for rectification implementations that make use of projections to represent rectified state and where the projection-centers in rectified and original state are the same. More...

#include <Image/RectificationViaProjectionMappingBase.hh>

+ Inheritance diagram for BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >:
+ Collaboration diagram for BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >:

Public Member Functions

virtual int Disp2Depth (const Image< float > &DisparityMap, Image< float > &DepthMap, unsigned int border)
 Uses the passed disparity map for camera A to calculate the corresponding depth map. More...
 
virtual int GetClonesOfRectificationParameters (ProjectionParametersBase *&rectPPA, ProjectionParametersBase *&rectPPB)
 Tries to calculate the rectification parameters and returns clones of internal members. More...
 
virtual bool IsInputCameraValid (const BIAS::Image< InputStorageType > &img, const BIAS::ProjectionParametersBase *proj)=0
 
 RectificationViaProjectionMappingBase (const std::string &stringID, const double &Scale=1.0)
 
virtual int Rectify ()
 Fundamental method which contains the rectification implementation. More...
 
virtual int SetCameraA (BIAS::Camera< InputStorageType > &cam)
 
virtual int SetCameraA (const BIAS::Image< InputStorageType > &img, const BIAS::ProjectionParametersBase *proj)
 
virtual int SetCameraB (BIAS::Camera< InputStorageType > &cam)
 
virtual int SetCameraB (const BIAS::Image< InputStorageType > &img, const BIAS::ProjectionParametersBase *proj)
 
void SetInterpolationMethod (InterpolationMethod interpolationType)
 Determines the type of interpolation used when rectifying. More...
 
void SetOverrideAngles (double thetaMinOverride, double thetaMaxOverride, double phiMinOverride, double phiMaxOverride)
 Set the override angles, which are individually chosen for the internal parameters, if the respective override leads to a smaller fov of the rectified cameras, then the automatically derived fov. More...
 
void SetScale (const double &scale)
 Scale factor for isotropically scaling the rectified images (and rectified intrinsic parameters). More...
 
void SetSecondFill (OutputStorageType d)
 fill color for second image (first is black) More...
 
void SetTargetWidth (unsigned int targetWidth)
 Similar to SetScale but uses the argument width to determine scale factor. More...
 
void UseLookUpTables (bool use)
 Method allows to turn on or off the use of look up tables. More...
 
virtual ~RectificationViaProjectionMappingBase ()
 
Getters

Return stored results.

If there are.

void GetRectifiedImageA (Image< OutputStorageType > &rectImg)
 
void GetRectifiedImageB (Image< OutputStorageType > &rectImg)
 
bool IsInputCameraValid (BIAS::Camera< InputStorageType > &cam)
 Method calls two parameteric pure virtual method. More...
 
Grabbing/RT Utils

Methods granting direct access to data structures of rectification.

Attention
Use this with caution, methods were introduced to allow direct image grabbing into rectification object and efficient rectification readout when camera parameter do not change!
Use of methods belonging to this group does not trigger ANY state update! Methods were designed for following scenario:
  1. Use Set methods to initialize rectification and trigger state update.
  2. Use pointer aquired by GetImagePointerA()/B() to set original image content! It is not possible to set the ProjectionParamters this way!
  3. Call Rectify(): running this the first time will take some calculational effort because LUT will be constructed.
  4. Use pointer aquired GetRectifiedImagePointerA()/B(): to readout the result. If camera parameters do not change repeat all but the first dash to aquire rectified images.
Camera< InputStorageType > * GetImagePointerA ()
 
Camera< InputStorageType > * GetImagePointerB ()
 
const Image< OutputStorageType > * GetRectifiedImagePointerA ()
 
const Image< OutputStorageType > * GetRectifiedImagePointerB ()
 

Static Public Member Functions

static int Disp2Depth (const Image< float > &DisparityMap, Image< float > &DepthMap, const ProjectionParametersBase *origCamPA, const ProjectionParametersBase *origCamPB, const ProjectionParametersBase *rectCamPA, const ProjectionParametersBase *rectCamPB, unsigned int border)
 
Utility functions

Methods connected with rectification but are rather unspecific.

static int CalculateRectifiedBases (const Pose &poseA, const Pose &poseB, Pose &poseResA, Pose &poseResB, bool failIfForwardMove=false)
 Method determines two orthonormal bases suitable for rectification. More...
 
static int CalculateMeanOrientation (const Pose &poseLeft, const Pose &poseCenter, const Pose &poseRight, Quaternion< double > &orientation)
 Method calculates an intermediate orientation for rectification from all three poses. More...
 

Protected Member Functions

bool AreRectificationParametersValid_ ()
 Checks for rectificationParamsAreValid_ if not true will try to succsessfully process DetermineRectificationParameters_(). More...
 
virtual int DetermineRectificationParameters_ ()=0
 Calculating the projection parameters for specific rectification. More...
 
int DetermineScaledRectificationParameters_ ()
 this computes ideal parameters and applies the scale More...
 
Initialization.

The general rectification procedure runs as follows:

  1. Receive input data: image and cam-params.
  2. Determine the rectification parameters, influenced by scale factors.
  3. Initialize the two projection mapping objects that perform the Mapping (InitializeMapping_()).

The rectification setup can be stored and loaded. The full initialization procedure is not necessary if the BWM-LUTs are loaded. In this case it suffices to initialize the target images (InitializeSinkImages_()). If informations about the mapping process have to be aquired without rectifciation, it can be of use to initialize the objects performing the mapping. This can be done using InitializeProjectionMappingObjects_().

Attention
This initializers do not order a rectification parameter calculation via AreRectificationParametersValid_().
void InitializeMapping_ ()
 Initializes lut structure and the result images. More...
 
void InitializeSinkImages_ ()
 
void InitializeProjectionMappingObjects_ ()
 

Protected Attributes

Camera< InputStorageType > imageA_
 local copy of passed image More...
 
Camera< InputStorageType > imageB_
 local copy of passed image More...
 
InterpolationMethod interpolationType_
 
bool mappingInitialized_
 Tells whether the lut structure and the result images have been initialized. More...
 
double phiMaxOverride_
 Value used to override phiMax result of automatic fov calculation if phiMaxOverride_ is smaller. More...
 
double phiMinOverride_
 Value used to override phiMin result of automatic fov calculation if phiMinOverride_ is larger. More...
 
ProjectionParametersBaseppBA_
 local copy of passed projection parameters More...
 
ProjectionParametersBaseppBB_
 local copy of passed projection parameters More...
 
bool rectificationParamsAreValid_
 Flag is true when DetermineRectificationParameters_() was succesfull and no setter was called afterwards. More...
 
Image< OutputStorageType > rectImageA_
 Results of rectification. More...
 
Image< OutputStorageType > rectImageB_
 Results of rectification. More...
 
ProjectionMapping
< InputStorageType,
OutputStorageType > 
rectMapperA_
 Classes holding rectification parameters and performing mapping. More...
 
ProjectionMapping
< InputStorageType,
OutputStorageType > 
rectMapperB_
 
ProjectionParametersBaserectPPA_
 Projection parameters of the rectified image A. More...
 
ProjectionParametersBaserectPPB_
 Projection parameters of the rectified image B. More...
 
double scale_
 scale computed rectification resolution by this amount More...
 
OutputStorageType secondFill_
 
unsigned int targetWidth_
 if this value is greater zero the scale the computed rectification parameters are isotropically scaled by a scale factor so that the image width of both rectified images matches this value. More...
 
double thetaMaxOverride_
 Value used to override thetaMax result of automatic fov calculation if thetaMaxOverride_ is smaller. More...
 
double thetaMinOverride_
 Value used to override thetaMin result of automatic fov calculation if thetaMinOverride_ is larger. More...
 
bool useLookUpTables_
 Toggles the use of lookup tables. More...
 

Rectification Setup I/O

std::string stringID_
 Descriptive identifier of the classes in the hierarchy. More...
 
int GetRectificationSetup (Camera< float > &rectSetup)
 Method returns the current rectification setup. More...
 
int SetRectificationSetup (Camera< float > &rectSetup)
 Loads rectification setup from Camera data. More...
 
int GetRectifyingDisplacementMaps (Image< float > &displacementA, Image< float > &displacementB)
 Returns the displacement maps rather then the rectified images, Suitable for texture look ups for multiple images of same configuration. More...
 
const std::string & GetStringID () const
 Returns the string id that identifies the rctification classes in this hierarchy. More...
 

Detailed Description

template<class InputStorageType, class OutputStorageType>
class BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >

Base class for rectification implementations that make use of projections to represent rectified state and where the projection-centers in rectified and original state are the same.

Implementation of child classes only have to supply the rectified params calculation. Aftwerwards they can make use of the ProjectionMapping facilities that are implemented in this class to rectify images and evaluate disparity maps into depth maps. Be warned: ProjectionMapping is a very expansive implementation, yet takles nonlinearities in coordinate transformation (i.e. distortions).

Author
bartczak 11/2006
Examples:
ExampleRectification.cpp.

Definition at line 51 of file RectificationViaProjectionMappingBase.hh.

Constructor & Destructor Documentation

template<class InputStorageType , class OutputStorageType >
BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::~RectificationViaProjectionMappingBase ( )
virtual

Definition at line 54 of file RectificationViaProjectionMappingBase.cpp.

template<class InputStorageType , class OutputStorageType >
BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::RectificationViaProjectionMappingBase ( const std::string &  stringID,
const double &  Scale = 1.0 
)

Member Function Documentation

template<class InputStorageType , class OutputStorageType >
bool BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::AreRectificationParametersValid_ ( )
protected

Checks for rectificationParamsAreValid_ if not true will try to succsessfully process DetermineRectificationParameters_().

If this is the case it will set rectificationParamsAreValid_ to true and return this value. Otherwise will return false.

Definition at line 136 of file RectificationViaProjectionMappingBase.cpp.

template<class InputStorageType , class OutputStorageType >
int BIAS::RectificationBase< InputStorageType, OutputStorageType >::CalculateMeanOrientation ( const Pose poseLeft,
const Pose poseCenter,
const Pose poseRight,
Quaternion< double > &  orientation 
)
staticinherited

Method calculates an intermediate orientation for rectification from all three poses.

Does not check for forward movement now! Fails if two of the cameras are the same!

Definition at line 254 of file RectificationBase.cpp.

References BIAS::Vector3< T >::CrossProduct(), BIAS::Equal(), BIAS::CoordinateTransform3D::GetC(), BIAS::Matrix3x3< T >::GetDeterminant(), BIAS::RMatrixBase::GetQuaternion(), BIAS::Pose::GetZAxis(), BIAS::Vector3< T >::Normalize(), and BIAS::Vector3< T >::ScalarProduct().

template<class InputStorageType , class OutputStorageType >
int BIAS::RectificationBase< InputStorageType, OutputStorageType >::CalculateRectifiedBases ( const Pose poseA,
const Pose poseB,
Pose poseResA,
Pose poseResB,
bool  failIfForwardMove = false 
)
staticinherited

Method determines two orthonormal bases suitable for rectification.

This bases are parallel to oneanother. The x-basevector is parallel to the line connecting the origins of poseA and poseB. The z-basevector is chosen so that it is in between the z-vectors of original poses.

Parameters
failIfForwardMoveif true will have an error code(<0) returned if one of the original z-basevectors is parallel to baseline

Definition at line 317 of file RectificationBase.cpp.

References BIAS::Vector3< T >::CrossProduct(), BIAS::Equal(), BIAS::CoordinateTransform3D::GetC(), BIAS::RMatrixBase::GetQuaternion(), BIAS::CoordinateTransform3D::GetR(), BIAS::Vector3< T >::Normalize(), BIAS::Vector3< T >::NormL2(), BIAS::Vector3< T >::ScalarProduct(), BIAS::Pose::Set(), and BIAS::Vector3< T >::Set().

template<class InputStorageType, class OutputStorageType>
virtual int BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::DetermineRectificationParameters_ ( )
protectedpure virtual

Calculating the projection parameters for specific rectification.

Is called by Rectify implementation. Must return 0 upon success, every other code is handled as failure.

Implemented in BIAS::PlanarRectification< InputStorageType, OutputStorageType >, BIAS::CylindricalRectification< InputStorageType, OutputStorageType >, and BIAS::SphericalRectification< InputStorageType, OutputStorageType >.

template<class InputStorageType , class OutputStorageType >
int BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::DetermineScaledRectificationParameters_ ( )
protected

this computes ideal parameters and applies the scale

Definition at line 152 of file RectificationViaProjectionMappingBase.cpp.

template<class InputStorageType , class OutputStorageType >
int BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::Disp2Depth ( const Image< float > &  DisparityMap,
Image< float > &  DepthMap,
unsigned int  border 
)
virtual

Uses the passed disparity map for camera A to calculate the corresponding depth map.

Parameters
DisparityMapdisparity map for camera A.
DepthMapresulting depth map for camera A.
borderimage border of depth map that will be ignored

Implements BIAS::RectificationBase< InputStorageType, OutputStorageType >.

Definition at line 679 of file RectificationViaProjectionMappingBase.cpp.

template<class InputStorageType , class OutputStorageType >
int BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::Disp2Depth ( const Image< float > &  DisparityMap,
Image< float > &  DepthMap,
const ProjectionParametersBase origCamPA,
const ProjectionParametersBase origCamPB,
const ProjectionParametersBase rectCamPA,
const ProjectionParametersBase rectCamPB,
unsigned int  border 
)
static

Definition at line 459 of file RectificationViaProjectionMappingBase.cpp.

References BIAS::Image< StorageType >::BilinearInterpolationGreyMinVal(), BIAS::Equal(), BIAS::Gauss< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::Filter(), BIAS::ProjectionParametersBase::GetC(), BIAS::HomgPoint3D::GetEuclidean(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ProjectionParametersBase::GetImageSize(), BIAS::Image< StorageType >::GetMinPixelValue(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetSourceCoordinates(), BIAS::TrackerBaseInterface< StorageType >::Init(), BIAS::Image< StorageType >::Init(), BIAS::MatrixZero, BIAS::Vector3< T >::NormL2(), BIAS::RT_MAD, BIAS::ImageIO::Save(), BIAS::HomgPoint2D::Set(), BIAS::TrackerBaseInterface< StorageType >::SetAffineBrightnessInvariance(), BIAS::TrackerBaseInterface< StorageType >::SetHalfWinSize(), BIAS::TrackerBaseInterface< StorageType >::SetMaxError(), BIAS::TrackerBaseInterface< StorageType >::SetMaxIterations(), BIAS::TrackerBaseInterface< StorageType >::SetMaxResiduumMAD(), BIAS::TrackerBaseInterface< StorageType >::SetRejectionType(), BIAS::Gauss< InputStorageType, OutputStorageType >::SetSigma(), BIAS::ProjectionMapping< InputStorageType, OutputStorageType >::SetSinkCam(), BIAS::ProjectionMapping< InputStorageType, OutputStorageType >::SetSourceCam(), BIAS::ImageBase::SetZero(), BIAS::TrackerBaseInterface< StorageType >::Track(), and BIAS::Triangulation::Triangulate().

template<class InputStorageType , class OutputStorageType >
int BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::GetClonesOfRectificationParameters ( ProjectionParametersBase *&  rectPPA,
ProjectionParametersBase *&  rectPPB 
)
virtual

Tries to calculate the rectification parameters and returns clones of internal members.

If just one rectification parameter could not be determined the returned pointer will be NULL and the return value is less 0.

Definition at line 238 of file RectificationViaProjectionMappingBase.cpp.

References BIAS::ProjectionParametersBase::Clone().

template<class InputStorageType , class OutputStorageType >
Camera< InputStorageType > * BIAS::RectificationBase< InputStorageType, OutputStorageType >::GetImagePointerA ( )
inherited

Definition at line 221 of file RectificationBase.cpp.

template<class InputStorageType , class OutputStorageType >
Camera< InputStorageType > * BIAS::RectificationBase< InputStorageType, OutputStorageType >::GetImagePointerB ( )
inherited

Definition at line 229 of file RectificationBase.cpp.

template<class InputStorageType , class OutputStorageType >
int BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::GetRectificationSetup ( Camera< float > &  rectSetup)

Method returns the current rectification setup.

The Camera class is used as a carrier for the camera parameters stored in the meta data under a single projection. The image data part is containing the BWM-Look-Up-Tables. Each image row contains a single BWM-LUT. The ascii meta data field will contain the StringID of the rectification, which can be quaried using GetStringID().

Definition at line 296 of file RectificationViaProjectionMappingBase.cpp.

References BIAS::Projection::AddRelativeCamera(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::Image< StorageType >::Init(), BIAS::Camera< StorageType >::SetASCIIString(), BIAS::Camera< StorageType >::SetProj(), and BIAS::Camera< StorageType >::UpdateMetaData().

template<class InputStorageType , class OutputStorageType >
void BIAS::RectificationBase< InputStorageType, OutputStorageType >::GetRectifiedImageA ( Image< OutputStorageType > &  rectImg)
inherited

Definition at line 205 of file RectificationBase.cpp.

template<class InputStorageType , class OutputStorageType >
void BIAS::RectificationBase< InputStorageType, OutputStorageType >::GetRectifiedImageB ( Image< OutputStorageType > &  rectImg)
inherited

Definition at line 212 of file RectificationBase.cpp.

template<class InputStorageType , class OutputStorageType >
const Image< OutputStorageType > * BIAS::RectificationBase< InputStorageType, OutputStorageType >::GetRectifiedImagePointerA ( )
inherited

Definition at line 237 of file RectificationBase.cpp.

template<class InputStorageType , class OutputStorageType >
const Image< OutputStorageType > * BIAS::RectificationBase< InputStorageType, OutputStorageType >::GetRectifiedImagePointerB ( )
inherited

Definition at line 246 of file RectificationBase.cpp.

template<class InputStorageType , class OutputStorageType >
int BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::GetRectifyingDisplacementMaps ( Image< float > &  displacementA,
Image< float > &  displacementB 
)

Returns the displacement maps rather then the rectified images, Suitable for texture look ups for multiple images of same configuration.

Definition at line 262 of file RectificationViaProjectionMappingBase.cpp.

References BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), and BIAS::Image< StorageType >::Release().

template<class InputStorageType, class OutputStorageType>
const std::string& BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::GetStringID ( ) const
inline

Returns the string id that identifies the rctification classes in this hierarchy.

Suitable for factories from information stored in Setup files.

Definition at line 155 of file RectificationViaProjectionMappingBase.hh.

template<class InputStorageType , class OutputStorageType >
void BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::InitializeMapping_ ( )
protected

Initializes lut structure and the result images.

Definition at line 216 of file RectificationViaProjectionMappingBase.cpp.

template<class InputStorageType , class OutputStorageType >
void BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::InitializeProjectionMappingObjects_ ( )
protected

Definition at line 204 of file RectificationViaProjectionMappingBase.cpp.

template<class InputStorageType , class OutputStorageType >
void BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::InitializeSinkImages_ ( )
protected

Definition at line 183 of file RectificationViaProjectionMappingBase.cpp.

template<class InputStorageType , class OutputStorageType >
bool BIAS::RectificationBase< InputStorageType, OutputStorageType >::IsInputCameraValid ( BIAS::Camera< InputStorageType > &  cam)
inherited

Method calls two parameteric pure virtual method.

Method is called by SetCamera* methods and returns true if arguments are accepted by rectification implementations. E.g. a rectification method specialised on perspective images will refuse to handle spherical parameters. If method returns false the SetCamera* routines will also fail.

Definition at line 46 of file RectificationBase.cpp.

References BIAS::Projection::GetParameters(), BIAS::Camera< StorageType >::GetProj(), and BIAS::Camera< StorageType >::ParseMetaData().

template<class InputStorageType, class OutputStorageType>
virtual bool BIAS::RectificationBase< InputStorageType, OutputStorageType >::IsInputCameraValid ( const BIAS::Image< InputStorageType > &  img,
const BIAS::ProjectionParametersBase proj 
)
pure virtualinherited
template<class InputStorageType , class OutputStorageType >
int BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::Rectify ( )
virtual

Fundamental method which contains the rectification implementation.

Returns
0 on successfull rectification.

Implements BIAS::RectificationBase< InputStorageType, OutputStorageType >.

Definition at line 400 of file RectificationViaProjectionMappingBase.cpp.

template<class InputStorageType , class OutputStorageType >
int BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::SetCameraA ( BIAS::Camera< InputStorageType > &  cam)
virtual
Returns
-1 if rectification class is not supporting the specified projection type (what includes invalid projections).
1 if argument projection is already set.

Reimplemented from BIAS::RectificationBase< InputStorageType, OutputStorageType >.

Definition at line 76 of file RectificationViaProjectionMappingBase.cpp.

References BIAS::Projection::GetParameters(), BIAS::Camera< StorageType >::GetProj(), and BIAS::Camera< StorageType >::ParseMetaData().

template<class InputStorageType , class OutputStorageType >
int BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::SetCameraA ( const BIAS::Image< InputStorageType > &  img,
const BIAS::ProjectionParametersBase proj 
)
virtual
Returns
-1 if rectification class is not supporting the specified projection type (what includes invalid projections).
1 if argument projection is already set. Will only use pointer for polymorphism. Will aquire copy of projection.

Reimplemented from BIAS::RectificationBase< InputStorageType, OutputStorageType >.

Definition at line 87 of file RectificationViaProjectionMappingBase.cpp.

template<class InputStorageType , class OutputStorageType >
int BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::SetCameraB ( BIAS::Camera< InputStorageType > &  cam)
virtual
Returns
-1 if rectification class is not supporting the specified projection type (what includes invalid projections).
1 if argument projection is already set.

Reimplemented from BIAS::RectificationBase< InputStorageType, OutputStorageType >.

Definition at line 101 of file RectificationViaProjectionMappingBase.cpp.

References BIAS::Projection::GetParameters(), BIAS::Camera< StorageType >::GetProj(), and BIAS::Camera< StorageType >::ParseMetaData().

template<class InputStorageType , class OutputStorageType >
int BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::SetCameraB ( const BIAS::Image< InputStorageType > &  img,
const BIAS::ProjectionParametersBase proj 
)
virtual
Returns
-1 if rectification class is not supporting the specified projection type (what includes invalid projections).
1 if argument projection is already set. Will only use pointer for polymorphism. Will aquire copy of projection.

Reimplemented from BIAS::RectificationBase< InputStorageType, OutputStorageType >.

Definition at line 112 of file RectificationViaProjectionMappingBase.cpp.

template<class InputStorageType , class OutputStorageType >
void BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::SetInterpolationMethod ( InterpolationMethod  interpolationType)

Determines the type of interpolation used when rectifying.

Types are taken from BackwardMapping.hh

Definition at line 126 of file RectificationViaProjectionMappingBase.cpp.

template<class InputStorageType , class OutputStorageType >
void BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::SetOverrideAngles ( double  thetaMinOverride,
double  thetaMaxOverride,
double  phiMinOverride,
double  phiMaxOverride 
)

Set the override angles, which are individually chosen for the internal parameters, if the respective override leads to a smaller fov of the rectified cameras, then the automatically derived fov.

The angles are defined in the rectified coordinate frame of the first camera and have the same defintion as the angle coordinates used in ProjectionParametersGreatCircle.

Definition at line 382 of file RectificationViaProjectionMappingBase.cpp.

template<class InputStorageType , class OutputStorageType >
int BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::SetRectificationSetup ( Camera< float > &  rectSetup)

Loads rectification setup from Camera data.

Returns
-1 if ID stored in the image does not fit the class id.
Attention
if Set*() is called with parameters not fitting the loaded setup, a reinitalisation of the mapping structures is performed (like in scenarios where the setup was not loaded!).

Definition at line 347 of file RectificationViaProjectionMappingBase.cpp.

References BIAS::ProjectionParametersBase::Clone(), BIAS::Camera< StorageType >::GetASCIIString(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::Projection::GetParameters(), BIAS::Camera< StorageType >::GetProj(), BIAS::ImageBase::GetWidth(), and BIAS::Camera< StorageType >::ParseMetaData().

template<class InputStorageType, class OutputStorageType>
void BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::SetScale ( const double &  scale)
inline

Scale factor for isotropically scaling the rectified images (and rectified intrinsic parameters).

Attention
If targetWidth_ is greater zero the scale factor set using this method is ignored, see SetTargetWidth().

Definition at line 66 of file RectificationViaProjectionMappingBase.hh.

template<class InputStorageType, class OutputStorageType>
void BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::SetSecondFill ( OutputStorageType  d)
inline

fill color for second image (first is black)

Definition at line 115 of file RectificationViaProjectionMappingBase.hh.

template<class InputStorageType , class OutputStorageType >
void BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::SetTargetWidth ( unsigned int  targetWidth)

Similar to SetScale but uses the argument width to determine scale factor.

Method sets the value of targetWidth_ which defaults to zero. If targetWidth_ is set greater then zero an isotropic scale factor for the calculated rectified intrinsic parameters is derived so that both rectified images will have this width.

Attention
If targetWidth_ is greater zero the scale factor set using SetScale is ignored.

Definition at line 908 of file RectificationViaProjectionMappingBase.cpp.

template<class InputStorageType , class OutputStorageType >
void BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::UseLookUpTables ( bool  use)

Method allows to turn on or off the use of look up tables.

Per default use of look up tables is turned on. If it is turned off loading rectification setups will turn it on!

Definition at line 916 of file RectificationViaProjectionMappingBase.cpp.

Member Data Documentation

template<class InputStorageType, class OutputStorageType>
Camera<InputStorageType> BIAS::RectificationBase< InputStorageType, OutputStorageType >::imageA_
protectedinherited

local copy of passed image

Definition at line 178 of file RectificationBase.hh.

template<class InputStorageType, class OutputStorageType>
Camera<InputStorageType> BIAS::RectificationBase< InputStorageType, OutputStorageType >::imageB_
protectedinherited

local copy of passed image

Definition at line 184 of file RectificationBase.hh.

template<class InputStorageType, class OutputStorageType>
InterpolationMethod BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::interpolationType_
protected

Definition at line 239 of file RectificationViaProjectionMappingBase.hh.

template<class InputStorageType, class OutputStorageType>
bool BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::mappingInitialized_
protected

Tells whether the lut structure and the result images have been initialized.

This flag is set to true by method InitializeMapping_(). It is false after object creation and is set false when rectificationParamsAreValid_ flag changes from false to true, which is the case in AreRectificationParametersValid_().

Definition at line 251 of file RectificationViaProjectionMappingBase.hh.

template<class InputStorageType, class OutputStorageType>
double BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::phiMaxOverride_
protected

Value used to override phiMax result of automatic fov calculation if phiMaxOverride_ is smaller.

Definition at line 300 of file RectificationViaProjectionMappingBase.hh.

template<class InputStorageType, class OutputStorageType>
double BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::phiMinOverride_
protected

Value used to override phiMin result of automatic fov calculation if phiMinOverride_ is larger.

Definition at line 295 of file RectificationViaProjectionMappingBase.hh.

template<class InputStorageType, class OutputStorageType>
ProjectionParametersBase* BIAS::RectificationBase< InputStorageType, OutputStorageType >::ppBA_
protectedinherited

local copy of passed projection parameters

Definition at line 175 of file RectificationBase.hh.

template<class InputStorageType, class OutputStorageType>
ProjectionParametersBase* BIAS::RectificationBase< InputStorageType, OutputStorageType >::ppBB_
protectedinherited

local copy of passed projection parameters

Definition at line 181 of file RectificationBase.hh.

template<class InputStorageType, class OutputStorageType>
bool BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::rectificationParamsAreValid_
protected

Flag is true when DetermineRectificationParameters_() was succesfull and no setter was called afterwards.

Definition at line 237 of file RectificationViaProjectionMappingBase.hh.

template<class InputStorageType, class OutputStorageType>
Image<OutputStorageType> BIAS::RectificationBase< InputStorageType, OutputStorageType >::rectImageA_
protectedinherited

Results of rectification.

Definition at line 187 of file RectificationBase.hh.

template<class InputStorageType, class OutputStorageType>
Image<OutputStorageType> BIAS::RectificationBase< InputStorageType, OutputStorageType >::rectImageB_
protectedinherited

Results of rectification.

Definition at line 190 of file RectificationBase.hh.

template<class InputStorageType, class OutputStorageType>
ProjectionMapping<InputStorageType, OutputStorageType> BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::rectMapperA_
protected

Classes holding rectification parameters and performing mapping.

Definition at line 243 of file RectificationViaProjectionMappingBase.hh.

template<class InputStorageType, class OutputStorageType>
ProjectionMapping<InputStorageType, OutputStorageType> BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::rectMapperB_
protected

Definition at line 244 of file RectificationViaProjectionMappingBase.hh.

template<class InputStorageType, class OutputStorageType>
ProjectionParametersBase* BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::rectPPA_
protected

Projection parameters of the rectified image A.

Definition at line 212 of file RectificationViaProjectionMappingBase.hh.

template<class InputStorageType, class OutputStorageType>
ProjectionParametersBase* BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::rectPPB_
protected

Projection parameters of the rectified image B.

Definition at line 215 of file RectificationViaProjectionMappingBase.hh.

template<class InputStorageType, class OutputStorageType>
double BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::scale_
protected

scale computed rectification resolution by this amount

Definition at line 218 of file RectificationViaProjectionMappingBase.hh.

template<class InputStorageType, class OutputStorageType>
OutputStorageType BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::secondFill_
protected
template<class InputStorageType, class OutputStorageType>
std::string BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::stringID_
protected

Descriptive identifier of the classes in the hierarchy.

Definition at line 197 of file RectificationViaProjectionMappingBase.hh.

template<class InputStorageType, class OutputStorageType>
unsigned int BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::targetWidth_
protected

if this value is greater zero the scale the computed rectification parameters are isotropically scaled by a scale factor so that the image width of both rectified images matches this value.

Its value is set using SetTargetWidth().

Definition at line 224 of file RectificationViaProjectionMappingBase.hh.

template<class InputStorageType, class OutputStorageType>
double BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::thetaMaxOverride_
protected

Value used to override thetaMax result of automatic fov calculation if thetaMaxOverride_ is smaller.

Definition at line 290 of file RectificationViaProjectionMappingBase.hh.

template<class InputStorageType, class OutputStorageType>
double BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::thetaMinOverride_
protected

Value used to override thetaMin result of automatic fov calculation if thetaMinOverride_ is larger.

Definition at line 285 of file RectificationViaProjectionMappingBase.hh.

template<class InputStorageType, class OutputStorageType>
bool BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::useLookUpTables_
protected

Toggles the use of lookup tables.

Definition at line 304 of file RectificationViaProjectionMappingBase.hh.


The documentation for this class was generated from the following files: