|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsugr.Element
sugr.Transformation
sugr.ProjectiveCamera
This class represents a projective camera. This camera consists of:
| c cs ppX | | r11 r12 r13 t1 | | p11 p12 p13 p14 | | 0 c(1+m) ppY | * | r21 r22 r23 t2 | = | p21 p22 p23 p24 | | 0 0 1 | | r31 r32 r33 t3 | | p31 p32 p33 p34 | inner orient. exterior orient. projection matrix (3x3) (3x4) (3x4)If you use getCov(), you get covariance for Point-Transformations. If you like to transform 3D-Lines, you can get this transformation-matrix via getLineMatrix() and its covariance via getLineMatrixCov().
Field Summary | |
private static int |
DIM
|
private static int |
DIMC
Number of cols of projection matrix |
private static int |
DIMR
Number of rows of projection matrix |
private static int |
DOF
|
private Matrix |
P
Stores the Point-Projection and Line-Projection matrices (for speed-optimisation only) |
private Matrix |
Q
Stores the Point-Projection and Line-Projection matrices (for speed-optimisation only) |
private Matrix |
Qdual
Stores the Point-Projection and Line-Projection matrices (for speed-optimisation only) |
private static long |
serialVersionUID
Class version number for serialization |
Fields inherited from class sugr.Element |
cov, MAXITER, v |
Constructor Summary | |
ProjectiveCamera()
Default constructor |
|
ProjectiveCamera(double c)
Sets a ProjectiveCamera by only defining camera constant. |
|
ProjectiveCamera(double[] cam)
Sets a ProjectiveCamera by setting whole projection matrix. |
|
ProjectiveCamera(double[] cam,
Matrix cov)
Sets a ProjectiveCamera by setting whole projection matrix. |
|
ProjectiveCamera(double c,
double ppX,
double ppY)
Sets a ProjectiveCamera by camera constant and principal point (camera with euclidean sensor) Exterior orientation is set to identity. |
|
ProjectiveCamera(double c,
double shear,
double scale,
double ppX,
double ppY)
Sets a ProjectiveCamera by setting inner orientation parameters directly. |
|
ProjectiveCamera(double p11,
double p12,
double p13,
double p14,
double p21,
double p22,
double p23,
double p24,
double p31,
double p32,
double p33,
double p34)
creates a PojectiveCamera from the 12 entries of the point projection matrix: | p11 p12 p13 p14 | | p21 p22 p23 p24 | | p31 p32 p33 p34 | |
|
ProjectiveCamera(double p11,
double p12,
double p13,
double p14,
double p21,
double p22,
double p23,
double p24,
double p31,
double p32,
double p33,
double p34,
Matrix cov)
Sets a ProjectiveCamera by setting whole projection matrix. |
|
ProjectiveCamera(double c,
double shear,
double scale,
double ppX,
double ppY,
Matrix cov)
Sets a ProjectiveCamera with covariance by setting inner orientation parameters directly. |
|
ProjectiveCamera(double c,
double ppX,
double ppY,
Matrix cov)
Sets a ProjectiveCamera by camera constant and principal point (camera with euclidean sensor) Exterior orientation is set to identity. |
|
ProjectiveCamera(double c,
Matrix cov)
Sets a ProjectiveCamera with covariance by only defining camera constant. |
|
ProjectiveCamera(Matrix pointMatrix)
Creates a ProjectiveCamera from a 3x4 point projection matrix |
|
ProjectiveCamera(Matrix inOrien,
Matrix extOrien)
Creates a ProjectiveCamera by setting inner and exterior orientation. |
|
ProjectiveCamera(Matrix inOrien,
Matrix extOrien,
Matrix cov)
Creates a ProjectiveCamera by setting inner and exterior orientation with covariance. |
|
ProjectiveCamera(Matrix inOrien,
Motion_3D extOrien)
Creates a ProjectiveCamera by setting inner and exterior orientation. |
|
ProjectiveCamera(Matrix inOrien,
Motion_3D extOrien,
Matrix cov)
Creates a ProjectiveCamera by setting inner and exterior orientation. |
|
ProjectiveCamera(Motion_3D extOrien)
Creates a ProjectiveCamera by setting exterior orientation. |
|
ProjectiveCamera(Motion_3D extOrien,
Matrix cov)
Creates a ProjectiveCamera by setting exterior orientation with covariance. |
|
ProjectiveCamera(java.io.Reader r)
Reads a projection matrix from a Reader. |
|
ProjectiveCamera(Translation_3D trans,
Rotation_3D rot)
Creates a ProjectiveCamera by setting exterior orientation. |
|
ProjectiveCamera(Translation_3D trans,
Rotation_3D rot,
Matrix cov)
Creates a ProjectiveCamera by setting exterior orientation. |
Method Summary | |
private void |
calcProjectionMatrices()
|
void |
doCondition(double[] f)
Condition that element with a set of conditioning factors. |
Matrix |
getCalibrationMatrix()
Returns the calibration matrix containing the interior orientation parameters |
int |
getDegreesOfFreedom()
returns the degrees of freedom of the projective camera |
int |
getDimCol()
Get the number of columns of the transformation matrix. |
int |
getDimRow()
Get the number of rows of the transformation matrix. |
Matrix |
getDualLineMatrix()
|
Matrix |
getInversePointMatrix(Vector A)
Returns the Inverse Point Projection Matrix of the plane A. |
Matrix |
getJacobianAfterFirst(Entity e)
The the Jacobian after the first entity of a trilinear relation. |
Matrix |
getJacobianAfterSecond(Entity e)
The the Jacobian after the second entity of a trilinear relation. |
Matrix |
getLineMatrix()
|
Matrix |
getPointMatrix()
|
Plane_3D |
getPrincipalPlane()
Returns the principal plane of the camera |
Point_3D |
getProjectionCenter()
Returns the projection center of the camera |
Matrix |
getRotationMatrix()
Returns the rotation matrix from the world to the camera coordiante system |
void |
swapRC()
Swaps the first two lines of the transformation matrix This is needed to support RC- and XY-coordinate-systems |
Entity |
transform(Entity e)
This method invokes the appropriate transform, if the Object has been downcasted |
Plane_3D |
transform(Line_2D l)
Performes the inverse projection of an 2D-line |
Line_2D |
transform(Line_3D l)
Performes the projection of a 3D line |
Line_3D |
transform(Point_2D p)
Performes the inverse projection of an 2D-point |
Point_2D |
transform(Point_3D p)
Performes the projection of a 3D point |
Methods inherited from class sugr.Transformation |
errorProp, getDimension, getJacobianOfRelation, getReducedAB, getTransformationMatrix, getTransposeTransMatrix, transform |
Methods inherited from class sugr.Element |
approximate, calcCov, changeNullspace, changeNullspace, checkCovDim, checkElement, clone, ensureConstraints, estimate, estimate, gaussHelmertIterations, gaussHelmertIterationsOld, getConstraintValue, getCov, getJacobianOfConstraint, getV, normalizeSphere, normalizeSphereComparable, print, print, reduceFirstMatrix, reduceMatrix, reduceMatrix, setCov, setV, toString |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final long serialVersionUID
private static final int DIM
private static final int DIMR
private static final int DIMC
private static final int DOF
private Matrix P
private Matrix Q
private Matrix Qdual
Constructor Detail |
public ProjectiveCamera()
public ProjectiveCamera(Matrix pointMatrix)
pointMatrix
- The 3x4 point projection matrixpublic ProjectiveCamera(double p11, double p12, double p13, double p14, double p21, double p22, double p23, double p24, double p31, double p32, double p33, double p34)
| p11 p12 p13 p14 | | p21 p22 p23 p24 | | p31 p32 p33 p34 |
p11
- Entry of the 3x4 point projection matrixp12
- Entry of the 3x4 point projection matrixp13
- Entry of the 3x4 point projection matrixp14
- Entry of the 3x4 point projection matrixp21
- Entry of the 3x4 point projection matrixp22
- Entry of the 3x4 point projection matrixp23
- Entry of the 3x4 point projection matrixp24
- Entry of the 3x4 point projection matrixp31
- Entry of the 3x4 point projection matrixp32
- Entry of the 3x4 point projection matrixp33
- Entry of the 3x4 point projection matrixp34
- Entry of the 3x4 point projection matrixpublic ProjectiveCamera(java.io.Reader r) throws java.io.IOException
r
- stream Reader, that yields 12 double values for the point
projection matrixpublic ProjectiveCamera(Matrix inOrien, Matrix extOrien)
| c cs ppX | | r11 r12 r13 t1 | | 0 c(1+m) ppY | * | r21 r22 r23 t2 | | 0 0 1 | | r31 r32 r33 t3 | inner orient. exterior orient. (3x3) (3x4)
inOrien
- 3x3-matrixextOrien
- 3x4 matrixpublic ProjectiveCamera(Matrix inOrien, Matrix extOrien, Matrix cov)
| c cs ppX | | r11 r12 r13 t1 | | 0 c(1+m) ppY | * | r21 r22 r23 t2 | | 0 0 1 | | r31 r32 r33 t3 | inner orient. exterior orient. (3x3) (3x4)
inOrien
- 3x3-matrixextOrien
- 3x4 matrixcov
- 12x12 Matrixpublic ProjectiveCamera(Motion_3D extOrien)
extOrien
- a Motion_3Dpublic ProjectiveCamera(Motion_3D extOrien, Matrix cov)
extOrien
- a Motion_3Dcov
- 12x12 Matrixpublic ProjectiveCamera(Matrix inOrien, Motion_3D extOrien)
| c cs ppX | | 0 c(1+m) ppY | | 0 0 1 |Error propagation is done automatically
inOrien
- 3x3 MatrixextOrien
- a Motion_3Dpublic ProjectiveCamera(Matrix inOrien, Motion_3D extOrien, Matrix cov)
| c cs ppX | | 0 c(1+m) ppY | | 0 0 1 |
inOrien
- 3x3 MatrixextOrien
- a Motion_3Dcov
- 12x12 Matrixpublic ProjectiveCamera(double c, double shear, double scale, double ppX, double ppY)
c
- camera constantshear
- as name saysscale
- as name saysppX
- principal point x-axisppY
- principal point y-axispublic ProjectiveCamera(double c, double shear, double scale, double ppX, double ppY, Matrix cov)
c
- camera constantshear
- as name saysscale
- as name saysppX
- principal point x-axisppY
- principal point y-axiscov
- 12x12 Matrixpublic ProjectiveCamera(Translation_3D trans, Rotation_3D rot)
trans
- a Translation_3Drot
- a Rotation_3Dpublic ProjectiveCamera(Translation_3D trans, Rotation_3D rot, Matrix cov)
trans
- a Translation_3Drot
- a Rotation_3Dcov
- 12x12 Matrixpublic ProjectiveCamera(double[] cam)
| a[0] a[1] a[ 2] a[ 3] | | a[4] a[5] a[ 6] a[ 7] | | a[8] a[9] a[10] a[11] |TODO: same row-column index order in homograpy and projective camera
cam
- double-Array with 12 entriespublic ProjectiveCamera(double[] cam, Matrix cov)
| a[0] a[1] a[ 2] a[ 3] | | a[4] a[5] a[ 6] a[ 7] | | a[8] a[9] a[10] a[11] |Covariance is also used here.
cam
- double-Array with 12 entriescov
- 12x12 Matrixpublic ProjectiveCamera(double c)
c
- camera constantpublic ProjectiveCamera(double c, Matrix cov)
c
- camera constantcov
- 12x12 Matrixpublic ProjectiveCamera(double c, double ppX, double ppY)
c
- camera constantppX
- principal point x-axisppY
- principal point y-axispublic ProjectiveCamera(double c, double ppX, double ppY, Matrix cov)
c
- camera constantppX
- principal point x-axisppY
- principal point y-axiscov
- 12x12 Matrixpublic ProjectiveCamera(double p11, double p12, double p13, double p14, double p21, double p22, double p23, double p24, double p31, double p32, double p33, double p34, Matrix cov)
| p11 p12 p13 p14 | | p21 p22 p23 p24 | | p31 p32 p33 p34 |Covariance is also used here.
cov
- 12x12 MatrixMethod Detail |
public void swapRC()
public int getDimRow()
getDimRow
in class Transformation
public int getDimCol()
getDimCol
in class Transformation
private void calcProjectionMatrices()
public Matrix getPointMatrix()
public Matrix getLineMatrix()
public Matrix getDualLineMatrix()
public Plane_3D getPrincipalPlane()
public Point_3D getProjectionCenter()
public Matrix getRotationMatrix()
public Matrix getCalibrationMatrix()
public Matrix getInversePointMatrix(Vector A)
A
- the plane
public Line_3D transform(Point_2D p)
p
- the 2D point to be inverse projected
public Plane_3D transform(Line_2D l)
l
- the 2D line to be inverse projected
public Point_2D transform(Point_3D p)
p
- the 3D point to be projected
public Line_2D transform(Line_3D l)
l
- 3D line to be projected
public Entity transform(Entity e)
transform
in class Transformation
e
- entity to be transformed
public int getDegreesOfFreedom()
getDegreesOfFreedom
in class Transformation
public void doCondition(double[] f)
doCondition
in class Element
f
- conditioning factors ( two factors for transformations!)public Matrix getJacobianAfterFirst(Entity e)
getJacobianAfterFirst
in class Transformation
e
- the second Entity of the relation.public Matrix getJacobianAfterSecond(Entity e)
getJacobianAfterSecond
in class Transformation
e
- the first Entity of the relation.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |