26 #include "Geometry/ProjectionParametersPerspective.hh"
28 #include "SphericalCoordinates.hh"
35 const unsigned int halfWidth,
36 const unsigned int halfHeight,
39 cutOutParams = (*this);
40 Vector2<int> UL(centerPoint[0]-halfWidth, centerPoint[1]-halfHeight);
41 Vector2<int> LR(centerPoint[0]+halfWidth, centerPoint[1]+halfHeight);
42 cutOutParams.
width_ = 2 * halfWidth + 1;
43 cutOutParams.
height_ = 2 * halfHeight + 1;
45 cutOutParams.
SetPrincipal(principalX_ - UL[0], principalY_ - UL[1]);
47 return ((UL[0]>=0) && (UL[0]<(
int)width_) &&
48 (UL[1]>=0) && (UL[1]<(
int)height_) &&
49 (LR[0]>=0) && (LR[0]<(
int)width_) &&
50 (LR[1]>=0) && (LR[1]<(
int)height_));
58 UnProjectLocal(corner, p, ray);
59 if(ray.
NormL2()<1e-12)
return -1;
68 neighbour[x] = corner;
69 neighbour[y] = corner;
70 neighbour[diag] = corner;
71 if(neighbour[x][0] == 0) {
73 neighbour[diag][0]+=1;
76 neighbour[diag][0]-=1;
79 if(neighbour[y][1] == 0) {
81 neighbour[diag][1]+=1;
84 neighbour[diag][1]-=1;
88 for(
unsigned int i=0; i<3; i++) {
90 UnProjectLocal(neighbour[i], p, neighbourRay[i]);
91 if(neighbourRay[i].NormL2() < 1e-12) {
98 minAngle = (angleDiff[x] < angleDiff[y]) ? angleDiff[x] : angleDiff[y];
99 if(minAngle > angleDiff[diag]) {
100 minAngle = angleDiff[diag];
119 corner[1][1] = height_-1;
122 corner[2][0] = width_-1;
123 corner[2][1] = height_-1;
126 corner[3][0] = width_-1;
131 for(
unsigned int i=0; i<4; i++) {
132 if(GetMinimalAngleInCorner_(corner[i], minAngle[i])!=0) {
136 double minAngleStepTemp[2];
137 minAngleStepTemp[0] = (minAngle[0]<minAngle[1]) ? minAngle[0] : minAngle[1];
138 minAngleStepTemp[1] = (minAngle[2]<minAngle[3]) ? minAngle[2] : minAngle[3];
141 (minAngleStepTemp[0]<minAngleStepTemp[1]) ?
142 minAngleStepTemp[0] : minAngleStepTemp[1];
161 if(kc1_ != ppp->
kc1_ || kc2_ != ppp->
kc2_ ||
162 kc3_ != ppp->
kc3_ || kc4_ != ppp->
kc4_)
171 bool IgnoreDistortion)
const
176 if(localX[2]/localX.
NormL2() > minZlocal_) {
178 x = ProjectLocal(localX, IgnoreDistortion);
181 if(x[0] == 0.0 && x[1]==0.0 && x[2]==0.0){
186 return (x[0]>=-0.5 && x[1]>=-0.5 &&
187 x[0]<=(
double)(width_)-0.5 && x[1]<=(
double)(height_)-0.5 );
198 if (point[2] <= minZlocal_)
return HomgPoint2D(0,0,0);
201 if (!IgnoreDistortion) {
202 int res = DistortNormalized(pos2);
218 bool IgnoreDistortion)
const
220 if (point.
NormL2()<1e-6) {
225 if (!IgnoreDistortion) {
226 int res = DistortNormalized(pos2);
227 if (res!=0) {
return -2; }
238 const double& zDistance,
239 bool ignoreDistortion)
const
242 UnProjectLocal(pos, p,d, ignoreDistortion);
244 d *= (zDistance/d[2]);
247 return Pose_.LocalToGlobal(local);
253 bool IgnoreDistortion)
const
256 UnProjectLocal(pos, p, d, IgnoreDistortion);
263 return Pose_.LocalToGlobal(local);
272 if (!IgnoreDistortion) {
273 if (!Undistort(mpos)){
274 BIASWARNONCE(
"ProjectionParametersPerspective::UnProjectLocal(): "
275 <<
"Error undistorting point: " << cPos)
282 invK_.Mult(mpos, direction);
283 const double n = direction.
NormL2();
284 if (!
Equal(n,0.0, 1e-15)){
287 BIASWARNONCE(
"cannot normalize local ray - division by zero otherwise")
296 if (kc1_==0 && kc2_==0 && kc3_==0 && kc4_==0)
return 0;
301 Distort_(point2d[0], point2d[1], dx, dy);
303 BIASWARNONCE(
"Error distorting point with inverse rad distortion" << point2d)
316 if (kc1_==0 && kc2_==0 && kc3_==0 && kc4_==0 && r0_==0)
return true;
326 point2d = invK_*point2d;
329 Distort_(point2d[0],point2d[1], point2d[0],point2d[1]);
331 BIASWARN(
"Error distorting point with inverse rad distortion " << point2d)
339 point2d = K_*point2d;
349 if (kc1_==0 && kc2_==0 && kc3_==0 && kc4_==0 && r0_==0){
359 point2d = invK_*point2d;
363 if (!Undistort_(point2d[0], point2d[1], point2d[0], point2d[1])){
364 point2d.
Set(0., 0., 0.);
370 point2d = K_*point2d;
378 return string(
"None");
380 return string(
"Bouguet_Radial");
382 return string(
"Bouguet_Full");
384 return string(
"Brown");
386 return string(
"Inverse_Radial");
388 return string(
"Unknown");
392 #ifdef BIAS_HAVE_XML2
396 TopLevelTag =
"ProjectionParametersPerspective";
411 xmlNodePtr childNode;
412 XMLObject.
addAttribute(Node,
"Focallength", focallength_);
414 childNode = XMLObject.
addChildNode(Node,
string(
"Distortion"));
425 XMLObject.
addAttribute(childNode,
"Type",
"DISTYPE_NONE");
428 XMLObject.
addAttribute(childNode,
"Type",
"DISTYPE_BROWN");
432 XMLObject.
addAttribute(childNode,
"Type",
"DISTYPE_DEF");
435 XMLObject.
addAttribute(childNode,
"Type",
"DISTYPE_RADIAL");
438 XMLObject.
addAttribute(childNode,
"Type",
"DISTYPE_INVERSE_RAD");
441 XMLObject.
addAttribute(childNode,
"Type",
"DISTYPE_RAD3");
444 XMLObject.
addAttribute(childNode,
"Type",
"DISTYPE_INVRAD3");
447 BIASWARN(
"Unknown distortion type. only default parameters have been saved." << distType_);
461 xmlNodePtr childNode;
462 if ((childNode = XMLObject.
getChild(Node, TopLevelName))==NULL) {
463 BIASERR(
"Error in xml, no tag" << TopLevelName);
471 if ((childNode = XMLObject.
getChild(Node,
"Distortion"))!=NULL) {
478 xmlAttrPtr typeAttr = NULL;
485 if(typestr ==
string(
"DISTYPE_NONE"))
489 else if(typestr ==
string(
"DISTYPE_BROWN"))
494 else if(typestr ==
string(
"DISTYPE_DEF"))
498 else if(typestr ==
string(
"DISTYPE_RADIAL"))
502 else if(typestr ==
string(
"DISTYPE_INVERSE_RAD"))
506 else if(typestr ==
string(
"DISTYPE_INVRAD3"))
510 else if(typestr ==
string(
"DISTYPE_RAD3"))
524 #endif // BIAS_HAVE_XML2
529 unsigned int imageWidth, imageHeight;
530 GetImageSize(imageWidth, imageHeight);
537 double minX = p[0], maxX = p[0], minY = p[1], maxY = p[1];
539 for (
unsigned int x = 0; x < imageWidth; x++) {
544 if (p[0] < minX) minX = p[0];
545 if (p[0] > maxX) maxX = p[0];
546 if (p[1] < minY) minY = p[1];
547 if (p[1] > maxY) maxY = p[1];
553 if (p[0] < minX) minX = p[0];
554 if (p[0] > maxX) maxX = p[0];
555 if (p[1] < minY) minY = p[1];
556 if (p[1] > maxY) maxY = p[1];
559 for (
unsigned int y = 0; y < imageHeight; y++) {
564 if (p[0] < minX) minX = p[0];
565 if (p[0] > maxX) maxX = p[0];
566 if (p[1] < minY) minY = p[1];
567 if (p[1] > maxY) maxY = p[1];
573 if (p[0] < minX) minX = p[0];
574 if (p[0] > maxX) maxX = p[0];
575 if (p[1] < minY) minY = p[1];
576 if (p[1] > maxY) maxY = p[1];
579 double focalLengthX = idealImageWidth_ / (maxX - minX);
580 double focalLengthY = idealImageHeight_ / (maxY - minY);
581 double principalX = -focalLengthX * minX;
582 double principalY = -focalLengthY * minY;
585 K[0][0] = focalLengthX;
586 K[1][1] = focalLengthY;
588 K[0][2] = principalX;
589 K[1][2] = principalY;
595 idealImageWidth_ = width;
596 idealImageHeight_ = height;
601 double minTheta,
double maxTheta,
602 double angleStep,
double aspectratio)
604 bool wrongAngles =
false;
605 wrongAngles = (minPhi <= -M_PI/2.0) || (maxPhi >= M_PI/2.0) || (minPhi>=maxPhi);
606 wrongAngles = wrongAngles || (minTheta <= 0) || (maxTheta >= M_PI)
607 || (minTheta>=maxTheta);
608 wrongAngles = wrongAngles || (angleStep<=0);
610 BIASERR(
"invalid angle values");
630 double minStepSize = 0;
634 bool ppIsInPhiRange = (minPhi<0) && (0<maxPhi);
635 bool ppIsInThetaRange = (minTheta<M_PI/2.0) && (M_PI/2.0<maxTheta);
637 if(ppIsInPhiRange && ppIsInThetaRange){
638 minStepSize = tan(angleStep);
641 double phiClose = (fabs(minPhi) < fabs(maxPhi)) ? minPhi : maxPhi;
642 double thetaClose = (fabs(minTheta-M_PI/2.0) < fabs(maxTheta-M_PI/2.0)) ? minTheta : maxTheta;
643 if(ppIsInPhiRange) phiClose = 0.0;
644 if(ppIsInThetaRange) thetaClose = M_PI/2.0;
653 double radius = sqrt(p[0]*p[0] + p[1]*p[1]);
654 double alpha = atan(radius);
655 minStepSize = tan(alpha + angleStep) - radius;
658 double idealSampleDistanceX = minStepSize / sqrt( 1.0 + 1.0/(aspectratio*aspectratio) );
659 BIASASSERT(idealSampleDistanceX>0);
680 double widthInSpace = pLR[0] - pUL[0];
681 BIASASSERT(widthInSpace>0);
682 double heightInSpace = pLR[1] - pUL[1];
683 BIASASSERT(heightInSpace>0);
685 unsigned int width =
static_cast<unsigned int>(rint( ceil(widthInSpace/idealSampleDistanceX) ));
686 unsigned int height =
static_cast<unsigned int>(rint( ceil(aspectratio*heightInSpace/idealSampleDistanceX) ));
687 SetImageSize(width, height);
689 focallength_ =
static_cast<double>(width)/widthInSpace;
690 double focallengthY =
static_cast<double>(height)/heightInSpace;
691 aspectratio_ = focallengthY/focallength_;
693 principalX_ = -focallength_*pUL[0] - 0.5;
694 principalY_ = -focallengthY*pUL[1] - 0.5;
702 unsigned int imgWidth,
unsigned int imgHeight)
705 if(imgWidth <= 0 && imgHeight <= 0) {
721 SetImageSize(imgWidth, imgHeight);
730 principalX_ = (b[0]*p[0]-a[0]*q[0]) / (p[0]-q[0]);
731 focallength_ = (a[0]-principalX_) / p[0];
734 focallength_ = (b[0] - principalX_) / q[0];
738 principalY_ = (b[1]*p[1]-a[1]*q[1]) / (p[1]-q[1]);
739 k = (a[1]-principalY_) / p[1];
742 k = (b[1] - principalY_) / q[1];
745 aspectratio_ = k / focallength_;
755 width = idealImageWidth_;
756 height = idealImageHeight_;
762 K_[0][0] = focallength_;
763 K_[1][1] = aspectratio_ * focallength_;
765 K_[0][2] = principalX_;
766 K_[1][2] = principalY_;
773 unsigned w = cartesianDepth.
GetWidth();
792 double px=0,py=0; GetPrincipal(px,py);
793 double fx=0,fy=0; GetFocalLength(fx); fy=fx*GetAspectratio();
794 for(
unsigned y=0;y<h;y++){
795 for(
unsigned x=0;x<w;x++){
796 float alpha = atan(
float((x-px)/fx));
797 float beta = atan(
float((py-y)/ sqrt( pow((x-px)*(fy/fx),2) + pow(fy,2))));
799 for(
unsigned k=0;k<c;k++){
800 idaPol[y][x*c+k] = idaCart[y][x*c+k]/(cos(alpha)*cos(beta));
815 double px=0,py=0; GetPrincipal(px,py);
816 double fx=0,fy=0; GetFocalLength(fx); fy=fx*GetAspectratio();
818 float alpha = atan(
float((pos[0]-px)/fx));
819 float beta = atan(
float((py-pos[1])/ sqrt( pow((pos[0]-px)*(fy/fx),2) + pow(fy,2))));
821 return depthCartesian/(cos(alpha)*cos(beta));
832 cartesianDepth.
Init(w,h,c);
835 cartesianDepth.
ReInit(w,h,c);
849 double px=0,py=0; GetPrincipal(px,py);
850 double fx=0,fy=0; GetFocalLength(fx); fy=fx*GetAspectratio();
851 for(
unsigned y=0;y<h;y++){
852 for(
unsigned x=0;x<w;x++){
853 float alpha = atan(
float((x-px)/fx));
854 float beta = atan(
float((py-y)/ sqrt( pow((x-px)*(fy/fx),2) + pow(fy,2))));
855 for(
unsigned k=0;k<c;k++){
856 idaCart[y][x*c+k] = cos(alpha)*cos(beta)*idaPol[y][x*c+k];
872 double px=0,py=0; GetPrincipal(px,py);
873 double fx=0,fy=0; GetFocalLength(fx); fy=fx*GetAspectratio();
874 float alpha = atan(
float((pos[0]-px)/fx));
875 float beta = atan(
float((py-pos[1])/ sqrt( pow((pos[0]-px)*(fy/fx),2) + pow(fy,2))));
876 return cos(alpha)*cos(beta)*depthPolar;
885 BIASERR(
"View difference for different projection models requested !");
893 A[0] = R[0][2]; A[1] = R[1][2]; A[2] = R[2][2];
896 A0[0] = R0[0][2]; A0[1] = R0[1][2]; A0[2] = R0[2][2];
901 double f = 0.5*(K0[0][0] + K0[1][1]);
902 double halfw = double(width_ + height_) / 4.0;
903 double coshalffieldofview = cos(atan(halfw/f));
905 double newness = (GetC()-C0).NormL2();
906 newness += 1.0/(1.0-coshalffieldofview)*(1.0-fabs(A.ScalarProduct(A0)));
913 bool IgnoreDistortion,
bool Normalize)
915 if (!IgnoreDistortion || Normalize){
940 GetFirstBorderPixel(it);
946 if (ray[2] < minZlocal_) {
949 }
while (GetNextBorderPixel(it));
951 if (minZlocal_<1e-10) minZlocal_=1e-10;
952 else minZlocal_ *= 0.97;
954 cout<<
"maximum viewing angle of this camera is "
955 <<acos(minZlocal_)*180.0/M_PI<<
" degrees"
966 const bool transpose)
972 projGL.
Mult(Pose_.GetMatrix4x4(), res);
984 const bool transpose)
994 const unsigned int width,
995 const unsigned int height,
997 const bool transpose)
999 BIASASSERT(zNear<zFar);
1000 BIASASSERT(zNear>0.0);
1012 for(
unsigned int i=0; i<3; i++) {
1013 for(
unsigned int j=0; j<3; j++) {
1014 embededK[i][j] = K[i][j];
1023 const double x0 =
static_cast<double>(upperLeft[0]);
1024 const double y0 =
static_cast<double>(upperLeft[1]);
1028 normalizingK[0][0] = 2.0/
static_cast<double>(width);
1029 normalizingK[0][2] = (1.0 - 2.0*x0)/static_cast<double>(width) - 1.0;
1031 normalizingK[1][1] = -2.0/
static_cast<double>(height);
1032 normalizingK[1][2] = (2.0*y0-1.0)/
static_cast<double>(height) + 1.0;
1034 normalizingK[1][1] = 2.0/
static_cast<double>(height);
1035 normalizingK[1][2] = (1.0-2.0*y0)/static_cast<double>(height) - 1.0;
1037 normalizingK[2][2] = (zFar + zNear)/(zFar - zNear);
1038 normalizingK[2][3] = -(1+normalizingK[2][2])*zNear;
1040 normalizingK[3][2] = 1.0;
virtual BIAS::Vector3< double > GetC() const
Get projection center.
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...
void addAttribute(const xmlNodePtr Node, const std::string &AttributeName, bool AttributeValue)
Add an attribute to a node.
void GetEuclidean(Vector3< HOMGPOINT3D_TYPE > &dest) const
calculate affine coordinates of this and write them to dest affine coordinates are projective coordin...
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.
class HomgPoint2D describes a point with 2 degrees of freedom in projective coordinates.
virtual int XMLGetClassName(std::string &TopLevelTag, double &Version) const
specialization of XML block name function
bool IsEmpty() const
check if ImageData_ points to allocated image buffer or not
virtual int XMLOut(const xmlNodePtr Node, XMLIO &XMLObject) const
Specialization of XML write function.
static std::string GetRadialDistModelString(BIAS_ProjParaPersp_DISTORTION_TYPE model)
camera parameters which define the mapping between rays in the camera coordinate system and pixels in...
virtual void SetPrincipal(const double x, const double y)
Set principal point in pixels relative to top left corner, virtual overload to recalculate K_...
xmlNodePtr getChild(const xmlNodePtr ParentNode, const std::string &ChildName)
Get a child of a Parent node by specifying the childs name, NULL is returned if the ParentNode has no...
void ScalarProduct(const Vector3< T > &argvec, T &result) const
scalar product (=inner product) of two vectors, storing the result in result
HomgPoint2D & Homogenize()
homogenize class data member elements to W==1 by divison by W
virtual const bool DoIntrinsicsDiffer(const ProjectionParametersBase *p) const
virtual int XMLIn(const xmlNodePtr Node, XMLIO &XMLObject)
specialization of XML read function
bool DoesPointProjectIntoImageLocal(const Vector3< double > &localX, HomgPoint2D &x, bool IgnoreDistortion=false) const
Checks if 3D point projects into specified image and returns belonging 2D image point.
virtual int GetMinimalAngularSamplingStep(double &minAngleStep)
Delivers the assumed minimal angular distance between two optical rays belonging to integer image coo...
void GetCartesianRayFromFullPhi(const double &phi, const double &theta, HomgPoint3D &ray) const
Calculates the Euclidean ray belonging to the passed angles in the world coordinate frame...
void SetAffineBase(const CoordinateTransform3D &newAffineBase)
Sets the "local" coordinate frame of the spherical coordinates.
unsigned int GetWidth() const
void SetIdealImageSize(unsigned int width, unsigned int height)
virtual int XMLOut(const xmlNodePtr Node, XMLIO &XMLObject) const
specialization of XML write function
virtual int XMLIn(const xmlNodePtr Node, XMLIO &XMLObject)
Specialization of XML read function.
int DistortNormalized(BIAS::HomgPoint2D &point2d) const
Undistort distorted coordinates using the standard distortion parameters and the parameter describing...
std::string getAttributeValueString(const xmlAttrPtr Attribute) const
void SetZero()
Sets all values to zero.
Wrapper class for reading and writing XML files based on the XML library libxml2. ...
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 = tru...
void Mult(const Vector3< T > &argvec, Vector3< T > &destvec) const
matrix - vector multiplicate this matrix with Vector3, storing the result in destvec calculates: dest...
void ReInit(const unsigned int &width, const unsigned int &height, const unsigned int nChannels=1, const enum EStorageType storageType=ST_unsignedchar, const bool interleaved=true, const EColorModel colormodel=CM_Grey)
(Re-)Initialize Image data if required.
xmlNodePtr addChildNode(const xmlNodePtr ParentNode, const std::string &NewNodeName)
Add a child node to an incoming node with the given name.
bool IsAtInfinity() const
virtual bool Distort(BIAS::HomgPoint2D &point2d) const
Using the Matlab camera calibration toolbox parameters for a distortion of undistorted coordinates...
void Mult(const Vector4< T > &argvec, Vector4< T > &destvec) const
matrix - vector multiplicate this matrix with Vector4, storing the result in destvec, calculates: destvec = (this Matrix) * argvec
int GetMinimalAngleInCorner_(const HomgPoint2D &corner, double &minAngle)
Helper function for minimal angle step calculation.
unsigned int GetChannelCount() const
returns the number of Color channels, e.g.
unsigned int height_
height of image in pixels
int TransformCartesianToPolarCoordinates(const BIAS::Image< float > &cartesianDepth, BIAS::Image< float > &polarDepth)
transforms an image from cartesian coordinates to polar coordinates
unsigned int GetHeight() const
virtual BIAS::RMatrix GetR() const
Get orientation as rotation matrix R.
Matrix4x4 Transpose() const
virtual HomgPoint3D UnProjectToPointByZ(const HomgPoint2D &pos, const double &zDistance, bool IgnoreDistortion=false) const
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.
class HomgPoint3D describes a point with 3 degrees of freedom in projective coordinates.
void GetIdealK(KMatrix &K) const
Can be used to run along the image border.
void Init(unsigned int Width, unsigned int Height, unsigned int channels=1, enum EStorageType storageType=ST_unsignedchar, const bool interleaved=true)
calls Init from ImageBase storageType is ignored, just dummy argument
bool Equal(const T left, const T right, const T eps)
comparison function for floating point values See http://www.boost.org/libs/test/doc/components/test_...
virtual bool Undistort(BIAS::HomgPoint2D &point2d) const
Using the Matlab camera calibration toolbox parameters for an undistortion of distorted coordinates...
xmlAttrPtr getAttributeByName(const xmlNodePtr Node, const std::string &attribute_name)
search for a specific attribute
unsigned int width_
width of image in pixels
double x
If using BorderPixel methods these are the coordinates of the pixel.
double focallength_
focal length is stored in pixel for cellSizeX
Matrix3x3< T > Transpose() const
returns transposed matrix tested 12.06.2002
Matrix4x4< double > GetGLModelviewProjectionMatrix(const double zNear, const double zFar, const bool flip, const bool transpose=false)
Calculates an ModelViewProjection matrix useable in OpenGL.
double getAttributeValueDouble(const xmlAttrPtr Attribute) const
int TransformPolarToCartesianCoordinates(const BIAS::Image< float > &polarDepth, BIAS::Image< float > &cartesianDepth)
transforms an image from polar coordinates to cartesian coordinates
virtual const bool DoIntrinsicsDiffer(const ProjectionParametersBase *p) const
void UpdateMinZLocal()
run along image border and compute maximum field of view, save in minzlocal
BIAS_ProjParaPersp_DISTORTION_TYPE
K describes the mapping from world coordinates (wcs) to pixel coordinates (pcs).
Matrix4x4< double > GetGLProjectionMatrix(const double zNear, const double zFar, const bool flip, const bool transpose=false)
Calculates an projection matrix useable in OpenGL.
virtual Matrix3x3< double > UnProjectCovLocal(const HomgPoint2D &pos, const Matrix3x3< double > &cov2D, bool IgnoreDistortion=false, bool Normalize=false)
unprojects the covariance matrices to K=Identity camera
virtual void UnProjectLocal(const HomgPoint2D &pos, Vector3< double > &pointOnRay, Vector3< double > &direction, bool IgnoreDistortion=false) const
calculates the viewing ray from the camera center (in the camera coordinate system) which belongs to ...
void GetIdealImageSize(unsigned int &width, unsigned int &height) const
virtual int XMLGetClassName(std::string &TopLevelTag, double &Version) const
Specialization of XML block name function.
Camera parameters which define the mapping between rays in the camera coordinate system and pixels in...
void Set(const HOMGPOINT2D_TYPE &x, const HOMGPOINT2D_TYPE &y)
set elementwise with given 2 euclidean scalar values.
bool GetCutOutParameters(const Vector2< int > ¢erPoint, const unsigned int halfWidth, const unsigned int halfHeight, ProjectionParametersPerspective &cutOutParams) const
Shifts the principle point so that imagePoint-(halfWidth, halfHeight) is mapped to (0...
Transformation between affine and spherical coordinates.
virtual double ViewDifference(const ProjectionParametersBase *pPPB) const
compute scalar dissimilarity between two cameras based upon rough approximation of field of view over...
Vector3< T > & Normalize()
normalize this vector to length 1
void ComputeK_()
computes the cached KMatrix and its inverse call after every parameter change
double kc1_
lens undistortion parameters after Bouquet also used as parameters for distortion after Brown(...
double NormL2() const
the L2 norm sqrt(a^2 + b^2 + c^2)
T Normalize()
divide this by biggest absolute entry, returns biggest entry
class BIASGeometryBase_EXPORT HomgPoint2D
class BIASGeometryBase_EXPORT HomgPoint3D
void SetIdentity()
set the elements of this matrix to the identity matrix (possibly overriding the inherited method) ...
const StorageType ** GetImageDataArray() const
overloaded GetImageDataArray() from ImageBase