x - Universität Freiburg
Transcription
x - Universität Freiburg
The Group of Affine Maps A The group of affine maps results from choosing an arbitrary regular matrix A (det(A) ≠ 0) and a translation a: t' = At + a This map has 6 degrees of freedom (4 for the general matrix A, and two for the translation vector a). The affine map describes the general steric motion of a planar master illustration followed by parallel projection on the camera plane, which is to be shown now. H. Burkhardt, Institut für Informatik, Universität Freiburg ME-I, Kap. 2b 1 Motion of an arbitrary curve in space with subsequent parallel projection on the camera plane x1(t) x(t) = x2(t) x3(t) x3 x2 x1 special case: plane steric curve: H. Burkhardt, Institut für Informatik, Universität Freiburg x3(t) 0 ME-I, Kap. 2b 2 The arc length calculates as follows: s= t t0 t 2 x 1(t) + x 22(t) + x 23(t) dt x (t) dt = t0 with: x 1(t) dx1/dt x (t) = x 2(t) = dx2/dt dx3/dt x 3(t) H. Burkhardt, Institut für Informatik, Universität Freiburg ME-I, Kap. 2b 3 Euclidian Space Motion (Rotation and Translation): x ( t) = A x ( t) + b With the orthogonal rotation matrix: A= A11 = c2c3 c1s 2s 3 A12 = c2s 3 c1s 2c3 A21 = s 2c3 + c1c2s 3 A22 = s 2s 3 + c1c2c3 A31 = s 1s 3 A32 = s1c3 A13 = s1s 2 A23 = s 1c2 A33 = c1 whereas: c1 = cos ϑ, c2 = cos ψ, c3 = cos ϕ s 1 = sin ϑ, s2 = sin ψ, s 3 = sin ϕ H. Burkhardt, Institut für Informatik, Universität Freiburg and the translation: b= b1 b2 b3 ME-I, Kap. 2b 4 zI Euler Angles: 1. nutation ϑ (Theta) 2. precession ψ (Psi) y 3. mere rotation ϕ (Phi) z ϑ O ϕ yI ψ N x xI To exchange from the inertial system into the body coordinate system the following three rotations are needed: 1. rotation ϕ about the zI - axis: the x-axis results/merges in the so-called line of nodes O-N. 2. rotation ϑ about the line of nodes O-N: the inertial zI - axis merges in the body z-axis. 3. rotation ψ about the z - axis: The body (x,y,z)-coordinate system results. H. Burkhardt, Institut für Informatik, Universität Freiburg ME-I, Kap. 2b 5 Factorization of the Rotation Matrix: c2 − s2 0 A = s2 c2 0 0 0 1 1 0 0 ⋅ 0 c1 − s1 0 s1 c1 c3 − s3 0 ⋅ s3 c3 0 0 0 1 rotation about z-axis (ψ ) rotation about x-axis (ϑ ) rotation about z-axis (ϕ ) H. Burkhardt, Institut für Informatik, Universität Freiburg ME-I, Kap. 2b 6 Properties of the Rotation Matrix A: • The row and column vectors of A are orthogonal and normalized and thus • A rotation matrix A is orthogonal, i.e.: A-1=AT and thus also ATA=AAT =I • Furthermore: det(A)=1 (mere rotation, without reflection) • Thus, for rotation matrices applies: ( ABC) −1 = ( ABC)T = CT BT AT H. Burkhardt, Institut für Informatik, Universität Freiburg ME-I, Kap. 2b 7 And thus: c3 A −1 = AT = − s3 0 s3 c3 0 0 1 0 0 c2 0 ⋅ 0 c1 s1 ⋅ − s2 1 0 − s1 c1 0 s2 c2 0 0 0 1 Rotation backwards can be achieved by inversion of the order! H. Burkhardt, Institut für Informatik, Universität Freiburg ME-I, Kap. 2b 8 A more compact notation: R 2 A= 0 and: 0 1 0 0 R 3 0 ⋅ 0 ⋅ R1 0 0 1 0 0 0 0 1 R i−1 = R Ti H. Burkhardt, Institut für Informatik, Universität Freiburg ME-I, Kap. 2b 9 Now: orthogonal projection of the sterical curve x(t) into the (e1,e2)-plane with the projection operator P12: x1 (t ) x12 = x2 (t ) = P12 x 0 with: 1 0 0 P12 = 0 1 0 0 0 0 The projection operator P12 is idempotent, i.e.: P122 = P12 H. Burkhardt, Institut für Informatik, Universität Freiburg ME-I, Kap. 2b 10 From the general motion in space with subsequent projection follows: x '' = P12 x ' = P12 ( Ax + b ) The projection has the following effect on A: A11 P12 A = A21 0 A12 A22 0 A13 A23 0 H. Burkhardt, Institut für Informatik, Universität Freiburg Since the curve is planar (x3≡0). the 3rd column can be omitted: A11 A 21 0 A12 A22 0 0 0 0 ME-I, Kap. 2b 11 And so the description can be reduced to 2 dimensions: A11 0 x' = A 'x' = A21 A12 x10 A22 x20 with: or expanded: c2 c3 − c1s2 s3 A' = s2 c3 + c1c2 s3 H. Burkhardt, Institut für Informatik, Universität Freiburg −c2 s3 − c1s2 c3 − s2 s3 + c1c2 c3 ME-I, Kap. 2b 12 Rotating a plane curve (x3≡0) in a 3D space and projecting it afterwards in a (e1,e2)-plane is equivalent to describing it with a corresponding two-dimensional affine map! H. Burkhardt, Institut für Informatik, Universität Freiburg ME-I, Kap. 2b 13 Discussing the Degrees of Freedom: • We see only three degrees of freedom c1,c2,c3, but the general affine map has 4! • As described here, the objects are only compressed and not enlarged. Adding a general dilation (enlarging/compressing) with a factor k, 4 degrees of freedom can be obtained! 0 δ 1 0 1 0 δ = δ1 0 δ / δ 2 2 1 dilation general compression H. Burkhardt, Institut für Informatik, Universität Freiburg compressing along y ME-I, Kap. 2b 14 Invariants of geometric maps: Congruent maps (AAT=I) are length preserving: ! x ' =< x ', x ' >=< Ax, Ax >=< x, A Ax > = < x, x >= x 2 * 2 only applies for: A* A = I ⇒ A −1 = A* (orthogonal rotation matrix) H. Burkhardt, Institut für Informatik, Universität Freiburg ME-I, Kap. 2b 15 The group of similarities guarantees angle preserving (conform) maps: < x ', y ' > < Ax, Ay > cos ϕ = = x' y' < Ax, Ax >1/ 2 < Ay , Ay >1/ 2 with: A* A = µ I follows: < x, A* Ay > cos ϕ = = * 1/ 2 * 1/ 2 < x, A Ax > < y , A Ay > µ < x, y > < x, y > = 1/ 2 1/ 2 1/ 2 1/ 2 µ < x, x > µ < y , y > x y H. Burkhardt, Institut für Informatik, Universität Freiburg ME-I, Kap. 2b 16 The group of affine maps preserves parallelisms: g1=r1+αl linear equations r1 l g2=r2+αl for all pairs of points on straight lines parallel to l applies: x2 -x1= αl r2 affine transformed: x´=Ax+t and thus: x′2 − x1′ = Ax 2 + t − Ax1 − t = A(x 2 − x1 ) = α Al = α l′ that are points on the parallel straight line with gradient l´ H. Burkhardt, Institut für Informatik, Universität Freiburg ME-I, Kap. 2b 17 Interpolation For rotation and translation about fractions of the sampling interval a grayscale interpolation of the images is required (non gridconforming maps). In the easiest way this can be realized by a) the Nearest-Neighbour-Rule: H. Burkhardt, Institut für Informatik, Universität Freiburg ME-I, Kap. 2b 18 Or better: with bilinear interpolation: xc x1 = xa + x2 = xc + ε ∆ ε ∆ x ( xb − xa ) = x ( xa , xb , ε ) ( xd − xc ) = x ( xc , xd , ε ) xa and so: x = x1 + η ∆ = xa + ε ∆ ( xb − xa ) + η ∆ ( xc − xa ) + εη ∆2 ( xa − xb − xc + xd ) xd c η a ( x2 − x1 ) = x ( x1 , x2 ,η ) x2 x1 xb b ε d ∆ ∆ By exchanging xa for xc and ε for η, one gets the same result, i.e. one could interpolate first with (xa, xa, η) and (xb, xd, η) and then interpolate the result linearly. H. Burkhardt, Institut für Informatik, Universität Freiburg ME-I, Kap. 2b 19