24#include "gzMathMatrix.h"
28CY_EXPORT gzMatrixf
getRobustProjectionMatrix(
const gzMatrixf &F,
const gzMatrixf &K0,
const gzMatrixf &K1,
const gzVectorf &matchPointA_1,
const gzVectorf &matchPointB_1,
const gzVectorf &matchPointA_2,
const gzVectorf &matchPointB_2,
const gzVectorf &matchPointA_3,
const gzVectorf &matchPointB_3,gzVectorf *point_1=NULL,gzVectorf *point_2=NULL,gzVectorf *point_3=NULL);
35CY_EXPORT gzMatrixf
composeKMatrix(
const gzFloat &fx,
const gzFloat &fy,
const gzFloat &x0=0.0f,
const gzFloat &y0=0.0f,
const gzFloat &s=0.0f);
44inline gzFloat
angle(
const gzFloat & X,
const gzFloat & Y)
50 return GZ_PI_F - atanf(-Y/X);
53 return GZ_PI_F + atanf(Y/X);
56 return GZ_2PI_F - atanf(-Y/X);
68 gzFloat A=gzSq2(Fx.dot(xp));
70 gzFloat B=(F*x).trunc(2).magnitude()+(F.transpose()*xp).trunc(2).magnitude();
85 gzVectorf ep=M.getCol(2);
89 gzMatrixf Pp=ep.scew()*F;
92 A.addRow(gzVectorf(-1,0,x[0],0));
93 A.addRow(gzVectorf(0,-1,x[1],0));
94 A.addRow(xp[0]*Pp.getRow(2)-Pp.getRow(0));
95 A.addRow(xp[1]*Pp.getRow(2)-Pp.getRow(1));
97 A.decomposeSVD(NULL,&M);
99 gzVectorf X=M.getRow(3);
101 gzVectorf xc=X.unified().unified();
102 gzVectorf xpc=(Pp*X).unified();
106 return (xc-x.unified()).magnitude()+(xpc-xp.unified()).magnitude();
108 return (xc-x).magnitude()+(xpc-xp).magnitude();
Basic include for all CycloPos files. Defines export structures and basic flags and builtin compiled ...
#define CY_EXPORT
Export control of dll functions.
const gzMatrixf & getZFlip4()
gzFloat samson_distance_mag(gzVectorf &x, gzVectorf &xp, gzMatrixf &F)
const gzMatrixf & getDeterminantFlip4()
gzMatrixf composeFMatrix(const gzMatrixf &K0, const gzMatrixf &K1, const gzMatrixf &R, const gzVectorf &t)
gzFloat angle(const gzFloat &X, const gzFloat &Y)
gzBool decomposeProjectionMatrix(const gzMatrixf &matrix, gzVectorf &translation, gzFloat &H, gzFloat &P, gzFloat &R)
gzFloat projected_distance_mag(gzVectorf &x, gzVectorf &xp, gzMatrixf &F)
gzMatrixf getRobustProjectionMatrix(const gzMatrixf &F, const gzMatrixf &K0, const gzMatrixf &K1, const gzVectorf &matchPointA_1, const gzVectorf &matchPointB_1, const gzVectorf &matchPointA_2, const gzVectorf &matchPointB_2, const gzVectorf &matchPointA_3, const gzVectorf &matchPointB_3, gzVectorf *point_1=NULL, gzVectorf *point_2=NULL, gzVectorf *point_3=NULL)
const gzMatrixf & getDeterminantFlip3()
gzMatrixf composeProjectionMatrix(const gzVectorf &translation, const gzFloat &H, const gzFloat &P, const gzFloat &R)
gzBool updateKanataniProjection(const gzMatrixf &F, gzVectorf &x, gzVectorf &xp)
gzMatrixf composeRotationMatrix(const gzFloat &H, const gzFloat &P, const gzFloat &R)
gzMatrixf composeKMatrix(const gzFloat &fx, const gzFloat &fy, const gzFloat &x0=0.0f, const gzFloat &y0=0.0f, const gzFloat &s=0.0f)
gzBool decomposeRotationMatrix(const gzMatrixf &matrix, gzFloat &H, gzFloat &P, gzFloat &R)