Presentation is loading. Please wait.

Presentation is loading. Please wait.

Digital Visual Effects, Spring 2008 Yung-Yu Chuang 2008/4/15

Similar presentations


Presentation on theme: "Digital Visual Effects, Spring 2008 Yung-Yu Chuang 2008/4/15"— Presentation transcript:

1 Digital Visual Effects, Spring 2008 Yung-Yu Chuang 2008/4/15
Camera calibration Digital Visual Effects, Spring 2008 Yung-Yu Chuang 2008/4/15 with slides by Richard Szeliski, Steve Seitz, and Marc Pollefyes

2 Announcements Project #2 is due midnight next Monday
Results for project #1 artifacts voting

3 Project #1 artifact voting
Total 141 votes 33 of 37 artifacts got votes

4 Honorable mention(8): 胡傳甡 高紹航

5 Honorable mention(8): 劉俊良

6 Honorable mention(10): 周伯相

7 Third place (13): 羅聖傑 鄭京恆

8 Second place (14): 葉蓉蓉 劉冠廷

9 First place (17): 梁彧 吳孟松

10 Outline Camera projection models Camera calibration
Nonlinear least square methods

11 Camera projection models

12 Pinhole camera

13 Pinhole camera model (X,Y,Z) P p (x,y) origin principal point (optical
center)

14 Pinhole camera model principal point

15 Pinhole camera model principal point

16 Principal point offset
intrinsic matrix only related to camera projection

17 Is this form of K good enough?
Intrinsic matrix Is this form of K good enough? non-square pixels (digital video) skew radial distortion

18 Distortion Radial distortion of the image Caused by imperfect lenses
No distortion Pin cushion Barrel Radial distortion of the image Caused by imperfect lenses Deviations are most noticeable for rays that pass through the edge of the lens

19 Camera rotation and translation
extrinsic matrix

20 Two kinds of parameters
internal or intrinsic parameters such as focal length, optical center, aspect ratio: what kind of camera? external or extrinsic (pose) parameters including rotation and translation: where is the camera?

21 Other projection models

22 Orthographic projection
Special case of perspective projection Distance from the COP to the PP is infinite Also called “parallel projection”: (x, y, z) → (x, y) Image World

23 Other types of projections
Scaled orthographic Also called “weak perspective” Affine projection Also called “paraperspective”

24 Illusion

25 Illusion

26 Fun with perspective

27 Perspective cues

28 Perspective cues

29 Fun with perspective Ames room Ames video BBC story

30 Forced perspective in LOTR
LOTR I Disc 4 -> Visual effects -> scale 0:00-10:00 or 15:00

31 Camera calibration

32 Camera calibration Estimate both intrinsic and extrinsic parameters
Mainly, two categories: Photometric calibration: uses reference objects with known geometry Self calibration: only assumes static scene, e.g. structure from motion

33 Camera calibration approaches
linear regression (least squares) nonlinear optimization

34 Chromaglyphs (HP research)

35 Multi-plane calibration
Images courtesy Jean-Yves Bouguet, Intel Corp. Advantage Only requires a plane Don’t have to know positions/orientations Good code available online! Intel’s OpenCV library: Matlab version by Jean-Yves Bouget: Zhengyou Zhang’s web site:

36 Step 1: data acquisition

37 Step 2: specify corner order

38 Step 3: corner extraction

39 Step 3: corner extraction

40 Step 4: minimize projection error

41 Step 4: camera calibration

42 Step 4: camera calibration

43 Step 5: refinement

44 Optimized parameters

45 Camera calibration

46 Linear regression

47 Linear regression Directly estimate 11 unknowns in the M matrix using known 3D points (Xi,Yi,Zi) and measured feature positions (ui,vi)

48 Linear regression

49 Linear regression

50 Linear regression Solve for Projection Matrix M using least-square techniques

51 Normal equation Given an overdetermined system
the normal equation is that which minimizes the sum of the square differences between left and right sides

52 Linear regression Advantages: Disadvantages:
All specifics of the camera summarized in one matrix Can predict where any world point will map to in the image Disadvantages: Doesn’t tell us about particular parameters Mixes up internal and external parameters pose specific: move the camera and everything breaks More unknowns than true degrees of freedom

53 Nonlinear optimization
A probabilistic view of least square Feature measurement equations Probability of M given {(ui,vi)} P

54 Optimal estimation Likelihood of M given {(ui,vi)}
It is a least square problem (but not necessarily linear least square) How do we minimize L? L P

55 We could have terms like in this
Optimal estimation Non-linear regression (least squares), because the relations between ûi and ui are non-linear functions M We can use Levenberg-Marquardt method to minimize it unknown parameters We could have terms like in this known constant

56 Nonlinear least square methods

57 Least square fitting number of data points number of parameters

58 Linear least square fitting
y t

59 Linear least square fitting
y model parameters t

60 Linear least square fitting
y model parameters t

61 Linear least square fitting
y model parameters residual prediction t

62 Linear least square fitting
y model parameters residual prediction t is linear, too.

63 Nonlinear least square fitting
model parameters residuals

64 Function minimization
Least square is related to function minimization. It is very hard to solve in general. Here, we only consider a simpler problem of finding local minimum.

65 Function minimization

66 Quadratic functions Approximate the function with
a quadratic function within a small neighborhood

67 Quadratic functions A is positive definite. All eigenvalues
are positive. For all x, xTAx>0. negative definite A is singular A is indefinite

68 Function minimization
Why? By definition, if is a local minimizer, is small enough

69 Function minimization

70 Function minimization

71 Descent methods

72 Descent direction

73 Steepest descent method
the decrease of F(x) per unit along h direction hsd is a descent direction because hTsd F’(x) = -F’(x)2 <0

74 Line search

75 Line search

76 Steepest descent method
isocontour gradient

77 Steepest descent method
It has good performance in the initial stage of the iterative process. Converge very slow with a linear rate.

78 Newton’s method It has good performance in the final stage of the iterative process, where x is close to x*.

79 Hybrid method This needs to calculate second-order derivative which might not be available.

80 Levenberg-Marquardt method
LM can be thought of as a combination of steepest descent and the Newton method. When the current solution is far from the correct one, the algorithm behaves like a steepest descent method: slow, but guaranteed to converge. When the current solution is close to the correct solution, it becomes a Newton’s method.

81 Nonlinear least square

82 Levenberg-Marquardt method

83 Levenberg-Marquardt method
μ=0 → Newton’s method μ→∞ → steepest descent method Strategy for choosing μ Start with some small μ If F is not reduced, keep trying larger μ until it does If F is reduced, accept it and reduce μ for the next iteration

84 How is calibration used?
Good for recovering intrinsic parameters; It is thus useful for many vision applications Since it requires a calibration pattern, it is often necessary to remove or replace the pattern from the footage or utilize it in some ways…

85 Example of calibration

86 Example of calibration

87 Example of calibration
Videos from GaTech


Download ppt "Digital Visual Effects, Spring 2008 Yung-Yu Chuang 2008/4/15"

Similar presentations


Ads by Google