Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends | List of all members
BIAS::ProjectionParametersPerspectiveDepth Class Reference

additional depth calibration parameters for a perspective depth camera to be used for ToF-(PMD) cameras. More...

#include <Geometry/ProjectionParametersPerspectiveDepth.hh>

+ Inheritance diagram for BIAS::ProjectionParametersPerspectiveDepth:
+ Collaboration diagram for BIAS::ProjectionParametersPerspectiveDepth:

Public Member Functions

virtual
ProjectionParametersPerspectiveDepth
Clone () const
 covariant virtual copy constructor for use in Projection More...
 
virtual bool CValid () const
 Check of current projection center is valid. More...
 
virtual bool Distort (BIAS::HomgPoint2D &point2d) const
 Using the Matlab camera calibration toolbox parameters for a distortion of undistorted coordinates. More...
 
void DistortDepth (HomgPoint2D const &pos, float &d, bool bIsInCartesianCoords=false)
 Distort depth value d at image position pos. More...
 
int DistortDepthMapIP (BIAS::Image< float > &depthMap, bool bIsInCartesianCoords=false)
 Distorts the passed depth map in place. More...
 
int DistortNormalized (BIAS::HomgPoint2D &point2d) const
 Undistort distorted coordinates using the standard distortion parameters and the parameter describing the second constant root of the distortion polynomial of the radial symmetric distortion. More...
 
void DistortReflectivity (HomgPoint2D const &pos, float &depth, float &Reflectivity, bool bIsInCartesianCoords=false)
 Distort Reflectivity value at depth at image offset form center radius. More...
 
int DistortReflectivityDepthIP (BIAS::Image< float > &depthMap, BIAS::Image< float > &ReflectivityImage, bool bIsInCartesianCoords=false)
 Distort Reflectivity error in depth map. More...
 
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. More...
 
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. More...
 
virtual const bool DoExtrinsicsDiffer (const ProjectionParametersBase *p) const
 
virtual const bool DoIntrinsicsDiffer (const ProjectionParametersBase *p) const
 
virtual double GetAspectratio () const
 Return aspectratio (i.e. More...
 
virtual BIAS::Vector3< double > GetC () const
 Get projection center. More...
 
virtual BIAS::Matrix< POSE_TYPE > GetCov () const
 Return pose covariance as 7x7 matrix with respect to C, Q. More...
 
virtual BIAS::Vector< double > GetCQ () const
 Return pose as 7 vector (first projection center C, then unit quaternion Q representing orientation). More...
 
bool GetCutOutParameters (const Vector2< int > &centerPoint, const unsigned int halfWidth, const unsigned int halfHeight, ProjectionParametersPerspective &cutOutParams) const
 Shifts the principle point so that imagePoint-(halfWidth, halfHeight) is mapped to (0,0). More...
 
BIAS_TOF_DEPTH_ERROR_MODEL GetDepthCalibrationModel ()
 Get the depth calibration model. More...
 
void GetDepthCalibrationParameters (std::vector< double > &params)
 Get the depth calibration parameters. More...
 
void GetDepthCalibrationSplineKnots (std::vector< double > &knots)
 Get the depth calibration spline knot points. More...
 
BIAS_ProjParaPersp_DISTORTION_TYPE GetDistortionType () const
 Get type of distortion parameters. More...
 
virtual BIAS::Matrix3x4< double > GetExternals () const
 Return cached 3x4 representation of external matrix [R|C]. More...
 
virtual BIAS::KMatrix GetFakeKMatrix (double &imgsize, int resolution=0, const double &maxangle=1.4) const
 Returns a fake KMatrix for the camera. More...
 
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. More...
 
virtual void GetFirstEdgePosition (PixelIterator &it)
 call this to start a run at the outer boundary of an image. More...
 
void GetFocalLength (double &f) const
 Get the current camera focal length. More...
 
double GetFocalLength () const
 Returns the focal length. More...
 
Matrix4x4< double > GetGLModelviewProjectionMatrix (const double zNear, const double zFar, const bool flip, const bool transpose=false)
 Calculates an ModelViewProjection matrix useable in OpenGL. More...
 
Matrix4x4< double > GetGLProjectionMatrix (const double zNear, const double zFar, const bool flip, const bool transpose=false)
 Calculates an projection matrix useable in OpenGL. More...
 
Matrix4x4< double > GetGLProjectionMatrix (const double zNear, const double zFar, const Vector2< unsigned int > upperLeft, const unsigned int width, const unsigned int height, const bool flip, const bool transpose=false)
 Calculates an projection matrix useable in OpenGL. More...
 
void GetIdealImageSize (unsigned int &width, unsigned int &height) const
 
void GetIdealK (KMatrix &K) const
 
virtual std::string GetIdentifier () const
 
virtual const unsigned int & GetImageHeight () const
 Returns the image height. More...
 
virtual int GetImageSize (unsigned int &Width, unsigned int &Height) const
 Obtain image dimensions. More...
 
virtual const unsigned int & GetImageWidth () const
 Returns the image width. More...
 
virtual BIAS::KMatrix GetK () const
 
virtual BIAS::KMatrix GetKinv () const
 
virtual int GetMinimalAngularSamplingStep (double &minAngleStep)
 Delivers the assumed minimal angular distance between two optical rays belonging to integer image coordinates within the FoV. More...
 
void GetMinMaxDepth (float &minDepth, float &maxDepth)
 get the minimum and maximum depth values with which the calibration has been done More...
 
double GetMinZLocal () const
 minimum z value of ray in image (if computed already) More...
 
virtual bool GetNextBorderPixel (PixelIterator &it)
 call this iteratively to run at the outer boundary of an image. More...
 
virtual bool GetNextEdgePosition (PixelIterator &it)
 call this iteratively to run at the outer edge of an image. More...
 
virtual BIAS::PMatrix GetP () const
 
virtual const BIAS::PoseGetPose () const
 Return complete pose object. More...
 
virtual BIAS::PoseParametrization GetPoseParametrization () const
 Return copy of pose parametrization object. More...
 
virtual int GetPrincipal (double &PrincipalX, double &PrincipalY) const
 Get principal point (in pixels relative to top left corner). More...
 
virtual BIAS::Quaternion< double > GetQ () const
 Get orientation as unit quaternion. More...
 
virtual BIAS::RMatrix GetR () const
 Get orientation as rotation matrix R. More...
 
void GetReflectivityCalibrationParameters (std::vector< double > &params)
 Get the reflectivity calibration parameters. More...
 
void GetReflectivityMaxReflectivities (std::vector< double > &params)
 Get the reflectivity calibration parameters which define the max reflectivity for all depths intervals. More...
 
void GetReflectivityMinReflectivities (std::vector< double > &params)
 Get the reflectivity calibration parameters which define the min reflectivity for all depths intervals. More...
 
void GetReflectivityRadiusNormalization (std::vector< double > &params)
 Get the reflectivity calibration parameters which define the radius vignetting function. More...
 
double GetSkew () const
 Obtain the current camera skew factor. More...
 
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. More...
 
void GetUndistortion (double &kc1, double &kc2, double &kc3, double &kc4) const
 
void GetUndistortion (double &kc1, double &kc2, double &kc3, double &kc4, double r0) const
 
void GetUndistortionBrown (double &kc1, double &kc2, double &kc3, double &kc4, double &r0) const
 Get the lens undistortion parameters including the parameter describing root of the polynomial. More...
 
void GetUndistortionInverseRad (double &kc1, double &kc2, double &kc3, double &kc4) const
 
void GetUndistortionInvRad3 (double &kc1, double &kc2, double &kc3)
 
void GetUndistortionRad3 (double &kc1, double &kc2, double &kc3)
 
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. More...
 
virtual std::string GetVideoSourceType () const
 
bool HasDepthDistortion () const
 checks whether depth distortion is present More...
 
bool HasReflectivityDistortion () const
 checks whether depth reflectivity distortion is present More...
 
void Init ()
 Init function called by constructors. More...
 
virtual void InvalidatePose ()
 Invalidate currently set pose. More...
 
bool IsDistorted () const
 
bool IsLeftOf (const ProjectionParametersBase &ppb) const
 Returns true if the camera represented by this ProjectionParametersBase is left of the given one. More...
 
const bool LookAt (const Vector3< double > &eye, const Vector3< double > &center, const Vector3< double > &up)
 Looks at given point, similar to gluLookAt. More...
 
const bool LookAt (const Vector3< double > &center, const Vector3< double > &up)
 Looks at given point, similar to gluLookAt. More...
 
const bool LookAtGL (const Vector3< double > &eye, const Vector3< double > &center, const Vector3< double > &up)
 Looks at given point, similar to gluLookAt. More...
 
const bool LookAtGL (const Vector3< double > &center, const Vector3< double > &up)
 Looks at given point, similar to gluLookAt. More...
 
ProjectionParametersPerspectiveDepthoperator= (const ProjectionParametersPerspectiveDepth &P)
 operator = with ProjectionParametersPerspectiveDepth More...
 
ProjectionParametersPerspectiveDepthoperator= (const ProjectionParametersPerspective &P)
 operator = with ProjectionParametersPerspective More...
 
virtual bool PoseValid () const
 Check if current pose is valid. More...
 
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 More...
 
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. More...
 
 ProjectionParametersPerspectiveDepth (const unsigned int width=0, const unsigned int height=0)
 constructor with image width and height More...
 
 ProjectionParametersPerspectiveDepth (BIAS_TOF_DEPTH_ERROR_MODEL model)
 constructor with depth distortion model More...
 
 ProjectionParametersPerspectiveDepth (const ProjectionParametersPerspectiveDepth &P)
 copy constructor with ProjectionParametersPerspectiveDepth More...
 
 ProjectionParametersPerspectiveDepth (const ProjectionParametersPerspective &P)
 copy constructor with ProjectionParametersPerspective More...
 
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 More...
 
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. More...
 
virtual bool QValid () const
 Check if current orientation is valid. More...
 
virtual void Rescale (double ratio, const double offset=0.0)
 Adapt internal parameters to resampled image. More...
 
virtual void Rescale (unsigned int width, unsigned int height)
 adapt internal parameters to new image size More...
 
virtual void SetAspectratio (const double AspectRatio)
 Set CCD cell-size in meter, virtual overload to recalculate K_. More...
 
virtual void SetC (const BIAS::Vector3< double > &C)
 Set projection center. More...
 
virtual void SetCov (const Matrix< POSE_TYPE > &Cov)
 Set pose covariance matrix with respect to C, Q. More...
 
void SetDepthCalibrationModel (BIAS_TOF_DEPTH_ERROR_MODEL model)
 Set the depth calibration model, one of BIAS_TOF_DEPTH_ERROR_MODEL inits the vectors and reserves spaces. More...
 
void SetDepthCalibrationParameters (const std::vector< double > &params, float minDepth=0.0, float maxDepth=15000.0)
 Set the depth calibration parameters. More...
 
void SetDepthCalibrationParametersSpline (const std::vector< double > &knots, const std::vector< double > &controls, float minDepth=0.0, float maxDepth=15000.0)
 Set the depth calibration parameters for B-Spline model. More...
 
void SetDepthDistortionToZero ()
 Sets depth distortion to 0. More...
 
void SetDistortionType (BIAS_ProjParaPersp_DISTORTION_TYPE distype)
 Set type of distortion parameters. More...
 
void SetFocalLengthAndAspect (double f, double AspectRatio)
 Set the current camera focal length in pixel and the a spect ratio. More...
 
void SetIdealImageSize (unsigned int width, unsigned int height)
 
virtual void SetIdentifier (std::string name)
 Set the identification string. More...
 
virtual void SetImageSize (const unsigned int w, const unsigned int h)
 Set image dimensions (in pixels). More...
 
int SetIntrinsics (double minPhi, double maxPhi, double minTheta, double maxTheta, double angleStep, double aspectratio=1.0)
 Method calculates K-Matrix and image size from specified angles. More...
 
int SetIntrinsics (Vector3< double > &p, Vector3< double > &q, unsigned int width, unsigned int height)
 
virtual void SetK (const KMatrix &K)
 sets the internal parameters from a given KMatrix and updates the cached K and its inverse More...
 
void SetMinZLocal (const double &minz)
 sets minimum z value of unit-ray in local CCS to be accepted as in front of camera (e.g. More...
 
virtual void SetP (const PMatrix &P)
 set from P More...
 
virtual void SetPose (const BIAS::Pose pose)
 Set pose from pose object. More...
 
virtual void SetPoseParametrization (const BIAS::PoseParametrization &pp)
 Set pose from pose parametrization. More...
 
virtual void SetPrincipal (const double x, const double y)
 Set principal point in pixels relative to top left corner, virtual overload to recalculate K_. More...
 
virtual void SetQ (const BIAS::Quaternion< double > &Q)
 Set orientation from unit quaternion Q. More...
 
virtual void SetQC (const BIAS::Quaternion< double > &Q, const BIAS::Vector3< double > &C)
 Set pose from unit quaternion Q and projection center C. More...
 
virtual void SetR (const BIAS::RMatrix &R)
 Set orientation from rotation matrix R. More...
 
void SetReflectivityCalibrationParameters (const std::vector< double > &params)
 Set the reflectivity calibration parameters. More...
 
void SetReflectivityDepthDistortionToZero ()
 Sets depth reflectivity distortion to 0. More...
 
int SetReflectivityNormalizationParameters (const std::vector< double > &depthValues, const std::vector< double > &minInt, const std::vector< double > &maxInt, const std::vector< double > &radiusValues, const std::vector< double > &radiusIntensities)
 sets the reflectivity calibration parameters and Fit polynomials to radial and reflectivity normalization parameters More...
 
void SetSimplePerspective (const double FoV=M_PI/2, const unsigned int width=512, const unsigned int height=512)
 Sets the parameters for a simple perspective camera with imagesize 512x512, focal length 512 (fov = 90 deg.), princ.point (255.5,255.5) and without distortion. More...
 
void SetSkew (double skew)
 Set the current camera skew factor. More...
 
void SetUndistortion (double kc1, double kc2)
 
void SetUndistortion (double kc1, double kc2, double kc3, double kc4)
 Set the lens undistortion parameters. More...
 
void SetUndistortionBrown (double kc1, double kc2, double kc3, double kc4, double r0)
 Set the lens undistortion parameters including the root of the polynomial. More...
 
void SetUndistortionInverseRad (double kc1, double kc2, double kc3, double kc4)
 
void SetUndistortionInverseRad3 (double kc1, double kc2, double kc3)
 
void SetUndistortionRad3 (double kc1, double kc2, double kc3)
 
virtual void SetVideoSourceType (const std::string &name)
 Set the camera source type. More...
 
virtual int Transform_ (const Vector< double > &src, Vector< double > &dst) const
 Worker function for Unscented Transform. More...
 
int TransformCartesianToPolarCoordinates (const BIAS::Image< float > &cartesianDepth, BIAS::Image< float > &polarDepth)
 transforms an image from cartesian coordinates to polar coordinates More...
 
float TransformCartesianToPolarCoordinates (const HomgPoint2D &pos, const float depthCartesian)
 transforms a depth value from cartesian coordinates to polar coordinates More...
 
int TransformPolarToCartesianCoordinates (const BIAS::Image< float > &polarDepth, BIAS::Image< float > &cartesianDepth)
 transforms an image from polar coordinates to cartesian coordinates More...
 
float TransformPolarToCartesianCoordinates (const HomgPoint2D &pos, const float depthPolar)
 transforms a depth value from polar coodinates to cartesian coordinates More...
 
virtual bool Undistort (BIAS::HomgPoint2D &point2d) const
 Using the Matlab camera calibration toolbox parameters for an undistortion of distorted coordinates. More...
 
void UnDistortDepth (HomgPoint2D const &pos, float &d, bool bIsInCartesianCoords=false)
 UnDistort depth value d at image position pos. More...
 
int UnDistortDepthMapIP (BIAS::Image< float > &depthMap, bool bIsInCartesianCoords=false)
 Undistorts the passed depth map in place. More...
 
void UnDistortReflectivity (HomgPoint2D const &pos, float &depth, float &Reflectivity, bool bIsInCartesianCoords=false)
 UnDistort Reflectivity value i at image position pos. More...
 
int UnDistortReflectivityDepthIP (BIAS::Image< float > &depthMap, BIAS::Image< float > &ReflectivityImage, bool bIsInCartesianCoords=false)
 Undistort Reflectivity error in depth map. More...
 
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 Fast implementation for IgnorDistortion = true and Normalize = false More...
 
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. More...
 
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. More...
 
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. More...
 
virtual HomgPoint3D UnProjectToPoint (const HomgPoint2D &pos, const double depth, const ProjectionParametersBase &proj, bool IgnoreDistortion=false) const
 
virtual HomgPoint3D UnProjectToPointByZ (const HomgPoint2D &pos, const double &zDistance, bool IgnoreDistortion=false) const
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
void UpdateMinZLocal ()
 run along image border and compute maximum field of view, save in minzlocal More...
 
virtual void ValidatePose ()
 Validate currently set pose. More...
 
virtual double ViewDifference (const ProjectionParametersBase *pPPB) const
 compute scalar dissimilarity between two cameras based upon rough approximation of field of view overlap for pure rotation and penalty term for translation: 0=identical 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 More...
 
virtual int XMLIn (const xmlNodePtr Node, XMLIO &XMLObject)
 specialization of XML read function More...
 
virtual int XMLOut (const xmlNodePtr Node, XMLIO &XMLObject) const
 specialization of XML write function 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 ~ProjectionParametersPerspectiveDepth ()
 destructor which clears all vectors More...
 

Static Public Member Functions

static std::string GetDepthDistModelString (BIAS_TOF_DEPTH_ERROR_MODEL model)
 
static unsigned GetNrOfDepthErrormodelParameters (BIAS_TOF_DEPTH_ERROR_MODEL model)
 returns the number of depth error model parameters More...
 
static unsigned GetNrOfReflectivityParameters ()
 returns the number of depth reflectivity error model parameters More...
 
static std::string GetRadialDistModelString (BIAS_ProjParaPersp_DISTORTION_TYPE model)
 

Protected Member Functions

void AddDebugLevel (const long int lv)
 
void AddDebugLevel (const std::string &name)
 
void ComputeK_ ()
 computes the cached KMatrix and its inverse call after every parameter change More...
 
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. More...
 
long ConsumeNextFreeDebuglevel_ ()
 returns the next available debuglevel More...
 
bool DebugLevelIsSet (const long int lv) const
 
bool DebugLevelIsSet (const std::string &name) const
 
void Distort_ (const double x, const double y, double &dist_x, double &dist_y) const
 
int GetDebugLevel () const
 
std::ostream & GetDebugStream () const
 
void GetDebugStream (std::ostream &os) const
 
int GetMinimalAngleInCorner_ (const HomgPoint2D &corner, double &minAngle)
 Helper function for minimal angle step calculation. More...
 
void InitParams_ ()
 called from constructors to set zeros to most values More...
 
long int Name2DebugLevel (const std::string &name) const
 looks up a debuglevel in the internal map, returns 0 if not found More...
 
long int NewDebugLevel (const std::string &name)
 creates a new debuglevel More...
 
void PrepareSpline_ ()
 
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. More...
 
void SetBeta (const double beta)
 Sets the beta parameter. More...
 
void SetDebugLevel (const long int lv)
 
void SetDebugLevel (const std::string &name)
 
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 More...
 
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_(). More...
 
bool Undistort_ (const double dist_x, const double dist_y, double &x, double &y) const
 

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 More...
 
std::map< std::string, long int > _String2Debuglevel
 
double Alpha_
 the alpha parameter determines the spread of the sigma points More...
 
double aspectratio_
 aspect ratio of the camera CCD More...
 
double Beta_
 beta is used to incorporate prior knowledge of the distribution of x. More...
 
bool bSplinePrepared_
 
bool CValid_
 
long int D_DEPTH_DISTORTION
 
BIAS_TOF_DEPTH_ERROR_MODEL DepthCalibrationModel_
 
std::vector< double > DepthCalibrationParameters_
 
std::vector< double > depthIntNormValues_
 
BIAS_ProjParaPersp_DISTORTION_TYPE distType_
 
double focallength_
 focal length is stored in pixel for cellSizeX More...
 
unsigned int height_
 height of image in pixels More...
 
unsigned int idealImageHeight_
 
unsigned int idealImageWidth_
 ideal image size More...
 
std::string identifier_
 Multifunctional identifier. More...
 
KMatrix invK_
 
KMatrix K_
 focal length, aspect ratio, principal point in K_, inverse in invK_ More...
 
double Kappa_
 kappa is a secondary scaling parameter. More...
 
double kc1_
 lens undistortion parameters after Bouquet also used as parameters for distortion after Brown(?) More...
 
double kc2_
 
double kc3_
 
double kc4_
 
std::vector< double > listSplineKnotPoints_
 
float maxDepth_
 
std::vector< double > maxNormIntCoeffs_
 
float minDepth_
 
std::vector< double > minNormIntCoeffs_
 
double minZlocal_
 rigorously clip unit rays in CCS with z smaller than this values More...
 
Pose Pose_
 pose More...
 
double principalX_
 principal point in pixel coordinates (one for all zoom settings) More...
 
double principalY_
 
bool QValid_
 validity flag for orientation and position More...
 
double r0_
 
std::vector< double > radiusIntNormCoeffs_
 
std::vector< double > radiusIntNormValues_
 
std::vector< double > ReflectivityCalibrationParameters_
 
double skew_
 skew calibration parameter More...
 
BIAS::Interpolator splineInterpolator_
 
BIAS::Interpolator splineInterpolatorUndist_
 
bool UseSVD_
 
bool ustIgnoreDistortion_
 
bool ustNormalize_
 
bool ustTransformIntoImage_
 unscented transform worker variables More...
 
std::string videoSourceType_
 
unsigned int width_
 width of image in pixels More...
 

Static Protected Attributes

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

Friends

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

Detailed Description

additional depth calibration parameters for a perspective depth camera to be used for ToF-(PMD) cameras.

Models different depth distortion models which account for distortions due to sinusoidal assumptions and different surface reflectivities

Author
ischiller
Date
01/2009-06/2010

Definition at line 55 of file ProjectionParametersPerspectiveDepth.hh.

Constructor & Destructor Documentation

ProjectionParametersPerspectiveDepth::ProjectionParametersPerspectiveDepth ( const unsigned int  width = 0,
const unsigned int  height = 0 
)

constructor with image width and height

Parameters
width[in],:image width (default=0)
height[in],:image height (default=0)
Author
ischiller

Definition at line 43 of file ProjectionParametersPerspectiveDepth.cpp.

References Init().

ProjectionParametersPerspectiveDepth::ProjectionParametersPerspectiveDepth ( BIAS_TOF_DEPTH_ERROR_MODEL  model)

constructor with depth distortion model

Parameters
model[in],:BIAS_TOF_DEPTH_ERROR_MODEL depth distortion model (Polynom or Spline...)
Author
ischiller

Definition at line 52 of file ProjectionParametersPerspectiveDepth.cpp.

References BIAS::DEPTH_MODEL_LINEAR, BIAS::DEPTH_MODEL_NONE, BIAS::DEPTH_MODEL_POLYNOM, BIAS::DEPTH_MODEL_SPLINE, BIAS::DEPTH_MODEL_UNDEFINED, DepthCalibrationModel_, DepthCalibrationParameters_, Init(), listSplineKnotPoints_, maxDepth_, minDepth_, and BIAS::nrOfSplineParameters_.

BIAS::ProjectionParametersPerspectiveDepth::ProjectionParametersPerspectiveDepth ( const ProjectionParametersPerspectiveDepth P)
inline

copy constructor with ProjectionParametersPerspectiveDepth

Parameters
P[in],:ProjectionParametersPerspectiveDepth to init from
Author
ischiller

Definition at line 74 of file ProjectionParametersPerspectiveDepth.hh.

BIAS::ProjectionParametersPerspectiveDepth::ProjectionParametersPerspectiveDepth ( const ProjectionParametersPerspective P)
inline

copy constructor with ProjectionParametersPerspective

Parameters
P[in],:ProjectionParametersPerspective to init from
Author
ischiller

Definition at line 80 of file ProjectionParametersPerspectiveDepth.hh.

virtual BIAS::ProjectionParametersPerspectiveDepth::~ProjectionParametersPerspectiveDepth ( )
inlinevirtual

destructor which clears all vectors

Author
ischiller

Definition at line 126 of file ProjectionParametersPerspectiveDepth.hh.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( const long int  lv)
inlineinherited
void BIAS::Debug::AddDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 362 of file Debug.hh.

virtual ProjectionParametersPerspectiveDepth* BIAS::ProjectionParametersPerspectiveDepth::Clone ( ) const
inlinevirtual

covariant virtual copy constructor for use in Projection

Reimplemented from BIAS::ProjectionParametersPerspective.

Definition at line 140 of file ProjectionParametersPerspectiveDepth.hh.

void ProjectionParametersPerspective::ComputeK_ ( )
protectedinherited

computes the cached KMatrix and its inverse call after every parameter change

Definition at line 760 of file ProjectionParametersPerspective.cpp.

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

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(), BIAS::Less(), 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_ ( )
inlineprotectedinherited

returns the next available debuglevel

Author
woelk 09/2006

Definition at line 521 of file Debug.hh.

virtual bool BIAS::ProjectionParametersBase::CValid ( ) const
inlinevirtualinherited

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
inlineinherited
bool BIAS::Debug::DebugLevelIsSet ( const std::string &  name) const
inlineinherited

Definition at line 350 of file Debug.hh.

bool ProjectionParametersPerspective::Distort ( BIAS::HomgPoint2D point2d) const
virtualinherited

Using the Matlab camera calibration toolbox parameters for a distortion of undistorted coordinates.

Inverse to the undistort function. TODO: faster implementation via Lookup-table

Author
streckel 06/2004

Implements BIAS::ProjectionParametersBase.

Definition at line 313 of file ProjectionParametersPerspective.cpp.

References BIAS::DISTYPE_INVERSE_RAD.

void BIAS::ProjectionParametersPerspective::Distort_ ( const double  x,
const double  y,
double &  dist_x,
double &  dist_y 
) const
inlineprotectedinherited
void ProjectionParametersPerspectiveDepth::DistortDepth ( HomgPoint2D const &  pos,
float &  d,
bool  bIsInCartesianCoords = false 
)
int ProjectionParametersPerspectiveDepth::DistortDepthMapIP ( BIAS::Image< float > &  depthMap,
bool  bIsInCartesianCoords = false 
)

Distorts the passed depth map in place.

Uses method DistortDepth.

Returns
0 if everything went smoothly, -1 if parameter's size didn't fit the input image's size.
Parameters
depthMap[in][out],:the depth image to distort, will be altered
bIsInCartesianCoords[in],:indicates whether image has been transformed to cartesian coordinates
Author
ischiller

Definition at line 446 of file ProjectionParametersPerspectiveDepth.cpp.

References DistortDepth(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), HasDepthDistortion(), BIAS::ProjectionParametersBase::height_, BIAS::ProjectionParametersPerspective::TransformCartesianToPolarCoordinates(), BIAS::ProjectionParametersPerspective::TransformPolarToCartesianCoordinates(), and BIAS::ProjectionParametersBase::width_.

int ProjectionParametersPerspective::DistortNormalized ( BIAS::HomgPoint2D point2d) const
inherited

Undistort distorted coordinates using the standard distortion parameters and the parameter describing the second constant root of the distortion polynomial of the radial symmetric distortion.

In contrast to the the bouguet way of calculating the radial symmetric distortion by using the polynomial raddist = 1 + kc1 * r^2 + kc2 * r^4 the "brown" way uses a modyfied polynomial which has a second root. the second constant root of the polynomial is implemented by subtracting the constant term rc from raddist with rc = kc1 * r0^2 + kc2 * r0^4 r0 is the parameter describing the root of the polynomial. (For details see: Luhmann, Nahbereichsphotogrammetrie. page. 121 )

Author
grauel 09/2007 Distort undistorted coordinates using the
grauel 09/2007 distortion of a normalized point
woelk 11/2006

Definition at line 293 of file ProjectionParametersPerspective.cpp.

References BIAS::DISTYPE_INVERSE_RAD, BIAS::HomgPoint2D::Homogenize(), and BIAS::HomgPoint2D::IsAtInfinity().

void ProjectionParametersPerspectiveDepth::DistortReflectivity ( HomgPoint2D const &  pos,
float &  depth,
float &  Reflectivity,
bool  bIsInCartesianCoords = false 
)

Distort Reflectivity value at depth at image offset form center radius.

Parameters
depth[in][out],:the depth value, will be altered
Reflectivity[in],:the reflectivity at that position
radius[in],:current offset from principle point
Author
ischiller
Date
02/2010

Definition at line 487 of file ProjectionParametersPerspectiveDepth.cpp.

References BIAS::PolynomialSolve::EvaluatePolynomial(), BIAS::ProjectionParametersBase::GetPrincipal(), maxNormIntCoeffs_, minNormIntCoeffs_, radiusIntNormCoeffs_, ReflectivityCalibrationParameters_, BIAS::ProjectionParametersPerspective::TransformCartesianToPolarCoordinates(), and BIAS::ProjectionParametersPerspective::TransformPolarToCartesianCoordinates().

Referenced by DistortReflectivityDepthIP().

int ProjectionParametersPerspectiveDepth::DistortReflectivityDepthIP ( BIAS::Image< float > &  depthMap,
BIAS::Image< float > &  ReflectivityImage,
bool  bIsInCartesianCoords = false 
)

Distort Reflectivity error in depth map.

Parameters
depthMap[in][out],:the depth map, will be altered
ReflectivityImage[in],:the reflectivity image
Author
ischiller
Date
02/2010

Definition at line 538 of file ProjectionParametersPerspectiveDepth.cpp.

References DistortReflectivity(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), BIAS::ProjectionParametersPerspective::TransformCartesianToPolarCoordinates(), and BIAS::ProjectionParametersPerspective::TransformPolarToCartesianCoordinates().

bool ProjectionParametersBase::DoesPointProjectIntoImage ( const HomgPoint3D X,
HomgPoint2D x,
bool  IgnoreDistortion = false 
) const
virtualinherited

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 ProjectionParametersPerspective::DoesPointProjectIntoImageLocal ( const Vector3< double > &  localX,
HomgPoint2D x,
bool  IgnoreDistortion = false 
) const
virtualinherited

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 169 of file ProjectionParametersPerspective.cpp.

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

const bool ProjectionParametersBase::DoExtrinsicsDiffer ( const ProjectionParametersBase p) const
virtualinherited
const bool ProjectionParametersPerspective::DoIntrinsicsDiffer ( const ProjectionParametersBase p) const
virtualinherited
virtual double BIAS::ProjectionParametersBase::GetAspectratio ( ) const
inlinevirtualinherited
virtual BIAS::Vector3<double> BIAS::ProjectionParametersBase::GetC ( ) const
inlinevirtualinherited
virtual BIAS::Matrix<POSE_TYPE> BIAS::ProjectionParametersBase::GetCov ( ) const
inlinevirtualinherited

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
inlinevirtualinherited

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.

bool ProjectionParametersPerspective::GetCutOutParameters ( const Vector2< int > &  centerPoint,
const unsigned int  halfWidth,
const unsigned int  halfHeight,
ProjectionParametersPerspective cutOutParams 
) const
inherited

Shifts the principle point so that imagePoint-(halfWidth, halfHeight) is mapped to (0,0).

Image size is adapted to halfWidth*2+1 and halfHeight*2+1. Distortion parameters are applied in normalized coords hence they keep their validity.

Returns
true only if whole cutout lies in image.

Definition at line 34 of file ProjectionParametersPerspective.cpp.

References BIAS::ProjectionParametersBase::height_, BIAS::ProjectionParametersPerspective::SetPrincipal(), and BIAS::ProjectionParametersBase::width_.

int BIAS::Debug::GetDebugLevel ( ) const
inlineinherited
std::ostream& BIAS::Debug::GetDebugStream ( ) const
inlineinherited

Definition at line 405 of file Debug.hh.

void BIAS::Debug::GetDebugStream ( std::ostream &  os) const
inlineinherited

Definition at line 414 of file Debug.hh.

BIAS_TOF_DEPTH_ERROR_MODEL BIAS::ProjectionParametersPerspectiveDepth::GetDepthCalibrationModel ( )
inline

Get the depth calibration model.

Author
ischiller

Definition at line 172 of file ProjectionParametersPerspectiveDepth.hh.

void BIAS::ProjectionParametersPerspectiveDepth::GetDepthCalibrationParameters ( std::vector< double > &  params)
inline

Get the depth calibration parameters.

Parameters
params[out],:the depth distortion parameters, these are the control points in spline model
Author
ischiller

Definition at line 179 of file ProjectionParametersPerspectiveDepth.hh.

Referenced by BIAS::MultipleDepthWarp::Warp().

void BIAS::ProjectionParametersPerspectiveDepth::GetDepthCalibrationSplineKnots ( std::vector< double > &  knots)
inline

Get the depth calibration spline knot points.

Parameters
knots[out],:the knot points in spline model
Author
ischiller

Definition at line 189 of file ProjectionParametersPerspectiveDepth.hh.

std::string ProjectionParametersPerspectiveDepth::GetDepthDistModelString ( BIAS_TOF_DEPTH_ERROR_MODEL  model)
static
BIAS_ProjParaPersp_DISTORTION_TYPE BIAS::ProjectionParametersPerspective::GetDistortionType ( ) const
inlineinherited

Get type of distortion parameters.

Author
grauel
Examples:
ExampleProjectionParametersPerspective.cpp.

Definition at line 358 of file ProjectionParametersPerspective.hh.

virtual BIAS::Matrix3x4<double> BIAS::ProjectionParametersBase::GetExternals ( ) const
inlinevirtualinherited

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
virtualinherited

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, BIAS::ProjectionParametersSpherical, and BIAS::ProjectionParametersSphericalFast.

Definition at line 544 of file ProjectionParametersBase.cpp.

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

Referenced by BIAS::ProjectionParametersSphericalFast::GetFakeKMatrix(), and BIAS::ProjectionParametersSpherical::GetFakeKMatrix().

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

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::ProjectionParametersSphericalFast, 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)
virtualinherited

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.

void BIAS::ProjectionParametersPerspective::GetFocalLength ( double &  f) const
inlineinherited

Get the current camera focal length.

Author
buck
Examples:
ExampleProjectionMapping.cpp.

Definition at line 246 of file ProjectionParametersPerspective.hh.

Referenced by BIAS::VideoSource_Controller_Kinect::OnLoadCalib(), and BIAS::wxProjectionPanel::UpdateGUI().

double BIAS::ProjectionParametersPerspective::GetFocalLength ( ) const
inlineinherited

Returns the focal length.

Author
rwulff
Date
07/2010

Definition at line 255 of file ProjectionParametersPerspective.hh.

Referenced by BIAS::GLProjectionParametersPerspective::DrawWithMatchedParamsAndViewport_().

Matrix4x4< double > ProjectionParametersPerspective::GetGLModelviewProjectionMatrix ( const double  zNear,
const double  zFar,
const bool  flip,
const bool  transpose = false 
)
inherited

Calculates an ModelViewProjection matrix useable in OpenGL.

Parameters
zNeardefines the near z-clipping plane.
zFardefines the far z-clipping plane.
flipreading out the framebuffer into a bias image implicitly flips the image, when this can be remedied by (pre)flipping in the projection matrix - however when rendering onscreen, the visible image will be flipped then.

Definition at line 968 of file ProjectionParametersPerspective.cpp.

References BIAS::Matrix4x4< T >::Mult(), and BIAS::Matrix4x4< T >::Transpose().

static long int BIAS::Debug::GetGlobalDebugLevel ( )
inlinestaticinherited

Definition at line 431 of file Debug.hh.

Matrix4x4< double > ProjectionParametersPerspective::GetGLProjectionMatrix ( const double  zNear,
const double  zFar,
const bool  flip,
const bool  transpose = false 
)
inherited

Calculates an projection matrix useable in OpenGL.

Parameters
zNeardefines the near z-clipping plane.
zFardefines the far z-clipping plane.
flipreading out the framebuffer into a bias image implicitly flips the image, when this can be remedied by (pre)flipping in the projection matrix - however when rendering onscreen, the visible image will be flipped then.

Definition at line 986 of file ProjectionParametersPerspective.cpp.

Matrix4x4< double > ProjectionParametersPerspective::GetGLProjectionMatrix ( const double  zNear,
const double  zFar,
const Vector2< unsigned int >  upperLeft,
const unsigned int  width,
const unsigned int  height,
const bool  flip,
const bool  transpose = false 
)
inherited

Calculates an projection matrix useable in OpenGL.

The viewing frustum encloses the image all optical rays passing through the image region specified by the parameters upperLeft, width and height.

Parameters
zNeardefines the near z-clipping plane.
zFardefines the far z-clipping plane.
upperLeftspecifies the image positions of the upper left "visible" optical ray.
widthspecifies the x-component of the image position of the lower right "visible" optical ray.
heightspecifies the y-component of the image position of the lower right "visible" optical ray.
flipreading out the framebuffer into a bias image implicitly flips the image, when this can be remedied by (pre)flipping in the projection matrix - however when rendering onscreen, the visible image will be flipped then.

Definition at line 996 of file ProjectionParametersPerspective.cpp.

References BIAS::Matrix< T >::SetZero(), and BIAS::Matrix4x4< T >::Transpose().

void ProjectionParametersPerspective::GetIdealImageSize ( unsigned int &  width,
unsigned int &  height 
) const
inherited
void ProjectionParametersPerspective::GetIdealK ( KMatrix K) const
inherited
virtual std::string BIAS::ProjectionParametersBase::GetIdentifier ( ) const
inlinevirtualinherited
virtual const unsigned int& BIAS::ProjectionParametersBase::GetImageHeight ( ) const
inlinevirtualinherited

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
inlinevirtualinherited

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::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::Disp2Depth(), BIAS::EpipolarLine::DrawDistortedLine(), BIAS::PMDImageProc::FitDepthTo2DImage(), BIAS::TriangleMesh::GenerateSimplifiedMesh(), BIAS::TriangleMesh::GenerateTexturedCamera(), BIAS::GenVisiblePoints::GenerateVisiblePoint(), BIAS::DistortionRendering::Init(), BIAS::ImageWarper< StorageType >::Init(), BIAS::PMDWarp::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::operator<<(), 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
inlinevirtualinherited

Returns the image width.

Returns
the image width

Reimplemented in BIAS::ProjectionParametersDynamicLoad.

Definition at line 557 of file ProjectionParametersBase.hh.

virtual BIAS::KMatrix BIAS::ProjectionParametersPerspective::GetK ( ) const
inlinevirtualinherited
virtual BIAS::KMatrix BIAS::ProjectionParametersPerspective::GetKinv ( ) const
inlinevirtualinherited

Definition at line 494 of file ProjectionParametersPerspective.hh.

int ProjectionParametersPerspective::GetMinimalAngleInCorner_ ( const HomgPoint2D corner,
double &  minAngle 
)
protectedinherited

Helper function for minimal angle step calculation.

Definition at line 54 of file ProjectionParametersPerspective.cpp.

References BIAS::Vector3< T >::Normalize(), BIAS::Vector3< T >::NormL2(), and BIAS::Vector3< T >::ScalarProduct().

int ProjectionParametersPerspective::GetMinimalAngularSamplingStep ( double &  minAngleStep)
virtualinherited

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

Author
bartczak 10/2007

Reimplemented from BIAS::ProjectionParametersBase.

Definition at line 110 of file ProjectionParametersPerspective.cpp.

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

void BIAS::ProjectionParametersPerspectiveDepth::GetMinMaxDepth ( float &  minDepth,
float &  maxDepth 
)
inline

get the minimum and maximum depth values with which the calibration has been done

Parameters
minDepth[out],:minimum depth
maxDepth[out],:maximum depth
Author
ischiller

Definition at line 199 of file ProjectionParametersPerspectiveDepth.hh.

Referenced by BIAS::MultipleDepthWarp::CreateDepthCorrectionLUT_().

double BIAS::ProjectionParametersPerspective::GetMinZLocal ( ) const
inlineinherited

minimum z value of ray in image (if computed already)

Definition at line 583 of file ProjectionParametersPerspective.hh.

bool ProjectionParametersBase::GetNextBorderPixel ( PixelIterator it)
virtualinherited

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::ProjectionParametersSphericalFast, 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)
virtualinherited

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.

unsigned ProjectionParametersPerspectiveDepth::GetNrOfDepthErrormodelParameters ( BIAS_TOF_DEPTH_ERROR_MODEL  model)
static

returns the number of depth error model parameters

Parameters
model[in],:the model for which the number of parameters is requested
Returns
number of parameters
Author
ischiller
Date
02/2010

Definition at line 649 of file ProjectionParametersPerspectiveDepth.cpp.

References BIAS::DEPTH_MODEL_LINEAR, BIAS::DEPTH_MODEL_NONE, BIAS::DEPTH_MODEL_POLYNOM, BIAS::DEPTH_MODEL_SPLINE, BIAS::DEPTH_MODEL_UNDEFINED, and BIAS::nrOfSplineParameters_.

unsigned ProjectionParametersPerspectiveDepth::GetNrOfReflectivityParameters ( )
static

returns the number of depth reflectivity error model parameters

Returns
number of parameters
Author
ischiller
Date
02/2010

Definition at line 664 of file ProjectionParametersPerspectiveDepth.cpp.

References BIAS::nrOfReflectivityParameters_.

virtual BIAS::PMatrix BIAS::ProjectionParametersPerspective::GetP ( ) const
inlinevirtualinherited
Examples:
ExampleTriangleMeshQuad.cpp.

Definition at line 482 of file ProjectionParametersPerspective.hh.

References BIAS::PMatrix.

virtual const BIAS::Pose& BIAS::ProjectionParametersBase::GetPose ( ) const
inlinevirtualinherited
virtual BIAS::PoseParametrization BIAS::ProjectionParametersBase::GetPoseParametrization ( ) const
inlinevirtualinherited

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
inlinevirtualinherited
virtual BIAS::Quaternion<double> BIAS::ProjectionParametersBase::GetQ ( ) const
inlinevirtualinherited
RMatrix ProjectionParametersBase::GetR ( ) const
virtualinherited
std::string ProjectionParametersPerspective::GetRadialDistModelString ( BIAS_ProjParaPersp_DISTORTION_TYPE  model)
staticinherited
void BIAS::ProjectionParametersPerspectiveDepth::GetReflectivityCalibrationParameters ( std::vector< double > &  params)
inline

Get the reflectivity calibration parameters.

Parameters
params[out],:the parameters of the reflectivity correction polynomial
Author
ischiller
Date
02/2010

Definition at line 223 of file ProjectionParametersPerspectiveDepth.hh.

void BIAS::ProjectionParametersPerspectiveDepth::GetReflectivityMaxReflectivities ( std::vector< double > &  params)
inline

Get the reflectivity calibration parameters which define the max reflectivity for all depths intervals.

Parameters
params[out],:the parameters of the reflectivity correction polynomial
Author
ischiller
Date
02/2010

Definition at line 244 of file ProjectionParametersPerspectiveDepth.hh.

void BIAS::ProjectionParametersPerspectiveDepth::GetReflectivityMinReflectivities ( std::vector< double > &  params)
inline

Get the reflectivity calibration parameters which define the min reflectivity for all depths intervals.

Parameters
params[out],:the parameters of the reflectivity correction polynomial
Author
ischiller
Date
02/2010

Definition at line 233 of file ProjectionParametersPerspectiveDepth.hh.

void BIAS::ProjectionParametersPerspectiveDepth::GetReflectivityRadiusNormalization ( std::vector< double > &  params)
inline

Get the reflectivity calibration parameters which define the radius vignetting function.

Parameters
params[out],:the parameters of the reflectivity correction polynomial
Author
ischiller
Date
02/2010

Definition at line 254 of file ProjectionParametersPerspectiveDepth.hh.

double BIAS::ProjectionParametersPerspective::GetSkew ( ) const
inlineinherited

Obtain the current camera skew factor.

Definition at line 329 of file ProjectionParametersPerspective.hh.

int ProjectionParametersBase::GetSphericalViewingRange ( const CoordinateTransform3D sphericalReferenceFrame,
double &  minPhi,
double &  maxPhi,
double &  centerPhi,
double &  minTheta,
double &  maxTheta 
)
virtualinherited

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

void BIAS::ProjectionParametersPerspective::GetUndistortion ( double &  kc1,
double &  kc2,
double &  kc3,
double &  kc4 
) const
inlineinherited
void BIAS::ProjectionParametersPerspective::GetUndistortion ( double &  kc1,
double &  kc2,
double &  kc3,
double &  kc4,
double  r0 
) const
inlineinherited

Definition at line 268 of file ProjectionParametersPerspective.hh.

void BIAS::ProjectionParametersPerspective::GetUndistortionBrown ( double &  kc1,
double &  kc2,
double &  kc3,
double &  kc4,
double &  r0 
) const
inlineinherited

Get the lens undistortion parameters including the parameter describing root of the polynomial.

Author
grauel 9/2007
Examples:
ExampleProjectionParametersPerspective.cpp.

Definition at line 441 of file ProjectionParametersPerspective.hh.

References BIAS::DISTYPE_BROWN.

void BIAS::ProjectionParametersPerspective::GetUndistortionInverseRad ( double &  kc1,
double &  kc2,
double &  kc3,
double &  kc4 
) const
inlineinherited

Definition at line 425 of file ProjectionParametersPerspective.hh.

References BIAS::DISTYPE_INVERSE_RAD.

void BIAS::ProjectionParametersPerspective::GetUndistortionInvRad3 ( double &  kc1,
double &  kc2,
double &  kc3 
)
inlineinherited

Definition at line 468 of file ProjectionParametersPerspective.hh.

References BIAS::DISTYPE_INVRAD3.

void BIAS::ProjectionParametersPerspective::GetUndistortionRad3 ( double &  kc1,
double &  kc2,
double &  kc3 
)
inlineinherited

Definition at line 457 of file ProjectionParametersPerspective.hh.

References BIAS::DISTYPE_RAD3.

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

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::MatrixIdentity, BIAS::Vector3< T >::Normalize(), BIAS::Vector3< T >::NormL2(), and BIAS::RMatrixBase::Set().

virtual std::string BIAS::ProjectionParametersBase::GetVideoSourceType ( ) const
inlinevirtualinherited

Reimplemented in BIAS::ProjectionParametersDynamicLoad.

Definition at line 577 of file ProjectionParametersBase.hh.

bool ProjectionParametersPerspectiveDepth::HasDepthDistortion ( ) const

checks whether depth distortion is present

Returns
true if depth distortion is present, false otherwise
Author
ischiller
Date
02/2010

Definition at line 603 of file ProjectionParametersPerspectiveDepth.cpp.

References DepthCalibrationParameters_.

Referenced by DistortDepthMapIP(), and UnDistortDepthMapIP().

bool ProjectionParametersPerspectiveDepth::HasReflectivityDistortion ( ) const

checks whether depth reflectivity distortion is present

Returns
true if depth distortion is present, false otherwise
Author
ischiller
Date
02/2010

Definition at line 613 of file ProjectionParametersPerspectiveDepth.cpp.

References maxNormIntCoeffs_, minNormIntCoeffs_, BIAS::nrOfReflectivityParameters_, and ReflectivityCalibrationParameters_.

void ProjectionParametersPerspectiveDepth::Init ( )
void BIAS::ProjectionParametersPerspective::InitParams_ ( )
inlineprotectedinherited

called from constructors to set zeros to most values

Definition at line 652 of file ProjectionParametersPerspective.hh.

References BIAS::DISTYPE_DEF.

virtual void BIAS::ProjectionParametersBase::InvalidatePose ( )
inlinevirtualinherited
bool BIAS::ProjectionParametersPerspective::IsDistorted ( ) const
inlineinherited
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().

const bool BIAS::ProjectionParametersBase::LookAt ( const Vector3< double > &  eye,
const Vector3< double > &  center,
const Vector3< double > &  up 
)
inlineinherited

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 
)
inlineinherited

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 
)
inlineinherited

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 
)
inlineinherited

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
inlineinherited

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

Author
woelk 09/2006

Definition at line 454 of file Debug.hh.

long int BIAS::Debug::NewDebugLevel ( const std::string &  name)
inlineinherited
ProjectionParametersPerspectiveDepth& BIAS::ProjectionParametersPerspectiveDepth::operator= ( const ProjectionParametersPerspectiveDepth P)
inline
ProjectionParametersPerspectiveDepth& BIAS::ProjectionParametersPerspectiveDepth::operator= ( const ProjectionParametersPerspective P)
inline
virtual bool BIAS::ProjectionParametersBase::PoseValid ( ) const
inlinevirtualinherited
void ProjectionParametersPerspectiveDepth::PrepareSpline_ ( )
protected
void BIAS::Debug::PrintDebugLevel ( std::ostream &  os = std::cout) const
inlineinherited

Definition at line 383 of file Debug.hh.

virtual HomgPoint2D BIAS::ProjectionParametersBase::Project ( const HomgPoint3D X,
bool  IgnoreDistortion = false 
) const
inlinevirtualinherited

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
inlinevirtualinherited

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 ProjectionParametersPerspective::ProjectLocal ( const Vector3< double > &  point,
bool  IgnoreDistortion = false 
) const
virtualinherited

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 194 of file ProjectionParametersPerspective.cpp.

References BIAS::DISTYPE_INVERSE_RAD, BIAS::HomgPoint2D, and BIAS::HomgPoint2D::Homogenize().

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

int ProjectionParametersPerspective::ProjectLocal ( const Vector3< double > &  point,
HomgPoint2D p2d,
bool  IgnoreDistortion = false 
) const
virtualinherited

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 217 of file ProjectionParametersPerspective.cpp.

References BIAS::HomgPoint2D::Homogenize(), BIAS::Vector3< T >::NormL2(), and BIAS::HomgPoint2D::Set().

virtual bool BIAS::ProjectionParametersBase::QValid ( ) const
inlinevirtualinherited

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 long int  lv)
inlineinherited

Definition at line 369 of file Debug.hh.

void BIAS::Debug::RemoveDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 376 of file Debug.hh.

virtual void BIAS::ProjectionParametersPerspective::Rescale ( double  ratio,
const double  offset = 0.0 
)
inlinevirtualinherited

Adapt internal parameters to resampled image.

Parameters
ratio2.0 = downsample by 2, 0.5 = upsample by 2
offsetOffset for principal point (applied before down/upsampling!)
Attention
Delivers only correct results if ratio is chosen to rescale image size to integral image dimensions in both directions. Image size is rounded!

Reimplemented from BIAS::ProjectionParametersBase.

Examples:
ExampleMultipleDepthWarp.cpp.

Definition at line 526 of file ProjectionParametersPerspective.hh.

References BIAS::ProjectionParametersBase::Rescale().

Referenced by BIAS::GLProjectionParametersPerspective::Rescale_().

virtual void BIAS::ProjectionParametersPerspective::Rescale ( unsigned int  width,
unsigned int  height 
)
inlinevirtualinherited

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 535 of file ProjectionParametersPerspective.hh.

References BIAS::ProjectionParametersBase::Rescale().

void BIAS::UnscentedTransform::SetAlpha ( const double  alpha)
inlineinherited

Sets the alpha parameter.

The alpha parameter determines the spread of the sigma points

Definition at line 80 of file UnscentedTransform.hh.

virtual void BIAS::ProjectionParametersPerspective::SetAspectratio ( const double  AspectRatio)
inlinevirtualinherited

Set CCD cell-size in meter, virtual overload to recalculate K_.

Author
streckel

Reimplemented from BIAS::ProjectionParametersBase.

Definition at line 344 of file ProjectionParametersPerspective.hh.

References BIAS::ProjectionParametersBase::SetAspectratio().

void BIAS::UnscentedTransform::SetBeta ( const double  beta)
inlineinherited

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)
inlinevirtualinherited
virtual void BIAS::ProjectionParametersBase::SetCov ( const Matrix< POSE_TYPE > &  Cov)
inlinevirtualinherited
void BIAS::Debug::SetDebugLevel ( const long int  lv)
inlineinherited
void BIAS::Debug::SetDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 325 of file Debug.hh.

void BIAS::Debug::SetDebugStream ( const std::ostream &  os)
inlineinherited

Definition at line 398 of file Debug.hh.

void ProjectionParametersPerspectiveDepth::SetDepthCalibrationModel ( BIAS_TOF_DEPTH_ERROR_MODEL  model)

Set the depth calibration model, one of BIAS_TOF_DEPTH_ERROR_MODEL inits the vectors and reserves spaces.

Parameters
model[in],:BIAS_TOF_DEPTH_ERROR_MODEL depth distortion model (Polynom or Spline...)
Author
ischiller

Definition at line 249 of file ProjectionParametersPerspectiveDepth.cpp.

References BIAS::DEPTH_MODEL_LINEAR, BIAS::DEPTH_MODEL_NONE, BIAS::DEPTH_MODEL_POLYNOM, BIAS::DEPTH_MODEL_SPLINE, BIAS::DEPTH_MODEL_UNDEFINED, DepthCalibrationModel_, DepthCalibrationParameters_, listSplineKnotPoints_, maxDepth_, minDepth_, and BIAS::nrOfSplineParameters_.

void ProjectionParametersPerspectiveDepth::SetDepthCalibrationParameters ( const std::vector< double > &  params,
float  minDepth = 0.0,
float  maxDepth = 15000.0 
)

Set the depth calibration parameters.

Parameters
params[in],:the depth distortion parameters must be of correct length according to set model
minDepth[in],:the minimum depth used for calibration (default=0.0)
maxDepth[in],:the maximum depth used for calibration (default=15000.0)
Author
ischiller

Definition at line 106 of file ProjectionParametersPerspectiveDepth.cpp.

References BIAS::DEPTH_MODEL_LINEAR, BIAS::DEPTH_MODEL_NONE, BIAS::DEPTH_MODEL_POLYNOM, BIAS::DEPTH_MODEL_SPLINE, BIAS::DEPTH_MODEL_UNDEFINED, DepthCalibrationModel_, DepthCalibrationParameters_, listSplineKnotPoints_, maxDepth_, minDepth_, BIAS::nrOfSplineParameters_, and PrepareSpline_().

void ProjectionParametersPerspectiveDepth::SetDepthCalibrationParametersSpline ( const std::vector< double > &  knots,
const std::vector< double > &  controls,
float  minDepth = 0.0,
float  maxDepth = 15000.0 
)

Set the depth calibration parameters for B-Spline model.

Parameters
knots[in],:the knot points of distortion spline must be of correct length (see GetNrOfSplineParameters())
controls[in],:the control points of distortion spline must be of correct length (see GetNrOfSplineParameters())
minDepth[in],:the minimum depth used for calibration (default=0.0)
maxDepth[in],:the maximum depth used for calibration (default=15000.0)
Author
ischiller

Definition at line 173 of file ProjectionParametersPerspectiveDepth.cpp.

References BIAS::DEPTH_MODEL_SPLINE, DepthCalibrationModel_, DepthCalibrationParameters_, listSplineKnotPoints_, maxDepth_, minDepth_, BIAS::nrOfSplineParameters_, and PrepareSpline_().

void ProjectionParametersPerspectiveDepth::SetDepthDistortionToZero ( )

Sets depth distortion to 0.

Author
ischiller
Date
02/2010

Definition at line 626 of file ProjectionParametersPerspectiveDepth.cpp.

References BIAS::DEPTH_MODEL_NONE, DepthCalibrationModel_, DepthCalibrationParameters_, listSplineKnotPoints_, and BIAS::nrOfSplineParameters_.

void BIAS::ProjectionParametersPerspective::SetDistortionType ( BIAS_ProjParaPersp_DISTORTION_TYPE  distype)
inlineinherited

Set type of distortion parameters.

Author
grauel

Definition at line 351 of file ProjectionParametersPerspective.hh.

Referenced by BIAS::Projection::CreatePerspective().

void BIAS::ProjectionParametersPerspective::SetFocalLengthAndAspect ( double  f,
double  AspectRatio 
)
inlineinherited
static void BIAS::Debug::SetGlobalDebugLevel ( long int  lev)
inlinestaticinherited

Definition at line 424 of file Debug.hh.

void ProjectionParametersPerspective::SetIdealImageSize ( unsigned int  width,
unsigned int  height 
)
inherited
virtual void BIAS::ProjectionParametersBase::SetIdentifier ( std::string  name)
inlinevirtualinherited
virtual void BIAS::ProjectionParametersBase::SetImageSize ( const unsigned int  w,
const unsigned int  h 
)
inlinevirtualinherited
int ProjectionParametersPerspective::SetIntrinsics ( double  minPhi,
double  maxPhi,
double  minTheta,
double  maxTheta,
double  angleStep,
double  aspectratio = 1.0 
)
inherited

Method calculates K-Matrix and image size from specified angles.

Angle phi is determining the opening angle and the principle point shift in y direction, while theta is determining the opening angle and the principle point shift in x direction. angleStep is used to derive the resolution, hence the focallength and the aspectratio. The K-Matrix is free of skew.

Valid values for phi are (-M_PI/2, M_PI/2), while theta must lie within (0,M_PI). Phi's reference direction is the A-Vector, theta's is the -H-Vector (negated H-Vector). The extrinsics are left unchanged (which you certainly guessed already).

Returns
-1 if angle values made no sense to the method.
Author
bartczak 10/2007
Examples:
ExampleMultipleDepthWarp.cpp, and ExampleXB3Rectification.cpp.

Definition at line 600 of file ProjectionParametersPerspective.cpp.

References BIAS::SphericalCoordinates::GetCartesianRayFromFullPhi(), BIAS::HomgPoint3D::GetEuclidean(), BIAS::CoordinateTransform3D::RotateLocalFrame(), and BIAS::SphericalCoordinates::SetAffineBase().

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

int ProjectionParametersPerspective::SetIntrinsics ( Vector3< double > &  p,
Vector3< double > &  q,
unsigned int  width,
unsigned int  height 
)
inherited

Definition at line 701 of file ProjectionParametersPerspective.cpp.

virtual void BIAS::ProjectionParametersPerspective::SetK ( const KMatrix K)
inlinevirtualinherited
void BIAS::ProjectionParametersPerspective::SetMinZLocal ( const double &  minz)
inlineinherited

sets minimum z value of unit-ray in local CCS to be accepted as in front of camera (e.g.

DoesPointProjectIntoImage)

Definition at line 578 of file ProjectionParametersPerspective.hh.

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

virtual void BIAS::ProjectionParametersPerspective::SetP ( const PMatrix P)
inlinevirtualinherited
virtual void BIAS::ProjectionParametersBase::SetPose ( const BIAS::Pose  pose)
inlinevirtualinherited
virtual void BIAS::ProjectionParametersBase::SetPoseParametrization ( const BIAS::PoseParametrization pp)
inlinevirtualinherited
virtual void BIAS::ProjectionParametersPerspective::SetPrincipal ( const double  x,
const double  y 
)
inlinevirtualinherited
virtual void BIAS::ProjectionParametersBase::SetQ ( const BIAS::Quaternion< double > &  Q)
inlinevirtualinherited
virtual void BIAS::ProjectionParametersBase::SetQC ( const BIAS::Quaternion< double > &  Q,
const BIAS::Vector3< double > &  C 
)
inlinevirtualinherited
virtual void BIAS::ProjectionParametersBase::SetR ( const BIAS::RMatrix R)
inlinevirtualinherited
void ProjectionParametersPerspectiveDepth::SetReflectivityCalibrationParameters ( const std::vector< double > &  params)

Set the reflectivity calibration parameters.

Parameters
params[in],:the parameters of the reflectivity correction polynomial
Author
ischiller
Date
02/2010

Definition at line 244 of file ProjectionParametersPerspectiveDepth.cpp.

References ReflectivityCalibrationParameters_.

void ProjectionParametersPerspectiveDepth::SetReflectivityDepthDistortionToZero ( )

Sets depth reflectivity distortion to 0.

Author
ischiller
Date
02/2010

Definition at line 641 of file ProjectionParametersPerspectiveDepth.cpp.

References BIAS::nrOfReflectivityParameters_, and ReflectivityCalibrationParameters_.

int ProjectionParametersPerspectiveDepth::SetReflectivityNormalizationParameters ( const std::vector< double > &  depthValues,
const std::vector< double > &  minInt,
const std::vector< double > &  maxInt,
const std::vector< double > &  radiusValues,
const std::vector< double > &  radiusIntensities 
)

sets the reflectivity calibration parameters and Fit polynomials to radial and reflectivity normalization parameters

Returns
0 on sucess, < 0 if polynomial fitting fails
Author
ischiller

Definition at line 190 of file ProjectionParametersPerspectiveDepth.cpp.

References depthIntNormValues_, BIAS::PolynomialSolve::FitPolynomial(), maxNormIntCoeffs_, minNormIntCoeffs_, radiusIntNormCoeffs_, and radiusIntNormValues_.

void BIAS::ProjectionParametersPerspective::SetSimplePerspective ( const double  FoV = M_PI/2,
const unsigned int  width = 512,
const unsigned int  height = 512 
)
inlineinherited

Sets the parameters for a simple perspective camera with imagesize 512x512, focal length 512 (fov = 90 deg.), princ.point (255.5,255.5) and without distortion.

Examples:
ExampleStencilBuffer.cpp, and ExampleTransformToCartesian.cpp.

Definition at line 287 of file ProjectionParametersPerspective.hh.

References BIAS::DISTYPE_DEF.

Referenced by BIAS::GLProjectionParametersBase::DrawWithMatchedParamsAndViewport_().

void BIAS::ProjectionParametersPerspective::SetSkew ( double  skew)
inlineinherited

Set the current camera skew factor.

Definition at line 323 of file ProjectionParametersPerspective.hh.

void BIAS::ProjectionParametersPerspective::SetUndistortion ( double  kc1,
double  kc2 
)
inlineinherited
void BIAS::ProjectionParametersPerspective::SetUndistortion ( double  kc1,
double  kc2,
double  kc3,
double  kc4 
)
inlineinherited

Set the lens undistortion parameters.

Definition at line 373 of file ProjectionParametersPerspective.hh.

References BIAS::DISTYPE_DEF.

void BIAS::ProjectionParametersPerspective::SetUndistortionBrown ( double  kc1,
double  kc2,
double  kc3,
double  kc4,
double  r0 
)
inlineinherited

Set the lens undistortion parameters including the root of the polynomial.

Author
grauel 9/2007
Examples:
ExampleProjectionParametersPerspective.cpp.

Definition at line 386 of file ProjectionParametersPerspective.hh.

References BIAS::DISTYPE_BROWN.

Referenced by BIAS::Projection::CreatePerspective().

void BIAS::ProjectionParametersPerspective::SetUndistortionInverseRad ( double  kc1,
double  kc2,
double  kc3,
double  kc4 
)
inlineinherited
void BIAS::ProjectionParametersPerspective::SetUndistortionInverseRad3 ( double  kc1,
double  kc2,
double  kc3 
)
inlineinherited
void BIAS::ProjectionParametersPerspective::SetUndistortionRad3 ( double  kc1,
double  kc2,
double  kc3 
)
inlineinherited
void BIAS::UnscentedTransform::SetUseSVD ( const bool  use_svd)
inlineinherited

Definition at line 89 of file UnscentedTransform.hh.

void ProjectionParametersBase::SetVideoSourceType ( const std::string &  name)
virtualinherited

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
inlineinherited

prints all internally known debuglevels

Author
woelk 09/2006

Definition at line 496 of file Debug.hh.

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

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

int ProjectionParametersPerspective::TransformCartesianToPolarCoordinates ( const BIAS::Image< float > &  cartesianDepth,
BIAS::Image< float > &  polarDepth 
)
inherited
float ProjectionParametersPerspective::TransformCartesianToPolarCoordinates ( const HomgPoint2D pos,
const float  depthCartesian 
)
inherited

transforms a depth value from cartesian coordinates to polar coordinates

Returns
the transformed depth in polar coordinates
Author
ischiller
Date
06/2010

Definition at line 808 of file ProjectionParametersPerspective.cpp.

int ProjectionParametersPerspective::TransformPolarToCartesianCoordinates ( const BIAS::Image< float > &  polarDepth,
BIAS::Image< float > &  cartesianDepth 
)
inherited
float ProjectionParametersPerspective::TransformPolarToCartesianCoordinates ( const HomgPoint2D pos,
const float  depthPolar 
)
inherited

transforms a depth value from polar coodinates to cartesian coordinates

Returns
the transformed depth in cartesian coordinates
Author
ischiller
Date
06/2010

Definition at line 864 of file ProjectionParametersPerspective.cpp.

bool ProjectionParametersPerspective::Undistort ( BIAS::HomgPoint2D point2d) const
virtualinherited

Using the Matlab camera calibration toolbox parameters for an undistortion of distorted coordinates.

TODO: faster implementation via Lookup-table

Author
streckel 06/2004

Implements BIAS::ProjectionParametersBase.

Examples:
ExampleProjectionParametersPerspective.cpp.

Definition at line 345 of file ProjectionParametersPerspective.cpp.

References BIAS::HomgPoint2D::Homogenize(), BIAS::HomgPoint2D::IsAtInfinity(), and BIAS::HomgPoint2D::Set().

Referenced by BIAS::OutputLensDistortion::CreateLookupTable(), and BIAS::DistortionRendering::Init().

bool BIAS::ProjectionParametersPerspective::Undistort_ ( const double  dist_x,
const double  dist_y,
double &  x,
double &  y 
) const
inlineprotectedinherited
void ProjectionParametersPerspectiveDepth::UnDistortDepth ( HomgPoint2D const &  pos,
float &  d,
bool  bIsInCartesianCoords = false 
)
int ProjectionParametersPerspectiveDepth::UnDistortDepthMapIP ( BIAS::Image< float > &  depthMap,
bool  bIsInCartesianCoords = false 
)

Undistorts the passed depth map in place.

Uses method UnDistortDepth.

Returns
0 if everything went smoothly, -1 if parameter's size didn't fit the input image's size.
Parameters
depthMap[in][out],:the depth image to undistort, will be altered
bIsInCartesianCoords[in],:indicates whether image has been transformed to cartesian coordinates
Author
ischiller

Definition at line 405 of file ProjectionParametersPerspectiveDepth.cpp.

References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), HasDepthDistortion(), BIAS::ProjectionParametersBase::height_, BIAS::ProjectionParametersPerspective::TransformCartesianToPolarCoordinates(), BIAS::ProjectionParametersPerspective::TransformPolarToCartesianCoordinates(), UnDistortDepth(), and BIAS::ProjectionParametersBase::width_.

void ProjectionParametersPerspectiveDepth::UnDistortReflectivity ( HomgPoint2D const &  pos,
float &  depth,
float &  Reflectivity,
bool  bIsInCartesianCoords = false 
)

UnDistort Reflectivity value i at image position pos.

Parameters
depth[in][out],:the depth value, will be altered
Reflectivity[in],:the reflectivity at that position
radius[in],:current offset from principle point
Author
ischiller
Date
02/2010

Definition at line 513 of file ProjectionParametersPerspectiveDepth.cpp.

References BIAS::PolynomialSolve::EvaluatePolynomial(), BIAS::ProjectionParametersBase::GetPrincipal(), maxNormIntCoeffs_, minNormIntCoeffs_, radiusIntNormCoeffs_, ReflectivityCalibrationParameters_, BIAS::ProjectionParametersPerspective::TransformCartesianToPolarCoordinates(), and BIAS::ProjectionParametersPerspective::TransformPolarToCartesianCoordinates().

Referenced by UnDistortReflectivityDepthIP().

int ProjectionParametersPerspectiveDepth::UnDistortReflectivityDepthIP ( BIAS::Image< float > &  depthMap,
BIAS::Image< float > &  ReflectivityImage,
bool  bIsInCartesianCoords = false 
)

Undistort Reflectivity error in depth map.

Parameters
depthMap[in][out],:the depth map, will be altered
ReflectivityImage[in],:the reflectivity image
Author
ischiller
Date
02/2010

Definition at line 571 of file ProjectionParametersPerspectiveDepth.cpp.

References BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), BIAS::ProjectionParametersPerspective::TransformCartesianToPolarCoordinates(), BIAS::ProjectionParametersPerspective::TransformPolarToCartesianCoordinates(), and UnDistortReflectivity().

Matrix3x3< double > ProjectionParametersPerspective::UnProjectCovLocal ( const HomgPoint2D pos,
const Matrix3x3< double > &  cov2D,
bool  IgnoreDistortion = false,
bool  Normalize = false 
)
virtualinherited

unprojects the covariance matrices to K=Identity camera Fast implementation for IgnorDistortion = true and Normalize = false

Author
woelk 11/2007

Reimplemented from BIAS::ProjectionParametersBase.

Definition at line 912 of file ProjectionParametersPerspective.cpp.

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

void ProjectionParametersPerspective::UnProjectLocal ( const HomgPoint2D pos,
Vector3< double > &  pointOnRay,
Vector3< double > &  direction,
bool  IgnoreDistortion = false 
) const
virtualinherited
HomgPoint3D ProjectionParametersPerspective::UnProjectToImagePlane ( const HomgPoint2D pos,
const double &  depth = 1.0,
bool  IgnoreDistortion = false 
) const
virtualinherited

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 252 of file ProjectionParametersPerspective.cpp.

References BIAS::Equal(), BIAS::HomgPoint3D, and BIAS::Vector3< T >::NormL2().

HomgPoint3D ProjectionParametersBase::UnProjectToPoint ( const HomgPoint2D pos,
double  depth,
bool  IgnoreDistortion = false 
) const
virtualinherited

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

HomgPoint3D ProjectionParametersBase::UnProjectToPoint ( const HomgPoint2D pos,
const double  depth,
const ProjectionParametersBase proj,
bool  IgnoreDistortion = false 
) const
virtualinherited
HomgPoint3D ProjectionParametersPerspective::UnProjectToPointByZ ( const HomgPoint2D pos,
const double &  zDistance,
bool  IgnoreDistortion = false 
) const
virtualinherited

Definition at line 237 of file ProjectionParametersPerspective.cpp.

Vector3< double > ProjectionParametersBase::UnProjectToPointLocal ( const HomgPoint2D pos,
const double &  depth,
bool  IgnoreDistortion = false 
) const
virtualinherited

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::ProjectionParametersDynamicLoad, BIAS::ProjectionParametersSpherical, BIAS::ProjectionParametersSphericalFast, BIAS::ProjectionParametersCylindric, BIAS::ProjectionParametersProjective, BIAS::ProjectionParametersOrthographic, and BIAS::ProjectionParametersBufferedRay.

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 > &  origin,
Vector3< double > &  direction,
bool  ignoreDistortion = false 
) const
inlinevirtualinherited

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 > &  direction,
bool  ignoreDistortion = false 
) const
inlinevirtualinherited

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,
const ProjectionParametersBase proj,
bool  ignoreDistortion = false 
) const
inlinevirtualinherited

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

void ProjectionParametersPerspective::UpdateMinZLocal ( )
inherited

run along image border and compute maximum field of view, save in minzlocal

Definition at line 933 of file ProjectionParametersPerspective.cpp.

References BIAS::Equal(), BIAS::HomgPoint2D, BIAS::Vector3< T >::NormL2(), BIAS::PixelIterator::x, and BIAS::PixelIterator::y.

virtual void BIAS::ProjectionParametersBase::ValidatePose ( )
inlinevirtualinherited
double ProjectionParametersPerspective::ViewDifference ( const ProjectionParametersBase pPPB) const
virtualinherited

compute scalar dissimilarity between two cameras based upon rough approximation of field of view overlap for pure rotation and penalty term for translation: 0=identical

Reimplemented from BIAS::ProjectionParametersBase.

Definition at line 880 of file ProjectionParametersPerspective.cpp.

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

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 ProjectionParametersPerspectiveDepth::XMLGetClassName ( std::string &  TopLevelTag,
double &  Version 
) const
virtual

specialization of XML block name function

Reimplemented from BIAS::ProjectionParametersPerspective.

Definition at line 691 of file ProjectionParametersPerspectiveDepth.cpp.

int ProjectionParametersPerspectiveDepth::XMLIn ( const xmlNodePtr  Node,
XMLIO XMLObject 
)
virtual
int ProjectionParametersPerspectiveDepth::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 ProjectionParametersPerspectiveDepth p 
)
friend

Definition at line 394 of file ProjectionParametersPerspectiveDepth.hh.

Member Data Documentation

long int BIAS::Debug::_liDebugLevel
protectedinherited

Definition at line 510 of file Debug.hh.

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

long int BIAS::Debug::_liNextDebugLevel
protectedinherited

new concept, debuglevel are managed here in the debug class

Definition at line 516 of file Debug.hh.

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

std::map<std::string, long int> BIAS::Debug::_String2Debuglevel
protectedinherited

Definition at line 517 of file Debug.hh.

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

std::ostream BIAS::Debug::_zDebugStream
staticprotectedinherited

Definition at line 511 of file Debug.hh.

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

double BIAS::UnscentedTransform::Alpha_
protectedinherited

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_
protectedinherited
double BIAS::UnscentedTransform::Beta_
protectedinherited

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::ProjectionParametersPerspectiveDepth::bSplinePrepared_
protected
bool BIAS::ProjectionParametersBase::CValid_
protectedinherited
long int BIAS::ProjectionParametersPerspectiveDepth::D_DEPTH_DISTORTION
protected

Definition at line 377 of file ProjectionParametersPerspectiveDepth.hh.

Referenced by DistortDepth(), and Init().

BIAS_TOF_DEPTH_ERROR_MODEL BIAS::ProjectionParametersPerspectiveDepth::DepthCalibrationModel_
protected
std::vector<double> BIAS::ProjectionParametersPerspectiveDepth::DepthCalibrationParameters_
protected
std::vector<double> BIAS::ProjectionParametersPerspectiveDepth::depthIntNormValues_
protected
BIAS_ProjParaPersp_DISTORTION_TYPE BIAS::ProjectionParametersPerspective::distType_
protectedinherited
double BIAS::ProjectionParametersPerspective::focallength_
protectedinherited

focal length is stored in pixel for cellSizeX

Definition at line 676 of file ProjectionParametersPerspective.hh.

Referenced by BIAS::ProjectionParametersPerspective::DoIntrinsicsDiffer(), and BIAS::ProjectionParametersPerspective::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0
staticprotectedinherited

Definition at line 513 of file Debug.hh.

unsigned int BIAS::ProjectionParametersBase::height_
protectedinherited
unsigned int BIAS::ProjectionParametersPerspective::idealImageHeight_
protectedinherited
unsigned int BIAS::ProjectionParametersPerspective::idealImageWidth_
protectedinherited

ideal image size

Definition at line 692 of file ProjectionParametersPerspective.hh.

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

std::string BIAS::ProjectionParametersBase::identifier_
protectedinherited
KMatrix BIAS::ProjectionParametersPerspective::invK_
protectedinherited
KMatrix BIAS::ProjectionParametersPerspective::K_
protectedinherited

focal length, aspect ratio, principal point in K_, inverse in invK_

Definition at line 673 of file ProjectionParametersPerspective.hh.

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

double BIAS::UnscentedTransform::Kappa_
protectedinherited

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::ProjectionParametersPerspective::kc1_
protectedinherited
double BIAS::ProjectionParametersPerspective::kc2_
protectedinherited
double BIAS::ProjectionParametersPerspective::kc3_
protectedinherited
double BIAS::ProjectionParametersPerspective::kc4_
protectedinherited
std::vector<double> BIAS::ProjectionParametersPerspectiveDepth::listSplineKnotPoints_
protected
float BIAS::ProjectionParametersPerspectiveDepth::maxDepth_
protected
std::vector<double> BIAS::ProjectionParametersPerspectiveDepth::maxNormIntCoeffs_
protected
float BIAS::ProjectionParametersPerspectiveDepth::minDepth_
protected
std::vector<double> BIAS::ProjectionParametersPerspectiveDepth::minNormIntCoeffs_
protected
double BIAS::ProjectionParametersPerspective::minZlocal_
protectedinherited

rigorously clip unit rays in CCS with z smaller than this values

Definition at line 695 of file ProjectionParametersPerspective.hh.

Referenced by BIAS::operator<<(), and BIAS::ProjectionParametersPerspective::operator=().

Pose BIAS::ProjectionParametersBase::Pose_
protectedinherited
double BIAS::ProjectionParametersBase::principalX_
protectedinherited
double BIAS::ProjectionParametersBase::principalY_
protectedinherited
bool BIAS::ProjectionParametersBase::QValid_
protectedinherited
double BIAS::ProjectionParametersPerspective::r0_
protectedinherited
std::vector<double> BIAS::ProjectionParametersPerspectiveDepth::radiusIntNormCoeffs_
protected
std::vector<double> BIAS::ProjectionParametersPerspectiveDepth::radiusIntNormValues_
protected
std::vector<double> BIAS::ProjectionParametersPerspectiveDepth::ReflectivityCalibrationParameters_
protected
double BIAS::ProjectionParametersPerspective::skew_
protectedinherited

skew calibration parameter

Definition at line 689 of file ProjectionParametersPerspective.hh.

Referenced by BIAS::operator<<(), and BIAS::ProjectionParametersPerspective::operator=().

BIAS::Interpolator BIAS::ProjectionParametersPerspectiveDepth::splineInterpolator_
protected

Definition at line 384 of file ProjectionParametersPerspectiveDepth.hh.

Referenced by DistortDepth(), and PrepareSpline_().

BIAS::Interpolator BIAS::ProjectionParametersPerspectiveDepth::splineInterpolatorUndist_
protected

Definition at line 385 of file ProjectionParametersPerspectiveDepth.hh.

Referenced by PrepareSpline_(), and UnDistortDepth().

bool BIAS::UnscentedTransform::UseSVD_
protectedinherited
bool BIAS::ProjectionParametersBase::ustIgnoreDistortion_
protectedinherited

Definition at line 803 of file ProjectionParametersBase.hh.

bool BIAS::ProjectionParametersBase::ustNormalize_
protectedinherited

Definition at line 804 of file ProjectionParametersBase.hh.

bool BIAS::ProjectionParametersBase::ustTransformIntoImage_
protectedinherited

unscented transform worker variables

Definition at line 802 of file ProjectionParametersBase.hh.

std::string BIAS::ProjectionParametersBase::videoSourceType_
protectedinherited
unsigned int BIAS::ProjectionParametersBase::width_
protectedinherited

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