Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 37 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
37
Dung lượng
2,79 MB
Nội dung
TRƯỜNG ĐẠI HỌC BÁCH KHOA HÀ NỘI XỬ LÝ ẢNH TRONG CƠ ĐIỆN TỬ Machine Vision Giảng viên: TS Nguyễn Thành Hùng Đơn vị: Bộ môn Cơ điện tử, Viện Cơ khí Hà Nội, 2021 Chapter Color Image Processing Color Fundamentals Color Models Basics of Full-Color Image Processing Color Transformations Color Image Smoothing and Sharpening Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) Color Fundamentals ❖Color spectrum Color spectrum seen by passing white light through a prism Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) Color Fundamentals ❖Wavelengths Wavelengths comprising the visible range of the electromagnetic spectrum Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) Color Fundamentals ❖The absorption of light by the red, green, and blue cones in the eye Absorption of light by the red, green, and blue cones in the human eye as a function of wavelength Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) Color Fundamentals ❖Primary and secondary colors of light and pigments Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) Color Fundamentals ❖Hue, Saturation, and Brightness ➢ The characteristics generally used to distinguish one color from another are brightness, hue, and saturation ➢ Brightness embodies the achromatic notion of intensity ➢ Hue is an attribute associated with the dominant wavelength in a mixture of light waves Hue represents dominant color as perceived by an observer ➢ Saturation refers to the relative purity or the amount of white light mixed with a hue The pure spectrum colors are fully saturated ➢ Hue and saturation taken together are called chromaticity → a color may be characterized by its brightness and chromaticity Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) Color Fundamentals ❖Hue, Saturation, and Brightness ➢ The amounts of red, green, and blue needed to form any particular color are called the tristimulus values, and are denoted, X, Y, and Z, respectively ➢ A color is then specified by its trichromatic coefficients, Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) Color Fundamentals ❖CIE chromaticity diagram CIE chromaticity diagram, which shows color composition as a function of x (red) and y (green) For any value of x and y, the corresponding value of z (blue) is obtained from Eq (7-4) by noting that z = – (x + y) The point marked green in Fig 7.5 , for example, has approximately 62% green and 25% red content It follows from Eq (7-4) that the composition of blue is approximately 13% Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) Color Fundamentals ❖Color gamut Illustrative color gamut of color monitors (triangle) and color printing devices (shaded region) Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) 10 Color Models ❖The HSI Color Model ➢ EXAMPLE: The HSI values corresponding to the image of the RGB color cube HSI components of the image in Fig (p 14): (a) hue, (b) saturation, and (c) intensity images Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) 23 Color Models ❖The HSI Color Model ➢ Manipulating HSI Component Images (a) RGB image and the components of its corresponding HSI image: (b) hue, (c) saturation, and (d) intensity Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) (a)-(c) Modified HSI component images (d) Resulting RGB image 24 Chapter Color Image Processing Color Fundamentals Color Models Basics of Full-Color Image Processing Color Transformations Color Image Smoothing and Sharpening Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) 25 Basics of Full-Color Image Processing ➢ Let c represent an arbitrary vector in RGB color space: ➢ In order for per-component-image and vector-based processing to be equivalent, two conditions have to be satisfied: (1) the process has to be applicable to both vectors and scalars; (2) the operation on each component of a vector (i.e., each voxel) must be independent of the other components Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) 26 Basics of Full-Color Image Processing Spatial neighborhoods for grayscale and RGB color images Observe in (b) that a single pair of spatial coordinates, (x, y), addresses the same spatial location in all three images Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) 27 Chapter Color Image Processing Color Fundamentals Color Models Basics of Full-Color Image Processing Color Transformations Color Image Smoothing and Sharpening Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) 28 Color Transformations ❖Formulation ➢ Color transformations for multispectral images where n is the total number of component images, ri are the intensity values of the input component images, si are the spatially corresponding intensities in the output component images, and Ti are a set of transformation or color mapping functions that operate on ri to produce si Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) A full-color image and its various color-space components 29 Color Transformations ❖Formulation Adjusting the intensity of an image using color transformations (a) Original image (b) Result of decreasing its intensity by 30% (i.e., letting k = 0.7) (c) The required RGB mapping function (d)–(e) The required CMYK mapping functions (f) The required CMY mapping function (g)–(h) The required HSI mapping functions Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) 30 Color Transformations ❖Color Complements Color complements on the color circle Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) EXAMPLE: Computing color image complements Color complement transformations (a) Original image (b) Complement transformation functions (c) Complement of (a) based on the RGB mapping functions (d) An approximation of the RGB complement using HSI transformations 31 Color Transformations ❖Color Slicing ➢ Using a cube of width W EXAMPLE: Color slicing ➢ Using a sphere of radius R0 Color-slicing transformations that detect (a) reds within an RGB cube of width centered at (0.6863, 0.1608, 0.1922), and (b) reds within an RGB sphere of radius 0.1765 centered at the same point Pixels outside the cube and sphere were replaced by color (0.5, 0.5, 0.5) Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) 32 Color Transformations ❖Histogram Processing of Color Images ➢ EXAMPLE: Histogram equalization in the HSI color space Histogram equalization (followed by saturation adjustment) in the HSI color space Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) 33 Chapter Color Image Processing Color Fundamentals Color Models Basics of Full-Color Image Processing Color Transformations Color Image Smoothing and Sharpening Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) 34 Color Image Smoothing and Sharpening ❖Color Image Smoothing ➢ The average of the RGB component vectors in this neighborhood is Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) 35 Color Image Smoothing and Sharpening ❖Color Image Smoothing ➢ EXAMPLE: Color image smoothing by neighborhood averaging HSI components of the RGB color image (a) Hue (b) Saturation (c) Intensity (a) RGB image (b) Red component image (c) Green component (d) Blue component Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) Image smoothing with a averaging kernel (a) Result of processing each RGB component image (b) Result of processing the intensity component of the HSI image and converting to RGB (c) Difference between the two results 36 Color Image Smoothing and Sharpening ❖Color Image Sharpening ➢ EXAMPLE: Image sharpening using the Laplacian Image sharpening using the Laplacian (a) Result of processing each RGB channel (b) Result of processing the HSI intensity component and converting to RGB (c) Difference between the two results Rafael C Gonzalez, Richard E Woods, “Digital image processing,” Pearson (2018) 37 ... “Digital image processing, ” Pearson (2018) 10 Chapter Color Image Processing Color Fundamentals Color Models Pseudocolor Image Processing Basics of Full -Color Image Processing Color Transformations Color. .. images (d) Resulting RGB image 24 Chapter Color Image Processing Color Fundamentals Color Models Basics of Full -Color Image Processing Color Transformations Color Image Smoothing and Sharpening... images Rafael C Gonzalez, Richard E Woods, “Digital image processing, ” Pearson (2018) 27 Chapter Color Image Processing Color Fundamentals Color Models Basics of Full -Color Image Processing Color