Recap from Monday - PowerPoint PPT Presentation

1 / 31
About This Presentation
Title:

Recap from Monday

Description:

Title: Computational Photography Author: Alexei A. Efros Last modified by: Lenovo User Created Date: 5/10/1998 5:20:27 PM Document presentation format – PowerPoint PPT presentation

Number of Views:68
Avg rating:3.0/5.0
Slides: 32
Provided by: Alexe187
Learn more at: https://cs.brown.edu
Category:

less

Transcript and Presenter's Notes

Title: Recap from Monday


1
Recap from Monday
DCT and JPEG Point Processing Histogram
Normalization Questions JPEG compression
levels Gamma correction
2
JPEG Clarifications
  • Compression level is indeed adjusted by changing
    the magnitude of the quantization table.
  • JPEG often preferentially compresses color
    information.

3
Gamma Correction
  • Is an instance of these power law intensity
    transformations.
  • Typically, gamma 2.2 for a display device, and
    1/2.2 for encoding.
  • The result is a more perceptually uniform
    encoding.

4
Gamma Correction
  • Image encoded for various display gammas.

Source Wikipedia
5
Image Warping
http//www.jeffrey-martin.com
cs195g Computational Photography James Hays,
Brown, Spring 2010
Slides from Alexei Efros and Steve Seitz
6
Image Transformations
  • image filtering change range of image
  • g(x) T(f(x))

image warping change domain of image g(x)
f(T(x))
7
Image Transformations
  • image filtering change range of image
  • g(x) T(f(x))

f
g
image warping change domain of image g(x)
f(T(x))
f
g
8
Parametric (global) warping
  • Examples of parametric warps

aspect
rotation
translation
perspective
cylindrical
affine
9
Parametric (global) warping
p (x,y)
p (x,y)
  • Transformation T is a coordinate-changing
    machine
  • p T(p)
  • What does it mean that T is global?
  • Is the same for any point p
  • can be described by just a few numbers
    (parameters)
  • Lets represent T as a matrix
  • p Mp

10
Scaling
  • Scaling a coordinate means multiplying each of
    its components by a scalar
  • Uniform scaling means this scalar is the same for
    all components

? 2
11
Scaling
  • Non-uniform scaling different scalars per
    component

12
Scaling
  • Scaling operation
  • Or, in matrix form

scaling matrix S
Whats inverse of S?
13
2-D Rotation
x x cos(?) - y sin(?) y x sin(?) y cos(?)
14
2-D Rotation
x r cos (f) y r sin (f) x r cos (f ?) y
r sin (f ?) Trig Identity x r cos(f)
cos(?) r sin(f) sin(?) y r sin(f) cos(?) r
cos(f) sin(?) Substitute x x cos(?) - y
sin(?) y x sin(?) y cos(?)
f
15
2-D Rotation
  • This is easy to capture in matrix form
  • Even though sin(q) and cos(q) are nonlinear
    functions of q,
  • x is a linear combination of x and y
  • y is a linear combination of x and y
  • What is the inverse transformation?
  • Rotation by q
  • For rotation matrices

R
16
2x2 Matrices
  • What types of transformations can be represented
    with a 2x2 matrix?

2D Identity?
2D Scale around (0,0)?
17
2x2 Matrices
  • What types of transformations can be represented
    with a 2x2 matrix?

2D Rotate around (0,0)?
2D Shear?
18
2x2 Matrices
  • What types of transformations can be represented
    with a 2x2 matrix?

2D Mirror about Y axis?
2D Mirror over (0,0)?
19
2x2 Matrices
  • What types of transformations can be represented
    with a 2x2 matrix?

2D Translation?
NO!
Only linear 2D transformations can be
represented with a 2x2 matrix
20
All 2D Linear Transformations
  • Linear transformations are combinations of
  • Scale,
  • Rotation,
  • Shear, and
  • Mirror
  • Properties of linear transformations
  • Origin maps to origin
  • Lines map to lines
  • Parallel lines remain parallel
  • Ratios are preserved
  • Closed under composition

21
Consider a different Basis
j (0,1)
q
i (1,0)
q4i3j (4,3)
p4u3v
22
Linear Transformations as Change of Basis
j (0,1)
v (vx,vy)
puv
pij
u(ux,uy)
i (1,0)
pij 4u3v
puv (4,3)
px4ux3vx py4uy3vy
  • Any linear transformation is a basis!!!

23
Whats the inverse transform?
v (vx,vy)
j (0,1)
puv
pij
u(ux,uy)
i (1,0)
pij (5,4)
puv (px,py) ?
pxu pyv
  • How can we change from any basis to any basis?
  • What if the basis are orthogonal?

24
Projection onto orthogonal basis
v (vx,vy)
j (0,1)
puv
pij
u(ux,uy)
i (1,0)
pij (5,4)
puv (upij, vpij)
ù
é
ù
é
u
u
u
u
ù
é
5
y
x
x
x


puv
pij
ú
ê
ú
ê
ú
ê
v
v
v
v
4
û
ë
û
ë
û
ë
y
x
y
y
25
Homogeneous Coordinates
  • Q How can we represent translation as a 3x3
    matrix?

26
Homogeneous Coordinates
  • Homogeneous coordinates
  • represent coordinates in 2 dimensions with a
    3-vector

homogenouscoords
27
Homogeneous Coordinates
  • Add a 3rd coordinate to every 2D point
  • (x, y, w) represents a point at location (x/w,
    y/w)
  • (x, y, 0) represents a point at infinity
  • (0, 0, 0) is not allowed

Convenient coordinate system to represent many
useful transformations
28
Homogeneous Coordinates
  • Q How can we represent translation as a 3x3
    matrix?
  • A Using the rightmost column

29
Translation
  • Example of translation

Homogeneous Coordinates
tx 2ty 1
30
Basic 2D Transformations
  • Basic 2D transformations as 3x3 matrices

Translate
Scale
Rotate
Shear
31
Matrix Composition
  • Transformations can be combined by matrix
    multiplication

p T(tx,ty) R(Q)
S(sx,sy) p
32
Affine Transformations
  • Affine transformations are combinations of
  • Linear transformations, and
  • Translations
  • Properties of affine transformations
  • Origin does not necessarily map to origin
  • Lines map to lines
  • Parallel lines remain parallel
  • Ratios are preserved
  • Closed under composition
  • Models change of basis
  • Will the last coordinate w always be 1?

33
Projective Transformations
  • Projective transformations
  • Affine transformations, and
  • Projective warps
  • Properties of projective transformations
  • Origin does not necessarily map to origin
  • Lines map to lines
  • Parallel lines do not necessarily remain parallel
  • Ratios are not preserved
  • Closed under composition
  • Models change of basis

34
2D image transformations
  • These transformations are a nested set of groups
  • Closed under composition and inverse is a member

35
Matlab Demo
help imtransform
Write a Comment
User Comments (0)
About PowerShow.com