Sie sind auf Seite 1von 6

Journal of Food Engineering 61 (2004) 137142 www.elsevier.

com/locate/jfoodeng

A simple digital imaging method for measuring and analyzing color of food surfaces
Kit L. Yam
a b

a,*

, Spyridon E. Papadakis

Department of Food Science, Rutgers University, 65 Dudley Road, New Brunswick, NJ 08901-8520, USA Department of Food Technology, TEI of Athens, Ag. Spyridonos Strasse, 122 10 Egaleo, Athens, Greece Received 7 May 2002; accepted 14 May 2003

Abstract This paper presents a simple method that uses a combination of digital camera, computer, and graphics software to measure and analyze the surface color of food products. The method has also the advantages of being versatile and aordable. The images of the food products can be displayed on computer screen or printed on paper for qualitative analysis of color and structure. Quantitative information such as color distribution and averages (in terms of L , a and b values) can also be determined readily. 2003 Elsevier Ltd. All rights reserved.
Keywords: Color measurement; Color analysis; Adobe Photoshop; Digital camera

1. Introduction In food engineering research, it is often necessary to analyze the surface color of food samples both qualitatively and quantitatively. Qualitative analysis may involve visual inspection and comparison of the food samples. Quantitative analysis may involve obtaining color distribution and averages. An attempt may also be made to correlate color distribution with other data such as temperature and moisture content distributions. The correlation is not presented here since the main purpose of this paper is to describe a color measurement method, and exploring the correlation is a complicated task that is better dealt in another paper. Most commercial color measurement instruments are not well suited for food engineering research, because they are designed mainly for quality control. Since those instruments can only provide average values, it would be rather dicult and time-consuming if they were used for point-by-point measurement at many locations to obtain color distribution. Moreover, some of these instruments require the food sample to be homogenized using a blender or grinder to achieve uniform color. The blending or grinding not only takes time, but also renders the food sample no longer useable for other purCorresponding author. Tel.: +1-732-932-9611x241; fax: +1-732932-6776. E-mail address: yam@aesop.rutgers.edu (K.L. Yam). 0260-8774/$ - see front matter 2003 Elsevier Ltd. All rights reserved. doi:10.1016/S0260-8774(03)00195-X
*

poses. Commercial microscopy imaging systems with sophisticated image and color analysis capabilities are also available, but they are not suitable for analyzing the color of larger food objects such as pizza and bread. In university research laboratories, computer vision systems have been developed for product quality inspection and grading. Studies were carried out to analyze visual characteristics of products ranging from fruits and vegetables (for example color inspection of apples and potatoes, Tao, Heinemann, Varghese, Morrow, & Sommer, 1995; sorting of bell peppers based on color, Shearer & Payne, 1990), nuts, grains, meats (for example degree of marbling and color of steaks, Gerrard, Gao, & Tan, 1996) and shellsh to prepared foods like cheese, bakery products (for example color of muns, Zaid Abdullah, Abdul Aziz, & Dos-Mohamed, 2000), pasta and rice dishes for component composition (Locht, Thomsen, & Mikkelsen, 1997), confectionery and beer. The use of computer vision technology for food analysis was reviewed by Gunasekaran (1996) and Brosnan and Sun (2002). Most of the computer vision systems described in the literature employed specialized equipment or algorithms that are not easily accessible to most researchers. This paper presents a simple method that uses a digital camera to measure color, and the graphics software Photoshop (Adobe Systems Incorporated, San Jose, CA) to analyze color. The term measure means that the digital camera is used to obtain the color values

138

K.L. Yam, S.E. Papadakis / Journal of Food Engineering 61 (2004) 137142

of the pixels on the food surface. The term analyze means that Photoshop is used to manipulate those color values to obtain color distribution, averages, and so on. In this digital imaging method, the required equipment and software costs are low, the experimental setup and operating are simple, and the measurements and analysis are often adequately sophisticated for food engineering research. The application of the method to analyze the color of microwaved pizza is illustrated. The principles of color measurement can be found elsewhere (Clydesdale, 1978; Francis, 1994; Francis & Clydesdale, 1975; Hunt, 1991).

ponent (from green to red) and the b component (from blue to yellow). The L a b color is device independent, providing consistent color regardless of the input or output device such as digital camera, scanner, monitor, and printer. The L a b values are often used in food research studies. It is important to reiterate that the RGB and CMYK models are device dependent. For example, the food image appears darker on a Windows system than on a Mac OS computer, because the standard RGB color space is darker in Windows than in Mac OS (Adobe Systems, 2002). Also, the RGB and CMYK gamuts are smaller than the L a b gamut, and thus there are out-ofgamut colors that cannot be display on-screen or printed. 3. Measuring color A high-resolution digital camera (2 mega-pixel or above) is used to measure color by capturing the color image of the food sample under proper lighting. The captured image is a bitmap image consisting of many pixels; each pixel is assigned a specic location and color value. Although a atbed scanner can capture color images, it can also distort the food sample through physical contact, and its light source cannot be controlled easily. 3.1. Lighting system When capturing color images, proper light source is important since the color of the food sample depends on the part of spectrum reected from it (Francis & Clydesdale, 1975). Hence, the spectral power distribution of the illumination must be standardized. The CIE has dened several standard illuminants, which are specied by their color temperatures. The standard illuminants commonly used in food research are A (2856 K), C (6774 K), D65 (6500 K), and D (7500 K). The light sources C, D65 , and D are designed to mimic variations of daylight (Lawless & Heymann, 1998). The angle between the camera lens axis and the lighting source axis should be around 45, because the diuse reection responsible for the color occurs at 45 from the incident light (Francis & Clydesdale, 1975). Furthermore, the light intensity over the food sample should be uniform. This can be achieved through experimenting with various lighting arrangements (such as varying the distance between the light source and the food sample, taking the pictures in a dark room) and checking the results with a light meter. 3.2. Digital camera Digital camera records images on an electric light sensor that is made up of millions of tiny points or

2. Color models Three color models are used to dene color in this paper: the RGB (red, green, and blue) model, the CMYK (cyan, magenta, yellow, black) model, and the L a b model. Among them, the L a b model has the largest gamut encompassing all colors in the RGB and CMYK gamuts (Adobe Systems, 2002). While those color models are useful, their limitations should also be observed. For example, the spectrum of colors seen by the human eye is wider than the gamut (the range of colors that a color system can display or print) available in any color model. The RGB model is an additive color model that uses transmitted light to display colors. Various proportions and intensities of three primary colors (red, green, and blue) are used to create cyan, magenta, yellow, and white. The model is used for television and computer screens, in which colored pixels are produced by ring red, green, and blue electron guns at phosphors on the screens. The model relates closely to the way human perceives color in the retina. The model is device dependent, since its range of colors varies with the display device. The CMYK is a color model based on the lightabsorbing quality of ink printed on paper (Adobe Systems, 2002). As white light strikes translucent inks, certain visible wavelengths are absorbed while others are reected to the eyes. Three primary ink colors (cyan, magenta, and yellow) are used to create other colors. In theory, these three primary colors should combine to absorb all light and produce black; however, a muddy brown is produced instead because all printing inks contain some impurities. Thus, the fourth primary ink color (black) is needed to produce a true black. The CMYK model is also device dependent and is used in four-color process printing. The L a b model is an international standard for color measurement developed by the Commission Internationale dEclairage (CIE) in 1976. The L a b color consists of a luminance or lightness component (L value, ranging from 0 to 100), along with two chromatic components (ranging from )120 to +120): the a com-

K.L. Yam, S.E. Papadakis / Journal of Food Engineering 61 (2004) 137142

139

pixels. There are two major factors that aect the quality of the imageresolution and le compression. Resolution is related to the number of pixels on the light sensor: the more pixels, the higher the resolution, and the better the image quality. File compression reduces the amount of memory taken up by the image and allows more images to be stored. The trade-o for compressing the le is loss of image quality. For research purpose, non-compressed le (TIFF format) is preferred to compressed le (JPEG format). A digital camera with a minimum resolution of 1600 1200 pixels is recommended, which is equivalent to a 2.1 megapixel or higher camera. The camera should also have macro and zoom feature. A memory card of at least 32 Mb and a digital lm reader are also useful for storing the image les and transferring them to the computer. It is important to regularly ensure that the lighting system and camera are working properly and consistently. Hence, at least two standard colored chips should be used to calibrate or verify the experimental settings prior to actual measurements, and those colored chips should cover the color range of the specic food samples. Standard colored chips can be obtained from the Munsell Book of Color (GretagMacbeth, New Windsor, New York). A free software is also available on the company website, which allows the conversion between the Munsell values and the L , a , b values. 3.3. Color measurements of microwaved pizza As an illustration, the method was used to measure and analyze the color of microwaved pizza. The color of the bottom surface of cooked pizza is not only important to visual perception, but is also related to crispness. It is well known that microwave cooking does not produce crisp and brown pizza. A solution to this problem is to microwave the pizza in contact with a susceptor, which is usually made of a metallized polyethylene terephthalate (PET) lm laminated to paperboard. The susceptor absorbs microwave energy, heats up rapidly to high temperatures, and causes browning of the contacting food surfaces (Buer, 1993; Zuckerman & Miltz, 1997). Commercial ready-to-cook frozen pizzas, 17.8 cm in diameter and 1.5 cm thick, of the same brand were used. The pizzas were microwaved either on a plain paperboard or on two dierent types of susceptor (referred to as Susceptor-A and Susceptor-B). The pizzas were microwaved at 100% power for 3.5 min. After microwaving, they were cooled to room temperature and then ipped over. The lighting system consisted of two CIE source D65 lamps (Bulb Direct, www.bulbdirect.com), 45.0 cm long, mounted on two sides of a frame, on either side of the food sample, 30.5 cm above and at an angle of 45 to the

food sample plane. A 2.1 megapixel digital camera (Olympus, model C-2000Z) was held securely on a tripod and the lens faced downwards towards the pizza sample. The distance from the bottom of the camera lens to the food sample plane was 30.5 cm. Images of the bottom surface of the pizza were taken under the following camera settings: aperture priority mode with the lens aperture at f11, no ash, daylight conditions, macro mode on, remote mode on, sound on, resolution 1600 1200 pixels, and the images saved in memory card as TIFF les. After zooming the lens (so that the pizza covered the whole eld of view) and focusing, the picture was taken with the remote control. The pictures were downloaded to the PC via a USB digital lm reader (CameraMate, SCM Microsystems, Connecticut, USA).

4. Analyzing color Once the color images of the pizza samples were captured, the color was analyzed qualitatively and quantitatively using Photoshop. 4.1. Adobe Photoshop Photoshop is standard software used primarily by graphics producers and photographers for photo retouching and image editing (Adobe Systems, 2002). However, the software also has several features that may be adopted for analyzing color of food samples. A computer (Pentium III, 128 MB RAM, 20 GB hard disk or higher recommended) is needed to run the software. There are several reasons for choosing Photoshop for this method. The software is rich in image editing features, and its color analysis capability is comparable to the more expensive color analysis software. The software provides more sophisticated capability for managing color and producing consistent color than other graphics software. The software is also available in many laboratories, and it is strongly supported by the manufacturer and users. 4.2. Qualitative analysis Here the term qualitative refers to those aspects that are not easily quantied. For example, there were scattered dark spots in the pizza samples, and their appearance was not easily quantied with parameters such as L , a , b . In qualitative analysis, subjective terms such as lighter, darker, and more appealing were used to describe or compare the pizza samples. Both qualitative and quantitative analyses were used to provide accurate descriptions of the color of the pizza samples. In many other research studies, only quantitative information (such as the average color) was reported. While the average color provided a simple

140

K.L. Yam, S.E. Papadakis / Journal of Food Engineering 61 (2004) 137142

description, some important details were not included. In some cases, the use of average color alone (i.e., without visually inspecting the food sample) even resulted in misleading conclusions. Photoshop was used to browse and sort the pizza images, display the images on a computer screen, and print the images using a color printer. The images were examined and compared, and the eects of susceptor on color were observed. Although those functions could also be performed using other less expensive graphics software, Photoshop provided more sophisticated color management capability that was necessary for research. Since the RGB model (used for screen display) and CYMK model (used for printing) are device dependent, the pizza images were always examined or compared using the same computer screen or the same printer. Also out-of-gamut colors were identied using the Info Palette in Photoshop (discussed later). Photoshop was also used to provide close-up examination of the dark spots scattered on the bottom of the pizza samples. Those dark spots were too small to examine with the naked eye. Under magnication, they were observed to have elliptical shapes, and the L , a , b values were also obtained. The use of Photoshop to examine food structure was also reported by Stanley and Baker (2002). 4.3. Quantitative analysis In quantitative analysis, L a b values were used because they are device independent and cover a larger gamut than RGB and CMYK. Photoshop can display L a b values (also RGB and CMYK values) in the Info Palette and Histogram Window. Three dierent methods were used to determine the L a b distribution of the pizza samples. The rst method (Fig. 1) used the Info Palette to determine the color distributions along the x-axis and y axis, where the origin was located at the center of the pizza sample. By turning on the Grid feature in Photoshop, a grid was superimposed on the pizza sample. As the computer pointer was placed at a grid point along the x-axis or y -axis, the L a b values corresponding the pixel of that grid point were obtained from the Info Palette. However, the plots of L a b values as a func-

tion of the x-axis or y -axis (not shown) obtained in this way had a high level of noise. The noise was due to the small dark spots in the pizza sample and the selection of a single pixel in the determination of the L a b values. It is worth mentioning that the Info Palette can also be used to identify out-of-gamut colors. The CMYK values are normally displayed in percentage (see Fig. 1). When the computer pointer is placed at a pixel whose color value is outside the CMYK gamut, the percentage is replaced with an exclamation mark. However, over 99% of color values of the pizza samples were within the CMYK gamut. The second method used the Histogram Window to determine the color distributions along the x-axis and y -axis. In Fig. 2, the Histogram Window displays the statistics (mean, standard deviation, median, percentage, and so on) of the color value, Lightness, for a selected area in the pizza image. The Histogram Window can also display the statistics for two other color values (a and b), which is done by selecting a and b under the Channel drop-down menu. Hence, the average color of a pizza sample or any portion of it can be obtained easily using the Histogram Window. The Lightness, a, and b in the Histogram Window are not standard color values. However, they can be converted to L , a , b values using the formulas L a b Lightness 100 255 240a 120 255 240b 120 255 1 2 3

To determine the color distribution using the second method, average values for multiple pixels were used to reduce the noise in the plots. Again a grid was superimposed on the pizza sample as before. Instead of the grid points, the small squares (Fig. 1) along the x-axis and y -axis were selected. The length of each square was 18 pixels, while the diameter of the pizza sample was

Fig. 1. Image of bottom of microwaved pizza (left) and Info Palette in Photoshop (right).

Fig. 2. Histogram Window in Photoshop.

K.L. Yam, S.E. Papadakis / Journal of Food Engineering 61 (2004) 137142


x-axis 75.0 70.0 y-axis
Paper Susceptor-A Susceptor-B

141

75.0 70.0 L* 65.0 60.0 55.0 50.0 0


-1.0 -0.8 -0.6 -0.4 -0.2 0.0 0.2 0.4 0.6 0.8 1.0

65.0 L* 60.0 55.0 50.0 45.0 40.0

0.2
Paper

0.4

0.6

0.8
Susceptor-B

Dimensionless radius
Susceptor-A

Dimensionless radius, r/R

10.0 5.0 a* 0.0 -5.0 -10.0 0 0.2 0.4 0.6 0.8 1


Dimensionless radius
Paper Susceptor-A Susceptor-B

Fig. 3. L values along the x-axis and y -axis obtained using the second method.

1075 pixels. The Histogram Window was used to provide the average values for the squares (18 18 324 pixels each). Fig. 3 shows the L value as a function of the dimensionless radius for pizza microwaved on Susceptor-B, where r is any radius and R is the radius of the pizza sample. The distributions for the a and b values were also obtained (not shown). The plots in Fig. 3 were also used to determine the color symmetry. Ideally, the color should be distributed symmetrically along the radial direction. In this case, the plots should show mirror images across the middle plane (r=R 0), and the plots for the x-axis and y -axis should overlap each other. Fig. 3 shows that the L values are distributed quite symmetrically. The advantage of the second method is that it provides detailed description of the color distribution of individual samples. The disadvantage is that it is not suitable for comparing two or more samples due to the waviness of the plots. The third method was designed for comparing multiple pizza samples. Instead of small squares, much larger circular areas were selected. Photoshop was used to separate each pizza sample into ten circular sections. The rst section was created by removing a circle of dimensionless radius r=R 0:9 from the pizza sample (the remaining annulus was the rst section). The second section was created by removing a circle of r=R 0:8 from the circle that was removed from the previous step (the remaining annulus was the second section). The detailed procedures for using Photoshop to remove the circles were described by Papadakis, Abdul-Malek, Kamden, and Yam (2000). For each circular section, the average L , a , b values were obtained using the Histogram Window. The method made the assumption that the color distribution was symmetrical along the radial direction. Fig. 4 shows the L , a , b values obtained by the third method. As expected, the L for the pizza microwaved with plain paper is higher than those with susceptors. The darkening achieved was more noticeable

50.0 45.0 b* 40.0 35.0 30.0 25.0 0 0.2 0.4 0.6 0.8 1
Dimensionless radius

Fig. 4. Comparison of L , a , b values between paper and susceptors.

toward the outside due to the edge eect (Buer, 1993). Susceptor-A produced slightly darker color than Susceptor-B. The a value is also a good indicator of the dierences between plain paper and susceptors. The b value is less indicative because its range is smaller and its trends are less clear.

5. Conclusions The digital imaging method allows measurements and analyses of the color of food surfaces that are adequate for food engineering research. While it is not yet a replacement for sophisticated color measurement instruments, it is an attractive alternative due to its simplicity, versatility, and low cost. Photoshop is shown to be able to analyze the color for food samples, although the software was not originally designed for this purpose. However, it is already one of the most powerful software for color analysis, and the manufacturer and users are regularly making enhancements.

142

K.L. Yam, S.E. Papadakis / Journal of Food Engineering 61 (2004) 137142 Lawless, H. T., & Heymann, H. (1998). Sensory evaluation of food: principles and practices. New York: Chapman & Hall, pp. 406429. Locht, P., Thomsen, K., & Mikkelsen, P. (1997). Full color image analysis as a tool for quality control and process development in the food industry. Paper no. 9733006, ASAE, 2950 Niles Road, St. Joseph, MI 49085-9659, USA. Papadakis, S. E., Abdul-Malek, S., Kamden, R. E., & Yam, K. L. (2000). A versatile and inexpensive technique for measuring color of foods. Food Technology, 54(12), 4851. Shearer, S. A., & Payne, F. A. (1990). Color and defect sorting of bell peppers using machine vision. Transactions of the ASAE, 33(6), 20452050. Stanley, D. W., & Baker, K. W. (2002). A simple laboratory exercise in food structure/texture relationships using a atbed scanner. Journal of Food Science Education, 1, 69. Tao, Y., Heinemann, P. H., Varghese, Z., Morrow, C. T., & Sommer, H. J. (1995). Machine vision for color inspection of potatoes and apples. Transactions of the ASAE, 38(5), 15551561. Zaid Abdullah, M., Abdul Aziz, S., & Dos-Mohamed, A. M. (2000). Quality inspection of bakery products using a color-based machine vision system. Journal of Food Quality, 23(1), 3950. Zuckerman, H., & Miltz, J. (1997). Prediction of dough browning in the microwave oven from temperatures at susceptor/product interface. Food Science and Technology, 30, 519524.

References
Adobe Systems (2002). Adobe PhotoShop 7.0 User Guide. San Jose, CA: Adobe Systems Inc. Brosnan, T., & Sun, D.-W. (2002). Inspection and grading of agricultural and food products by computer vision systemsa review. Computers and Electronics in Agriculture, 36, 193213. Buer, C. R. (1993). Microwave cooking and processing: engineering fundamentals for the food scientist. New York: Van Nostrand Reinhold. Clydesdale, F. M. (1978). Colorimetry: methodology and applications. CRC Critical Reviews in Food Science and Nutrition, 10(3), 243301. Francis, F. J. (1994). Colorimetric properties of foods. In M. A. Rao, & S. S. H. Rizvi (Eds.), Engineering properties of foods (2nd ed., pp. 495523). New York: Marcel Dekker, Inc. Francis, F. J., & Clydesdale, F. M. (1975). Food colorimetry: theory and applications. Westport, CT: AVI Publishing. Gerrard, D. E., Gao, X., & Tan, J. (1996). Beef marbling and color score determination by image processing. Journal of Food Science, 61(1), 145148. Gunasekaran, S. (1996). Computer vision technology for food quality assurance. Trends in Food Science and Technology, 7, 245256. Hunt, R. W. G. (1991). Measuring colour (2nd ed.). New York: Ellis Horwood.

Das könnte Ihnen auch gefallen