Camera & Color
Overview Pinhole camera model Projective geometry Vanishing points and lines Projection matrix Cameras with Lenses Color Digital image Book: Hartley 6.1, Szeliski 2.1.5, 2.2, 2.3
The trip of Light Light source properties Sensor characteristics Exposure Optics Surface shape Surface reflectance properties
Image formation Let's design a camera. Is this going to work? object film
Pinhole Camera object barrier film Add a barrier to block off most of the rays This reduces blurring The opening known as the aperture
Pinhole Camera f f c f = focal length c = camera center
Dimensionality Reduction 3D to 2D 3D world Pointofobservation 2D image
Projection Illusion
Projection Illusion
Projective Geometry Lost Properties Length (size) Angles Shape Invariant Properties Straight Lines
Projective Geometry Angles-Shape
Projective Geometry Length-Size
Projective Geometry Straight Lines
Projection Properties Many-to-one: any point along the same ray map to the same point in the image. Points Points Lines Lines Line through the camera center projects to a point. Planes Planes Plane through the camera center projects to a line.
Vanishing Points Parallel lines in the world intersect in the image at a vanishing point Vanishing Point
Vanishing Lines Planes in the world form the vanishing line in the image. Vanishing Line
Vanishing Lines camera center plane in the scene Horizon: vanishing line of the ground plane.
Homogeneous Coordinates Converting to homogeneous coordinates homogeneous image coordinates homogeneous scene coordinates Converting from homogeneous coordinates
Projection 3D World Coordinates to 2D Image Coordinates [] u p= v Y Y c Z o v f Z c: Camera center o: Optical center (0,0) i: Image plane X i Intrinsic Assumptions Unit aspect ratio Optical center at (0,0) Extrinsic Assumptions No rotation Camera at (0,0,0) ][ ] X Projection u f 0 0 0 Y w v =0 f 0 0 Matrix: Z 1 0 0 1 0 1 [][ [] X P= Y Z
Projection Matrix [] u p= v Y Y c Z o v f Z X i c: Camera center o: Optical center (u0,v0) i: Image plane [] X P= Y Z If the position of the optical center is at (u 0,v0): K:intrinsic matrix [][ f 0 u0 u w v = 0 f v0 1 0 0 1 ][ ] X 0 Y 0 Z 0 1 x=k [ I 0 ] X Rotation (R), Translation (t) x=k [ R t ] X
Field of View
Field of View Y c φ Z d o f X i 1 ϕ=tan (d /2f )
Lenses focal point f A lens focuses light onto the film.
Lens Focus circle of confusion There is a specific distance at which objects are in focus.
Lens Focus Depth of Field
Depth of Field and Aperture Changing the aperture size affects depth of field A smaller aperture increases the range in which the object is approximately in focus But small aperture reduces amount of light need to increase exposure
Lens flaws: Spherical aberration Rays farther from the optical axis focus closer.
Lens flaws: Vingetting
Radial Distortion Caused by imperfect lenses Deviations are most noticeable on the edges. No distortion Pin cushion Barrel
Real Lenses
Color
What is color? Color is the result of interaction between physical light in the environment and our visual system Color is a psychological property of our visual experiences when we look at objects and lights, not a physical property of those objects or lights (S. Palmer, Vision Science: Photons to Phenomenology) Wassily Kandinsky, Murnau Street with Women, 1908
Physics of Light A source of light can be described physically by its spectrum: the amount of energy emitted at each wavelength (~400-700nm).
Color Perception by Humans Photoreceptor cells: Rods and cones on the retina. Rods provide black and white vision. Cones provide color vision. 3 kind of cones.
Color Perception by Humans Rods and cones act as filters on the spectrum:to get the output of a filter, multiply its response curve by the spectrum, integrate over all wavelengths
RGB Color Space Additive color model. Each pixel is characterized by a value for each of the three components: (vr,vg,vb). Examples: Black: (0,0,0) Gray: (v,v,v) White: (vmax,vmax,vmax)
Uses of Color in Computer Vision Skin Detection
Uses of Color in Computer Vision Image Segmentation and Retrieval
Digital Camera
Digital Image - Binary
Digital Image - Grayscale
Digital Image - Color
Digitization Digital camera, scanner. Quality depends on: Spatial Sampling (image resolution, number of pixels). Depth (number of intensity values).
Digitization Spatial Sampling Initial image Sampling points Coarse sampling Dense sampling
Sampling Interval Look at the fence: Sampling interval White image! Grey image! 100 100 100 100 100 100 40 40 40 40 40 40 100 100 100 100 100 100 40 40 40 40 40 40 100 100 100 100 100 100 40 40 40 40 40 40 100 100 100 100 100 100 40 40 40 40 40 40
Sampling Interval Look at the fence: Sampling interval 40 100 40 100 40 40 100 40 100 40 40 100 40 100 40 40 100 40 100 40 Now the fence is visible!
Sampling Theorem If the width of the thinest structure is d, then the sampling interval should be smaller than d/2.
Image Quantization Determines the value of each sample. Mapping between analog continuous values and K digital quantized values. K-1 Quantization Level 3 2 1 0 0 Signal Value M
Selection of K Gray Scale Image Analog image K=2 K=4 K=16 K=32
Selection of K - Color Image Analog Image K=2 (for each color) K=4 (for each color)
Loss during Quantization
Loss during Spatial Sampling
Image Histogram H H(i) is the number of image pixels that have the value i. 8 Pixel Count 7 6 5 For a MxN image: I max 4 3 H (i) MN 2 1 0 0 1 2 3 4 5 Gray Value 6 7 i I min
Histogram Examples 1241 0 256 1693 0 256
? Questions?