Basic Image AlgorithmS Library
2.8.0
|
This class hides the underlying projection model, like projection matrix, spherical camera, lens distortion. More...
#include <Geometry/Projection.hh>
Public Member Functions | |
void | AddAbsoluteCamera (ProjectionParametersBase *ppb) |
Add a camera to the projection,the coordinates of the pose are given in absolute Coordinates, they are transformed to relative coordinates to the first camera internally. More... | |
void | AddRelativeCamera (ProjectionParametersBase *ppb) |
Add a camera to the projection,the coordinates of the pose are given in relative Coordinates, first cam is origin. More... | |
void | Clear () |
Delete all ProjectionParameterBase objects contained in Projection. More... | |
void | CreatePerspective (const BIAS::Pose &pose, const BIAS::KMatrix &K, int width, int height, BIAS_ProjParaPersp_DISTORTION_TYPE radDistType=DISTYPE_DEF, const std::vector< double > &UndistortionCoefficients=std::vector< double >(4, 0.0)) |
Create a perspective camera and add to projection. More... | |
void | CreateSpherical (const Pose &pose, const unsigned int width, const int height, const double principalX, const double principalY, const double radius, const double aspect=1.0) |
push_back a new sperical cam to this More... | |
virtual bool | DoesPointProjectIntoImage (const BIAS::HomgPoint3D &X, BIAS::HomgPoint2D &x, unsigned int cam=0, bool IgnoreDistortion=false) const |
Checks if 3D point projects into specified image and returns belonging 2D image point. More... | |
virtual const bool | DoExtrinsicsDiffer (const BIAS::Projection &p) const |
Checks whether extrinsic parameters are different. More... | |
virtual const bool | DoIntrinsicsDiffer (const BIAS::Projection &p) const |
Checks whether intrinsic parameters are different. More... | |
Vector3< double > | GetAbsoluteC (unsigned int cam=0) const |
Return center of camera with index cam. More... | |
Quaternion< double > | GetAbsoluteQ (unsigned int cam=0) const |
return rotation quaternion of camera with index cam. More... | |
RMatrix | GetAbsoluteR (unsigned int cam=0) const |
return RMatrix of camera with index cam. More... | |
Vector3< double > | GetC (unsigned int cam=0) const |
return Center of camera with index cam. More... | |
virtual Matrix< double > | GetCov (unsigned int cam=0) const |
Get the Pose covariance. More... | |
Matrix3x4< double > | GetExternals (unsigned int cam=0) const |
Obtain the external camera parameters. More... | |
std::string | GetIdentifier () const |
Return the identifier of the Projection such as a name. More... | |
ProjectionParametersBase * | GetParameterCloneWithAbsolutePose (unsigned int cam=0) const |
Allocates memory for parameters base type and returns pointer to it! More... | |
const ProjectionParametersBase * | GetParameters (unsigned int cam=0) const |
const parameter access function More... | |
ProjectionParametersBase * | GetParameters (unsigned int cam=0) |
Non-const access function to parameters. More... | |
virtual const Pose & | GetPose (unsigned int cam=0) const |
return complete pose object. More... | |
BIAS::Quaternion< double > | GetQ (unsigned int cam=0) const |
return rotation quaternion of camera with index cam if cam>0 this is a relative pose in the coordinate system of cam 0 More... | |
RMatrix | GetR (unsigned int cam=0) const |
return RMatrix of camera with index cam. More... | |
int | InitFromCameraData (const std::vector< CameraData > &vcd) |
initializes projection from cameradata object More... | |
bool | IsEmpty () const |
Determine whether the Projection is Empty. More... | |
virtual int | Load (const std::string &filename) |
convenience wrapper which tries to read different formats More... | |
const Projection & | operator= (const Projection &p) |
operator= More... | |
bool | PoseValid (unsigned int cam=0) const |
Determine whether the pose is valid or not. More... | |
virtual HomgPoint2D | Project (const HomgPoint3D &X, unsigned int cam=0, bool IgnoreDistortion=false) const |
returns the 2d projection of X in camera cam, where X is given in the global coordinate frame (not the rig) (needs HomgPoint3D to map points at infinity) More... | |
Projection () | |
constructor More... | |
Projection (const Projection &p) | |
copy constructor More... | |
Projection (const ProjectionParametersBase &p) | |
constructor for initialization with a ProjectionParametersBase object More... | |
int | ReadFromBBC (const std::string &filename, const bool silent=false) |
read BBC's FreeD data from file and constructs a perspective projection (may have radial distortion) More... | |
int | ReadFromCamParamFile (const std::string &filename, const bool silent=false) |
Reads a camera data XML file and constructs the ProjectionParametersBase-pointer, using the ProjectionParametersIO and the CameraParameter file format. More... | |
void | Rescale (float ratio, unsigned int cam=0) |
adapt internal params to resampled image More... | |
virtual void | SetC (const Vector3< double > &C, unsigned int cam=0) |
Set center of camera with index cam. More... | |
virtual void | SetCov (const Matrix< double > &Cov, unsigned int cam=0) |
Set the Pose covariance. More... | |
void | SetIdentifier (const std::string &identString) |
Set the identifier of the Projection such as a name. More... | |
virtual void | SetPose (const BIAS::Pose pose, unsigned int cam=0) |
Set the Pose of the camera with index cam. More... | |
virtual void | SetQ (const Quaternion< double > &Q, unsigned int cam=0) |
Set rotation quaternion of camera with index cam. More... | |
virtual void | SetR (const RMatrix &R, unsigned int cam=0) |
Set rotation matrix of camera with index cam. More... | |
unsigned int | Size () const |
Determine number of ProjectionParameterBase pointers in Projection. More... | |
Matrix3x3< double > | UnProjectToCovLocal (const HomgPoint2D &pos, const Matrix3x3< double > &cov2D, const double &depth, unsigned int camSystem=0, unsigned int cam=0, bool IgnoreDistortion=false, bool Normalize=false) const |
calculate 3D point and associated covariance by unprojection More... | |
Vector3< double > | UnProjectToPoint (const HomgPoint2D &pos, double depth, unsigned int cam=0, bool IgnoreDistortion=false) const |
calculates a 3D point in the global (not the rig) coordinate system, which belongs to the image position pos with distance depth to the camera center of cam. More... | |
Vector3< double > | UnProjectToPointLocal (const HomgPoint2D &pos, const double &depth, unsigned int camSystem=0, unsigned int cam=0, bool IgnoreDistortion=false) const |
calculates a 3D point in a local camera coordinate system specified by camSystem, which belongs to the image position pos in cam with distance depth to the camera center cam. More... | |
void | UnProjectToRay (const HomgPoint2D &pos, Vector3< double > &origin, Vector3< double > &rayDir, unsigned int cam=0, bool IgnoreDistortion=false) const |
calculates the viewing ray in the global coordinate frame (not the rig) from the camera center which belongs to the given image position. More... | |
void | UnProjectToRay (const HomgPoint2D &pos, Vector3< double > &rayDir, unsigned int cam=0, bool IgnoreDistortion=false) const |
calculates the viewing ray in the global coordinate frame (not the rig) from the camera center which belongs to the given image position. More... | |
void | UnProjectToRayLocal (const HomgPoint2D &pos, Vector3< double > &origin, Vector3< double > &rayDir, unsigned int camSystem=0, unsigned int cam=0, bool IgnoreDistortion=false) const |
calculates a 3D ray in a local camera coordinate system specified by camSystem, which belongs to the image position pos in cam. More... | |
xmlNodePtr | XMLAdd (const xmlNodePtr Node, XMLIO &XMLObject) const |
call this to add the class to a node of a given xml tree More... | |
virtual int | XMLGetClassName (std::string &TopLevelTag, double &Version) const |
specialization of XML block name function for BIAS::Projection. More... | |
virtual int | XMLIn (const xmlNodePtr Node, XMLIO &XMLObject) |
specialization of XML read function for BIAS::Projection. More... | |
virtual int | XMLOut (const xmlNodePtr Node, XMLIO &XMLObject) const |
specialization of XML write function for BIAS::Projection. More... | |
int | XMLRead (const std::string &Filename) |
derived classes must implement the function XMLIn which is called by this function XMLRead to read everything with name Filename into (*this). More... | |
int | XMLReadFromString (const std::string &str) |
reconstruct xml tree from string More... | |
int | XMLWrite (const std::string &Filename, int CompressionLevel=0, bool AutoAddCompressionSuffix=true, std::string encoding="UTF-8") const |
call this to add the class to a new xml tree and write it to the file Filename. More... | |
int | XMLWriteToString (std::string &str, std::string encoding="UTF-8") const |
serialize xml tree to string More... | |
virtual | ~Projection () |
destructor for initialization with a ProjectionParametersBase object More... | |
Protected Attributes | |
std::string | identifier_ |
Multifunctional identifier. More... | |
std::vector < ProjectionParametersBase * > | vecParameters_ |
the intrinsics (like K, ...) of the camera usually only one only in rig mode there may be many, in that case vecIntrinsics[0] holds the external pose while the others hold the internal pose (pose in the coordinate system of the first camera) More... | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const Projection &p) |
The outstream operator, used in XMLOut, etc. More... | |
This class hides the underlying projection model, like projection matrix, spherical camera, lens distortion.
Read and write projections with XMLRead(filename) and XMLWrite(filename)
Definition at line 70 of file Projection.hh.
Projection::Projection | ( | ) |
constructor
Definition at line 38 of file Projection.cpp.
Projection::Projection | ( | const Projection & | p | ) |
copy constructor
Definition at line 49 of file Projection.cpp.
|
explicit |
constructor for initialization with a ProjectionParametersBase object
Definition at line 43 of file Projection.cpp.
References BIAS::ProjectionParametersBase::Clone().
|
virtual |
destructor for initialization with a ProjectionParametersBase object
Definition at line 55 of file Projection.cpp.
void Projection::AddAbsoluteCamera | ( | ProjectionParametersBase * | ppb | ) |
Add a camera to the projection,the coordinates of the pose are given in absolute Coordinates, they are transformed to relative coordinates to the first camera internally.
ppB | Pointer to ProjectionParametersBase, the Object is copied and stored in vecParameters_ |
Definition at line 199 of file Projection.cpp.
References BIAS::CoordinateTransform3D::BecomeRelativeTransform(), BIAS::ProjectionParametersBase::Clone(), BIAS::ProjectionParametersBase::GetPose(), and BIAS::ProjectionParametersBase::SetPose().
void Projection::AddRelativeCamera | ( | ProjectionParametersBase * | ppb | ) |
Add a camera to the projection,the coordinates of the pose are given in relative Coordinates, first cam is origin.
ppB | Pointer to ProjectionParametersBase, the Object is copied and stored in vecParameters_ |
Definition at line 194 of file Projection.cpp.
References BIAS::ProjectionParametersBase::Clone().
Referenced by BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::GetRectificationSetup().
|
inline |
Delete all ProjectionParameterBase objects contained in Projection.
Definition at line 184 of file Projection.hh.
void Projection::CreatePerspective | ( | const BIAS::Pose & | pose, |
const BIAS::KMatrix & | K, | ||
int | width, | ||
int | height, | ||
BIAS_ProjParaPersp_DISTORTION_TYPE | radDistType = DISTYPE_DEF , |
||
const std::vector< double > & | UndistortionCoefficients = std::vector<double>(4, 0.0) |
||
) |
Create a perspective camera and add to projection.
pose | the pose to use |
K | the KMatrix of the new camera |
width | width of the new camera |
height | height of the new camera |
radDistType | the radial distortion type (DISTYPE_DEF or DISTYPE_BROWN) |
UndistortionCoefficients | std::vector containing the distortion parameters |
Definition at line 133 of file Projection.cpp.
References BIAS::DISTYPE_BROWN, BIAS::DISTYPE_DEF, BIAS::DISTYPE_INVERSE_RAD, BIAS::DISTYPE_INVRAD3, BIAS::DISTYPE_NONE, BIAS::DISTYPE_RAD3, BIAS::DISTYPE_RADIAL, BIAS::KMatrix::GetFx(), BIAS::KMatrix::GetFy(), BIAS::KMatrix::GetHx(), BIAS::KMatrix::GetHy(), BIAS::ProjectionParametersPerspective::SetDistortionType(), BIAS::ProjectionParametersPerspective::SetFocalLengthAndAspect(), BIAS::ProjectionParametersBase::SetImageSize(), BIAS::ProjectionParametersBase::SetPose(), BIAS::ProjectionParametersPerspective::SetPrincipal(), BIAS::ProjectionParametersPerspective::SetUndistortion(), BIAS::ProjectionParametersPerspective::SetUndistortionBrown(), BIAS::ProjectionParametersPerspective::SetUndistortionInverseRad(), BIAS::ProjectionParametersPerspective::SetUndistortionInverseRad3(), and BIAS::ProjectionParametersPerspective::SetUndistortionRad3().
Referenced by BIAS::PMDImageProc::FitDepthTo2DImageFree_(), and BIAS::VideoSource_DiskPMD::GrabSingle().
void Projection::CreateSpherical | ( | const Pose & | pose, |
const unsigned int | width, | ||
const int | height, | ||
const double | principalX, | ||
const double | principalY, | ||
const double | radius, | ||
const double | aspect = 1.0 |
||
) |
push_back a new sperical cam to this
Definition at line 218 of file Projection.cpp.
References BIAS::ProjectionParametersBase::SetAspectratio(), BIAS::ProjectionParametersBase::SetImageSize(), BIAS::ProjectionParametersBase::SetPose(), BIAS::ProjectionParametersBase::SetPrincipal(), BIAS::ProjectionParametersSpherical::SetRadius(), and BIAS::ProjectionParametersSpherical::SetUndistortion().
|
virtual |
Checks if 3D point projects into specified image and returns belonging 2D image point.
X | assumes homogenized point! |
Definition at line 300 of file Projection.cpp.
References BIAS::HomgPoint3D::GetEuclidean(), and BIAS::HomgPoint3D::Homogenize().
Referenced by BIAS::PMDImageProc::Fit2DToDepthImage(), BIAS::TriangleMesh::GenerateDenseMesh(), BIAS::TriangleMesh::MakeTriangles_(), BIAS::EpipolarLine::ProjectEpipolarPlane(), and BIAS::TriangleMesh::SimplifyMeshSurface_().
|
virtual |
Checks whether extrinsic parameters are different.
Definition at line 269 of file Projection.cpp.
References vecParameters_.
|
virtual |
Checks whether intrinsic parameters are different.
Definition at line 285 of file Projection.cpp.
References vecParameters_.
|
inline |
Return center of camera with index cam.
If cam>0 this is an absolute position in the global coordinate system
Definition at line 261 of file Projection.hh.
|
inline |
return rotation quaternion of camera with index cam.
If cam>0 this is an absolute rotation in the global coordinate system
Definition at line 273 of file Projection.hh.
|
inline |
return RMatrix of camera with index cam.
If cam>0 this is an absolute rotation in the global coordinate system
Definition at line 250 of file Projection.hh.
|
inline |
return Center of camera with index cam.
If cam>0 this is a relative pose in the coordinate system of cam 0
Definition at line 236 of file Projection.hh.
Referenced by BIAS::ThreeDOut::AddProjection(), BIAS::TriangleMesh::GenerateDenseMesh(), BIAS::TriangleMesh::GenerateSimplifiedMesh(), BIAS::TriangleMesh::MakeTriangles_(), BIAS::SphericalDepthPanorama::ProcessSphericalProjection(), BIAS::EpipolarLine::ProjectEpipolarPlane(), and BIAS::Projection3DData::Set().
|
inlinevirtual |
Get the Pose covariance.
Definition at line 306 of file Projection.hh.
|
inline |
Obtain the external camera parameters.
Definition at line 292 of file Projection.hh.
|
inline |
Return the identifier of the Projection such as a name.
Definition at line 483 of file Projection.hh.
Referenced by BIAS::operator<<(), and BIAS::Projection3DData::Set().
|
inline |
Allocates memory for parameters base type and returns pointer to it!
Definition at line 218 of file Projection.hh.
References BIAS::ProjectionParametersBase::Clone(), BIAS::CoordinateTransform3D::ConcatenateLocalTransform(), BIAS::ProjectionParametersBase::GetPose(), and BIAS::ProjectionParametersBase::SetPose().
Referenced by BIAS::ProjectionParametersFactory::Load(), BIAS::clfTrimmedICP::SetDataFromDepthMap(), BIAS::clfTrimmedICP::setFromDepthMap_(), and BIAS::clfTrimmedICP::SetModelFromDepthMap().
|
inline |
const parameter access function
Definition at line 194 of file Projection.hh.
Referenced by BIAS::ThreeDOut::AddProjection(), BIAS::ImageBlender::BlendImages(), BIAS::ImageBlenderIncremental::BlendImages(), BIAS::ImageBlender::CheckFov(), BIAS::ImageBlenderIncremental::CheckFov_(), BIAS::PMDImageProc::CrossCheck(), BIAS::PMDImageProc::FitDepthTo2DImage(), BIAS::TriangleMesh::GenerateImagePlane(), BIAS::TriangleMesh::GenerateSimplifiedMesh(), BIAS::IOUtils::GetProjection(), BIAS::IOUtils::GetProjectionParametersPerspective(), BIAS::biasGLviewerGLUT::Init(), BIAS::CylindricDepthPanorama::Init(), BIAS::RectificationBase< InputStorageType, OutputStorageType >::IsInputCameraValid(), BIAS::IOUtils::LoadCamera(), BIAS::IOUtils::LoadParameters(), BIAS::TriangleMesh::MakeTriangles_(), BIAS::VideoSource_Controller_Kinect::OnLoadCalib(), BIAS::CylindricDepthTrackingPanorama::ProcessCylindricProjection(), BIAS::EpipolarLine::ProjectEpipolarPlane(), BIAS::Projection3DData::Set(), BIAS::RectificationBase< InputStorageType, OutputStorageType >::SetCameraA(), BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::SetCameraA(), BIAS::RectificationBase< InputStorageType, OutputStorageType >::SetCameraB(), BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::SetCameraB(), BIAS::wxProjectionPanel::SetProjection(), BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::SetRectificationSetup(), BIAS::ForwardMappingNearestNeighbour< InputStorageType, OutputStorageType >::SetSinkCam(), and BIAS::ForwardMappingNearestNeighbour< InputStorageType, OutputStorageType >::SetSourceCam().
|
inline |
Non-const access function to parameters.
Definition at line 204 of file Projection.hh.
|
inlinevirtual |
return complete pose object.
If cam>0 this is a relative pose in the coordinate system of cam 0
Definition at line 318 of file Projection.hh.
BIAS::Quaternion< double > Projection::GetQ | ( | unsigned int | cam = 0 | ) | const |
return rotation quaternion of camera with index cam if cam>0 this is a relative pose in the coordinate system of cam 0
Definition at line 524 of file Projection.cpp.
Referenced by BIAS::ThreeDOut::AddProjection(), and BIAS::SphericalDepthPanorama::ProcessSphericalProjection().
|
inline |
return RMatrix of camera with index cam.
If cam>0 this is a relative pose in the coordinate system of cam 0
Definition at line 243 of file Projection.hh.
Referenced by BIAS::Projection3DData::Set().
int Projection::InitFromCameraData | ( | const std::vector< CameraData > & | vcd | ) |
initializes projection from cameradata object
Definition at line 120 of file Projection.cpp.
References BIAS::ProjectionParametersFactory::Create().
|
inline |
Determine whether the Projection is Empty.
Definition at line 174 of file Projection.hh.
Referenced by BIAS::ImageBlenderIncremental::BlendImages(), and BIAS::ImageBlenderIncremental::SetOutputParameters().
|
virtual |
convenience wrapper which tries to read different formats
Definition at line 62 of file Projection.cpp.
References BIAS::ProjectionParametersPerspective::Clone(), BIAS::FileHandling::GetCwd(), BIAS::PMatrix::GetK(), BIAS::PMatrix::Load(), BIAS::ProjectionParametersBase::SetImageSize(), and BIAS::ProjectionParametersPerspective::SetP().
Referenced by BIAS::biasGLviewerGLUT::Init(), BIAS::ProjectionParametersFactory::Load(), BIAS::IOUtils::LoadParameters(), and BIAS::VideoSource_Controller_Kinect::OnLoadCalib().
|
inline |
|
inline |
Determine whether the pose is valid or not.
Definition at line 359 of file Projection.hh.
|
virtual |
returns the 2d projection of X in camera cam, where X is given in the global coordinate frame (not the rig) (needs HomgPoint3D to map points at infinity)
Definition at line 250 of file Projection.cpp.
References BIAS::Vector3< T >::Mult().
Referenced by BIAS::PMDImageProc::FitDepthTo2DImage(), BIAS::PMDImageProc::FitDepthTo2DImageFree_(), and BIAS::TriangleMesh::GenerateTexturedQuadStrip().
int Projection::ReadFromBBC | ( | const std::string & | filename, |
const bool | silent = false |
||
) |
read BBC's FreeD data from file and constructs a perspective projection (may have radial distortion)
Definition at line 110 of file Projection.cpp.
References BIAS::ProjectionParametersIO::ReadFromBBC().
int Projection::ReadFromCamParamFile | ( | const std::string & | filename, |
const bool | silent = false |
||
) |
Reads a camera data XML file and constructs the ProjectionParametersBase-pointer, using the ProjectionParametersIO and the CameraParameter file format.
filename | Name of the XML parameter file |
Definition at line 99 of file Projection.cpp.
References BIAS::ProjectionParametersIO::ReadRigData().
|
inline |
adapt internal params to resampled image
ratio | 2.0 = downsample, 0.5 = upsample |
Definition at line 471 of file Projection.hh.
Referenced by BIAS::CylindricDepthTrackingPanorama::GetTriangleMesh(), BIAS::SphericalDepthPanorama::GetTriangleMesh(), and BIAS::CylindricDepthPanorama::GetTriangleMesh().
|
inlinevirtual |
Set center of camera with index cam.
If cam>0 this is a relative pose in the coordinate system of cam 0
Definition at line 331 of file Projection.hh.
|
inlinevirtual |
Set the Pose covariance.
Definition at line 324 of file Projection.hh.
|
inline |
Set the identifier of the Projection such as a name.
Definition at line 478 of file Projection.hh.
|
inlinevirtual |
Set the Pose of the camera with index cam.
If cam>0 this is a relative pose in the coordinate system of cam 0
Definition at line 352 of file Projection.hh.
|
inlinevirtual |
Set rotation quaternion of camera with index cam.
If cam>0 this is a relative pose in the coordinate system of cam 0
Definition at line 338 of file Projection.hh.
|
inlinevirtual |
Set rotation matrix of camera with index cam.
If cam>0 this is a relative pose in the coordinate system of cam 0
Definition at line 345 of file Projection.hh.
|
inline |
Determine number of ProjectionParameterBase pointers in Projection.
Definition at line 178 of file Projection.hh.
Referenced by BIAS::ThreeDOut::AddProjection(), BIAS::ProjectionParametersFactory::Load(), and BIAS::operator<<().
Matrix3x3< double > Projection::UnProjectToCovLocal | ( | const HomgPoint2D & | pos, |
const Matrix3x3< double > & | cov2D, | ||
const double & | depth, | ||
unsigned int | camSystem = 0 , |
||
unsigned int | cam = 0 , |
||
bool | IgnoreDistortion = false , |
||
bool | Normalize = false |
||
) | const |
calculate 3D point and associated covariance by unprojection
Definition at line 403 of file Projection.cpp.
Vector3< double > Projection::UnProjectToPoint | ( | const HomgPoint2D & | pos, |
double | depth, | ||
unsigned int | cam = 0 , |
||
bool | IgnoreDistortion = false |
||
) | const |
calculates a 3D point in the global (not the rig) coordinate system, which belongs to the image position pos with distance depth to the camera center of cam.
Definition at line 349 of file Projection.cpp.
References BIAS::Vector3< T >::Normalize(), and BIAS::Vector3< T >::NormL2().
Referenced by BIAS::PMDImageProc::Fit2DToDepthImage(), BIAS::PMDImageProc::FitDepthTo2DImage(), BIAS::PMDImageProc::FitDepthTo2DImageFree_(), BIAS::TriangleMesh::GenerateDenseMesh(), and BIAS::CylindricDepthPanorama::ProcessCylindricProjection().
Vector3< double > Projection::UnProjectToPointLocal | ( | const HomgPoint2D & | pos, |
const double & | depth, | ||
unsigned int | camSystem = 0 , |
||
unsigned int | cam = 0 , |
||
bool | IgnoreDistortion = false |
||
) | const |
calculates a 3D point in a local camera coordinate system specified by camSystem, which belongs to the image position pos in cam with distance depth to the camera center cam.
Definition at line 368 of file Projection.cpp.
References BIAS::HomgPoint3D::GetEuclidean(), BIAS::CoordinateTransform3D::GlobalToLocal(), and BIAS::CoordinateTransform3D::LocalToGlobal().
void Projection::UnProjectToRay | ( | const HomgPoint2D & | pos, |
Vector3< double > & | origin, | ||
Vector3< double > & | rayDir, | ||
unsigned int | cam = 0 , |
||
bool | IgnoreDistortion = false |
||
) | const |
calculates the viewing ray in the global coordinate frame (not the rig) from the camera center which belongs to the given image position.
The resulting vector3 may have any length.
Definition at line 323 of file Projection.cpp.
Referenced by BIAS::TriangleMesh::MakeTriangles_().
void Projection::UnProjectToRay | ( | const HomgPoint2D & | pos, |
Vector3< double > & | rayDir, | ||
unsigned int | cam = 0 , |
||
bool | IgnoreDistortion = false |
||
) | const |
calculates the viewing ray in the global coordinate frame (not the rig) from the camera center which belongs to the given image position.
The resulting vector3 may have any length.
Definition at line 337 of file Projection.cpp.
void Projection::UnProjectToRayLocal | ( | const HomgPoint2D & | pos, |
Vector3< double > & | origin, | ||
Vector3< double > & | rayDir, | ||
unsigned int | camSystem = 0 , |
||
unsigned int | cam = 0 , |
||
bool | IgnoreDistortion = false |
||
) | const |
calculates a 3D ray in a local camera coordinate system specified by camSystem, which belongs to the image position pos in cam.
Definition at line 419 of file Projection.cpp.
References BIAS::Matrix3x3< T >::Transpose().
|
inherited |
call this to add the class to a node of a given xml tree
Definition at line 26 of file XMLBase.cpp.
References BIAS::XMLIO::addAttribute(), and BIAS::XMLIO::addChildNode().
|
virtual |
specialization of XML block name function for BIAS::Projection.
returns the xml class name Projection
Implements BIAS::XMLBase.
Definition at line 461 of file Projection.cpp.
|
virtual |
specialization of XML read function for BIAS::Projection.
Called if the function XMLRead is called.
Implements BIAS::XMLBase.
Definition at line 489 of file Projection.cpp.
References BIAS::ProjectionParametersFactory::Create(), BIAS::XMLIO::getFirstChild(), BIAS::XMLIO::getNextChild(), BIAS::XMLIO::getNodeContentString(), BIAS::XMLIO::getNodeName(), and BIAS::ProjectionParametersBase::XMLIn().
|
virtual |
specialization of XML write function for BIAS::Projection.
Called if the function XMLWrite is called.
Implements BIAS::XMLBase.
Definition at line 468 of file Projection.cpp.
References BIAS::XMLIO::addAttribute(), BIAS::XMLIO::addChildNode(), and BIAS::XMLIO::addContent().
|
inherited |
derived classes must implement the function XMLIn which is called by this function XMLRead to read everything with name Filename into (*this).
Definition at line 78 of file XMLBase.cpp.
References BIAS::XMLIO::clear(), BIAS::XMLIO::getAttributeValueDouble(), BIAS::XMLIO::getNodeName(), and BIAS::XMLIO::read().
Referenced by BIAS::biasGLviewerGLUT::Init(), BIAS::SceneOpenSceneGraph::Load(), and BIAS::GLProjectionParametersPerspective::XMLRead().
|
inherited |
reconstruct xml tree from string
Definition at line 111 of file XMLBase.cpp.
References BIAS::XMLIO::clear(), BIAS::XMLIO::getAttributeValueDouble(), BIAS::XMLIO::getNodeName(), and BIAS::XMLIO::ReadFromString().
Referenced by BIAS::IOUtils::GetProjection().
|
inherited |
call this to add the class to a new xml tree and write it to the file Filename.
Calls function XMLOut of derived class
CompressionLevel | 0..9 (0=off, 9=highest compression) |
Definition at line 40 of file XMLBase.cpp.
References BIAS::XMLIO::addAttribute(), BIAS::XMLIO::clear(), BIAS::XMLIO::create(), BIAS::XMLIO::SetCompression(), BIAS::XMLIO::SetEncoding(), and BIAS::XMLIO::write().
Referenced by BIAS::SphericalDepthPanorama::GetTriangleMesh(), BIAS::SceneOpenSceneGraph::Save(), BIAS::ScreenShotListener::StoreNextScreenShot_(), and BIAS::GLProjectionParametersPerspective::XMLWrite().
|
inherited |
serialize xml tree to string
Definition at line 61 of file XMLBase.cpp.
References BIAS::XMLIO::addAttribute(), BIAS::XMLIO::clear(), BIAS::XMLIO::create(), BIAS::XMLIO::SetEncoding(), and BIAS::XMLIO::WriteToString().
|
friend |
The outstream operator, used in XMLOut, etc.
Definition at line 503 of file Projection.hh.
|
protected |
Multifunctional identifier.
Definition at line 499 of file Projection.hh.
|
protected |
the intrinsics (like K, ...) of the camera usually only one only in rig mode there may be many, in that case vecIntrinsics[0] holds the external pose while the others hold the internal pose (pose in the coordinate system of the first camera)
Definition at line 496 of file Projection.hh.
Referenced by DoExtrinsicsDiffer(), DoIntrinsicsDiffer(), BIAS::operator<<(), and operator=().