Presentation is loading. Please wait.

Presentation is loading. Please wait.

Instructor: Mircea Nicolescu Lecture 9

Similar presentations


Presentation on theme: "Instructor: Mircea Nicolescu Lecture 9"— Presentation transcript:

1 Instructor: Mircea Nicolescu Lecture 9
CS 485 / 685 Computer Vision Instructor: Mircea Nicolescu Lecture 9 Good afternoon and thank you everyone for coming. My talk today will describe the research I performed at the IRIS at USC, the object of this work being to build a computational framework that addresses the problem of motion analysis and interpretation.

2 Systems of Linear Equations
An arbitrary system of m linear equations in n unknowns can be written as: where: or Example (m=n=2):

3 Solutions of Ax=b (m=n)
Characterize the solutions of Ax = b using conditions on the rank of A and A|b (i.e., augmented matrix).

4 Solutions of Ax=b (m=n)
The system has one solution if : rank(A|b) = rank(A) = n Solution: i.e., b can be expressed as a linear combination of the columns of A

5 Solutions of Ax=b (m=n)
The following statements are equivalent: rank(A|b) = rank(A) = n A is invertible b has a unique expansion in the column space of A

6 Solving Ax=b Using SVD Ax=b Assuming that A=UDVT, then
UDVTx=b or DVTx=UTb Setting VTx=z and UTb=d, we have Dz=d (1) Compute z=D-1d (assume no zeroes in the diagonal) (2) Compute solution x=Vz Ax=b

7 Solutions of Ax=b (m=n)
(2) The system has no solution if rank(A|b) > rank(A) b cannot be expressed as a linear combination of the columns of A e.g., using substitution leads to the contradiction 16=9

8 Solutions of Ax=b (m=n)
(3) The system has infinitely many solutions if rank(A|b) = rank(A) < n - Less equations than unknowns (i.e, free variables). - b can be expressed as a linear combination of the columns of A in more than one way.

9 Homogeneous System: Ax=0 (m=n)
If b=0, then Ax=0 is called homogeneous. (1) Has the trivial solution x=0 iff rank(A) = n (i.e., A is invertible) (2) Has a non-trivial solution iff rank(A) < n (i.e., A is singular)

10 Over/Under-Determined Systems
m>n m<n

11 Solving Ax=b (m>n) Consider the over-determined system of linear equations: Let r be the residual vector for some x: The vector x* which yields the smallest possible residual is called a least-squares solution:

12 Solving Ax=b (m>n) Although a least-squares solution always exist, it might not be unique! The least-squares solution x with the smallest norm ||x|| is unique and it is given by:

13 Solving Ax=b (m>n) – Example

14 Computing A+ Using SVD If ATA is ill-conditioned (or singular), we can use SVD to obtain a least squares solution as follows: where: (where t is a small threshold)

15 Homogeneous Systems The minimum-norm solution is x=0; need to modify the meaning of a least-squares solution by imposing the constraint: This is a "constrained" optimization problem:

16 Homogeneous Systems The solution for homogeneous systems is not always unique. Special case: Solution: (vn is the last column of V; the one corresponding to the smallest σ)

17 Homogeneous Systems General case: Solution: with
+2 with (vn-k+1, …,vn are the last columns of V ; correspond to the smallest σ’s)

18 2D Translation Moves a point to a new location by adding translation amounts to the coordinates of the point. or or

19 2D Translation To translate an object, translate every point of the object by the same amount.

20 2D Scaling Changes the size of the object by multiplying the coordinates of the points by scaling factors. or or

21 2D Scaling Uniform vs non-uniform scaling Effect of scale factors:

22 2D Scaling Scaling with respect to an arbitrary point

23 2D Rotation Rotates points by an angle θ about origin
(θ >0: counterclockwise rotation) From ABP triangle: C B A From ACP’ triangle:

24 2D Rotation From the above equations we have: or or

25 2D Rotation Rotation about an arbitrary point

26 Summary of 2D Transformations
Use homogeneous coordinates to express translation as matrix multiplication

27 Homogeneous Coordinates
Add one more coordinate: (x,y)  (xh, yh, w) Recover (x,y) by homogenizing (xh, yh, w): So, xh=xw, yh=yw, (x, y)  (xw, yw, w)

28 Homogeneous Coordinates
(x, y) has multiple representations in homogeneous coordinates: w=1 (x,y)  (x,y,1) w=2 (x,y)  (2x,2y,2) All these points lie on a line in the space of homogeneous coordinates !! projective space

29 2D Translation Using Homogeneous Coordinates
w=1

30 2D Translation Using Homogeneous Coordinates
Successive translations:

31 2D Scaling Using Homogeneous Coordinates
w=1

32 2D Scaling Using Homogeneous Coordinates
Successive scalings:

33 2D Scaling Using Homogeneous Coordinates
Scaling about an arbitrary point Decomposing the above transformation:

34 2D Rotation Using Homogeneous Coordinates
w=1

35 2D Rotation Using Homogeneous Coordinates
Successive rotations: or

36 2D Rotation Using Homogeneous Coordinates
Rotation about an arbitrary point Decomposing the above transformation:

37 Composition of Transformations
The transformation matrices of a series of transformations can be concatenated into a single transformation matrix. Example: * Translate P1 to origin * Perform scaling and rotation * Translate to P2

38 Composition of Transformations
Important: preserve the order of transformations! translation + rotation rotation + translation Representing a sequence of transformations as a single transformation matrix is more efficient! (only 4 multiplications and 4 additions)

39 Special Cases of Transformations
General form of a transformation matrix (projective transformation): Affine transformations Involve translations, rotations, scale, and shear Preserve parallelism of lines but not lengths and angles

40 Special Cases of Transformations
Similarity transformations Involve rotation, translation, uniform scaling (4 parameters) Preserve angles and length ratios Rigid transformations Involve only translation and rotation (3 parameters) Preserve areas, angles and lengths

41 Special Cases of Transformations
Rigid transformations – cont. Property: the upper 2x2 submatrix is orthonormal Example:

42 Special Cases of Transformations
Shear transformations Change the shape of the object. Shear along the x-axis: Shear along the y-axis:

43 Affine vs Projective Transformations
affine (6 parameters) projective (8 parameters) Under certain assumptions, affine transformations can be used to approximate the effects of perspective projection

44 3D Geometric Transformations
Coordinate systems Right-handed vs. left-handed systems Positive rotation angles for right-handed systems

45 Homogeneous Coordinates
Add one more coordinate: (x,y,z)  (xh, yh, zh,w) Recover (x,y,z) by homogenizing (xh, yh, zh,w): In general, xh=xw, yh=yw, zh=zw (x, y,z)  (xw, yw, zw, w) Each point (x, y, z) corresponds to a line in the 4D space of homogeneous coordinates.

46 3D Translation

47 3D Scaling

48 3D Rotation Rotation about the z-axis:

49 3D Rotation Rotation about the x-axis:

50 3D Rotation Rotation about the y-axis

51 Change of Coordinate Systems
Suppose that the coordinates of P3 are given in the xyz coordinate system How can you compute its coordinates in the RxRyRz coordinate system? (1) Recover the translation T and rotation R from RxRyRz to xyz (that align RxRyRz with xyz) (2) Apply T and R on P3 to compute its coordinates in the RxRyRz system.

52 Recover Translation T If we know the coordinates of P1 (i.e., origin of RxRyRz) in the xyz coordinate system, then T is: ux uy uz 1 0 0 –P1x 0 1 0 –P1y 0 0 1 –P1z T =

53 Recover Rotation R ux, uy, uz are unit vectors of the xyz coordinate system. rx, ry, rz are unit vectors of the RxRyRz coordinate system (rx, ry, rz are represented in the xyz coordinate system) Find rotation R that maps: rz uz , rxux, ry uy R ux uy uz

54 Recover Rotation R uz= ux= uy=

55 Recover Rotation R Thus, the rotation matrix R is given by:

56 Recover Rotation R Verify that it performs the correct mapping:
rx  ux ry  uy rz  uz

57 Interest Points Interest point: a point in an image which has a well-defined position and can be robustly detected. Typically associated with a significant change of one or more image properties simultaneously (e.g., intensity, color, texture). 57

58 Interest Points and Corners
A corner can be defined as the intersection of two or more edges (special case of interest points). In general, interest points could be: Isolated points of local intensity maximum or minimum Line endings Points on a curve where the curvature is locally maximized


Download ppt "Instructor: Mircea Nicolescu Lecture 9"

Similar presentations


Ads by Google