Basic Image AlgorithmS Library
2.8.0
|
base class for rectification implementations and wrappers More...
#include <Image/RectificationBase.hh>
Public Member Functions | |
virtual int | Disp2Depth (const Image< float > &DisparityMap, Image< float > &DepthMap, unsigned int border)=0 |
Uses the passed disparity map for camera A to calculate the corresponding depth map. More... | |
virtual bool | IsInputCameraValid (const BIAS::Image< InputStorageType > &img, const BIAS::ProjectionParametersBase *proj)=0 |
RectificationBase () | |
virtual int | Rectify ()=0 |
Fundamental method which contains the rectification implementation. More... | |
virtual | ~RectificationBase () |
Input data | |
fundamental setters. | |
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) |
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.
| |
Camera< InputStorageType > * | GetImagePointerA () |
Camera< InputStorageType > * | GetImagePointerB () |
const Image< OutputStorageType > * | GetRectifiedImagePointerA () |
const Image< OutputStorageType > * | GetRectifiedImagePointerB () |
Static Public Member Functions | |
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 Attributes | |
Camera< InputStorageType > | imageA_ |
local copy of passed image More... | |
Camera< InputStorageType > | imageB_ |
local copy of passed image More... | |
ProjectionParametersBase * | ppBA_ |
local copy of passed projection parameters More... | |
ProjectionParametersBase * | ppBB_ |
local copy of passed projection parameters More... | |
Image< OutputStorageType > | rectImageA_ |
Results of rectification. More... | |
Image< OutputStorageType > | rectImageB_ |
Results of rectification. More... | |
base class for rectification implementations and wrappers
Definition at line 43 of file RectificationBase.hh.
|
virtual |
Definition at line 33 of file RectificationBase.cpp.
BIAS::RectificationBase< InputStorageType, OutputStorageType >::RectificationBase | ( | ) |
Definition at line 41 of file RectificationBase.cpp.
|
static |
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().
|
static |
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.
failIfForwardMove | if 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().
|
pure virtual |
Uses the passed disparity map for camera A to calculate the corresponding depth map.
DisparityMap | disparity map for camera A. |
DepthMap | resulting depth map for camera A. |
border | image border of depth map that will be ignored |
Implemented in BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >, and BIAS::HomographyRectification< InputStorageType, OutputStorageType >.
Camera< InputStorageType > * BIAS::RectificationBase< InputStorageType, OutputStorageType >::GetImagePointerA | ( | ) |
Definition at line 221 of file RectificationBase.cpp.
Camera< InputStorageType > * BIAS::RectificationBase< InputStorageType, OutputStorageType >::GetImagePointerB | ( | ) |
Definition at line 229 of file RectificationBase.cpp.
void BIAS::RectificationBase< InputStorageType, OutputStorageType >::GetRectifiedImageA | ( | Image< OutputStorageType > & | rectImg | ) |
Definition at line 205 of file RectificationBase.cpp.
void BIAS::RectificationBase< InputStorageType, OutputStorageType >::GetRectifiedImageB | ( | Image< OutputStorageType > & | rectImg | ) |
Definition at line 212 of file RectificationBase.cpp.
const Image< OutputStorageType > * BIAS::RectificationBase< InputStorageType, OutputStorageType >::GetRectifiedImagePointerA | ( | ) |
Definition at line 237 of file RectificationBase.cpp.
const Image< OutputStorageType > * BIAS::RectificationBase< InputStorageType, OutputStorageType >::GetRectifiedImagePointerB | ( | ) |
Definition at line 246 of file RectificationBase.cpp.
bool BIAS::RectificationBase< InputStorageType, OutputStorageType >::IsInputCameraValid | ( | BIAS::Camera< InputStorageType > & | cam | ) |
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().
|
pure virtual |
|
pure virtual |
Fundamental method which contains the rectification implementation.
Implemented in BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >, and BIAS::HomographyRectification< InputStorageType, OutputStorageType >.
|
virtual |
Reimplemented in BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >.
Definition at line 55 of file RectificationBase.cpp.
References BIAS::Projection::GetParameters(), BIAS::Camera< StorageType >::GetProj(), and BIAS::Camera< StorageType >::ParseMetaData().
|
virtual |
Reimplemented in BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >.
Definition at line 86 of file RectificationBase.cpp.
References BIAS::ProjectionParametersBase::Clone(), and BIAS::ImageBase::IsEmpty().
|
virtual |
Reimplemented in BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >.
Definition at line 129 of file RectificationBase.cpp.
References BIAS::Projection::GetParameters(), BIAS::Camera< StorageType >::GetProj(), and BIAS::Camera< StorageType >::ParseMetaData().
|
virtual |
Reimplemented in BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >.
Definition at line 164 of file RectificationBase.cpp.
References BIAS::ProjectionParametersBase::Clone(), and BIAS::ImageBase::IsEmpty().
|
protected |
local copy of passed image
Definition at line 178 of file RectificationBase.hh.
|
protected |
local copy of passed image
Definition at line 184 of file RectificationBase.hh.
|
protected |
local copy of passed projection parameters
Definition at line 175 of file RectificationBase.hh.
|
protected |
local copy of passed projection parameters
Definition at line 181 of file RectificationBase.hh.
|
protected |
Results of rectification.
Definition at line 187 of file RectificationBase.hh.
|
protected |
Results of rectification.
Definition at line 190 of file RectificationBase.hh.