Correcting Image Defects Chaiwoot Boonyasiriwat October 30, 2020
RGB Color Space ▪ “Most digital cameras detect color in RGB channels.” ▪ “An RGB color space is an additive color space based on the RGB color model.” (Wikipedia) ▪ “The RGB color model is simple because the axes are orthogonal.” 2 Russ and Neal (2016; p.164)
CIE Chromaticity Diagram ▪ “CIE chromaticity diagram is a 2D plot defining color.” ▪ The third axis (pointing out of plane) is brightness. ▪ “Mixing any 2 colors corresponds to selecting a new point along a straight line between the 2 colors.” ▪ CRT monitor can produce colors shown in the triangle. ▪ The range of possible colors for any display is called gamut 3 Russ and Neal (2016; p.164)
CIELab Color Space RGB can be transformed to CIEL * a * b * by Lightness from black (0) to white (100) From green to red From blue to yellow where X n , Y n , Z n are calculated using R = G = B = 100. 4
HSI Color Space ▪ “The CIE diagram provides a means for color definition but does not correspond directly to human vision.” ▪ To address this issue, HSV (hue, saturation, value), HSI (hue, saturation, intensity), and HLS (hue, lightness, saturation) coordinate systems were defined. ▪ “Hue is what people mean by color.” ▪ “Saturation is the amount of color that is present.” ▪ “The third axis (lightness, brightness, intensity, or value) is the amount of light.” 5 Russ and Neal (2016; p.166)
HSI Color Space 6 Russ and Neal (2016; p.167)
HSI Color Space ▪ Projecting a tilted RGB cube onto a plane yields a hexagon with red, yellow, green, cyan, blue, and magenta at its corner. ▪ “Hue is roughly the angle of the vector to a point in the projection.” ▪ Red at 0 . Chroma C is the distance of the point from the origin. 7 Wikipedia
HSI Color Space ▪ Hue can be computed by ▪ Lightness can be computed by 8 https://en.wikipedia.org/wiki/HSL_and_HSV
Smoothing Filter ▪ Smoothing can reduce random noise in an image. ▪ Smoothing can be performed by multiplying a portion of an image by an averaging kernel. ▪ Example: boldface number represents the center pixel ▪ This filter is applied at one location and is shifted to another location until all pixels in the image are processes so the filter is called a moving average filter. 9 Russ and Neal (2016; p.180)
Gaussian Smoothing ▪ A Gaussian smoothing filter has a kernel that approximate the Gaussian function 10 Russ and Neal (2016; p.181)
Gaussian Smoothing ▪ A 7x7 Gaussian smoothing kernel ▪ Instead of applying a 2D filter, we can apply two 1D filters in horizontal and vertical directions. 11 Russ and Neal (2016; p.182)
Gaussian Smoothing ▪ Applying a filter is to convolve an image with the filter. 12 Russ and Neal (2016; p.183)
Median Filter ▪ A median filter can reduce noise with extreme values from an image by applying a median operation as a kernel. Examples of kernel shapes 5x5 median filter 13 Russ and Neal (2016; p.186)
Nonuniform Illumination ▪ Nonuniform illumination in an image can be removed by image subtraction. A - B = C ▪ Images A and B were recorded under the same lighting conditions. 14 Russ and Neal (2016; p.216)
Forensic Application ▪ To enhance a fingerprint on a bank note, the complex background is removed by an image subtraction using an image of another note. ▪ Alignment between the two image was performed using cross-correlation. A - B = C 15 Russ and Neal (2016; p.216)
Nonuniform Illumination ▪ When the background image is not recorded, we may use interpolation to generate a background image. The red part was masked out. A third-order polynomial was used to fit the background points: 16 Russ and Neal (2016; p.218)
Nonuniform Illumination ▪ When the background is darker than foreground, we can subdivide the image into many regions. ▪ Within each region, we find the darkest pixel. These values and their locations are used to fit the polynomial and then subtract it from the original image. 17 Russ and Neal (2016; p.219)
Rank Leveling ▪ If the features of interest are smaller than the background which is darker or lighter than the features, we can use rank operations such as median. ▪ In (b), each pixel is replaced by the darkest pixel in a 5x5 kernel. ▪ (c) is the result after 4 repetitions of this operation. ▪ a – c = d 18 Russ and Neal (2016; p.223)
Rank Leveling 19 Russ and Neal (2016; p.225)
Rank Leveling 20 Russ and Neal (2016; p.225)
Rank Leveling on Color Image ▪ The background image is obtained by using a morphological opening operation. 21 Russ and Neal (2016; p.227)
Geometric Distortion ▪ Geometric distortion in an image can be rectified by identifying 4 points on the image ▪ The real coordinates of these 4 points must be known. ▪ Substituting the coordinates of the 4 points and into the equations will lead to a linear system whose solution contains the values of a i and b i . ▪ The equations are then used to form all the pixels in the image. 22 Russ and Neal (2016; p.230)
Geometric Distortion 23 Russ and Neal (2016; p.232)
Geometric Distortion ▪ Combining 4 images after correcting the distortion enhances the license plate. 24 Russ and Neal (2016; p.232)
Image Alignment ▪ Multiple images might need some alignment so that they can be patched together, e.g., as shown below. ▪ “Points to be aligned may be located manually by the user or automatically using cross- correlation.” ▪ Alignment equations are of the form 25 Russ and Neal (2016; p.234)
Image Alignment ▪ Registration of PET (small), MRI (medium), and CT (large) images. 3 points are used for alignment. 26 Russ and Neal (2016; p.230)
References ▪ J. C. Russ and F. B. Neal, 2016, The Image Processing Handbook, 7 th edition, CRC Press.
Recommend
More recommend