Image Enhancement in the Spatial Domain Chaiwoot Boonyasiriwat - - PowerPoint PPT Presentation

image enhancement
SMART_READER_LITE
LIVE PREVIEW

Image Enhancement in the Spatial Domain Chaiwoot Boonyasiriwat - - PowerPoint PPT Presentation

Image Enhancement in the Spatial Domain Chaiwoot Boonyasiriwat November 6, 2020 Image Histogram Image histogram is a plot of the number of pixels with each possible brightness level. The visibility of structures can be


slide-1
SLIDE 1

Chaiwoot Boonyasiriwat

November 6, 2020

Image Enhancement in the Spatial Domain

slide-2
SLIDE 2

2

▪ “Image histogram is a plot of the number of pixels with each possible brightness level.”

Image Histogram

Russ and Neal (2016, p. 245)

▪ “The visibility of structures can be improved by stretching the contrast so that the value of pixels are reassigned to cover the entire available range.”

slide-3
SLIDE 3

3

The linear mapping was applied to the original image (left) and provided a higher-contrast image (right).

Contrast Expansion

Russ and Neal (2016, p. 246)

slide-4
SLIDE 4

4

▪ Convert RGB to HSI or Lab color space. ▪ Apply the linear mapping to intensity, luminance, or lightness scale while leaving the color information unchanged.

Contrast Expansion for Color Images

Russ and Neal (2016, p. 248)

Original image expanding only intensity expanding RGB values

Color shift occurs

slide-5
SLIDE 5

5

▪ The stored value of brightness of each pixel can be mapped to a displayed value using a transfer function.

Contrast Manipulation

Russ and Neal (2016, p. 250)

Red line is the transfer function.

Stored value Displayed value

slide-6
SLIDE 6

6

▪ Gamma correction uses a nonlinear transfer function

Contrast Manipulation

Russ and Neal (2016, p. 252)

1   1  

slide-7
SLIDE 7

7

▪ “A transfer function can be created arbitrarily to reveal important details of an image.”

Contrast Manipulation

Russ and Neal (2016, p. 252-253)

slide-8
SLIDE 8

T is the total number of pixels. j is brightness level. Ni is the number of pixels at brightness level i.

8

▪ Histogram equalization uses the cumulative curve (summation of pixel values) as the transfer function. ▪ The result uses all available brightness values equally.

Histogram Equalization

Russ and Neal (2016, p. 253)

Red line is the cumulative curve

Original image Image after Histogram equalization

slide-9
SLIDE 9

9

Histogram Equalization

Russ and Neal (2016, p. 254)

slide-10
SLIDE 10

10

Histogram Equalization

Russ and Neal (2016, p. 255)

slide-11
SLIDE 11

11

▪ Convert RGB to HSI and apply histogram equalization to intensity only. Leave color information unchanged.

Histogram Equalization for Color Image

Russ and Neal (2016, p. 257)

slide-12
SLIDE 12

12

Histogram Equalization for Color Image

Russ and Neal (2016, p. 258)

slide-13
SLIDE 13

13

▪ Histogram modification of local image regions can improve the visibility of some feature in an image.

Local Equalization

Russ and Neal (2016, p. 257)

Original image Images after local equalization Radius = 6 Radius = 3

slide-14
SLIDE 14

14

▪ Variance equalization also uses a moving neighborhood filter like local equalization ▪ Variance equalization only modifies the central pixel while local equalization modifies all pixels within the filtering region. ▪ “Statistical variance of the pixels in the region is computed and compared to that of the entire image, and the pixel values are adjusted to match the local variance to the global.”

Variance Equalization

Russ and Neal (2016, p. 257)

slide-15
SLIDE 15

15

Variance Equalization

Russ and Neal (2016, p. 260)

(a) original. (b) local brightness equalization. (c) blend of (a) and (b) (d) local variance equalization

slide-16
SLIDE 16

16

Variance Equalization for Color Image

Russ and Neal (2016, p. 261)

Convert RGB to HSI and apply variance equalization to intensity only.

Original Variance equalization with radius = 6

slide-17
SLIDE 17

17

Variance Equalization for Color Image

Russ and Neal (2016, p. 261)

Median filter (radius = 2) + variance equalization 2/3 of (b) + 1/3 of (c)

slide-18
SLIDE 18

18

▪ Laplacian sharpening is a filter that enhance edges. ▪ The convolution kernel of a 3x3 Laplacian filter is It is an approximation to the Laplacian

  • perator

Laplacian Sharpening

Russ and Neal (2016, p. 261) Original image Local equalization Laplacian

slide-19
SLIDE 19

19

Laplacian Sharpening

Russ and Neal (2016, p. 263)

SEM image of alumina fracture surface Laplacian Sharpening operator

The convolution kernel of a sharpening operator is

slide-20
SLIDE 20

20

(a) Image of M101 (b) Out-of-focus negative of (a) (c) Combine (a) and (b) (d) Add (a) and (c) produces the unsharp mask result

Unsharp Mask

Russ and Neal (2016, p. 269) (a) (b) (c) (d)

slide-21
SLIDE 21

21

(a) Original image (b) Gaussian smoothed (c) (a) – (b) (d) (a) + (c)

Unsharp Mask

Russ and Neal (2016, p. 270) (a) (b) (c) (d)

slide-22
SLIDE 22

22

Unsharp Mask

Russ and Neal (2016, p. 270)

slide-23
SLIDE 23

23

▪ Subtract one smoothed version of the image from another having a different degree of smoothing.

Difference of Gaussians (DoG)

Russ and Neal (2016, p. 271)

slide-24
SLIDE 24

24

(a) Original image (b) 3x3 sharpening filter (c) DoG using  = 0.5 and  = 2.5 pixels

Difference of Gaussians (DoG)

Russ and Neal (2016, p. 271)

slide-25
SLIDE 25

25

▪ Derivative filters are suitable for images having features with a principal orientation. (a) Chromatography in which proteins are spread along lanes in an electric field. (b) horizontal derivative using a 1-pixel high kernel. (c) horizontal derivative using a 5- pixel high kernel for noise reduction.

Derivative

slide-26
SLIDE 26

26

▪ Typical kernels for horizontal first derivative are ▪ Kernels for first derivative in tilted direction

Derivative

slide-27
SLIDE 27

27

Derivative

3x3 derivative 3x3 Laplacian 3x3 sharpening

slide-28
SLIDE 28

28

Derivative

slide-29
SLIDE 29

29

▪ Edges of features are represented as a step in brightness ▪ “Laplacian filter, based on second derivative, gives a larger response to a line than to a step, and to a point than to a line.” ▪ “Directional first derivative only highlights edges in a direction perpendicular to their orientation.” ▪ One of earliest filters to locate edges of arbitrary

  • rientation is the Roberts’ cross operator – applications
  • f two first derivatives of brightness in perpendicular

directions:

Edge Detectors

slide-30
SLIDE 30

30

▪ A common method to combine two orthogonal vectors is to compute the magnitude of the resulting vector. ▪ An example is the Sobel gradient operator which is magnitude of the local gradient of brightness B:

Edge Detectors

slide-31
SLIDE 31

31

Edge Detectors

Original Horizontal derivative Absolute value of horizontal derivative Vertical derivative Absolute value of vertical derivative Sobel operator

slide-32
SLIDE 32

32

Directional Derivative Filters

slide-33
SLIDE 33

33

Edge Detectors

Original 3x3 Sobel filter 7x7 Sobel filter

slide-34
SLIDE 34

34

▪ The direction of the gradient vector can be computed by

Edge Orientation

Original

Gradient vector Gradient magnitude Assign gradient angle to brightness Assign gradient magnitude to intensity and direction to hue

slide-35
SLIDE 35

35

Edge Orientation

SEM image of eggshell membrane Sobel direction operator Rose diagram

  • f fiber
  • rientations
slide-36
SLIDE 36

36

More Edge Detectors

slide-37
SLIDE 37

▪ J. C. Russ and F. B. Neal, 2016, The Image Processing Handbook, 7th edition, CRC Press.

References