Basic Image AlgorithmS Library 2.8.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends

BIAS::ProjectionParametersGreatCircles Class Reference

spherical camera that samples along big circles containig the H vector. More...

#include <Geometry/ProjectionParametersGreatCircles.hh>

Inheritance diagram for BIAS::ProjectionParametersGreatCircles:
Collaboration diagram for BIAS::ProjectionParametersGreatCircles:

List of all members.

Public Member Functions

void Angle2Image (double phi, double theta, BIAS::HomgPoint2D &imgPoint) const
 Calculates image coordinates from local angle vectors.
virtual
ProjectionParametersGreatCircles
Clone () const
 covariant virtual copy constructor for use in Projection
virtual bool CValid () const
 Check of current projection center is valid.
virtual bool Distort (BIAS::HomgPoint2D &point2d) const
 Interface defintion for lens distortion function, implemented by derived classes.
virtual bool DoesPointProjectIntoImage (const HomgPoint3D &X, HomgPoint2D &x, bool IgnoreDistortion=false) const
 Checks if 3D point projects into specified image and returns belonging 2D image point.
bool DoesPointProjectIntoImageLocal (const Vector3< double > &localX, HomgPoint2D &x, bool IgnoreDistortion=false) const
 Checks if 3D point projects into specified image and returns belonging 2D image point.
virtual const bool DoExtrinsicsDiffer (const ProjectionParametersBase *p) const
virtual const bool DoIntrinsicsDiffer (const ProjectionParametersBase *p) const
bool GetAngleInterval (const HomgPoint3D &worldPoint, const double halfAngleRange, double &thetaMin, double &thetaMax, double &phiMin, double &phiMax) const
 Determines angle intervalls for the camera from viewing cone.
virtual double GetAspectratio () const
 Return aspectratio (i.e.
virtual BIAS::Vector3< double > GetC () const
 Get projection center.
virtual BIAS::Matrix< POSE_TYPE > GetCov () const
 Return pose covariance as 7x7 matrix with respect to C, Q.
virtual BIAS::Vector< double > GetCQ () const
 Return pose as 7 vector (first projection center C, then unit quaternion Q representing orientation).
virtual BIAS::Matrix3x4< double > GetExternals () const
 Return cached 3x4 representation of external matrix [R|C].
virtual BIAS::KMatrix GetFakeKMatrix (double &imgsize, int resolution=0, const double &maxangle=1.4) const
 Returns a fake KMatrix for the camera.
virtual BIAS::KMatrix GetFakeKMatrix (int resolution=0, const double &maxangle=1.4) const
virtual void GetFirstBorderPixel (PixelIterator &it)
 call this to start a run at the outer boundary of an image.
virtual void GetFirstEdgePosition (PixelIterator &it)
 call this to start a run at the outer boundary of an image.
double GetFocallengthTheta ()
virtual std::string GetIdentifier () const
virtual const unsigned int & GetImageHeight () const
 Returns the image height.
virtual int GetImageSize (unsigned int &Width, unsigned int &Height) const
 Obtain image dimensions.
virtual const unsigned int & GetImageWidth () const
 Returns the image width.
virtual int GetMinimalAngularSamplingStep (double &minAngleStep)
 Delivers the assumed minimal angular distance between two optical rays belonging to integer image coordinates within the FoV.
virtual bool GetNextBorderPixel (PixelIterator &it)
 call this iteratively to run at the outer boundary of an image.
virtual bool GetNextEdgePosition (PixelIterator &it)
 call this iteratively to run at the outer edge of an image.
virtual const BIAS::PoseGetPose () const
 Return complete pose object.
virtual BIAS::PoseParametrization GetPoseParametrization () const
 Return copy of pose parametrization object.
virtual int GetPrincipal (double &PrincipalX, double &PrincipalY) const
 Get principal point (in pixels relative to top left corner).
virtual BIAS::Quaternion< double > GetQ () const
 Get orientation as unit quaternion.
virtual BIAS::RMatrix GetR () const
 Get orientation as rotation matrix R.
virtual int GetSphericalViewingRange (const CoordinateTransform3D &sphericalReferenceFrame, double &minPhi, double &maxPhi, double &centerPhi, double &minTheta, double &maxTheta)
 Determines the maximal and minimal viewing range in means of spherical coordinates.
virtual int GetUnProjectionJacobian (const HomgPoint2D &x, Matrix2x2< double > &Jac, const bool homogenized=true) const
 Get warp (local magnification/shear/...) when going from the real image to ideal image with focal length = 1.
virtual std::string GetVideoSourceType () const
void Image2Angle (const BIAS::HomgPoint2D &imgPoint, double &phi, double &theta) const
 Calculates local angle vectors from image coordinate.
virtual void InvalidatePose ()
 Invalidate currently set pose.
bool IsLeftOf (const ProjectionParametersBase &ppb) const
 Returns true if the camera represented by this ProjectionParametersBase is left of the given one.
const bool LookAt (const Vector3< double > &eye, const Vector3< double > &center, const Vector3< double > &up)
 Looks at given point, similar to gluLookAt.
const bool LookAt (const Vector3< double > &center, const Vector3< double > &up)
 Looks at given point, similar to gluLookAt.
const bool LookAtGL (const Vector3< double > &eye, const Vector3< double > &center, const Vector3< double > &up)
 Looks at given point, similar to gluLookAt.
const bool LookAtGL (const Vector3< double > &center, const Vector3< double > &up)
 Looks at given point, similar to gluLookAt.
ProjectionParametersGreatCirclesoperator= (const ProjectionParametersGreatCircles &P)
virtual bool PoseValid () const
 Check if current pose is valid.
virtual HomgPoint2D Project (const HomgPoint3D &X, bool IgnoreDistortion=false) const
 calculates the projection of a point in the world coordinate system to a pixel in the image plane of the camera !warning! the function my return an invalid point (0,0,0) in certain cases (3d point) behind camera or 3d point to close to camera center
virtual int Project (const HomgPoint3D &X, HomgPoint2D &p2d, bool IgnoreDistortion=false) const
 calculates the projection of a point in the world coordinate system to a pixel in the image plane of the camera.
 ProjectionParametersGreatCircles (const ProjectionParametersGreatCircles &P)
 ProjectionParametersGreatCircles (const unsigned int width=0, const unsigned int height=0)
virtual HomgPoint2D ProjectLocal (const Vector3< double > &point, bool IgnoreDistortion=false) const
 calculates the projection of a point in the camera coordinate system to a pixel in the image plane of the camera with lens distortion In the simplest case perspective pinhole projection x = K * y where y is the projection of X using y = (R^T | -R^T C) X
virtual int ProjectLocal (const Vector3< double > &point, HomgPoint2D &p2d, bool IgnoreDistortion=false) const
 calculates the projection of a point in the local camera coordinate system to a pixel in the image plane of the camera.
virtual bool QValid () const
 Check if current orientation is valid.
virtual void Rescale (double ratio, const double offset=0.0)
virtual void Rescale (unsigned int width, unsigned int height)
 adapt internal parameters to new image size
bool SetAngleInterval (const HomgPoint3D &worldPoint, const double &halfAngleRange)
 Sets viewing volume of camera using GetAngleInterval().
virtual void SetAspectratio (const double AspectRatio)
 Set CCD aspect ratio (i.e.
virtual void SetC (const BIAS::Vector3< double > &C)
 Set projection center.
virtual void SetCov (const Matrix< POSE_TYPE > &Cov)
 Set pose covariance matrix with respect to C, Q.
virtual void SetIdentifier (std::string name)
 Set the identification string.
virtual void SetImageSize (const unsigned int w, const unsigned int h)
 Set image dimensions (in pixels).
void SetInternals (const double minPhi, const double maxPhi, const double minTheta, const double maxTheta, const unsigned int imgWidth, const unsigned int imgHeight)
 Calculates and sets internal camera parameters.
virtual void SetPose (const BIAS::Pose pose)
 Set pose from pose object.
virtual void SetPoseParametrization (const BIAS::PoseParametrization &pp)
 Set pose from pose parametrization.
virtual void SetPrincipal (const double x, const double y)
 Set principal point (in pixels relative to top left corner).
virtual void SetQ (const BIAS::Quaternion< double > &Q)
 Set orientation from unit quaternion Q.
virtual void SetQC (const BIAS::Quaternion< double > &Q, const BIAS::Vector3< double > &C)
 Set pose from unit quaternion Q and projection center C.
virtual void SetR (const BIAS::RMatrix &R)
 Set orientation from rotation matrix R.
virtual void SetVideoSourceType (const std::string &name)
 Set the camera source type.
virtual int Transform_ (const Vector< double > &src, Vector< double > &dst) const
 Worker function for Unscented Transform.
virtual bool Undistort (BIAS::HomgPoint2D &point2d) const
 Interface defintion for lens undistortion function, implemented by derived classes.
virtual Matrix3x3< double > UnProjectCovLocal (const HomgPoint2D &pos, const Matrix3x3< double > &cov2D, bool IgnoreDistortion=false, bool Normalize=false)
 unprojects the covariance matrices to K=Identity camera
virtual void UnProjectLocal (const HomgPoint2D &pos, Vector3< double > &pointOnRay, Vector3< double > &direction, bool ignoreDistortion=false) const
 calculates the viewing ray from the camera center (in the camera coordinate system) which belongs to the image position pos with lens distortion e.g.
HomgPoint3D UnProjectToImagePlane (const HomgPoint2D &pos, const double &depth=1.0, bool IgnoreDistortion=false) const
 map points from image onto unit diameter image plane in 3D.
virtual HomgPoint3D UnProjectToPoint (const HomgPoint2D &pos, const double depth, const ProjectionParametersBase &proj, bool IgnoreDistortion=false) const
virtual HomgPoint3D UnProjectToPoint (const HomgPoint2D &pos, double depth, 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.
virtual Vector3< double > UnProjectToPointLocal (const HomgPoint2D &pos, const double &depth, bool IgnoreDistortion=false) const
 calculates a 3D point in the local camera coordinate system, which belongs to the image position pos in cam with distance depth to the camera center cam.
virtual void UnProjectToRay (const HomgPoint2D &pos, Vector3< double > &direction, bool ignoreDistortion=false) const
 Calculates the view ray, which belongs to the given position on the image plane, in global coordinates.
virtual void UnProjectToRay (const HomgPoint2D &pos, Vector3< double > &origin, Vector3< double > &direction, const ProjectionParametersBase &proj, bool ignoreDistortion=false) const
 Calculates the view ray, which belongs to the given position on the image plane, using the given projection.
virtual void UnProjectToRay (const HomgPoint2D &pos, Vector3< double > &origin, Vector3< double > &direction, bool ignoreDistortion=false) const
 Calculates the view ray, which belongs to the given position on the image plane, in global coordinates.
virtual void ValidatePose ()
 Validate currently set pose.
virtual double ViewDifference (const ProjectionParametersBase *) const
 Returns difference between two projections like |C1-C2|.
xmlNodePtr XMLAdd (const xmlNodePtr Node, XMLIO &XMLObject) const
 call this to add the class to a node of a given xml tree
virtual int XMLGetClassName (std::string &TopLevelTag, double &Version) const
 specialization of XML block name function
virtual int XMLIn (const xmlNodePtr Node, XMLIO &XMLObject)
 specialization of XML read function
virtual int XMLOut (const xmlNodePtr Node, XMLIO &XMLObject) const
 specialization of XML write function
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).
int XMLReadFromString (const std::string &str)
 reconstruct xml tree from string
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.
int XMLWriteToString (std::string &str, std::string encoding="UTF-8") const
 serialize xml tree to string
virtual ~ProjectionParametersGreatCircles ()

Static Public Member Functions

static bool LocalEuclideanCamCoordinates2SphericalAngles (const BIAS::Vector3< double > &euc, double &phi, double &theta)
 Calculate spherical angles from local 3D point.
static bool LocalEuclidianCamCoordinates2SphericalAngles (const BIAS::Vector3< double > &euc, double &phi, double &theta)
 deprecated version
static bool SphericalAngles2LocalEuclideanRay (const double phi, const double theta, BIAS::Vector3< double > &ray)
 Calculate euclidean ray direction in local camera frame from angles.
static bool SphericalAngles2LocalEuclidianRay (const double phi, const double theta, BIAS::Vector3< double > &ray)
 deprecated version

Protected Member Functions

void AddDebugLevel (const long int lv)
void AddDebugLevel (const std::string &name)
int ComputeSigmaPoints_ (const Vector< double > &src_mean, const Matrix< double > &src_cov, std::vector< WeightedSigmaPoint > &sigma_points) const
 The covariance of a n-dimensional vector is approximated using 2n+1 so called sigma points with associated weights.
long ConsumeNextFreeDebuglevel_ ()
 returns the next available debuglevel
bool DebugLevelIsSet (const long int lv) const
bool DebugLevelIsSet (const std::string &name) const
int GetDebugLevel () const
std::ostream & GetDebugStream () const
void GetDebugStream (std::ostream &os) const
long int Name2DebugLevel (const std::string &name) const
 looks up a debuglevel in the internal map, returns 0 if not found
long int NewDebugLevel (const std::string &name)
 creates a new debuglevel
void PrintDebugLevel (std::ostream &os=std::cout) const
void RemoveDebugLevel (const long int lv)
void RemoveDebugLevel (const std::string &name)
void SetAlpha (const double alpha)
 Sets the alpha parameter.
void SetBeta (const double beta)
 Sets the beta parameter.
void SetDebugLevel (const std::string &name)
void SetDebugLevel (const long int lv)
void SetDebugStream (const std::ostream &os)
void SetUseSVD (const bool use_svd)
void ShowDebugLevel (std::ostream &os=std::cout) const
 prints all internally known debuglevels
int Transform (const Vector< double > &src_mean, const Matrix< double > &src_cov, Vector< double > &dst_mean, Matrix< double > &dst_cov) const
 computes the second order approximation of the transformations of the mean and the associated covariance for the point transformation Transform_().

Static Protected Member Functions

static long int GetGlobalDebugLevel ()
static void SetGlobalDebugLevel (long int lev)

Protected Attributes

long int _liDebugLevel
long int _liNextDebugLevel
 new concept, debuglevel are managed here in the debug class
std::map< std::string, long int > _String2Debuglevel
double Alpha_
 the alpha parameter determines the spread of the sigma points
double aspectratio_
 aspect ratio of the camera CCD
double Beta_
 beta is used to incorporate prior knowledge of the distribution of x.
bool CValid_
double focallengthTheta_
 scale from angles to image
unsigned int height_
 height of image in pixels
std::string identifier_
 Multifunctional identifier.
double Kappa_
 kappa is a secondary scaling parameter.
Pose Pose_
 pose
double principalX_
 principal point in pixel coordinates (one for all zoom settings)
double principalY_
bool QValid_
 validity flag for orientation and position
bool UseSVD_
bool ustIgnoreDistortion_
bool ustNormalize_
bool ustTransformIntoImage_
 unscented transform worker variables
std::string videoSourceType_
unsigned int width_
 width of image in pixels

Static Protected Attributes

static std::ostream _zDebugStream
static long int GlobalDebugLevel = 0

Friends

std::ostream & operator<< (std::ostream &os, const ProjectionParametersGreatCircles &p)
std::ostream & operator<< (std::ostream &os, const ProjectionParametersBase &p)

Detailed Description

spherical camera that samples along big circles containig the H vector.

Sampling is done along spherical coordinates e.g. along phi and theta. Theta is mapped to the x-component and phi is mapped to the y-component of the corresponding image.

Projection was originaly desigened for the purpose of image rectification.

Author:
bartczak

Definition at line 52 of file ProjectionParametersGreatCircles.hh.


Constructor & Destructor Documentation

BIAS::ProjectionParametersGreatCircles::ProjectionParametersGreatCircles ( const unsigned int  width = 0,
const unsigned int  height = 0 
) [inline]

Definition at line 56 of file ProjectionParametersGreatCircles.hh.

BIAS::ProjectionParametersGreatCircles::ProjectionParametersGreatCircles ( const ProjectionParametersGreatCircles P) [inline]

Definition at line 64 of file ProjectionParametersGreatCircles.hh.

virtual BIAS::ProjectionParametersGreatCircles::~ProjectionParametersGreatCircles ( ) [inline, virtual]

Definition at line 72 of file ProjectionParametersGreatCircles.hh.


Member Function Documentation

void BIAS::Debug::AddDebugLevel ( const long int  lv) [inline, inherited]
void BIAS::Debug::AddDebugLevel ( const std::string &  name) [inline, inherited]

Definition at line 363 of file Debug.hh.

void ProjectionParametersGreatCircles::Angle2Image ( double  phi,
double  theta,
BIAS::HomgPoint2D imgPoint 
) const

Calculates image coordinates from local angle vectors.

See LocalEuclideanCamCoordinates2SphericalAngles().

Author:
bartczak 08/2007

Definition at line 110 of file ProjectionParametersGreatCircles.cpp.

virtual ProjectionParametersGreatCircles* BIAS::ProjectionParametersGreatCircles::Clone ( ) const [inline, virtual]

covariant virtual copy constructor for use in Projection

Implements BIAS::ProjectionParametersBase.

Definition at line 154 of file ProjectionParametersGreatCircles.hh.

int UnscentedTransform::ComputeSigmaPoints_ ( const Vector< double > &  src_mean,
const Matrix< double > &  src_cov,
std::vector< WeightedSigmaPoint > &  sigma_points 
) const [protected, inherited]

The covariance of a n-dimensional vector is approximated using 2n+1 so called sigma points with associated weights.

The points and weights are computed in this function

Returns:
0=ok, <0 on error (bad cov, ...)

Definition at line 138 of file UnscentedTransform.cpp.

References BIAS::UnscentedTransform::Alpha_, BIAS::UnscentedTransform::Beta_, BIAS::Debug::DebugLevelIsSet(), BIAS::Matrix< T >::GetCol(), BIAS::Matrix< T >::GetCols(), BIAS::UnscentedTransform::Kappa_, Lapack_Cholesky_SymmetricPositiveDefinit(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), BIAS::Vector< T >::Size(), BIAS::SVD::SqrtT(), and BIAS::UnscentedTransform::UseSVD_.

Referenced by BIAS::UnscentedTransform::Transform().

long BIAS::Debug::ConsumeNextFreeDebuglevel_ ( ) [inline, protected, inherited]

returns the next available debuglevel

Author:
woelk 09/2006

Definition at line 522 of file Debug.hh.

virtual bool BIAS::ProjectionParametersBase::CValid ( ) const [inline, virtual, inherited]

Check of current projection center is valid.

Reimplemented in BIAS::ProjectionParametersDynamicLoad.

Definition at line 673 of file ProjectionParametersBase.hh.

Referenced by BIAS::wxProjectionPanel::UpdateGUI().

bool BIAS::Debug::DebugLevelIsSet ( const long int  lv) const [inline, inherited]
bool BIAS::Debug::DebugLevelIsSet ( const std::string &  name) const [inline, inherited]

Definition at line 351 of file Debug.hh.

bool ProjectionParametersGreatCircles::Distort ( BIAS::HomgPoint2D point2d) const [virtual]

Interface defintion for lens distortion function, implemented by derived classes.

Implements BIAS::ProjectionParametersBase.

Definition at line 44 of file ProjectionParametersGreatCircles.cpp.

bool ProjectionParametersBase::DoesPointProjectIntoImage ( const HomgPoint3D X,
HomgPoint2D x,
bool  IgnoreDistortion = false 
) const [virtual, inherited]

Checks if 3D point projects into specified image and returns belonging 2D image point.

Parameters:
Xassumes homogenized point!
Author:
bartczak

Reimplemented in BIAS::ProjectionParametersDynamicLoad.

Definition at line 223 of file ProjectionParametersBase.cpp.

References BIAS::HomgPoint3D::GetEuclidean().

Referenced by BIAS::ImageBlender::BlendImages(), BIAS::ImageBlender::CheckFov(), BIAS::EpipolarLine::DrawDistortedLine(), and BIAS::GenVisiblePoints::IsPointVisible().

bool ProjectionParametersGreatCircles::DoesPointProjectIntoImageLocal ( const Vector3< double > &  localX,
HomgPoint2D x,
bool  IgnoreDistortion = false 
) const [virtual]

Checks if 3D point projects into specified image and returns belonging 2D image point.

Parameters:
localXassumes homogenized point!
Author:
bartczak

Reimplemented from BIAS::ProjectionParametersBase.

Definition at line 309 of file ProjectionParametersGreatCircles.cpp.

const bool ProjectionParametersBase::DoExtrinsicsDiffer ( const ProjectionParametersBase p) const [virtual, inherited]
const bool ProjectionParametersGreatCircles::DoIntrinsicsDiffer ( const ProjectionParametersBase p) const [virtual]
bool ProjectionParametersGreatCircles::GetAngleInterval ( const HomgPoint3D worldPoint,
const double  halfAngleRange,
double &  thetaMin,
double &  thetaMax,
double &  phiMin,
double &  phiMax 
) const

Determines angle intervalls for the camera from viewing cone.

The viewing cone is defined through the optical ray passing through the given worlPoint functioning as cone axis. The halfAngleRange defines the opening angle of the cone. The calculated parameters are chosen so that the whole viewing cone projects into the image. Yet no minimal solution is sought!! The resulting ranges lie within [thetaMin, thetaMax] in [0, M_PI] and [phiMin, phiMax] in [-M_PI, M_PI]!

Author:
bartczak 08/2007

Definition at line 220 of file ProjectionParametersGreatCircles.cpp.

virtual double BIAS::ProjectionParametersBase::GetAspectratio ( ) const [inline, virtual, inherited]
virtual BIAS::Vector3<double> BIAS::ProjectionParametersBase::GetC ( ) const [inline, virtual, inherited]
virtual BIAS::Matrix<POSE_TYPE> BIAS::ProjectionParametersBase::GetCov ( ) const [inline, virtual, inherited]

Return pose covariance as 7x7 matrix with respect to C, Q.

Reimplemented in BIAS::ProjectionParametersDynamicLoad.

Definition at line 500 of file ProjectionParametersBase.hh.

Referenced by BIAS::ProjectionParametersBufferedRay::UpdateProjection_().

virtual BIAS::Vector<double> BIAS::ProjectionParametersBase::GetCQ ( ) const [inline, virtual, inherited]

Return pose as 7 vector (first projection center C, then unit quaternion Q representing orientation).

Reimplemented in BIAS::ProjectionParametersDynamicLoad, and BIAS::ProjectionParametersProjective.

Definition at line 485 of file ProjectionParametersBase.hh.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]
std::ostream& BIAS::Debug::GetDebugStream ( ) const [inline, inherited]

Definition at line 406 of file Debug.hh.

void BIAS::Debug::GetDebugStream ( std::ostream &  os) const [inline, inherited]

Definition at line 415 of file Debug.hh.

virtual BIAS::Matrix3x4<double> BIAS::ProjectionParametersBase::GetExternals ( ) const [inline, virtual, inherited]

Return cached 3x4 representation of external matrix [R|C].

Reimplemented in BIAS::ProjectionParametersDynamicLoad, and BIAS::ProjectionParametersProjective.

Examples:
ExampleProjection.cpp.

Definition at line 533 of file ProjectionParametersBase.hh.

Referenced by BIAS::EpipolarLine::ProjectEpipolarPlane().

KMatrix ProjectionParametersBase::GetFakeKMatrix ( double &  imgsize,
int  resolution = 0,
const double &  maxangle = 1.4 
) const [virtual, inherited]

Returns a fake KMatrix for the camera.

Attention:
Stolen from PPSpherical, since this is a general issue. THERE MAY BE PROBLEMS FOR OTHER THAN FISHEYE CAMERAS (UNTESTED) If this implementation is not correct for your derived projection parameters you have to reimplement it in the derived class.

The FoV of the KMatrix is specified by maxangle (PI*80/180 for 160deg) or the max angle, if this is <160deg.

Parameters:
resolutionThe resolution parameter influences the Resolution of the perspective image that is represented by the camera. 0 - The perspective image has the same size as the this image 1 - The perspective image has the same resolution as this image in the center (highest resolution) 2 - The perspective image has the same resolution as this image near the border (lowest resolution)
imgsizereturns the image size
maxanglemaximum theta in rad, e.g. (PI*80/180 for 160deg fov)
Author:
streckel 05/2006 (moved here by koeser)

Reimplemented in BIAS::ProjectionParametersDynamicLoad, BIAS::ProjectionParametersProjective, and BIAS::ProjectionParametersSpherical.

Definition at line 544 of file ProjectionParametersBase.cpp.

References BIAS::Vector3< T >::Set(), and BIAS::Matrix3x3< T >::SetIdentity().

Referenced by BIAS::ProjectionParametersSpherical::GetFakeKMatrix().

KMatrix ProjectionParametersBase::GetFakeKMatrix ( int  resolution = 0,
const double &  maxangle = 1.4 
) const [virtual, inherited]
void ProjectionParametersBase::GetFirstBorderPixel ( PixelIterator it) [virtual, inherited]

call this to start a run at the outer boundary of an image.

You get the first boundary position in it, e.g. (0,0) for a perspective image. Feed this into GetNextBorderPixel to get the next position.

Author:
koeser 09/2007

Reimplemented in BIAS::ProjectionParametersDynamicLoad, and BIAS::ProjectionParametersSpherical.

Definition at line 67 of file ProjectionParametersBase.cpp.

References BIAS::PixelIterator::x, and BIAS::PixelIterator::y.

Referenced by BIAS::ImageBlender::BlendImages(), and BIAS::ImageBlender::CheckFov().

void ProjectionParametersBase::GetFirstEdgePosition ( PixelIterator it) [virtual, inherited]

call this to start a run at the outer boundary of an image.

You get the first edge position i.e. (-0.5, -0.5) for a perspective image. Feed this into GetNextBorderPixel to get the next position.

Author:
bartczak 06/2009

Reimplemented in BIAS::ProjectionParametersDynamicLoad.

Definition at line 107 of file ProjectionParametersBase.cpp.

References BIAS::PixelIterator::x, and BIAS::PixelIterator::y.

double ProjectionParametersGreatCircles::GetFocallengthTheta ( )

Definition at line 38 of file ProjectionParametersGreatCircles.cpp.

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 432 of file Debug.hh.

virtual std::string BIAS::ProjectionParametersBase::GetIdentifier ( ) const [inline, virtual, inherited]
virtual const unsigned int& BIAS::ProjectionParametersBase::GetImageHeight ( ) const [inline, virtual, inherited]

Returns the image height.

Returns:
the image height

Reimplemented in BIAS::ProjectionParametersDynamicLoad.

Definition at line 568 of file ProjectionParametersBase.hh.

virtual int BIAS::ProjectionParametersBase::GetImageSize ( unsigned int &  Width,
unsigned int &  Height 
) const [inline, virtual, inherited]

Obtain image dimensions.

Reimplemented in BIAS::ProjectionParametersDynamicLoad.

Examples:
ExampleEstimateFisheyePolynomial.cpp, ExampleMultipleDepthWarp.cpp, ExampleProjectionMapping.cpp, ExampleRectification.cpp, ExampleTriangleMesh.cpp, and ExampleXB3Rectification.cpp.

Definition at line 545 of file ProjectionParametersBase.hh.

Referenced by BIAS::OutputLensDistortion::CreateLookupTable(), BIAS::CylindricalRectification< InputStorageType, OutputStorageType >::DetermineCylindricCameraBoundriesCylindric_(), BIAS::CylindricalRectification< InputStorageType, OutputStorageType >::DetermineCylindricCameraBoundriesPerspective_(), BIAS::CylindricalRectification< InputStorageType, OutputStorageType >::DetermineCylindricCameraBoundriesSpherical_(), BIAS::EpipolarLine::DrawDistortedLine(), BIAS::PMDImageProc::FitDepthTo2DImage(), BIAS::TriangleMesh::GenerateSimplifiedMesh(), BIAS::TriangleMesh::GenerateTexturedCamera(), BIAS::GenVisiblePoints::GenerateVisiblePoint(), BIAS::PMDWarp::Init(), BIAS::MultipleDepthWarp::Init(), BIAS::ImageWarper< StorageType >::Init(), BIAS::DistortionRendering::Init(), BIAS::Primitives::LocalNormalizedPointCloud(), BIAS::Primitives::LocalNormalizedTriangleMesh(), BIAS::Primitives::LocalNormalizedTriangleStrip(), BIAS::Primitives::LocalNormalizedVertexCloud(), BIAS::Primitives::LocalPerspectivePatches(), BIAS::Primitives::LocalPerspectivePatchOverLine(), BIAS::Primitives::LocalPerspectiveQuad(), BIAS::glfMatrix::MakeProjectionMatrix(), BIAS::glfMatrix::MakeProjectionMatrixNew(), BIAS::glfMatrix::MakeTextureMatrix(), BIAS::glfMatrix::MakeTextureMatrixNew(), BIAS::Projection3DData::Set(), BIAS::GLProjectionParametersPerspective::SetGLMatrices(), BIAS::ForwardMappingNearestNeighbour< InputStorageType, OutputStorageType >::SetSinkCam(), BIAS::ForwardMappingNearestNeighbour< InputStorageType, OutputStorageType >::SetSourceCam(), BIAS::ImageWarper< StorageType >::SetTargetCamera(), BIAS::ProjectionParametersBufferedRay::UpdateFromProjection_(), BIAS::GLProjectionParametersPerspective::UpdateGLProjectionMatrix_(), and BIAS::wxProjectionPanel::UpdateGUI().

virtual const unsigned int& BIAS::ProjectionParametersBase::GetImageWidth ( ) const [inline, virtual, inherited]

Returns the image width.

Returns:
the image width

Reimplemented in BIAS::ProjectionParametersDynamicLoad.

Definition at line 557 of file ProjectionParametersBase.hh.

virtual int BIAS::ProjectionParametersBase::GetMinimalAngularSamplingStep ( double &  minAngleStep) [inline, virtual, inherited]

Delivers the assumed minimal angular distance between two optical rays belonging to integer image coordinates within the FoV.

Author:
bartczak 10/2007

Reimplemented in BIAS::ProjectionParametersDynamicLoad, and BIAS::ProjectionParametersPerspective.

Examples:
ExampleXB3Rectification.cpp.

Definition at line 180 of file ProjectionParametersBase.hh.

bool ProjectionParametersBase::GetNextBorderPixel ( PixelIterator it) [virtual, inherited]

call this iteratively to run at the outer boundary of an image.

All returned coordinates must have valid local rays in the camera coordinate system (e.g. in fisheye cams, we run at the fov circle) and must be in the image. Two subsequent coordinates must not be more distant than 1 pixel.

Parameters:
itmust be initialized by GetFirstBorderPixel
Returns:
false if the returned position closes the loop around the image
Author:
koeser 09/2007

Reimplemented in BIAS::ProjectionParametersDynamicLoad, and BIAS::ProjectionParametersSpherical.

Definition at line 74 of file ProjectionParametersBase.cpp.

References BIAS::PixelIterator::x, and BIAS::PixelIterator::y.

Referenced by BIAS::ImageBlender::BlendImages(), and BIAS::ImageBlender::CheckFov().

bool ProjectionParametersBase::GetNextEdgePosition ( PixelIterator it) [virtual, inherited]

call this iteratively to run at the outer edge of an image.

Like the GetNextBorderPixel() method, however runs along the outer rim of an image, i.e. the coordinate range (-0.5, -0.5) and (W-0.5, H-0.5). The positions returned are the upper left corner of the pixels. These are at the same time the upper right corners of the neighboring pixel.

Parameters:
itmust be initialized by GetFirstBorderPixel
Returns:
false if the returned position closes the loop around the image
Author:
bartczak 06/2009

Reimplemented in BIAS::ProjectionParametersDynamicLoad.

Definition at line 114 of file ProjectionParametersBase.cpp.

References BIAS::PixelIterator::x, and BIAS::PixelIterator::y.

virtual const BIAS::Pose& BIAS::ProjectionParametersBase::GetPose ( ) const [inline, virtual, inherited]
virtual BIAS::PoseParametrization BIAS::ProjectionParametersBase::GetPoseParametrization ( ) const [inline, virtual, inherited]

Return copy of pose parametrization object.

Reimplemented in BIAS::ProjectionParametersDynamicLoad, and BIAS::ProjectionParametersProjective.

Definition at line 517 of file ProjectionParametersBase.hh.

virtual int BIAS::ProjectionParametersBase::GetPrincipal ( double &  PrincipalX,
double &  PrincipalY 
) const [inline, virtual, inherited]
virtual BIAS::Quaternion<double> BIAS::ProjectionParametersBase::GetQ ( ) const [inline, virtual, inherited]
RMatrix ProjectionParametersBase::GetR ( ) const [virtual, inherited]
int ProjectionParametersBase::GetSphericalViewingRange ( const CoordinateTransform3D sphericalReferenceFrame,
double &  minPhi,
double &  maxPhi,
double &  centerPhi,
double &  minTheta,
double &  maxTheta 
) [virtual, inherited]

Determines the maximal and minimal viewing range in means of spherical coordinates.

The spherical coordinates are calculated relatively to the passed coordinate frame. The method is using the class SphericalCoordinates, see also the documentation there in order to understand the meaning of the sphericalReferenceFrame.

Attention:
in order to make sense the sphericalReferenceFrame must have the same origin as the ProjectionParameters.
Parameters:
sphericalReferenceFramereference frame for the calculation of spherical coordinates belonging to optical rays, must be defined in the same coordinate frame like the local frame of the ProjectionParameters.
Returns:
minPhi phi angle from (-M_PI, M_PI] with smallest value within viewing range.
maxPhi phi angle from (-M_PI, M_PI] with largest value within viewing range.
centerPhi phi angle from (-M_PI, M_PI] belonging to the optical ray passing through the image center. This angle allows to determine which direction the camera was facing in the sphericalReferenceFrame.
minTheta theta angle from [0, M_PI] with smallest value within viewing range.
maxTheta theta angle from [0, M_PI] with largest value within viewing range.
Author:
bartczak 10/2007

Reimplemented in BIAS::ProjectionParametersDynamicLoad.

Examples:
ExampleXB3Rectification.cpp.

Definition at line 148 of file ProjectionParametersBase.cpp.

References BIAS::CoordinateTransform3D::BecomeRelativeTransform(), BIAS::CoordinateTransform3D::GetC(), BIAS::SphericalCoordinates::GetCartesianRayFromFullPhi(), BIAS::HomgPoint3D::GetEuclidean(), BIAS::SphericalCoordinates::GetSphericalCoordinatesFullPhi(), BIAS::Vector3< T >::NormL2(), BIAS::HomgPoint3D::Set(), BIAS::SphericalCoordinates::SetAffineBase(), BIAS::PixelIterator::x, and BIAS::PixelIterator::y.

Referenced by BIAS::PlanarRectification< InputStorageType, OutputStorageType >::DetermineRectificationParameters_().

int ProjectionParametersBase::GetUnProjectionJacobian ( const HomgPoint2D x,
Matrix2x2< double > &  Jac,
const bool  homogenized = true 
) const [virtual, inherited]

Get warp (local magnification/shear/...) when going from the real image to ideal image with focal length = 1.

When an image is undistorted to an ideal perspective camera with K=id, the region around each pixel must be warped. For perspective cameras without radial distortion this is the undoing (inverse) of the upper 2x2 part of the KMatrix (simply a rescale of coordinates). If radial distortion is present, the local warp depends on the image position. Same for most other camera models. This matrix is closely related to the absolute local image resolution.

Instead of going to the w=1 (homogenized) ideal image, we can as well go to a tangent image. This can be steered by the parameter homogenized (if false, we use normalized mode).

Author:
koeser 06/2008

Reimplemented in BIAS::ProjectionParametersDynamicLoad, and BIAS::ProjectionParametersProjective.

Definition at line 632 of file ProjectionParametersBase.cpp.

References BIAS::Vector3< T >::CrossProduct(), BIAS::HomgPoint2D::IsHomogenized(), BIAS::Vector3< T >::Normalize(), BIAS::Vector3< T >::NormL2(), and BIAS::RMatrixBase::Set().

virtual std::string BIAS::ProjectionParametersBase::GetVideoSourceType ( ) const [inline, virtual, inherited]

Reimplemented in BIAS::ProjectionParametersDynamicLoad.

Definition at line 577 of file ProjectionParametersBase.hh.

void ProjectionParametersGreatCircles::Image2Angle ( const BIAS::HomgPoint2D imgPoint,
double &  phi,
double &  theta 
) const

Calculates local angle vectors from image coordinate.

See LocalEuclideanCamCoordinates2SphericalAngles().

Author:
bartczak 08/2007

Definition at line 118 of file ProjectionParametersGreatCircles.cpp.

virtual void BIAS::ProjectionParametersBase::InvalidatePose ( ) [inline, virtual, inherited]
bool ProjectionParametersBase::IsLeftOf ( const ProjectionParametersBase ppb) const [inherited]

Returns true if the camera represented by this ProjectionParametersBase is left of the given one.

Computes the baseline vector and rotates it so that this cam would have zero rotation. This cam is left of the given one if the x component of the transformed baseline is non-negative.

Note that the orientation of the given camere is not considered, only its position.

Parameters:
ppbthe parameters of the cam to compare this to
Author:
rwulff
Date:
09/2011

Definition at line 711 of file ProjectionParametersBase.cpp.

References BIAS::ProjectionParametersBase::GetC(), and BIAS::Matrix3x3< T >::GetInverse().

bool ProjectionParametersGreatCircles::LocalEuclideanCamCoordinates2SphericalAngles ( const BIAS::Vector3< double > &  euc,
double &  phi,
double &  theta 
) [static]

Calculate spherical angles from local 3D point.

Parameters:
euccoordinates in the local camera coordinate frame.
Returns:
phi angle around the H axis, zero lies at direction of A and value range is [-pi, pi].
theta angle within plane containing H relative to -H, value range is [0,pi]
true if a direction could be calculated, else false.
Author:
bartczak 08/2007

Definition at line 61 of file ProjectionParametersGreatCircles.cpp.

References BIAS::Vector3< T >::NormL2().

static bool BIAS::ProjectionParametersGreatCircles::LocalEuclidianCamCoordinates2SphericalAngles ( const BIAS::Vector3< double > &  euc,
double &  phi,
double &  theta 
) [inline, static]

deprecated version

Definition at line 191 of file ProjectionParametersGreatCircles.hh.

const bool BIAS::ProjectionParametersBase::LookAt ( const Vector3< double > &  eye,
const Vector3< double > &  center,
const Vector3< double > &  up 
) [inline, inherited]

Looks at given point, similar to gluLookAt.

Parameters:
eyeEye coordinate
center3D point to look at
upUp vector of the camera
Returns:
true, if everything is fine - false, otherwise

Definition at line 751 of file ProjectionParametersBase.hh.

Referenced by CSimpleWxFrame::CSimpleWxFrame().

const bool BIAS::ProjectionParametersBase::LookAt ( const Vector3< double > &  center,
const Vector3< double > &  up 
) [inline, inherited]

Looks at given point, similar to gluLookAt.

Parameters:
center3D point to look at
upUp vector of the camera
Returns:
true, if everythings fine - false, otherwise

Definition at line 760 of file ProjectionParametersBase.hh.

const bool BIAS::ProjectionParametersBase::LookAtGL ( const Vector3< double > &  eye,
const Vector3< double > &  center,
const Vector3< double > &  up 
) [inline, inherited]

Looks at given point, similar to gluLookAt.

Parameters:
eyeEye coordinate
center3D point to look at
upUp vector of the camera
Returns:
true, if everything is fine - false, otherwise

Definition at line 770 of file ProjectionParametersBase.hh.

const bool BIAS::ProjectionParametersBase::LookAtGL ( const Vector3< double > &  center,
const Vector3< double > &  up 
) [inline, inherited]

Looks at given point, similar to gluLookAt.

Parameters:
center3D point to look at
upUp vector of the camera
Returns:
true, if everythings fine - false, otherwise

Definition at line 779 of file ProjectionParametersBase.hh.

long int BIAS::Debug::Name2DebugLevel ( const std::string &  name) const [inline, inherited]

looks up a debuglevel in the internal map, returns 0 if not found

Author:
woelk 09/2006

Definition at line 455 of file Debug.hh.

long int BIAS::Debug::NewDebugLevel ( const std::string &  name) [inline, inherited]
ProjectionParametersGreatCircles & ProjectionParametersGreatCircles::operator= ( const ProjectionParametersGreatCircles P)
virtual bool BIAS::ProjectionParametersBase::PoseValid ( ) const [inline, virtual, inherited]
void BIAS::Debug::PrintDebugLevel ( std::ostream &  os = std::cout) const [inline, inherited]

Definition at line 384 of file Debug.hh.

virtual HomgPoint2D BIAS::ProjectionParametersBase::Project ( const HomgPoint3D X,
bool  IgnoreDistortion = false 
) const [inline, virtual, inherited]

calculates the projection of a point in the world coordinate system to a pixel in the image plane of the camera !warning! the function my return an invalid point (0,0,0) in certain cases (3d point) behind camera or 3d point to close to camera center

Author:
woelk 05/2006

Reimplemented in BIAS::ProjectionParametersDynamicLoad, and BIAS::ProjectionParametersProjective.

Examples:
ExampleEstimateFisheyePolynomial.cpp, and ExampleProjectionParametersPerspective2.cpp.

Definition at line 221 of file ProjectionParametersBase.hh.

References BIAS::Vector3< T >::Mult().

virtual int BIAS::ProjectionParametersBase::Project ( const HomgPoint3D X,
HomgPoint2D p2d,
bool  IgnoreDistortion = false 
) const [inline, virtual, inherited]

calculates the projection of a point in the world coordinate system to a pixel in the image plane of the camera.

The only case when this function may not compute the 2d point is when the camera center and the 3d point coincide. This case must be indicated by a negative return value. In all other cases, a valid 2d point is computed, *particularily* when the 3d point is behind the camera or when the resulting 2d point is at infinity. returns negative, when 3d point and camera center coincide

Author:
woelk 05/2006

Reimplemented in BIAS::ProjectionParametersDynamicLoad, and BIAS::ProjectionParametersProjective.

Definition at line 237 of file ProjectionParametersBase.hh.

References BIAS::Vector3< T >::Mult().

HomgPoint2D ProjectionParametersGreatCircles::ProjectLocal ( const Vector3< double > &  point,
bool  IgnoreDistortion = false 
) const [virtual]

calculates the projection of a point in the camera coordinate system to a pixel in the image plane of the camera with lens distortion In the simplest case perspective pinhole projection x = K * y where y is the projection of X using y = (R^T | -R^T C) X

Implements BIAS::ProjectionParametersBase.

Definition at line 327 of file ProjectionParametersGreatCircles.cpp.

int ProjectionParametersGreatCircles::ProjectLocal ( const Vector3< double > &  point,
HomgPoint2D p2d,
bool  IgnoreDistortion = false 
) const [virtual]

calculates the projection of a point in the local camera coordinate system to a pixel in the image plane of the camera.

The only case when this function may not compute the 2d point is when the camera center and the 3d point coincide. This case must be indicated by a negative return value. In all other cases, a 2d point must be computed, *particularily* when the 3d point is behind the camera or when the resulting 2d point is at infinity.

In the simplest case perspective pinhole projection x = K * point where point is transformed of X using point = (R^T | -R^T C) X

Author:
woelk 08/2008 (c) www.vision-n.de

Implements BIAS::ProjectionParametersBase.

Definition at line 346 of file ProjectionParametersGreatCircles.cpp.

virtual bool BIAS::ProjectionParametersBase::QValid ( ) const [inline, virtual, inherited]

Check if current orientation is valid.

Reimplemented in BIAS::ProjectionParametersDynamicLoad.

Definition at line 676 of file ProjectionParametersBase.hh.

Referenced by BIAS::wxProjectionPanel::UpdateGUI().

void BIAS::Debug::RemoveDebugLevel ( const std::string &  name) [inline, inherited]

Definition at line 377 of file Debug.hh.

void BIAS::Debug::RemoveDebugLevel ( const long int  lv) [inline, inherited]

Definition at line 370 of file Debug.hh.

void ProjectionParametersGreatCircles::Rescale ( double  ratio,
const double  offset = 0.0 
) [virtual]
Attention:
off set is being ignored - just for interface purposes

Reimplemented from BIAS::ProjectionParametersBase.

Definition at line 166 of file ProjectionParametersGreatCircles.cpp.

void ProjectionParametersGreatCircles::Rescale ( unsigned int  width,
unsigned int  height 
) [virtual]

adapt internal parameters to new image size

Parameters:
widthand height are the new images sizes
Attention:
Delivers only correct results if ratio is chosen to rescale image size to integral image dimensions in both directions.

Reimplemented from BIAS::ProjectionParametersBase.

Definition at line 193 of file ProjectionParametersGreatCircles.cpp.

void BIAS::UnscentedTransform::SetAlpha ( const double  alpha) [inline, inherited]

Sets the alpha parameter.

The alpha parameter determines the spread of the sigma points

Definition at line 80 of file UnscentedTransform.hh.

bool ProjectionParametersGreatCircles::SetAngleInterval ( const HomgPoint3D worldPoint,
const double &  halfAngleRange 
)

Sets viewing volume of camera using GetAngleInterval().

width_ and height_ are kept!

Definition at line 270 of file ProjectionParametersGreatCircles.cpp.

virtual void BIAS::ProjectionParametersBase::SetAspectratio ( const double  AspectRatio) [inline, virtual, inherited]
void BIAS::UnscentedTransform::SetBeta ( const double  beta) [inline, inherited]

Sets the beta parameter.

beta is used to incorporate prior knowledge of the distribution of x. For Gaussian distributions beta = 2.0 is optiomal

Definition at line 86 of file UnscentedTransform.hh.

virtual void BIAS::ProjectionParametersBase::SetC ( const BIAS::Vector3< double > &  C) [inline, virtual, inherited]
virtual void BIAS::ProjectionParametersBase::SetCov ( const Matrix< POSE_TYPE > &  Cov) [inline, virtual, inherited]
void BIAS::Debug::SetDebugLevel ( const std::string &  name) [inline, inherited]

Definition at line 326 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( const long int  lv) [inline, inherited]
void BIAS::Debug::SetDebugStream ( const std::ostream &  os) [inline, inherited]

Definition at line 399 of file Debug.hh.

static void BIAS::Debug::SetGlobalDebugLevel ( long int  lev) [inline, static, inherited]

Definition at line 425 of file Debug.hh.

virtual void BIAS::ProjectionParametersBase::SetIdentifier ( std::string  name) [inline, virtual, inherited]
virtual void BIAS::ProjectionParametersBase::SetImageSize ( const unsigned int  w,
const unsigned int  h 
) [inline, virtual, inherited]
void ProjectionParametersGreatCircles::SetInternals ( const double  minPhi,
const double  maxPhi,
const double  minTheta,
const double  maxTheta,
const unsigned int  imgWidth,
const unsigned int  imgHeight 
)

Calculates and sets internal camera parameters.

Valid ranges for the parameters are [minPhi, maxPhi] in [-M_PI, M_PI] and [minTheta, maxTheta] in [0,M_PI].

The behaviour of the camera outside this ranges is undefined.

Of course all modulo M_PI ranges are valid but it is a nasty thing to work with. Learn how this camera works, before assuming that it is easy to handle arbitrary ranges for this parameters.

Author:
bartczak 08/2007

Definition at line 126 of file ProjectionParametersGreatCircles.cpp.

Referenced by BIAS::SphericalRectification< InputStorageType, OutputStorageType >::DetermineRectificationParameters_().

virtual void BIAS::ProjectionParametersBase::SetPose ( const BIAS::Pose  pose) [inline, virtual, inherited]
virtual void BIAS::ProjectionParametersBase::SetPoseParametrization ( const BIAS::PoseParametrization pp) [inline, virtual, inherited]
virtual void BIAS::ProjectionParametersBase::SetPrincipal ( const double  x,
const double  y 
) [inline, virtual, inherited]
virtual void BIAS::ProjectionParametersBase::SetQ ( const BIAS::Quaternion< double > &  Q) [inline, virtual, inherited]
virtual void BIAS::ProjectionParametersBase::SetQC ( const BIAS::Quaternion< double > &  Q,
const BIAS::Vector3< double > &  C 
) [inline, virtual, inherited]
virtual void BIAS::ProjectionParametersBase::SetR ( const BIAS::RMatrix R) [inline, virtual, inherited]
void BIAS::UnscentedTransform::SetUseSVD ( const bool  use_svd) [inline, inherited]

Definition at line 89 of file UnscentedTransform.hh.

void ProjectionParametersBase::SetVideoSourceType ( const std::string &  name) [virtual, inherited]

Set the camera source type.

Reimplemented in BIAS::ProjectionParametersDynamicLoad.

Definition at line 722 of file ProjectionParametersBase.cpp.

void BIAS::Debug::ShowDebugLevel ( std::ostream &  os = std::cout) const [inline, inherited]

prints all internally known debuglevels

Author:
woelk 09/2006

Definition at line 497 of file Debug.hh.

bool ProjectionParametersGreatCircles::SphericalAngles2LocalEuclideanRay ( const double  phi,
const double  theta,
BIAS::Vector3< double > &  ray 
) [static]

Calculate euclidean ray direction in local camera frame from angles.

Returns:
ray ray direction in the local camera coordinate frame.
Parameters:
phiangle around the H axis, zero lies at direction of A and value range is [-pi, pi]. theta angle within plane containing H relative to -H, value range is [0,pi]
Returns:
true if given angles allow for unique ray reconstruction.
Author:
bartczak 08/2007

Definition at line 85 of file ProjectionParametersGreatCircles.cpp.

References BIAS::Vector3< T >::Set().

static bool BIAS::ProjectionParametersGreatCircles::SphericalAngles2LocalEuclidianRay ( const double  phi,
const double  theta,
BIAS::Vector3< double > &  ray 
) [inline, static]

deprecated version

Definition at line 212 of file ProjectionParametersGreatCircles.hh.

int UnscentedTransform::Transform ( const Vector< double > &  src_mean,
const Matrix< double > &  src_cov,
Vector< double > &  dst_mean,
Matrix< double > &  dst_cov 
) const [virtual, inherited]
int ProjectionParametersBase::Transform_ ( const Vector< double > &  src,
Vector< double > &  dst 
) const [virtual, inherited]

Worker function for Unscented Transform.

Author:
koeser

Implements BIAS::UnscentedTransform.

Reimplemented in BIAS::ProjectionParametersDynamicLoad.

Definition at line 472 of file ProjectionParametersBase.cpp.

References TNT::Vector< T >::size().

bool ProjectionParametersGreatCircles::Undistort ( BIAS::HomgPoint2D point2d) const [virtual]

Interface defintion for lens undistortion function, implemented by derived classes.

Implements BIAS::ProjectionParametersBase.

Definition at line 52 of file ProjectionParametersGreatCircles.cpp.

Matrix3x3< double > ProjectionParametersBase::UnProjectCovLocal ( const HomgPoint2D pos,
const Matrix3x3< double > &  cov2D,
bool  IgnoreDistortion = false,
bool  Normalize = false 
) [virtual, inherited]

unprojects the covariance matrices to K=Identity camera

This uses the unscented transform to propagate covariance. Use a faster or better specialization in derived class if you want.

Author:
koeser 06/2006

Reimplemented in BIAS::ProjectionParametersDynamicLoad, and BIAS::ProjectionParametersPerspective.

Definition at line 502 of file ProjectionParametersBase.cpp.

Referenced by BIAS::ProjectionParametersPerspective::UnProjectCovLocal().

void ProjectionParametersGreatCircles::UnProjectLocal ( const HomgPoint2D pos,
Vector3< double > &  pointOnRay,
Vector3< double > &  direction,
bool  ignoreDistortion = false 
) const [virtual]

calculates the viewing ray from the camera center (in the camera coordinate system) which belongs to the image position pos with lens distortion e.g.

(0,0,1) means optical axis

Implements BIAS::ProjectionParametersBase.

Definition at line 373 of file ProjectionParametersGreatCircles.cpp.

HomgPoint3D ProjectionParametersGreatCircles::UnProjectToImagePlane ( const HomgPoint2D pos,
const double &  depth = 1.0,
bool  IgnoreDistortion = false 
) const [virtual]

map points from image onto unit diameter image plane in 3D.

Chosen is the image plane with distance of one from the image center.

Implements BIAS::ProjectionParametersBase.

Definition at line 357 of file ProjectionParametersGreatCircles.cpp.

References BIAS::Vector3< T >::NormL2().

HomgPoint3D ProjectionParametersBase::UnProjectToPoint ( const HomgPoint2D pos,
const double  depth,
const ProjectionParametersBase proj,
bool  IgnoreDistortion = false 
) const [virtual, inherited]
HomgPoint3D ProjectionParametersBase::UnProjectToPoint ( const HomgPoint2D pos,
double  depth,
bool  IgnoreDistortion = false 
) const [virtual, inherited]

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.

Returns:
: (0,0,0,0) is returned on failure

Reimplemented in BIAS::ProjectionParametersDynamicLoad.

Examples:
ExampleEstimateFisheyePolynomial.cpp, and ExampleProjectionParametersProjective.cpp.

Definition at line 448 of file ProjectionParametersBase.cpp.

References BIAS::Vector3< T >::AddIP(), and BIAS::Vector3< T >::Mult().

Referenced by BIAS::PMDImageProc::CrossCheck(), and BIAS::TriangleMesh::MakeTriangles_().

Vector3< double > ProjectionParametersBase::UnProjectToPointLocal ( const HomgPoint2D pos,
const double &  depth,
bool  IgnoreDistortion = false 
) const [virtual, inherited]

calculates a 3D point in the local camera coordinate system, which belongs to the image position pos in cam with distance depth to the camera center cam.

Author:
koeser

Reimplemented in BIAS::ProjectionParametersBufferedRay, BIAS::ProjectionParametersCylindric, BIAS::ProjectionParametersDynamicLoad, BIAS::ProjectionParametersOrthographic, BIAS::ProjectionParametersProjective, and BIAS::ProjectionParametersSpherical.

Definition at line 432 of file ProjectionParametersBase.cpp.

References BIAS::Vector3< T >::NormL2().

Referenced by BIAS::ProjectionParametersBase::UnProjectToPoint().

virtual void BIAS::ProjectionParametersBase::UnProjectToRay ( const HomgPoint2D pos,
Vector3< double > &  direction,
bool  ignoreDistortion = false 
) const [inline, virtual, inherited]

Calculates the view ray, which belongs to the given position on the image plane, in global coordinates.

Parameters:
posposition on the image plane
directionwill be the direction of the ray
ignoreDistortionoptional parameter which specifies if potential distortions are ignored (is false by default)
Author:
Woelk, Husvogt
Date:
May 2006, March 2012

In case of a perspective projection, the ray goes through the optical center of the projection and the given position on the image plane.

Definition at line 351 of file ProjectionParametersBase.hh.

References BIAS::Matrix3x3< T >::Mult().

virtual void BIAS::ProjectionParametersBase::UnProjectToRay ( const HomgPoint2D pos,
Vector3< double > &  origin,
Vector3< double > &  direction,
bool  ignoreDistortion = false 
) const [inline, virtual, inherited]

Calculates the view ray, which belongs to the given position on the image plane, in global coordinates.

Parameters:
posposition on the image plane
originorigin of the ray
directionwill be the direction of the ray
ignoreDistortionoptional parameter which specifies if potential distortions are ignored (is false by default)
Author:
Woelk, Husvogt
Date:
May 2006, March 2012

In case of a perspective projection, the ray goes through the optical center of the projection and the given position on the image plane.

Reimplemented in BIAS::ProjectionParametersDynamicLoad, and BIAS::ProjectionParametersProjective.

Examples:
ExampleProjectionParametersPerspective2.cpp.

Definition at line 325 of file ProjectionParametersBase.hh.

References BIAS::Matrix3x3< T >::Mult().

Referenced by BIAS::ImageBlender::BlendImages(), BIAS::ImageBlender::CheckFov(), BIAS::EpipolarLine::DrawDistortedLine(), BIAS::GenVisiblePoints::GenerateVisiblePoint(), BIAS::Triangulation::Triangulate(), and BIAS::Triangulation::TriangulateProjective().

virtual void BIAS::ProjectionParametersBase::UnProjectToRay ( const HomgPoint2D pos,
Vector3< double > &  origin,
Vector3< double > &  direction,
const ProjectionParametersBase proj,
bool  ignoreDistortion = false 
) const [inline, virtual, inherited]

Calculates the view ray, which belongs to the given position on the image plane, using the given projection.

Parameters:
posposition on the image plane
originorigin of the ray
directionwill be the direction of the ray
projreference to the projection which is used
ignoreDistortionoptional parameter which specifies if potential distortions are ignored (is false by default)
Author:
Woelk, Husvogt
Date:
May 2006, March 2012

In case of a perspective projection, the ray goes through the optical center of the given projection and the given position on the image plane.

Reimplemented in BIAS::ProjectionParametersDynamicLoad, and BIAS::ProjectionParametersProjective.

Definition at line 377 of file ProjectionParametersBase.hh.

References BIAS::Matrix3x3< T >::Mult(), and BIAS::ProjectionParametersBase::UnProjectLocal().

virtual void BIAS::ProjectionParametersBase::ValidatePose ( ) [inline, virtual, inherited]
double ProjectionParametersBase::ViewDifference ( const ProjectionParametersBase ) const [virtual, inherited]

Returns difference between two projections like |C1-C2|.

This function can be used to calculate inter-camera distance e.g. for ordering purposes.

Author:
koeser 03/2006

Reimplemented in BIAS::ProjectionParametersCylindric, BIAS::ProjectionParametersDynamicLoad, BIAS::ProjectionParametersPerspective, BIAS::ProjectionParametersProjective, and BIAS::ProjectionParametersSpherical.

Definition at line 423 of file ProjectionParametersBase.cpp.

xmlNodePtr XMLBase::XMLAdd ( const xmlNodePtr  Node,
XMLIO XMLObject 
) const [inherited]

call this to add the class to a node of a given xml tree

Attention:
interface changed 3/2008: return value now nodeptr of added node!

Definition at line 26 of file XMLBase.cpp.

References BIAS::XMLIO::addAttribute(), and BIAS::XMLIO::addChildNode().

int ProjectionParametersGreatCircles::XMLGetClassName ( std::string &  TopLevelTag,
double &  Version 
) const [virtual]

specialization of XML block name function

Reimplemented from BIAS::ProjectionParametersBase.

Definition at line 384 of file ProjectionParametersGreatCircles.cpp.

int ProjectionParametersGreatCircles::XMLIn ( const xmlNodePtr  Node,
XMLIO XMLObject 
) [virtual]
int ProjectionParametersGreatCircles::XMLOut ( const xmlNodePtr  Node,
XMLIO XMLObject 
) const [virtual]
int XMLBase::XMLRead ( const std::string &  Filename) [inherited]
int XMLBase::XMLReadFromString ( const std::string &  str) [inherited]

reconstruct xml tree from string

Author:
evers
Examples:
ExampleProjection.cpp.

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().

int XMLBase::XMLWrite ( const std::string &  Filename,
int  CompressionLevel = 0,
bool  AutoAddCompressionSuffix = true,
std::string  encoding = "UTF-8" 
) const [inherited]
int XMLBase::XMLWriteToString ( std::string &  str,
std::string  encoding = "UTF-8" 
) const [inherited]

serialize xml tree to string

Author:
evers
Examples:
ExampleProjection.cpp.

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().


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const ProjectionParametersGreatCircles p 
) [friend]

Definition at line 262 of file ProjectionParametersGreatCircles.hh.

std::ostream& operator<< ( std::ostream &  os,
const ProjectionParametersBase p 
) [friend, inherited]

Definition at line 810 of file ProjectionParametersBase.hh.


Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 511 of file Debug.hh.

Referenced by BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

long int BIAS::Debug::_liNextDebugLevel [protected, inherited]

new concept, debuglevel are managed here in the debug class

Definition at line 517 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

std::map<std::string, long int> BIAS::Debug::_String2Debuglevel [protected, inherited]

Definition at line 518 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 512 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

double BIAS::UnscentedTransform::Alpha_ [protected, inherited]

the alpha parameter determines the spread of the sigma points

Definition at line 94 of file UnscentedTransform.hh.

Referenced by BIAS::UnscentedTransform::ComputeSigmaPoints_().

double BIAS::ProjectionParametersBase::aspectratio_ [protected, inherited]
double BIAS::UnscentedTransform::Beta_ [protected, inherited]

beta is used to incorporate prior knowledge of the distribution of x.

For Gaussian distributions beta = 2.0 is optiomal

Definition at line 97 of file UnscentedTransform.hh.

Referenced by BIAS::UnscentedTransform::ComputeSigmaPoints_().

bool BIAS::ProjectionParametersBase::CValid_ [protected, inherited]

scale from angles to image

Definition at line 257 of file ProjectionParametersGreatCircles.hh.

Referenced by DoIntrinsicsDiffer(), and operator=().

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 514 of file Debug.hh.

unsigned int BIAS::ProjectionParametersBase::height_ [protected, inherited]
std::string BIAS::ProjectionParametersBase::identifier_ [protected, inherited]
double BIAS::UnscentedTransform::Kappa_ [protected, inherited]

kappa is a secondary scaling parameter.

In other papers from Uhlman kappa is fixed to 1.0

Definition at line 100 of file UnscentedTransform.hh.

Referenced by BIAS::UnscentedTransform::ComputeSigmaPoints_().

double BIAS::ProjectionParametersBase::principalX_ [protected, inherited]
double BIAS::ProjectionParametersBase::principalY_ [protected, inherited]
bool BIAS::ProjectionParametersBase::QValid_ [protected, inherited]
bool BIAS::UnscentedTransform::UseSVD_ [protected, inherited]

Definition at line 803 of file ProjectionParametersBase.hh.

bool BIAS::ProjectionParametersBase::ustNormalize_ [protected, inherited]

Definition at line 804 of file ProjectionParametersBase.hh.

unscented transform worker variables

Definition at line 802 of file ProjectionParametersBase.hh.

std::string BIAS::ProjectionParametersBase::videoSourceType_ [protected, inherited]
unsigned int BIAS::ProjectionParametersBase::width_ [protected, inherited]

The documentation for this class was generated from the following files:
 All Classes Functions Variables Typedefs Enumerations Enumerator Friends