By Dick Maybach Tech Column n2nd[at]att[dot]net Guide to the inner workings of a

This is the first of three articles on digital cam- eras covering their anatomy, how their processors control them, and how they process the captured images. An early slogan was, “You press the button; we do the rest.” Today, modern digital cameras can make the same claim. Most of us have pressed the button; let’s look at the rest of the process.

The First Digital Camera In 1975, Steven Sasson at Eastman Kodak de- veloped the first digital camera, shown in Figure Fig. 2. Basic Camera Components. 1. He used off-the-shelf parts: a movie-camera ture; the lens focuses the incoming light onto the lens, a newly-developed sensor from Bell Labs, a photo sensor, which takes the same roll as pho- “In 1975, cassette tape for stor- tographic film. In all but the simplest cameras, a Steven Sasson age, and a TV monitor diaphragm with a variable area limits the amount to display the images. of light entering the camera. (Notable exceptions at Eastman The camera had a 1/20 are cell-phone cameras.) The shutter opens only Kodak de- second shutter speed, when you wish to take a picture. Located as veloped the but needed 23 seconds shown, it’s called a focal-plane shutter, because to transfer a 100 by it’s very near the plane where the lens focuses first digital 100 black-and- the light. The shutter can also be near the lens camera…. He white image to tape. or it can be integrated into the sensor (which is used off-the- Kodak wasn’t inter- the case for cell-phone cameras). There are thus Fig. 1. First Digital Camera. ested, because they two ways to control the amount of light striking shelf parts…” feared digital cameras the sensor, with the diaphragm and with shutter. would reduce their profits from photographic Although only a simple lens is shown here, more films. They were right, and in 2012, they filed complex ones are common. for bankruptcy. The liquid crystal display (LCD) shows you where the camera is pointed and lets you look at Camera Types the pictures you have taken. It also displays the Figure 2 [top of next column] shows a simpli- camera status and set-up menus. On higher-end fied view of a consumer digital camera architec- Continued on page 7 BCUG Bytes April 2018 a 6

Tools for computer users with impaired vision Continued Continued from page 6 cameras, a second LCD that shows the same in- optical complexity, its lens must be far away from formation as the one on the rear panel allows for the sensor to clear the mirror. Its main advantages viewing in bright sunlight. The result is called a are high-quality pictures and fast operation. Be- viewfinder. In older camera the viewfinder was cause of its cost, SLR architecture is used only for purely optical, with its own lens, but this is rare high-end, interchangeable-lens cameras. now. The sensor must operate all the time, whether to provide an image for composing or one for Lenses storage, although its resolution is usually reduced The complexity of Figure 4 is typical of modern for composing. lenses, although cell-phone and Webcam lenses You may have noticed a problem; when the often have only a single element. Point-and-shoot shutter is closed, light can’t strike the photo sen- lens complexity lies between these extremes. The sor, and the LCD has nothing to display. Cameras added lens elements correct distortion, keep the with mechanical shutters hold them open to allow light intensity constant across the sensor, and a display, close them briefly when you press the reduce color aberration. button to allow the photo sensor to be reset for picture taking, and open them for the exposure, and perhaps close them while the image is trans- ferred from the sensor. A digital single lens reflex (DSLR), shown in Figure 3, places a mirror in the light path to reflect the light into the optical viewfinder whenever the camera is not taking a picture. To take a picture, both mirrors momentarily flip up. Normally, DSLRs also have focal plane shutters, since they must be located out of the way of the mirror. Their high-performance sensors often have both Fig. 4. High-end lens. mechanical and electronic shutters. We will now shift gears to look at how the “A digital camera records an image. You may be surprised single lens to learn that its sensor does not use the red-green- reflex (DSLR blue (RGB) format. A computer in the camera changes the recorded information into the desired … places a output format. mirror in the light path to Bayer Each pixel on a digital camera sensor contains reflect the a light sensitive photo diode which measures the light into the brightness of light. Photo-diodes are monochrome devices, unable to sense color. Therefore, a mosaic optical view- Fig. 3. Digital Single Lens Reflex Architecture. pattern of color filters is positioned on top of the Because the sensor receives light only when finder whenev- sensor to allow only red, green, or blue light to taking a picture, the LCD can display only the illuminate a single pixel. The most common filter er the camera pictures already taken. Live viewing requires an used in digital cameras is the GRGB Bayer Pat- auxiliary sensor, often located in the viewfinder, is not taking tern, named after a Kodak engineer. The result is as both the shutter and mirror block light from a picture.” a color filter array, shown in Figure 5. By breaking the main sensor. The main mirror is partially up the sensor into red, blue and green , it silvered to allow some light to pass through it is possible to get enough information in the gen- and be reflected down to the focus and exposure eral vicinity of each sensor to make an accurate sensors by the second mirror. These sensors are estimate of the true color there. By contrast, our optimized for their particular uses, since they eyes contain two types of sensors: rods, which aren’t used to capture images. This arrangement are much more numerous, detect only intensity implies a high price. Besides its mechanical and Continued on page 8 BCUG Bytes April 2018 7 Tools for computer users with impaired vision Continued Continued from page 7 and are most sensitive to green light, and cones, sistor to drain the charge from the photosensitive which detect color. region. Next, the integration period begins, and In the Bayer filter pat- light interacts with the photo-diode region of the tern, the colors are not pixel to produce electrons, which are stored in the evenly divided – there are silicon potential well lying beneath the surface. as many green pixels as After the integration period has finished, the there are blue and red com- row-select transistor is switched on, connecting bined, because our eyes are the amplifier transistor in the selected pixel to its more sensitive to green load, thus converting the electron charge in the detail than the other col- photo-diode into a voltage. The resulting voltage Fig. 5. Bayer Filter. ors. The advantages of this appears on the column bus and can be detected method are that only one sensor is required, and by the sense amplifier. This cycle is then repeated all the color information (red, green and blue) is to read out every row in the sensor in order to recorded at the same moment. The raw output produce an image. Keep in mind that even simple from a sensor with a Bayer filter is a mosaic of cell-phone cameras have millions of these cells red, green and blue pixels of different intensi- on their sensors. ties. After a raw image has been obtained from Figure 7 shows a complete CMOS image sen- a photo-sensor blanketed by a Bayer pattern of sor that contains an active image area of 640 x 480 color filters, it must be converted into standard pixels. The photo-diode array, located in the large red, green, and blue format, usually sRGB or reddish-brown central area of the chip, is covered Adobe RGB. A computer in the digital camera by a Bayer color filter array and a micro-lens ar- determines the correct color for each pixel in the ray. The inset reveals a highly magnified view of array by averaging the color values of neighboring the filter and micro-lens array. Also included on pixels. This process is called . the sensor is the analog signal processing circuitry to collect and interpret the signals. These then go CMOS Sensor to the analog-to-digital conversion circuits, locat- The Complementary Metal Oxide Semicon- ed adjacent to the photo-diode array on the upper ductor (CMOS) sensor, shown in Figure 6, is portion of the chip. You can see the peripheral now the dominant type. This sketch shows one circuitry located on the edges of the chip. “Each pixel CMOS sensor pixel containing a photosensitive area (photo-diode), busses, microlens, Bayer in a CMOS filter, and three support transistors. Each pixel in a CMOS image sensor contains an amplifier transistor, which converts the charge generated contains an by the photo-diode into a voltage. In addition, amplifier tran- the pixel also features a reset transistor to control sistor, which photon accumulation time, and a row-select tran- sistor that connects the pixel output for readout. converts the All this circuitry reduces the photo-diode area. charge gen- In operation, the first step is to use the reset tran- erated by the photo-diode Fig. 7. CMOS Image Sensor Integrated Circuit into a voltage.” Architecture. CMOS Functions In addition to converting photons to electrons and transferring them, the CMOS sensor might also perform image processing, noise reduction, and analog to digital conversion. This functional integration onto a single chip reduces the number of external components needed. Using such an in- Fig. 6. CMOS PixelCell Anatomy. Continued on page 9 BCUG Bytes April 2018 a 8

BBS Discussion By users of the BCUG BBS service listed in the article www.bcug.com, log into members-only section, then enter BBS My favorite, most used, can’t-live-without utilities Lee Maxwell https://www.malwarebytes.com/premium/ wrote: ➤➤Glary Utilities: I admit to not knowing much John Stampfel sent a query in his email an- about the intricacies of the Windows Registry, nouncing the March General Meeting speaker, but Glary seems to be the best of these types of which I quote in part below: utilities. Don’t like the nagging to pay for it, but “The topic of David Williams, our presenter otherwise does the job well. You can download it at the BCUG March monthly General Meeting as a 30-day full trial and continue to use it with- will be ‘Must Have Utilities for Your Computer’. out auto-update and process scanning functions. “To get us thinking about this, how about https://www.glarysoft.com/ “…how about sharing what is your favorite, or most used, or ➤➤Task Manager: It’s right there, free, just sharing what ‘can’t live without’ utility, tool, trick or add-on? CTRL-ALT-Delete, and you can examine pro- is your fa- Take a moment to respond via the club Bulletin cessor and RAM usage, force-quit recalcitrant Board (rather than the email lists) and help programs and processes, and many other tasks vorite, or make the lives of your fellow participants and I’m not knowledgeable enough to describe. most used, club members easier too. (Include how to get or ‘can’t live the item.)” macOS: OK, I’ll byte [pun intended]: ➤➤DiskWarrior: The price is steep $100, but I’ve without’ util- used this hundreds of times to either fix software ity, tool, trick Windows: storage issues on Mac had drives or resurrect hard ➤➤MalwareBytes: a must-have anti-malware drives that have no physical damage but have or add-on?” program, which I’ve used successfully and rare- issues with how software is stored on the Mac. ly seen fail to find and remove malware from https://www.alsoft.com/ Windows. Works well with Windows Defender. Continued on page 10

Tools for computer users with impaired vision Continued Continued from page 8 ones found in cell-phones, are far more complex than you probably suspected. Their optics are relatively simple, about the same as in a consumer film camera of 50 years ago, but their electronics “…digital boost their performance far beyond these early devices. Since optics are expensive and circuitry cameras, even cheap, the result is impressively cost effective. the simple Next month I’ll discuss camera control and ones found in image capture. cell-phones, Fig. 8. CMOS Functional Diagram. Full Service Internet are far more tegrated CMOS sensor allows the digital camera Interconnection & Presence complex than to devote less space to other chips, such as digital Serving Montvale to Barnegat plus NYC signal processors (DSPs) and ADCs. CMOS is you probably the dominant semiconductor technology, so these suspected. devices enjoy huge economies of scale. http://www.monmouth.com Their optics To read out the array, a row is selected, which connects one pixel in each column to the col- are relatively umn bus. Each column is then selected in turn, • Personal & Business Accounts simple…” which sends the pixels one at a time to the output • Web Page Hosting/Design amplifier. Figure 8 shows the circuit blocks to • Dedicated Internet Connections accomplish these functions. 10 W. Bergen Place Although this introduction was quite brief, it Suite 110 NJ 732–842–5366 does show that digital cameras, even the simple Red Bank, New Jersey 07701 NY 712–785–1735 BCUG Bytes April 2018 9