Basic Image AlgorithmS Library
2.8.0
|
#include <Image/HomographyRectification.hh>
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 bool | IsInputCameraValid (const BIAS::Image< InputStorageType > &img, const BIAS::ProjectionParametersBase *proj) |
virtual int | Rectify () |
Rectify with same internal parameters for both. More... | |
virtual int | RectifyMinImageSize () |
Rectify so that images have minimal size. More... | |
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... | |
Definition at line 35 of file HomographyRectification.hh.
|
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().
|
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.
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().
|
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 |
Implements BIAS::RectificationBase< InputStorageType, OutputStorageType >.
Definition at line 54 of file HomographyRectification.cpp.
|
inherited |
Definition at line 221 of file RectificationBase.cpp.
|
inherited |
Definition at line 229 of file RectificationBase.cpp.
|
inherited |
Definition at line 205 of file RectificationBase.cpp.
|
inherited |
Definition at line 212 of file RectificationBase.cpp.
|
inherited |
Definition at line 237 of file RectificationBase.cpp.
|
inherited |
Definition at line 246 of file RectificationBase.cpp.
|
virtual |
Implements BIAS::RectificationBase< InputStorageType, OutputStorageType >.
Definition at line 65 of file HomographyRectification.cpp.
|
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().
|
virtual |
Rectify with same internal parameters for both.
Implements BIAS::RectificationBase< InputStorageType, OutputStorageType >.
Definition at line 32 of file HomographyRectification.cpp.
|
virtual |
Rectify so that images have minimal size.
Definition at line 47 of file HomographyRectification.cpp.
|
virtualinherited |
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().
|
virtualinherited |
Reimplemented in BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >.
Definition at line 86 of file RectificationBase.cpp.
References BIAS::ProjectionParametersBase::Clone(), and BIAS::ImageBase::IsEmpty().
|
virtualinherited |
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().
|
virtualinherited |
Reimplemented in BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >.
Definition at line 164 of file RectificationBase.cpp.
References BIAS::ProjectionParametersBase::Clone(), and BIAS::ImageBase::IsEmpty().
|
protectedinherited |
local copy of passed image
Definition at line 178 of file RectificationBase.hh.
|
protectedinherited |
local copy of passed image
Definition at line 184 of file RectificationBase.hh.
|
protectedinherited |
local copy of passed projection parameters
Definition at line 175 of file RectificationBase.hh.
|
protectedinherited |
local copy of passed projection parameters
Definition at line 181 of file RectificationBase.hh.
|
protectedinherited |
Results of rectification.
Definition at line 187 of file RectificationBase.hh.
|
protectedinherited |
Results of rectification.
Definition at line 190 of file RectificationBase.hh.