Presentation is loading. Please wait.

Presentation is loading. Please wait.

Digital Image Processing EEE415 Lecture 3

Similar presentations


Presentation on theme: "Digital Image Processing EEE415 Lecture 3"— Presentation transcript:

1 Digital Image Processing EEE415 Lecture 3
Image Enhancement in Spatial Domain Pixel Operations and Histogram Processing

2 Image Enhancement Process an image to make the result more suitable than the original image for a specific application Image enhancement is subjective (problem/application oriented) Image enhancement methods Spatial domain: Direct manipulation of pixel in an image (on the image plane) Frequency domain: Processing the image based on modifying the Fourier transform of an image Some techniques are based on various combinations of methods from these two categories

3 Image Enhancement No general theory Viewer is ultimate judge
Highly subjective process Easier in machine perception

4 Types of image enhancement operations - Pixel point processing
Pixel point processing is a form of image enhancement based only on the intensity of single pixels. No consideration what-so-ever is taken of neighbouring pixels, or the spatial arrangement of groups of pixels, or of the position of the pixel within the digital image. Pixel point processing is a simple but important type of image enhancement technique. All pixels are processed individually.

5 Pixel Point Processing
The general equation for a point process is given by: g(x,y) = M[f(x,y)] Where g(x,y) is the output digital image, f(x,y) is the input digital image, and M is the mapping function. M maps or converts input pixel brightness to an output pixel brightness. The mapping function can be non-linear.

6 Types of image enhancement operations: Block processing
Local operations The output value at (x,y) is dependent on the input values in the neighborhood of (x,y) Global operations The output value at (x,y) is dependent on all the values in the input image

7 Basic concepts Spatial domain enhancement methods can be generalized as g(x,y)=T[f(x,y)] f(x,y) : input image g(x,y): processed (output) image T[*] : an operator on f (or a set of input images), defined over neighborhood of (x,y) Neighborhood about (x,y): a square or rectangular sub image area centered at (x,y) 4/25/2017

8 Basic Concepts 3x3 neighborhood about (x,y) 4/25/2017

9 Basic concepts g(x,y) = T [f(x,y)] Pixel/point operation:
Neighborhood of size 1x1: g depends only on f at (x,y) T: a gray-level/intensity transformation/mapping function Let r = f(x,y) s = g(x,y) r and s represent gray levels of f and g at (x,y) Then s = T(r) Local operations: g depends on the predefined number of neighbors of f at (x,y) Implemented by using mask processing or filtering Masks (filters, windows, kernels, templates) : a small (e.g. 3×3) 2-D array, in which the values of the coefficients determine the nature of the process 4/25/2017

10 Common pixel operations
Image negatives Log transformations Power-law transformations 4/25/2017

11 Pixel Operations: Image negatives
Reverses the gray level order For L gray levels the transformation function is s =T(r) = (L-1)-r Input image (X-ray image) Output image (negative) Application: To enhance the visibility for images with more dark portion 4/25/2017

12 Pixel Operations: Contrast Scaling
s =T(r) = a.r (a is a constant) 4/25/2017

13 Pixel Operations: Log transformations
Function of s = c Log(1+r) 4/25/2017

14 Pixel Operations: Log transformations
Properties of log transformations For lower amplitudes of input image the range of gray levels is expanded For higher amplitudes of input image the range of gray levels is compressed Application: This transformation is suitable for the case when the dynamic range of a processed image far exceeds the capability of the display device (e.g. display of the Fourier spectrum of an image) Also called “dynamic-range compression / expansion” 4/25/2017

15 Pixel Operations: Log transformations
Fourier spectrum with values of range 0 to 1.5 x 106 scaled linearly The result applying log transformation, c = 1 4/25/2017

16 Pixel Operations: Power-law Transformation
Basic form: s = crg , where c & g are positive Plots of equation s = crg, For various values of g (c = 1) 4/25/2017

17 Pixel Operations: Power-law Transformation
For γ < 1: Expands values of dark pixels, compress values of brighter pixels For γ > 1: Compresses values of dark pixels, expand values of brighter pixels If γ=1 & c=1: Identity transformation (s = r) A variety of devices (image capture, printing, display) respond according to a power law and need to be corrected; Gamma (γ) correction The process used to correct the power-law response phenomena 4/25/2017

18 Pixel Operations: Power-law Transformation
Example of gamma correction To linearize the CRT response a pre-distortion circuit is needed s = cr1/g 4/25/2017

19 Pixel Operations: Gamma correction
Linear wedge gray scale image Response of CRT to Linear wedge Gamma corrected wedge Output of monitor 4/25/2017

20 Pixel Operations: Power-law Transformation
MRI image of fractured human spine Result of applying power-law transformation c = 1, g = 0.6 Result of applying power-law transformation c = 1, g = 0.4 Result of applying power-law transformation c = 1, g = 0.3 4/25/2017

21 Pixel Operations: Power-law Transformation
Original satellite image Result of applying power-law transformation c = 1, g = 3.0 Result of applying power-law transformation c = 1, g = 4.0 Result of applying power-law transformation c = 1, g = 5.0 4/25/2017

22 Pixel Operations: Piecewise-linear transformation
Contrast stretching Goal: Increase the dynamic range of the gray levels for low contrast images Low-contrast images can result from poor illumination lack of dynamic range in the imaging sensor wrong setting of a lens aperture during image acquisition 4/25/2017

23 Pixel Operations: Piecewise-linear transformation
Contrast stretching: Method where a1, a2, and a3 control the result of contrast stretching if a1 = a2 = a3 = 1 no change in gray levels if a1 = a3 = 0 and r1 = r2, T(*) is a thresholding function, the result is a binary image 4/25/2017

24 Pixel Operations: Piecewise-linear transformation
Form of Transformation function Original low-contrast image Result of contrast stretching Result of thresholding 4/25/2017

25 Pixel Operations: Non-linear contrast stretching
Non-linear contrast stretching is implemented using look-up tables, not formulas.

26 Pixel Operations: Bit-plane Slicing
A bit-plane is the binary image associated with a selected bit’s contribution to overall pixel brightness. Most of the image structure is conveyed in the higher order bit planes. 27 = 128 26 = 64 25 = 32 24 = 16 23 = 8 22 = 4 21 = 2 20 = 1 Bit 7 (MSB) Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 (LSB) MSB = Most Significant Bit LSB = Least Significant Bit 1 Bit : max value = 1 = 21 – 1 1 Byte = 8 bits : max value = 255 = 28 – 1 1 Word = 2 bytes = 16 bits : max value = = 26

27 Pixel Operations: Bit-plane Slicing

28 Pixel Operations: Bit-plane Slicing
The lower order bit planes carry the important but more subtle shading and detail of the digital image. LSB also carries digitisation noise (sampling uncertainty). 28

29 Pixel Operations: Bit-plane Slicing

30 Pixel Operations: Bit-plane Slicing

31 g(x,y)=T{f(x,y)}=a*f(x,y)
Quiz /10/2010 Apply contrast stretching to following 2-bit image f(x,y) according to the transformation given in equation: g(x,y)=T{f(x,y)}=a*f(x,y) Where g(x,y) is out image and ‘a=2’ is scaling factor. Then change the dynamic range of output image to 0-3.


Download ppt "Digital Image Processing EEE415 Lecture 3"

Similar presentations


Ads by Google