Digital Image Processing Lecture9: Intensity (Gray-level) Transformation Functions using MATLAB.

Slides:



Advertisements
Similar presentations
Histogram Processing The histogram of a digital image with gray levels in the range [0, L-1] is a discrete function h(rk) = nk where rk is the kth gray.
Advertisements

Types of Image Enhancements in spatial domain
Digital Image Processing Lecture 3: Image Display & Enhancement
Laboratory of Image Processing Pier Luigi Mazzeo
Lecture 9 Grey Level & Colour Enhancement TK3813 Dr. Masri Ayob.
Gray-Scale Morphological Filtering
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.
Image Processing Ch3: Intensity Transformation and spatial filters
Image Processing Lecture 4
Chapter 3 Image Enhancement in the Spatial Domain.
Chapter - 2 IMAGE ENHANCEMENT
Digital Image Processing Lecture11: Histogram Processing.
Intensity Transformations (Chapter 3)
Digital Image Processing
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.
Image (and Video) Coding and Processing Lecture 5: Point Operations Wade Trappe.
Intensity Transformations
Image Processing IB Paper 8 – Part A Ognjen Arandjelović Ognjen Arandjelović
SCCS 4761 Point Processing Basic Image Processing Operations Arithmetic Operations Histograms.
Chapter 4: Image Enhancement
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.
1 © 2010 Cengage Learning Engineering. All Rights Reserved. 1 Introduction to Digital Image Processing with MATLAB ® Asia Edition McAndrew ‧ Wang ‧ Tseng.
Digital Image Processing
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.
Digital Image Processing
Digital Image Processing
Spectral contrast enhancement
Digital Image Processing, 3rd ed. © 1992–2008 R. C. Gonzalez & R. E. Woods Gonzalez & Woods Chapter 3 Intensity Transformations.
© 2004 R. C. Gonzalez, R. E. Woods, and S. L. Eddins Digital Image Processing Using MATLAB ® Chapter 3 Intensity Transformations.
Chapter 9.  Mathematical morphology: ◦ A useful tool for extracting image components in the representation of region shape.  Boundaries, skeletons,
University of Ioannina - Department of Computer Science Intensity Transformations (Point Processing) Christophoros Nikou Digital Image.
CS654: Digital Image Analysis Lecture 17: Image Enhancement.
CS6825: Point Processing Contents – not complete What is point processing? What is point processing? Altering/TRANSFORMING the image at a pixel only.
Image Processing Image Histogram Lecture
M ATLAB L ECTURE 1 Basic Concepts of Digital Image Processing.
Digital Image Processing Lecture10: MATLAB Example – Utility M-functions for Intensity Transformations.
EE663 Image Processing Dr. Samir H. Abdul-Jauwad Electrical Engineering Department King Fahd University of Petroleum & Minerals.
Intensity Transformations or Translation in Spatial Domain.
Lecture Eight Matlab for spatial filtering and intro to DFTs Figures from Gonzalez and Woods, Digital Image Processing, Copyright 2002, Gonzalez, Woods,
Digital Image Processing Lecture 3: Image Display & Enhancement March 2, 2005 Prof. Charlene Tsai.
Image Enhancement in the Spatial Domain (MATLAB)
Digital Image Processing Lecture4: Fundamentals. Digital Image Representation An image can be defined as a two- dimensional function, f(x,y), where x.
Digital Image Processing, 3rd ed. © 1992–2008 R. C. Gonzalez & R. E. Woods Gonzalez & Woods Chapter 3 Intensity Transformations.
Digital Image Processing EEE415 Lecture 3
Digital Image Processing Introduction to MATLAB. Background on MATLAB (Definition) MATLAB is a high-performance language for technical computing. The.
Prepared by: Hanan Hardan
Digital Image Processing CSC331 Image Enhancement 1.
Image enhancement using MATLAB Digital Image Processing 2014 Fall NTU 1.
Lecture Reading  3.1 Background  3.2 Some Basic Gray Level Transformations Some Basic Gray Level Transformations  Image Negatives  Log.
M ATLAB L ECTURE 2 Image Enhancement in the Spatial Domain (MATLAB)
Digital Image Processing Image Enhancement in Spatial Domain
M ATLAB L ECTURE 3 Histogram Processing. H ISTOGRAM E QUALIZATION The imhist function create a histogram that show the distribution of intensities in.
Point Processing When doing so you actually perform a special type of image processing known as point processing.
1 Chapter 3 Intensity Transformations and Spatial Filtering Chapter 3 Intensity Transformations and Spatial Filtering Objectives: We will learn about different.
Computer Application in Engineering Design
IMAGE PROCESSING INTENSITY TRANSFORMATION AND SPATIAL FILTERING
Digital Image Processing
Intensity Transformations and Spatial Filtering
Image Processing Ch3: Intensity Transformation and spatial filters
Grey Level Enhancement
Fundamentals of Image Processing Digital Image Representation
IT523 Digital Image Processing
IT523 Digital Image Processing
The spatial domain processes discussed in this chapter are denoted by the expression
Presentation transcript:

Digital Image Processing Lecture9: Intensity (Gray-level) Transformation Functions using MATLAB

Function imadjust Function imadjust is the basic IPT tool for intensity transformations of gray-scale images. It has the syntax: g = imadjust (f, [low_in high_in], [low_out high_out], gamma)

Function imadjust As illustrated in figure 3.2 (above), this function maps the intensity values in image f to new values in g, such that values between low_in and high_in map to values between low_out and high_out. Values below low_in and above high_in are clipped; that is values below low_in map to low_out, and those above high_in map to high_out.

Function imadjust The input image can be of class uint8, uint16, or double, and the output image has the same class as the input. All inputs to function imadjust, other than f, are specified as values between 0 and 1, regardless of the class of f. If f is of class uint8, imadjust multiplies the value supplied by 255 to determine the actual values to use; if f is of class uint16, the values are multiplied by Using the empty matrix ([ ]) for [low_in high_in] of for [low_out high_out] results in the default values [0 1]. If high_out is less than low_out, the output intensity is reversed.

Function imadjust Parameter gamma specifies the shape of the curve that maps the intensity values of f to create g. If gamma is less than 1, the mapping is weighted toward higher (brighter) output values, as fig 3.2 (a) shows. If gamma is greater than 1, the mapping is weighted toward lower (darker) output values. If it is omitted from the function arguments, gamma defaults to 1 (linear mapping).

Function imadjust Examples Example1: >> f = imread ('baby-BW.jpg'); >> g = imadjust (f, [0 1], [1 0]); >> imshow(f), figure, imshow (g); fg

Function imadjust Examples Cont. Example1: This process, which is the digital equivalent of obtaining a photographic negative, is particularly useful for enhancing white or gray detail embedded in a large dark region. The negative of an image can be obtained also with IPT function imcomplement: g = imcomplement (f);

Function imadjust Examples Example2: >> g = imadjust (f, [ ], [0 1],.5); >> imshow(f), figure, imshow (g); fg

Function imadjust Examples Example3: >> g = imadjust (f, [ ], [0.6 1], 0.5); >> imshow(f), figure, imshow (g); fg

Function imadjust Examples Example4: >> g = imadjust (f, [ ], [ ], 2); >> imshow(f), figure, imshow (g); fg

Logarithmic Transformations The shape of logarithmic function curve, is similar to the gamma curve where gamma < 1, where low values set to 0 and high values set to 1 on both scales. The shape of the gamma curve is variable (because of the change of low and high values), while the shape of the log function is fixed. Logarithmic transformations are implemented using the expression: g = c * log (1 + double (f))

Logarithmic Transformations But this function changes the data class of the image to double, so another sentence to return it back to uint8 should be done: gs = im2uint8 (mat2gray(g)); Use of mat2gray brings the values to the range [0 1] and im2uint8 brings them to the range [0 255]

Logarithmic Transformations Example: >> g = log(1 + double(f)); >> gs = im2uint8(mat2gray(g)); >> imshow(f), figure, imshow (g), figure, imshow(gs); fggs

Contrast-Stretching Transformation The function shown in the figure below, as indicated in lecture 8, is called a contrast-stretching transformation function, because it compresses the input levels lower than m into a narrow range of dark levels in the output image. Similarly, it compresses the values above m into a narrow band of light levels in the output. The result is an image of higher contrast. The limiting case shown below (b), shows the output of a binary image. This function is called Thresholding, as mentioned earlier. Thresholding, is a simple tool that can be used for image segmentation.

Contrast-Stretching Transformation The function takes the form of: Where r represents the intensities of the input image, s the corresponding intensity values in the output image, and E controls the slope of the function.

Contrast-Stretching Transformation This equation is implemented in MATLAB for the entire image as Note the use of eps to prevent overflow if f has any 0 values.

Contrast-Stretching Transformation Example1: >>g = 1./ (1+ (100./(double(f) + eps)).^ 20); >> imshow(f), figure, imshow(g);

Contrast-Stretching Transformation Example2: >> g = 1./ (1+ (50./(double(f) + eps)).^ 20); >> imshow(f), figure, imshow(g);

Contrast-Stretching Transformation Example3: >> g = 1./ (1+ (150./(double(f) + eps)).^ 20); >> imshow(f), figure, imshow(g);