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

Slides:



Advertisements
Similar presentations
Laboratory of Image Processing Pier Luigi Mazzeo
Advertisements

Image Display MATLAB functions for displaying image Bit Planes
Digital Image Processing
Grey Level Enhancement Contrast stretching Linear mapping Non-linear mapping Efficient implementation of mapping algorithms Design of classes to support.
CS & CS Multimedia Processing Lecture 2. Intensity Transformation and Spatial Filtering Spring 2009.
Chapter 3 Image Enhancement in the Spatial Domain.
Chapter - 2 IMAGE ENHANCEMENT
Histogram Specification
Topic 4 - Image Mapping - I DIGITAL IMAGING Course 3624 Department of Physics and Astronomy Professor Bob Warwick.
Intensity Transformations (Chapter 3)
Digital Image Processing
Histogram Processing The histogram of a digital image with gray levels from 0 to L-1 is a discrete function h(rk)=nk, where: rk is the kth gray level nk.
6. Gray level enhancement Some of the simplest, yet most useful, image processing operations involve the adjustment of brightness, contrast or colour in.
Image Enhancement in the Spatial Domain
1 Chapter 4: Point Processing 4.1 Introduction Any image-processing operation transforms the gray values of the pixels. Image-processing operations may.
Intensity Transformations
SCCS 4761 Point Processing Basic Image Processing Operations Arithmetic Operations Histograms.
BYST Eh-1 DIP - WS2002: Enhancement in the Spatial Domain Digital Image Processing Bundit Thipakorn, Ph.D. Computer Engineering Department Image Enhancement.
Image Enhancement by Modifying Gray Scale of Individual Pixels
Digital Image Processing & Pattern Analysis (CSCE 563) Intensity Transformations Prof. Amr Goneid Department of Computer Science & Engineering The American.
DREAM PLAN IDEA IMPLEMENTATION Introduction to Image Processing Dr. Kourosh Kiani
Image Enhancement To process an image so that the result is more suitable than the original image for a specific application. Spatial domain methods and.
1 © 2010 Cengage Learning Engineering. All Rights Reserved. 1 Introduction to Digital Image Processing with MATLAB ® Asia Edition McAndrew ‧ Wang ‧ Tseng.
Digital Image Processing
Chap. 3: Image Enhancement in the Spatial Domain Spring 2006, Jen-Chang Liu CSIE, NCNU.
imshow function uint8 data type (0-255) double data type ( )
A Parallel Algorithm for Hardware Implementation of Inverse Halftoning Umair F. Siddiqi 1, Sadiq M. Sait 1 & Aamir A. Farooqui 2 1 Department of Computer.
1 © 2010 Cengage Learning Engineering. All Rights Reserved. 1 Introduction to Digital Image Processing with MATLAB ® Asia Edition McAndrew ‧ Wang ‧ Tseng.
1 © 2010 Cengage Learning Engineering. All Rights Reserved. 1 Introduction to Digital Image Processing with MATLAB ® Asia Edition McAndrew ‧ Wang ‧ Tseng.
1 © 2010 Cengage Learning Engineering. All Rights Reserved. 1 Introduction to Digital Image Processing with MATLAB ® Asia Edition McAndrew ‧ Wang ‧ Tseng.
Computer Vision Lecture 3: Digital Images
© 2010 Cengage Learning Engineering. All Rights Reserved.
Spectral contrast enhancement
Digital Image Processing, 3rd ed. © 1992–2008 R. C. Gonzalez & R. E. Woods Gonzalez & Woods Chapter 3 Intensity Transformations.
1 © 2010 Cengage Learning Engineering. All Rights Reserved. 1 Introduction to Digital Image Processing with MATLAB ® Asia Edition McAndrew ‧ Wang ‧ Tseng.
Digital Image Processing Contrast Enhancement: Part I
September 5, 2013Computer Vision Lecture 2: Digital Images 1 Computer Vision A simple two-stage model of computer vision: Image processing Scene analysis.
Digital Image Processing Lecture 4: Image Enhancement: Point Processing Prof. Charlene Tsai.
CIS 601 Image ENHANCEMENT in the SPATIAL DOMAIN Dr. Rolf Lakaemper.
Intensity Transformations or Translation in Spatial Domain.
1 © 2010 Cengage Learning Engineering. All Rights Reserved. 1 Introduction to Digital Image Processing with MATLAB ® Asia Edition McAndrew ‧ Wang ‧ Tseng.
1 © 2010 Cengage Learning Engineering. All Rights Reserved. 1 Introduction to Digital Image Processing with MATLAB ® Asia Edition McAndrew ‧ Wang ‧ Tseng.
Digital Image Processing Lecture9: Intensity (Gray-level) Transformation Functions using MATLAB.
Image Enhancement in the Spatial Domain (MATLAB)
1 © 2010 Cengage Learning Engineering. All Rights Reserved. 1 Introduction to Digital Image Processing with MATLAB ® Asia Edition McAndrew ‧ Wang ‧ Tseng.
CIS 601 – 04 Image ENHANCEMENT in the SPATIAL DOMAIN Longin Jan Latecki Based on Slides by Dr. Rolf Lakaemper.
Chapter 5: Neighborhood Processing 5.1 Introduction
CH2. Point Processes Arithmetic Operation Histogram Equalization
Digital Image Processing
1 © 2010 Cengage Learning Engineering. All Rights Reserved. 1 Introduction to Digital Image Processing with MATLAB ® Asia Edition McAndrew ‧ Wang ‧ Tseng.
Digital Image Processing Lecture 4: Image Enhancement: Point Processing January 13, 2004 Prof. Charlene Tsai.
Digital Image Processing Image Enhancement in Spatial Domain
Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Chapter 3 Image Enhancement in the Spatial Domain Chapter.
1 © 2010 Cengage Learning Engineering. All Rights Reserved. 1 Introduction to Digital Image Processing with MATLAB ® Asia Edition McAndrew ‧ Wang ‧ Tseng.
Copyright © Cengage Learning. All rights reserved. 1 Equations, Inequalities, and Mathematical Modeling.
Point Processing When doing so you actually perform a special type of image processing known as point processing.
Histogram Equalization
IMAGE PROCESSING INTENSITY TRANSFORMATION AND SPATIAL FILTERING
Image Enhancement.
Two-Dimensional Signal and Image Processing Chapter 8 - pictures
Image Enhancement in the Spatial Domain
Image Enhancement in the
Image Coding and Compression
© 2010 Cengage Learning Engineering. All Rights Reserved.
© 2010 Cengage Learning Engineering. All Rights Reserved.
Intensity Transform Contrast Stretching Y ← u0+γ*(Y-u)/s
Image Enhancement in Spatial Domain: Point Processing
Presentation transcript:

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

2 4.1 Introduction Any image-processing operation transforms the gray values of the pixels. Image-processing operations may be divided into three classes based on the information required to perform the transformation. © 2010 Cengage Learning Engineering. All Rights Reserved. Ch4-p.65

3 © 2010 Cengage Learning Engineering. All Rights Reserved. From the most complex to the simplest, they are as follows: Transforms Neighborhood processing Point operations Ch4-p Introduction

4 © 2010 Cengage Learning Engineering. All Rights Reserved. (Point operations) Ch4-p.65 FIGURE 4.1

5 4.2 Arithmetic Operations These operations act by applying a simple function In each case we may have to adjust the output slightly in order to ensure that the results are integers in the range (type uint8) © 2010 Cengage Learning Engineering. All Rights Reserved. Ch4-p.66

6 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch4-p.67 FIGURE 4.2

7 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch4-p.68 FIGURE 4.3

8 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch4-p.68 FIGURE 4.4

9 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch4-p.69 TABLE 4.1

10 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch4-p.69 FIGURE 4.5

11 © 2010 Cengage Learning Engineering. All Rights Reserved. COMPLEMENTS The complement of a grayscale image is its photographic negative type double (0.0~1.0) 1-m type uint8 (0~255) 255-m Ch4-p Arithmetic Operations

12 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch4-p.70 FIGURE 4.6

13 © 2010 Cengage Learning Engineering. All Rights Reserved. 4.3 Histograms A graph indicating the number of times each gray level occurs in the image a = [ ; ; ; ] Ch4-p.71

14 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch4-p.71 FIGURE 4.8

15 © 2010 Cengage Learning Engineering. All Rights Reserved Histogram Stretching A table of the numbers n i of gray values (with n = 360, as before) We can stretch out the gray levels in the center of the range by applying the piecewise linear function Ch4-p.72

16 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch4-p.72 FIGURE 4.9

17 © 2010 Cengage Learning Engineering. All Rights Reserved. where i is the original gray level and j is its result after the transformation This function has the effect of stretching the gray levels 5–9 to gray levels 2–14 Ch4-p Histogram Stretching

18 © 2010 Cengage Learning Engineering. All Rights Reserved. the corresponding histogram Ch4-p Histogram Stretching

19 © 2010 Cengage Learning Engineering. All Rights Reserved. Use of imadjust Ch4-p.73 FIGURE 4.10

20 © 2010 Cengage Learning Engineering. All Rights Reserved. imadjust is designed to work equally well on images of type double, uint8, or uint16 the values of a, b, c, and d must be between 0 and 1 the function automatically converts the image im (if needed) to be of type double Ch4-p Histogram Stretching

21 Note that imadjust does not work quite in the same way as shown in Figure 4.9 The imadjust function has one other optional parameter: the gamma value © 2010 Cengage Learning Engineering. All Rights Reserved. Ch4-p Histogram Stretching

22 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch4-p.74 FIGURE 4.11

23 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch4-p.75 FIGURE 4.12

24 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch4-p.76 FIGURE 4.13

25 © 2010 Cengage Learning Engineering. All Rights Reserved. A PIECE WISE LINEAR-STRETCHING FUNCTION The heart of this function will be the lines where im is the input image and out is the output image Ch4-p Histogram Stretching

26 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch4-p.76 FIGURE 4.14

27 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch4-p.78 Refer to figure 4.15 FIGURE 4.16 The tire image after piecewise linear-stretching and piecewise linear-stretching function.

28 © 2010 Cengage Learning Engineering. All Rights Reserved Histogram Equalization An entirely automatic procedure Suppose our image has L different gray levels, 0, 1, 2,..., L − 1, and gray level i occurs n i times in the image Where n=n 0 +n 1 +n 2 +· · ·+n L−1 Ch4-p.78

29 © 2010 Cengage Learning Engineering. All Rights Reserved. EXAMPLE Suppose a 4-bit grayscale image has the histogram shown in Figure 4.17, associated with a table of the numbers n i of gray values Ch4-p Histogram Equalization

30 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch4-p.79 FIGURE 4.17

31 © 2010 Cengage Learning Engineering. All Rights Reserved. (L-1)/n Ch4-p Histogram Equalization

32 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch4-p.80 FIGURE 4.18

33 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch4-p.80 FIGURE 4.19

34 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch4-p.81 FIGURE 4.20

35 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch4-p.82 FIGURE 4.21

36 © 2010 Cengage Learning Engineering. All Rights Reserved. WHY IT WORKS If we were to treat the image as a continuous function f (x, y) and the histogram as the area between different contours, then we can treat the histogram as a probability density function. Ch4-p Histogram Equalization

37 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch4-p.82 FIGURE 4.22

38 © 2010 Cengage Learning Engineering. All Rights Reserved. 4.4 Lookup Tables Point operations can be performed very effectively by using a lookup table, known more simply as an LUT e.g., the LUT corresponding to division by 2 looks like Ch4-p.83

39 © 2010 Cengage Learning Engineering. All Rights Reserved. If T is a lookup table in M ATLAB and im is our image, the lookup table can be applied by the simple command e.g., Ch4-p.83 >> b = b+1; 4.4 Lookup Tables >> b2 = T(b+1);

40 © 2010 Cengage Learning Engineering. All Rights Reserved. As another example, suppose we wish to apply an LUT to implement the contrast-stretching function Ch4-p Lookup Tables

41 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch4-p.84 FIGURE 4.23