Lec. 26, Thursday, Nov. 18 Digital imaging (not in the book) We are here Matrices and bit maps How many pixels How many shades? CCD Digital light projector Image compression: JPEG and MPEG Chapter 8: Binocular vision 1 What is a digital image? First: What is a matrix? The matrix M is rows and columns of numbers. M 1,1 M 1,2 M 1,3 M 2,1 M 2,2 M 2,3 M 3,1 M 3,2 M 3,3 2 1
Dot matrix printer The numbers in the matrix are 0 for OFF and 1 for ON. The 0 or 1 is a bit. The matrix for an image is a bit map. One dot is a pixel. Each pixel is one bit (a zero or a one) in the memory. Example: highway sign with weather warning 3 Why do I want more pixels? Answers: To make an enlargement To read the fine print 4 2
How many pixels does my display have? 640 x 480 VGA used in older 14 in. displays 800 x 600 SVGA (super video graphics array) 1024 x 768 XGA (extended graphics array) 1280 x 1024 SXGA 1600 x 1200 UXGA used in 20 inch displays Pixels in digital cameras (examples): 2240 x 1680 (4 megapixels) 4064 x 2704 (11 megapixels) In color images, there are 3 subpixels, one for each color. Two designs for color pixels. Wikipedia 5 How many shades of gray? Instead of 0 for black and 1 for white: 0 to 255 for shades of gray (256 values) 6 3
How many possible colors on your screen? 256 shades of red x 256 shades of blue x 256 shades of green = 16.7 million colors Demo: in MS Word, the draw program, fill colors 7 Digital Cameras Wikipedia Film is replaced by a CCD chip (and a memory chip.) 4
The digital camera dial Auto: camera chooses shutter speed and exposure time S or Tv: shutter priority, you choose the shutter speed to freeze moving subjets, camera selects f/number. A: aperture priority, you choose aperture to control depth of field M: manual, you choose f/number (aperture) and shutter speed P: program mode, partially automatic More camera modes Macro mode (flowers) Camera focuses close to capture a bee in a flower, for example 4 x 6 inch prints are life size Landscape mode Chooses small aperture (big f/number) for depth of field Portrait mode Chooses large aperture for small depth of field Sports mode Chooses fastest shutter speed Night mode Chooses long exposure for background and flash for subject 5
CCD is a charge coupled device A CCD is rows and columns of sensors which convert light to electric signals. It produces a bitmap image directly. One sensor element Color CCD chips have filter arrays 6
CCD chip seen with a microscope. How is the image stored? The easiest file type to understand in the bitmap (.bmp) which is a matrix of numbers. Bitmaps files are often too large (2 MB or more). You could not store many images on a small memory stick. JPEG (joint photographic experts group) files are smaller (compressed about 10:1) and some detail is lost. They are converted back to bitmaps to be displayed. 7
Examples of JPEG compression 23 KB 8.4 KB 4 KB MPEG files MPEG (moving picture experts group) files are for movies and DVDs The basic idea: 1. Send a complete picture every now and then 2. Between complete pictures, send only the difference between the images (consider a car moving against a fixed background) 3. Send fewer colors than the whole range 8
What is a digital light projector (DLP)? It is an array of tiny mirrors which can tilt. Each mirror is 16 micrometers square. Maximum resolution now is 1280 x 720. Mirror array with insect leg. Light shines on the mirrors and is projected (or not) onto the screen For color images, color filters are needed. Often a rotating wheel with color filters is used. 9
Internal components of an old 1998 InFocus LP425z single-chip DLP projector, with a 4-segment color wheel. Interior view of a single-chip DLP projector, showing the light path. Light from the lamp enters a reverse-fisheye, passes through the spinning color wheel, crosses underneath the main lens, reflects off a frontsurfaced mirror, and is spread onto the DMD (red arrows). From there, light either enters the lens (yellow) or is reflected off the top cover down into a light-sink (blue arrows) to absorb unneeded light. Wikipedia.com Chapter 8: Binocular vision We are here Why two eyes Binocular disparity Conveying depth in art Stereo images 20 10
Why two eyes? 1. Wider field of view: one eye sees 130 degrees, two eyes see 208 degrees 2. Depth perception: the two images are not the same. The difference, binocular disparity, tells us the distance. Animal eyes: Predators: eyes in front, like cats Prey: eyes on sides of head, like cows, ducks, rabbits Exceptions: prey living in trees; monkeys, squirrels 21 How do we perceive distance? Accommodation: Eye muscles must exert a force to focus more closely. You can feel the strain associated with accommodation. Convergence: Your eyes must both orient toward the center of the field of view in order to focus on something close. Parallax: A different view is seen from different positions. Hold up a finger in front of your face. Look at a distant object through one eye and then the other. Demo: hold up a finger near your face. Close one eye then the other. 22 11
Convergence (again) 23 What is parallax? What is binocular disparity? Left eye view Right eye view The items are a basketball and a grapefruit. The brain interprets the difference in the images as due to distance. The image difference is binocular disparity. Parallax is an apparent displacement or difference in the apparent position of an object viewed along two different lines of sight. 24 12
Stereo Photography two cameras make two images to reproduces binocular disparity The three-d view looks just right when the cameras have the same spacing apart as your eyes. Is this answer a surprise? The spacing of eyes is about 6.5 cm or about 2 ½ inches. 25 Viewing a stereo image This 19 th century device is a stereopticon or stereoscope. 26 13
Lenticular screen Lenticular screens were used for 3-d baseball cards. These have little lenses embossed in plastic (see diagram below) which send to the left and right eyes different images which are printed in small vertical strips under the lenses. Plastic lenticules There is an LCD version of the lenticular screen that shows 3-d. However, you must be standing in front at the right distance. 27 Chapter 8: Binocular vision We are here Why two eyes Binocular disparity Conveying depth in art Stereo images 28 14
Conveying 3-d in 2-d art Six ambiguous depth cues (having more than one interpretation) 1. Size 2. Perspective 3. Light and shadow 4. Low contrast 5. Overlay 6. Previous knowledge 29 1. Size We interpret bigger as being closer. Trickery: a gardener will but big leafed plants in front and small leafed plants in back to make the garden look deeper. 30 15
Pietro Perugino's usage of perspective in this fresco at the Sistine Chapel (1481 82) helped bring the Renaissance to Rome. Wikipedia 31 Perspective is done poorly. Late 8 th century Wikipedia 32 16
Reconstruction of the temple of Jerusalem, Burgundian miniature, c. 1460. Lacks vanishing points. More distant persons are smaller, but inconsistently. 33 Detail of The Effects of Good Government, a fresco in the City Hall of Siena by Ambrogio Lorenzetti, 1338 Wikipedia Perspective is inconsistent. 34 17
Thirteenth century artists tended to draw the most important person (the king?) the biggest. Later, more sophisticated artists used smaller size to indicate persons further away. CIMABUE Virgin Enthroned with Angels 1290-95 35 18