BYST Eh-1 DIP - WS2002: Enhancement in the Spatial Domain Digital Image Processing Bundit Thipakorn, Ph.D. Computer Engineering Department Image Enhancement.

Slides:



Advertisements
Similar presentations
Types of Image Enhancements in spatial domain
Advertisements

Digital Image Processing
Grey Level Enhancement Contrast stretching Linear mapping Non-linear mapping Efficient implementation of mapping algorithms Design of classes to support.
Image Processing Lecture 4
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
Intensity Transformations (Chapter 3)
EE663 Image Processing Histogram Equalization Dr. Samir H. Abdul-Jauwad Electrical Engineering Department King Fahd University of Petroleum & Minerals.
Digital Image Processing
Image Enhancement in the Spatial Domain
Intensity Transformations
Digital Image Processing
SCCS 4761 Point Processing Basic Image Processing Operations Arithmetic Operations Histograms.
Chapter 4: 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.
Lecture 4 Digital Image Enhancement
Digital Image Processing In The Name Of God Digital Image Processing Lecture3: Image enhancement M. Ghelich Oghli By: M. Ghelich Oghli
Digital Image Processing
Chapter 3: Image Enhancement in the Spatial Domain
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.
6/9/2015Digital Image Processing1. 2 Example Histogram.
Digital Image Processing
Image Enhancement.
Image Analysis Preprocessing Arithmetic and Logic Operations Spatial Filters Image Quantization.
Lecture 2. Intensity Transformation and Spatial Filtering
Chapter 3 Image Enhancement in the Spatial Domain.
Spectral contrast enhancement
Lecture 4 Digital Image Enhancement
Digital Image Processing, 3rd ed. © 1992–2008 R. C. Gonzalez & R. E. Woods Gonzalez & Woods Chapter 3 Intensity Transformations.
Digital Image Processing
Chapter 5 Image Restoration.
University of Ioannina - Department of Computer Science Intensity Transformations (Point Processing) Christophoros Nikou Digital Image.
Chapter 3 Image Enhancement in the Spatial Domain.
Digital Image Processing Contrast Enhancement: Part I
Pattern Recognition Mrs. Andleeb Y. Khan Lecture 03 BCS-VII.
Digital Image Processing
DIGITAL IMAGE PROCESSING
Digital Image Processing Lecture 4: Image Enhancement: Point Processing Prof. Charlene Tsai.
CIS 601 Image ENHANCEMENT in the SPATIAL DOMAIN Dr. Rolf Lakaemper.
EE663 Image Processing Dr. Samir H. Abdul-Jauwad Electrical Engineering Department King Fahd University of Petroleum & Minerals.
Intensity Transformations or Translation in Spatial Domain.
: Chapter 4: Statistical Operations 1 Montri Karnjanadecha ac.th/~montri Image Processing.
Ch5 Image Restoration CS446 Instructor: Nada ALZaben.
CIS 601 – 04 Image ENHANCEMENT in the SPATIAL DOMAIN Longin Jan Latecki Based on Slides by Dr. Rolf Lakaemper.
Digital Image Processing EEE415 Lecture 3
Digital Image Processing CSC331 Image Enhancement 1.
Digital Image Processing
Image Enhancement in Spatial Domain Presented by : - Mr. Trushar Shah. ME/MC Department, U.V.Patel College of Engineering, Kherva.
Lecture Reading  3.1 Background  3.2 Some Basic Gray Level Transformations Some Basic Gray Level Transformations  Image Negatives  Log.
Lecture 02 Point Based Image Processing Lecture 02 Point Based Image Processing Mata kuliah: T Computer Vision Tahun: 2010.
Digital Image Processing Lecture 4: Image Enhancement: Point Processing January 13, 2004 Prof. Charlene Tsai.
Digital Image Processing Image Enhancement in Spatial Domain
Lecture 10 Chapter 5: Image Restoration. Image restoration Image restoration is the process of recovering the original scene from the observed scene which.
Image Enhancement Band Ratio Linear Contrast Enhancement
Point Processing When doing so you actually perform a special type of image processing known as point processing.
Image Enhancement in the Spatial Domain.
Intensity Transformations and Spatial Filtering
Image Enhancement in the Spatial Domain
Lecture 3 (2.5.07) Image Enhancement in Spatial Domain
CSC 381/481 Quarter: Fall 03/04 Daniela Stan Raicu
Digital Image Processing
Grey Level Enhancement
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.
Introduction to Mathematical tools in used in DIP
Intensity Transformations and Spatial Filtering
Image Enhancement in the Spatial Domain
Presentation transcript:

BYST Eh-1 DIP - WS2002: Enhancement in the Spatial Domain Digital Image Processing Bundit Thipakorn, Ph.D. Computer Engineering Department Image Enhancement in the Spatial Domain

BYST Eh-2 DIP - WS2002: Enhancement in the Spatial Domain Image Enhancement  improve the quality of the image / or  emphasize particular aspects within the image Enhancement Input Image f(x,y) Output Image g(x,y) Application Specific Feedback

BYST Eh-3 DIP - WS2002: Enhancement in the Spatial Domain Enhancement The image enhancement can be performed in either: Spatial Domain: Directly manipulate on the pixels in an image. Frequency Domain: Modify the Fourier transform of an image. or Cont’d. The enhancement methods are application specific as illustrated in previous diagram. The enhancement process requires feedback from application.

BYST Eh-4 DIP - WS2002: Enhancement in the Spatial Domain Enhancement Cont’d. Image enhancement in spatial domain methods can be classified into five categories: 1. Point Operations: Each output pixel’s gray level depends only upon the gray level of the corresponding input pixel. 2. Global Operations: The global characteristics (statistics) of the image array are use to modify the pixel values.

BYST Eh-5 DIP - WS2002: Enhancement in the Spatial Domain Enhancement Cont’d. 4. Geometric Operations: The pixel values are modified according to the structural content of the image. 5. Temporal (Frame-Based) Operations: The resulting image is a combination of more than one unprocessed image. 3. Neighbourhood Operations: Data from the immediate neighbours is used to modify a pixel value.

BYST Eh-6 DIP - WS2002: Enhancement in the Spatial Domain Spatial Domain Methods g(x,y) = T[f(x,y)] Wheref(x,y)= the input image g(x,y)= the processed image T= an operator. Image enhancement in spatial domain can be expressed by the following expression: EnhancementCont’d.

BYST Eh-7 DIP - WS2002: Enhancement in the Spatial Domain The operator T is normally defined over some neighborhood of (x,y). EnhancementCont’d. y x Origin(0,0) (x,y) A traditional defined neighborhood of a point (x,y) A square subimage area centered at (x,y) which is usually called “mask (kernel, template, or window)”. Image f(x,y)

BYST Eh-8 DIP - WS2002: Enhancement in the Spatial Domain The center of the subimage is moved from pixel to pixel and the operator T is applied at each location (x,y) to yield the output g(x,y). EnhancementCont’d. y x Origin(0,0) (x,y) Image f(x,y) ConvolutionProcess Only the pixels in the area of the image spanned by the neighborhood are utilized.

BYST Eh-9 DIP - WS2002: Enhancement in the Spatial Domain Gray-Scale Modification Letr = the gray level of f(x,y) at x,y and s = the gray level of g(x,y) at x,y. s = M(r) Where M = a gray-level or mapping transformation function. Gray-scale modification is a type of point operations that will change the pixel’s values by a mapping equation as shown in the following:

BYST Eh-10 DIP - WS2002: Enhancement in the Spatial Domain That is, only one pixel is used and g(x,y) depends on the gray value at (x,y). Cont’d. Gray-Scale Modification

BYST Eh-11 DIP - WS2002: Enhancement in the Spatial Domain 1. Image Negative 1:1 Mapping Negative Mapping Input Gray Level Output Gray Level Let n be the number of gray level bits used S = 2 n - r Cont’d. Gray-Scale Modification

BYST Eh-12 DIP - WS2002: Enhancement in the Spatial Domain The primary operations applied to the gray scale of an image are to compress or stretch. Cont’d. Gray-Scale Modification Compress Uninterested gray-scale ranges. Stretch Gray-scale ranges containing desired information. Gray-scale compression or stretching can be performed by changing the slope of the mapping equations to be lower or greater than one, respectively. 2. Gray-Scale Compression and Stretching

BYST Eh-13 DIP - WS2002: Enhancement in the Spatial Domain Cont’d. Gray-Scale Modification Input Gray Level Output Gray Level 1:1 Mapping a b Gray-Scale Compression Gray-Scale Stretching Slope > 1: Stretching Slope < 1: Compressing (0-b)(0-255) (0-255)(0-a) “a” and “b” < 255

BYST Eh-14 DIP - WS2002: Enhancement in the Spatial Domain Cont’d. Gray-Scale Modification Input Gray Level Output Gray Level Slope = ab Gray-Scale Stretching Stretching gray-scales between a to b. Slope = 1 ab Output Gray Level Input Gray Level 0 Gray-Scale Stretching Stretching with clipping at ends.

BYST Eh-15 DIP - WS2002: Enhancement in the Spatial Domain Cont’d. Gray-Scale Modification Input Gray Level Output Gray Level Slope = a b Highlighting gray values between a to b. Slope = 1 ab Output Gray Level Input Gray Level 0 Highlighting gray values between a to b and dimming others. Intensity-Level Slicing

BYST Eh-16 DIP - WS2002: Enhancement in the Spatial Domain To reduce contrast of brighter regions by using a logarithmic curve as the mapping function. 3. Logarithm Operator Cont’d. Gray-Scale Modification S = c log(|r|) or S = c log(1+|r|) rS Where c is the scaling constant which is selected so that the maximum output value is 255. M(r) A logarithmic transform stretches the lower values while compresses the higher values.

BYST Eh-17 DIP - WS2002: Enhancement in the Spatial Domain Cont’d. Gray-Scale Modification An original image. A enhanced image after applying the logarithm operator.

BYST Eh-18 DIP - WS2002: Enhancement in the Spatial Domain To enhance high intensity pixel values by using a exponential curve as the mapping function. 4. Exponential Operator Cont’d. Gray-Scale Modification S = c b r or S = c(b r - 1) Whereb = the basis rS M(r) A exponential transform stretches the higher values while compresses the lower values. c = the scaling constant

BYST Eh-19 DIP - WS2002: Enhancement in the Spatial Domain Cont’d. Gray-Scale Modification An original image. A enhanced image after applying the exponential operator.

BYST Eh-20 DIP - WS2002: Enhancement in the Spatial Domain An alternative method: “Raised to the Power” Cont’d. Gray-Scale Modification S = c r i In this alternative method, the input intensity “r” is a basis of the exponential mapping function. Hence the new pixel intensity value is equal to the input intensity value raised to the value of “i”. Ifi > 1 An exponential transform. i < 1 A logarithmic transform.

BYST Eh-21 DIP - WS2002: Enhancement in the Spatial Domain The brightness of the image can be easily adjusted by adding or subtracting f(x,y) with some constant gray-level (sliding the histogram to the bigger or the smaller gray-level). S = r + A ; S = r - A 5. Brightness Modification WhereA = the enhancement factor (constant). Cont’d. Gray-Scale Modification

BYST Eh-22 DIP - WS2002: Enhancement in the Spatial Domain To improve the contrast in an image by linearly stretching the intensity values that image contains to span within a desired range of values. Leta = the lowest gray level (0) b = the highest gray level (255) c = the lowest pixel value in the present image d = the highest pixel value in the present image. Therefore; S = [(r-c)(b-a)/(d-c)] + a 6. Contrast Stretching Cont’d. Gray-Scale Modification

BYST Eh-23 DIP - WS2002: Enhancement in the Spatial Domain A plot of the gray-level values versus the number of pixels at that value. # of pixels gray-level

BYST Eh-24 DIP - WS2002: Enhancement in the Spatial Domain Given an image f, the histogram of f over the gray levels ranged from 0 to L-1 is defined as: P(g) = N(g) M WhereP(g)= the histogram probability N(g)= the number of pixels at gray level g M= the total number of pixels in the image.

BYST Eh-25 DIP - WS2002: Enhancement in the Spatial Domain Note:0= White 255= Black Dark Image Bright Image

BYST Eh-26 DIP - WS2002: Enhancement in the Spatial Domain Note:0= White 255= Black Low- Contrast Image High- Contrast Image

BYST Eh-27 DIP - WS2002: Enhancement in the Spatial Domain Histogram processing (modification) is a type of global operations that will modify the dynamic range and contrast of the original image. Histogram processing (modification) is a type of global operations that will modify the dynamic range and contrast of the original image. The modification is performed by altering the histogram of the original image to have the desired shape. The modification is performed by altering the histogram of the original image to have the desired shape. Histogram modification can perform using non-linear or non-monotonic mapping functions. Histogram modification can perform using non-linear or non-monotonic mapping functions. Histogram Processing

BYST Eh-28 DIP - WS2002: Enhancement in the Spatial Domain 1. Histogram Equalization Ideally: The output image contains a uniform distribution of intensities ( a flat histogram). N(g) = Max { 0, Round ( ) -1} 2 l x c(g) m x n Wherel = the number of bits;m x n = the image resolution N(g) = the new intensity value c(g) = the cumulative pixel count up to old intensity value g Round( ) = a rounding to the nearest integer function. Cont’d. Histogram

BYST Eh-29 DIP - WS2002: Enhancement in the Spatial Domain Examples m=n=8 and l = 3 g fc(g)N(g) Cont’d. Histogram

BYST Eh-30 DIP - WS2002: Enhancement in the Spatial Domain An original image. A enhanced image after applying the histogram equalization method. Cont’d. Histogram

BYST Eh-31 DIP - WS2002: Enhancement in the Spatial Domain 2. Histogram Specification (Matching) The output image contains a desired shape of the output intensity distribution (histogram). The output image contains a desired shape of the output intensity distribution (histogram). Histogram specification will map the intensity distribution of the original image into a desired intensity distribution by using a histogram equalized image as the intermediate stage. Histogram specification will map the intensity distribution of the original image into a desired intensity distribution by using a histogram equalized image as the intermediate stage. Cont’d. Histogram

BYST Eh-32 DIP - WS2002: Enhancement in the Spatial Domain Histogram specification can be performed as following steps:  Apply the histogram equalization to the original image (Row H in the following table).  Specify the histogram of the new image.  Apply the histogram equalization to the desired histogram in step 2 (Row S).  Map each value of row H to the closest value in row S and then using the corresponding row in O for the new value of gray level (Row M). Cont’d. Histogram

BYST Eh-33 DIP - WS2002: Enhancement in the Spatial Domain Examples: Step 1: Result of applying histogram equalization to the original image. Original Gray-Scale Value (O)Histogram Equalized Values (H) Cont’d. Histogram

BYST Eh-34 DIP - WS2002: Enhancement in the Spatial Domain Examples: Step 2: The desired histogram. Gray-Scale ValueNumber of Pixels in Desired Histogram Cont’d. Histogram

BYST Eh-35 DIP - WS2002: Enhancement in the Spatial Domain Examples: Step 3: Result of applying histogram equalization to the desired histogram. Gray-Scale ValueHistogram Equalized Values (S) Cont’d. Histogram

BYST Eh-36 DIP - WS2002: Enhancement in the Spatial Domain Examples: Step 4: Mapping result OHSM Cont’d. Histogram

BYST Eh-37 DIP - WS2002: Enhancement in the Spatial Domain Local Enhancement Histogram equalization and histogram specification previously discussed will enhance an image globally since pixels are modified by a transformation function based on the gray-level distribution over an entire image. Histogram equalization and histogram specification previously discussed will enhance an image globally since pixels are modified by a transformation function based on the gray-level distribution over an entire image. To enhance details over small areas, gray-level values within an image can be modified locally by applying histogram modification techniques to the image on a block- by-block basis (7x7, 15x15, etc.). This technique is called “local enhancement”. To enhance details over small areas, gray-level values within an image can be modified locally by applying histogram modification techniques to the image on a block- by-block basis (7x7, 15x15, etc.). This technique is called “local enhancement”.

BYST Eh-38 DIP - WS2002: Enhancement in the Spatial Domain Local Enhancement Cont’d.

BYST Eh-39 DIP - WS2002: Enhancement in the Spatial Domain Local Enhancement Original Image Image after global histogram equalization. Cont’d.

BYST Eh-40 DIP - WS2002: Enhancement in the Spatial Domain Local Enhancement Image after local histogram equalization (7x7). Image after local histogram equalization (15x15). Cont’d.

BYST Eh-41 DIP - WS2002: Enhancement in the Spatial Domain Adaptive Contrast Enhancement Modify the histogram by a transformation function based on the gray-level distribution over small areas (Local enhancement). Modify the histogram by a transformation function based on the gray-level distribution over small areas (Local enhancement). Adaptive Contrast Enhancement (ACE) method is based on the intensity mean and variance (or S.D.) of the pixel intensities in a neighborhood. Adaptive Contrast Enhancement (ACE) method is based on the intensity mean and variance (or S.D.) of the pixel intensities in a neighborhood. Let f(x,y) = an input image, g(x,y) = a new image, M = the global mean of f(x,y),

BYST Eh-42 DIP - WS2002: Enhancement in the Spatial Domain Adaptive Contrast Enhancement  (x,y) = the gray-level standard deviation (S.D.), Cont’d. m(x,y) = the gray-level mean, k 1 and k 2 = constants and 0 < k 1, k 2 < 1. Where  (x,y) and m(x,y) are calculated in a neighborhood centered at (x,y). The transformation function of ACE method is defined as follows:

BYST Eh-43 DIP - WS2002: Enhancement in the Spatial Domain Adaptive Contrast Enhancement Cont’d. The term is called the “local gain”.  (x,y) High contrast  (x,y) Low contrast Thus, areas with low contrast will have larger local gain.

BYST Eh-44 DIP - WS2002: Enhancement in the Spatial Domain Arithmetic/Logic Operations Image 1, …, n are normally the identical scenes but may be acquired at different times or through different spectral filters. Image 1, …, n are normally the identical scenes but may be acquired at different times or through different spectral filters. Arithmetic or Logic Operations Image 1 Image 2 Image n ResultImage

BYST Eh-45 DIP - WS2002: Enhancement in the Spatial Domain Arithmetic/Logic Operations Arithmetic/logic operations will operate on a pixel-by- pixel basis between two or more images. Arithmetic/logic operations will operate on a pixel-by- pixel basis between two or more images. The result image is a new image whose pixel at coordinates (x,y) is the result of applying arithmetic or logic operations to the pixels in the same location. The result image is a new image whose pixel at coordinates (x,y) is the result of applying arithmetic or logic operations to the pixels in the same location. Image subtraction and division are more widely used than image addition and multiplication. Image subtraction and division are more widely used than image addition and multiplication. The AND or OR operations are used for selecting subimages in an image (masking). The AND or OR operations are used for selecting subimages in an image (masking). Cont’d.

BYST Eh-46 DIP - WS2002: Enhancement in the Spatial Domain Arithmetic/Logic Operations Cont’d.

BYST Eh-47 DIP - WS2002: Enhancement in the Spatial Domain Arithmetic/Logic Operations Cont’d.