Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 © 2010 Cengage Learning Engineering. All Rights Reserved. 1 Introduction to Digital Image Processing with MATLAB ® Asia Edition McAndrew ‧ Wang ‧ Tseng.

Similar presentations


Presentation on theme: "1 © 2010 Cengage Learning Engineering. All Rights Reserved. 1 Introduction to Digital Image Processing with MATLAB ® Asia Edition McAndrew ‧ Wang ‧ Tseng."— Presentation transcript:

1 1 © 2010 Cengage Learning Engineering. All Rights Reserved. 1 Introduction to Digital Image Processing with MATLAB ® Asia Edition McAndrew ‧ Wang ‧ Tseng Chapter 13: Color Processing

2 2 © 2010 Cengage Learning Engineering. All Rights Reserved. 13.1 What Is Color? Color study consists of The physical properties of light that give rise to color The nature of the human eye and the ways in which it detects color The nature of the human vision center in the brain and the ways in which messages from the eye are perceived as color Ch13-p.377

3 3 © 2010 Cengage Learning Engineering. All Rights Reserved. 13.1 What Is Color? 13.1.1 Physical Aspects of Color Visible light is part of the electromagnetic spectrum The values for the wavelengths of blue, green, and red were set in 1931 by the CIE (Commission International de l’Eclairage) Ch13-p.377

4 4 © 2010 Cengage Learning Engineering. All Rights Reserved. 13.1 What Is Color? 13.1.2 Perceptual Aspects of Color The human visual system tends to perceive color as being made up of varying amounts of red, green, and blue That is, human vision is particularly sensitive to these colors. This is a function of the cone cells in the retina of the eye Ch13-p.377

5 5 © 2010 Cengage Learning Engineering. All Rights Reserved. 13.1 What Is Color? Primary colors Red, blue and green Secondary colors Magenta(purple) = red + blue, Cyan = green + blue, Yellow = red + green Ch13-p.378

6 6 FIGURE 13.1 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch13-p.378

7 7 FIGURE 13.2 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch13-p.378

8 8 © 2010 Cengage Learning Engineering. All Rights Reserved. 13.1 What Is Color? Tristimulus values ( X, Y and Z ) Chromaticity coordinates A color can be specified by x and y alone Ch13-p.380

9 9 © 2010 Cengage Learning Engineering. All Rights Reserved. 13.1 What Is Color? Ch13-p.380

10 10 FIGURE 13.3 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch13-p.381

11 11 13.2 Color Models © 2010 Cengage Learning Engineering. All Rights Reserved. A color model is a method for specifying colors in some standard way It generally consists of a three-dimensional coordinate system and a subspace of that system in which each color is represented by a single point Ch13-p.381

12 12 13.2 Color Models © 2010 Cengage Learning Engineering. All Rights Reserved. 13.2.1 RGB Note also from Figure 13.1 that some colors require negative values of R,G, or B These colors are not realizable on a computer monitor or TV set on which only positive values are possible The colors corresponding to positive values form the RGB gamut Ch13-p.381

13 13 FIGURE 13.4 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch13-p.382

14 14 FIGURE 13.5 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch13-p.383

15 15 13.2 Color Models © 2010 Cengage Learning Engineering. All Rights Reserved. 13.2.2 Hue, Saturation, and Value Hue: The “true color” attribute (red, green, blue, orange, yellow, and so on) Saturation: The amount by which the color has been diluted with white. The more white in the color, the lower the saturation Value: The degree of brightness. A well-lit color has high intensity; a dark color has low intensity Ch13-p.382

16 16 FIGURE 13.6 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch13-p.383

17 17 13.2 Color Models © 2010 Cengage Learning Engineering. All Rights Reserved. 13.2.3 Conversion between RGB and HSV Ch13-p.384

18 18 13.2 Color Models © 2010 Cengage Learning Engineering. All Rights Reserved. HSV  RGB Ch13-p.385

19 19 13.2 Color Models © 2010 Cengage Learning Engineering. All Rights Reserved. 13.2.4 YIQ This color space is used for TV and video in the United States and other countries where NTSC sets the video standard In this scheme Y is the luminance (this corresponds roughly with intensity) I and Q carry the color information Ch13-p.386

20 20 Note the difference between Y and V 13.2 Color Models © 2010 Cengage Learning Engineering. All Rights Reserved. Other transformation [7] of the V Ch13-p.386

21 21 FIGURE 13.7 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch13-p.387

22 22 13.3 Color Images in M ATLAB © 2010 Cengage Learning Engineering. All Rights Reserved. Ch13-p.387

23 23 FIGURE 13.8 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch13-p.388

24 24 FIGURE 13.9 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch13-p.389

25 25 13.3 Color Images in M ATLAB © 2010 Cengage Learning Engineering. All Rights Reserved. Ch13-p.389

26 26 FIGURE 13.10 & 13.11 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch13-p.389

27 27 13.4 Pseudocoloring © 2010 Cengage Learning Engineering. All Rights Reserved. 13.4.1 Intensity Slicing In this method, we break up the image into various gray level ranges. We simply assign a different color to each range. For example Ch13-p.390

28 28 FIGURE 13.12 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch13-p.390

29 29 13.4 Pseudocoloring © 2010 Cengage Learning Engineering. All Rights Reserved. 13.4.2 Gray to Color Transformations We have three functions, f R (x), f G ( x ), f B ( x ), that assign red, green, and blue values to each gray level x These values (with appropriate scaling, if necessary) are then used for display Using an appropriate set of functions can enhance a grayscale image with impressive results Ch13-p.391

30 30 13.4 Pseudocoloring © 2010 Cengage Learning Engineering. All Rights Reserved. 0.375 0.125 0.75 Ch13-p.391

31 31 13.4 Pseudocoloring © 2010 Cengage Learning Engineering. All Rights Reserved. Ch13-p.391

32 32 13.4 Pseudocoloring © 2010 Cengage Learning Engineering. All Rights Reserved. The available color maps are listed in the help file for graph3d Ch13-p.392

33 33 13.4 Pseudocoloring © 2010 Cengage Learning Engineering. All Rights Reserved. Create our own color map Using the RGB values Ch13-p.392

34 34 13.4 Pseudocoloring © 2010 Cengage Learning Engineering. All Rights Reserved. Create our own color map Before we apply it to the blocks image, we need to scale the image down so that there are only the four grayscales 0, 1, 2, and 3 Ch13-p.392

35 35 13.5 Processing of Color Images © 2010 Cengage Learning Engineering. All Rights Reserved. There are two methods we can use: We can process each RGB matrix separately We can transform the color space so that the intensity is separated from the color information, and process the intensity component only Ch13-p.393

36 36 FIGURE 13.13 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch13-p.393

37 37 FIGURE 13.14 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch13-p.393

38 38 13.5 Processing of Color Images © 2010 Cengage Learning Engineering. All Rights Reserved. 13.5.1 Contrast Enhancement Contrast enhancement is best done by processing the intensity component Ch13-p.395

39 39 13.5 Processing of Color Images © 2010 Cengage Learning Engineering. All Rights Reserved. Ch13-p.395

40 40 13.5 Processing of Color Images © 2010 Cengage Learning Engineering. All Rights Reserved. 13.5.2 Spatial Filtering The schema we use depends on the filter. For a low- pass filter, say a blurring filter, we can apply the filter to each RGB component Ch13-p.396

41 41 FIGURE 13.15 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch13-p.396

42 42 13.5 Processing of Color Images © 2010 Cengage Learning Engineering. All Rights Reserved. 13.5.3 Noise Reduction Ch13-p.397

43 43 FIGURE 13.16 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch13-p.398

44 44 FIGURE 3.17 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch13-p.398

45 45 13.5 Processing of Color Images © 2010 Cengage Learning Engineering. All Rights Reserved. 13.5.4 Edge Detection We can go about obtaining an edge image in two ways: Take the intensity component only and apply the edge function to it Apply the edge function to each of the RGB components and join the results Ch13-p.399

46 46 FIGURE 13.18 © 2010 Cengage Learning Engineering. All Rights Reserved. To implement the first method, we start with the rgb2gray function: Ch13-p.399


Download ppt "1 © 2010 Cengage Learning Engineering. All Rights Reserved. 1 Introduction to Digital Image Processing with MATLAB ® Asia Edition McAndrew ‧ Wang ‧ Tseng."

Similar presentations


Ads by Google