image formation fundamentals basic concepts (continued…)
TRANSCRIPT
![Page 1: Image Formation Fundamentals Basic Concepts (Continued…)](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649e7a5503460f94b7adea/html5/thumbnails/1.jpg)
Image Formation Fundamentals
Basic Concepts (Continued…)
![Page 2: Image Formation Fundamentals Basic Concepts (Continued…)](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649e7a5503460f94b7adea/html5/thumbnails/2.jpg)
How are images represented in the computer?
courstey UNR computer vision course
![Page 3: Image Formation Fundamentals Basic Concepts (Continued…)](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649e7a5503460f94b7adea/html5/thumbnails/3.jpg)
Image digitization
• Sampling means measuring the value of an image at a finite number of points.• Quantization is the representation of the measured value at the sampled point by an
integer.
courstey UNR computer vision course
![Page 4: Image Formation Fundamentals Basic Concepts (Continued…)](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649e7a5503460f94b7adea/html5/thumbnails/4.jpg)
Image digitization (cont’d)
courstey UNR computer vision course
![Page 5: Image Formation Fundamentals Basic Concepts (Continued…)](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649e7a5503460f94b7adea/html5/thumbnails/5.jpg)
Image quantization (Example)
256 gray levels (8bits/pixel) 32 gray levels (5 bits/pixel) 16 gray levels (4 bits/pixel)
8 gray levels (3 bits/pixel) 4 gray levels (2 bits/pixel) 2 gray levels (1 bit/pixel)
courstey UNR computer vision course
![Page 6: Image Formation Fundamentals Basic Concepts (Continued…)](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649e7a5503460f94b7adea/html5/thumbnails/6.jpg)
Image sampling (example)
original image sampled by a factor of 2
sampled by a factor of 4 sampled by a factor of 8
courstey UNR computer vision course
![Page 7: Image Formation Fundamentals Basic Concepts (Continued…)](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649e7a5503460f94b7adea/html5/thumbnails/7.jpg)
Digital image
• An image is represented by a rectangular array of integers.• An integer represents the brightness or darkness of the image at that
point.• N: # of rows, M: # of columns, Q: # of gray levels
– N = , M = , Q = (q is the # of bits/pixel)– Storage requirements: NxMxQ (e.g., N=M=1024, q=8, 1MB)
(0,0)(0,1)...(0,1)(1,0)(1,1)...(1,1)............(1,0)(1,1)...(1,1)fffMfffMfNfNfNM−−−−−−
2n 2m 2q
courstey UNR computer vision course
![Page 8: Image Formation Fundamentals Basic Concepts (Continued…)](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649e7a5503460f94b7adea/html5/thumbnails/8.jpg)
Image formation
• There are two parts to the image formation process:– The geometry of image formation, which
determines where in the image plane the projection of a point in the scene will be located.
– The physics of light, which determines the brightness of a point in the image plane as a function of illumination and surface properties.
courstey UNR computer vision course
![Page 9: Image Formation Fundamentals Basic Concepts (Continued…)](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649e7a5503460f94b7adea/html5/thumbnails/9.jpg)
A Simple model of image formation
• The scene is illuminated by a single source.
• The scene reflects radiation towards the camera.
• The camera senses it via chemicals on film.
courstey UNR computer vision course
![Page 10: Image Formation Fundamentals Basic Concepts (Continued…)](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649e7a5503460f94b7adea/html5/thumbnails/10.jpg)
Pinhole cameras
• Abstract camera model - box with a small hole in it
• Pinhole cameras work in practice
courstey Dr. G. D. Hager
![Page 11: Image Formation Fundamentals Basic Concepts (Continued…)](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649e7a5503460f94b7adea/html5/thumbnails/11.jpg)
Real Pinhole Cameras
Pinhole too big - many directions are averaged, blurring the image
Pinhole too small- diffraction effects blur the image
Generally, pinhole cameras are dark, becausea very small set of raysfrom a particular pointhits the screen.
courstey Dr. G. D. Hager
![Page 12: Image Formation Fundamentals Basic Concepts (Continued…)](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649e7a5503460f94b7adea/html5/thumbnails/12.jpg)
The reason for lenses
Lenses gather andfocus light, allowingfor brighter images.
courstey Dr. G. D. Hager
![Page 13: Image Formation Fundamentals Basic Concepts (Continued…)](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649e7a5503460f94b7adea/html5/thumbnails/13.jpg)
The thin lens
1z'
−1z
=1f
Thin Lens Properties:1. A ray entering parallel to optical axis
goes through the focal point.2. A ray emerging from focal point is parallel
to optical axis3. A ray through the optical center is unaltered
courstey Dr. G. D. Hager
![Page 14: Image Formation Fundamentals Basic Concepts (Continued…)](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649e7a5503460f94b7adea/html5/thumbnails/14.jpg)
The thin lens
1z'
−1z
=1f
Note that, if the image plane is verysmall and/or z >> z’, then z’ is approximately equal to f
courstey Dr. G. D. Hager
![Page 15: Image Formation Fundamentals Basic Concepts (Continued…)](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649e7a5503460f94b7adea/html5/thumbnails/15.jpg)
Lens Realities
Real lenses have a finite depth of field, and usuallysuffer from a variety of defects
vignetting
Spherical Aberration
courstey Dr. G. D. Hager
![Page 16: Image Formation Fundamentals Basic Concepts (Continued…)](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649e7a5503460f94b7adea/html5/thumbnails/16.jpg)
The equation of projection
• Equating z’ and f– We have, by similar triangles,
that (x, y, z) -> (-f x/z, -f y/z, -f)– Ignore the third coordinate, and
flip the image around to get:
(x,y,z)→ ( fxz, fyz)
courstey Dr. G. D. Hager
![Page 17: Image Formation Fundamentals Basic Concepts (Continued…)](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649e7a5503460f94b7adea/html5/thumbnails/17.jpg)
Distant objects are smaller
courstey Dr. G. D. Hager
![Page 18: Image Formation Fundamentals Basic Concepts (Continued…)](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649e7a5503460f94b7adea/html5/thumbnails/18.jpg)
Parallel lines meet
common to draw film planein front of the focal point
A Good Exercise: Show this is the case!
courstey Dr. G. D. Hager
![Page 19: Image Formation Fundamentals Basic Concepts (Continued…)](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649e7a5503460f94b7adea/html5/thumbnails/19.jpg)
Orthographic projection
yv
xu
==
Suppose I let f go to infinity; then
courstey Dr. G. D. Hager
![Page 20: Image Formation Fundamentals Basic Concepts (Continued…)](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649e7a5503460f94b7adea/html5/thumbnails/20.jpg)
The model for orthographic projection
U
V
W
⎛
⎝
⎜ ⎜
⎞
⎠ ⎟ ⎟ =
1 0 0 0
0 1 0 0
0 0 0 1
⎛
⎝
⎜ ⎜
⎞
⎠ ⎟ ⎟
X
Y
Z
T
⎛
⎝
⎜ ⎜ ⎜
⎞
⎠
⎟ ⎟ ⎟
courstey Dr. G. D. Hager
![Page 21: Image Formation Fundamentals Basic Concepts (Continued…)](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649e7a5503460f94b7adea/html5/thumbnails/21.jpg)
Weak perspective
• Issue– perspective effects, but not over
the scale of individual objects– collect points into a group at
about the same depth, then divide each point by the depth of its group
– Adv: easy– Disadv: wrong
*/ Zfs
syv
sxu
===
courstey Dr. G. D. Hager
![Page 22: Image Formation Fundamentals Basic Concepts (Continued…)](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649e7a5503460f94b7adea/html5/thumbnails/22.jpg)
The model for weak perspective projection
⎟⎟⎟⎟⎟
⎠
⎞
⎜⎜⎜⎜⎜
⎝
⎛
⎟⎟⎟
⎠
⎞
⎜⎜⎜
⎝
⎛=
⎟⎟⎟
⎠
⎞
⎜⎜⎜
⎝
⎛
T
Z
Y
X
fZW
V
U
/*000
0010
0001
courstey Dr. G. D. Hager
![Page 23: Image Formation Fundamentals Basic Concepts (Continued…)](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649e7a5503460f94b7adea/html5/thumbnails/23.jpg)
Model for perspective projection
U
V
W
⎛
⎝
⎜ ⎜
⎞
⎠ ⎟ ⎟ =
1 0 0 0
0 1 0 0
0 0 1f 0
⎛
⎝
⎜ ⎜
⎞
⎠
⎟ ⎟
X
Y
Z
T
⎛
⎝
⎜ ⎜ ⎜
⎞
⎠
⎟ ⎟ ⎟
courstey Dr. G. D. Hager
![Page 24: Image Formation Fundamentals Basic Concepts (Continued…)](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649e7a5503460f94b7adea/html5/thumbnails/24.jpg)
Intrinsic Parameters
Intrinsic Parameters describe the conversion fromunit focal length metric to pixel coordinates (and the reverse)
pK
w
y
x
os
os
w
y
x
mm
yy
xx
pix
int
100
/10
0/1
=⎟⎟⎟
⎠
⎞
⎜⎜⎜
⎝
⎛
⎟⎟⎟
⎠
⎞
⎜⎜⎜
⎝
⎛−
−=
⎟⎟⎟
⎠
⎞
⎜⎜⎜
⎝
⎛
It is common to combine scale and focal length togetheras the are both scaling factors; note projection is unitless in this case!
courstey Dr. G. D. Hager
![Page 25: Image Formation Fundamentals Basic Concepts (Continued…)](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649e7a5503460f94b7adea/html5/thumbnails/25.jpg)
Image formation - Recap
Taken from MASKS (invitation to 3D vision)
world coordinate system
camera coordinate system
(R,T)
pixel coordinate system
image coordinate system
If we consider unit focal length
Scaling factor = depth of the point X
x1
![Page 26: Image Formation Fundamentals Basic Concepts (Continued…)](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649e7a5503460f94b7adea/html5/thumbnails/26.jpg)
Camera parameters
• Summary:– points expressed in external frame– points are converted to canonical camera coordinates– points are projected– points are converted to pixel units
⎟⎟⎟⎟⎟
⎠
⎞
⎜⎜⎜⎜⎜
⎝
⎛
⎟⎟⎟
⎠
⎞
⎜⎜⎜
⎝
⎛
⎟⎟⎟
⎠
⎞
⎜⎜⎜
⎝
⎛
⎟⎟⎟
⎠
⎞
⎜⎜⎜
⎝
⎛=
⎟⎟⎟
⎠
⎞
⎜⎜⎜
⎝
⎛
T
Z
Y
X
W
V
U
parameters extrinsic
ngrepresenti
tionTransforma
model projection
ngrepresenti
tionTransforma
parameters intrinsic
ngrepresenti
tionTransforma
point in cam. coords.
point in metricimage coords.
point in pixelcoords.
point in world coords.courstey Dr. G. D. Hager
![Page 27: Image Formation Fundamentals Basic Concepts (Continued…)](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649e7a5503460f94b7adea/html5/thumbnails/27.jpg)
Camera Calibration
The problem:Compute the camera intrinsic and extrinsic
parameters using only observed camera data.
![Page 28: Image Formation Fundamentals Basic Concepts (Continued…)](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649e7a5503460f94b7adea/html5/thumbnails/28.jpg)
Calibration with a Rig
Use the fact that both 3-D and 2-D coordinates of feature points on a pre-fabricated object (e.g., a cube) are known.
![Page 29: Image Formation Fundamentals Basic Concepts (Continued…)](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649e7a5503460f94b7adea/html5/thumbnails/29.jpg)
Calibration with Multiple Plane Images
Actually used in practice these days
![Page 30: Image Formation Fundamentals Basic Concepts (Continued…)](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649e7a5503460f94b7adea/html5/thumbnails/30.jpg)
Calibration Continued…