Grey Level Enhancement

Slides:



Advertisements
Similar presentations
Types of Image Enhancements in spatial domain
Advertisements

Digital Image Processing Lecture 3: Image Display & Enhancement
Lecture 9 Grey Level & Colour Enhancement TK3813 Dr. Masri Ayob.
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
Chapter 3 Image Enhancement in the Spatial Domain.
Chapter - 2 IMAGE ENHANCEMENT
Digital Imaging and Image Analysis
Topic 4 - Image Mapping - I DIGITAL IMAGING Course 3624 Department of Physics and Astronomy Professor Bob Warwick.
Intensity Transformations (Chapter 3)
Image Enhancement in the Spatial Domain
Image Processing IB Paper 8 – Part A Ognjen Arandjelović Ognjen Arandjelović
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
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.
Image Enhancement.
Digital Image Processing
Spectral contrast enhancement
University of Ioannina - Department of Computer Science Intensity Transformations (Point Processing) Christophoros Nikou Digital Image.
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
Multimedia Data Introduction to Image Processing Dr Sandra I. Woolley Electronic, Electrical.
Digital Image Processing Lecture 4: Image Enhancement: Point Processing Prof. Charlene Tsai.
EE663 Image Processing Dr. Samir H. Abdul-Jauwad Electrical Engineering Department King Fahd University of Petroleum & Minerals.
Intensity Transformations or Translation in Spatial Domain.
MULTIMEDIA TECHNOLOGY SMM 3001 MEDIA - IMAGES. Processing digital Images digital images are often processed using “digital filters” digital images are.
Digital Image Processing Lecture 3: Image Display & Enhancement March 2, 2005 Prof. Charlene Tsai.
Digital Image Processing Lecture9: Intensity (Gray-level) Transformation Functions using MATLAB.
Digital Image Processing EEE415 Lecture 3
Digital Image Processing Part 2 Contrast processing.
1 Mathematic Morphology used to extract image components that are useful in the representation and description of region shape, such as boundaries extraction.
Lecture Reading  3.1 Background  3.2 Some Basic Gray Level Transformations Some Basic Gray Level Transformations  Image Negatives  Log.
Digital Image Processing Lecture 4: Image Enhancement: Point Processing January 13, 2004 Prof. Charlene Tsai.
Digital Image Processing Image Enhancement in Spatial Domain
Point Processing When doing so you actually perform a special type of image processing known as point processing.
Image Enhancement in the Spatial Domain.
Chapter 10 Digital Signal and Image Processing
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
Lecture Six Figures from Gonzalez and Woods, Digital Image Processing, Second Edition, Copyright 2002.
Histogram Equalization
1-Introduction (Computing the image histogram).
IMAGE PROCESSING INTENSITY TRANSFORMATION AND SPATIAL FILTERING
Digital Image Processing
Image Enhancement.
Intensity Transformations and Spatial Filtering
CIS 601 – 03 Image ENHANCEMENT SPATIAL DOMAIN Longin Jan Latecki
Computer Vision Lecture 5: Binary Image Processing
Digital Image Processing
7 elements of remote sensing process
Histogram Histogram is a graph that shows frequency of anything. Histograms usually have bars that represent frequency of occuring of data. Histogram has.
Image Processing – Contrast Enhancement
Image Enhancement in the Spatial Domain
CSC 381/481 Quarter: Fall 03/04 Daniela Stan Raicu
Digital Image Processing
Image Processing Ch3: Intensity Transformation and spatial filters
Transformation of Continuous Time Signals
Histogram Equalization
CIS 4350 Image ENHANCEMENT SPATIAL DOMAIN
Digital Image Processing Lecture 3: Image Display & Enhancement
IT523 Digital Image Processing
IT523 Digital Image Processing
The spatial domain processes discussed in this chapter are denoted by the expression
Histogram The histogram of an image is a plot of the gray _levels values versus the number of pixels at that value. A histogram appears as a graph with.
Image Enhancement in the Spatial Domain
Image Enhancement in Spatial Domain: Point Processing
DIGITAL IMAGE PROCESSING Elective 3 (5th Sem.)
Morphological Filters Applications and Extension Morphological Filters
Presentation transcript:

Grey Level Enhancement Contrast stretching Linear mapping Non-linear mapping Efficient implementation of mapping algorithms Design of classes to support gray level mapping

Image Histogram Brightness histogram provides the frequency of the brightness value in the image.

Contrast stretching Range = gmax(x,y) – gmin(x,y) The notion contrast refers to the amplitude of gray-level differences within an image. The range of gray level is a simple measure of how dispersed a data distribution is. Range = gmax(x,y) – gmin(x,y)

Contrast enhancement Contrast enhancement - In some digital images, the features of interest occupy only a relatively narrow range of the gray scale. One might use a point operation to expand the contrast of the features of interest so that they occupy a larger portion of the displayed gray-level range. This is called contrast enhancement or contrast stretching.

Contrast stretching   151 151 151 152 152 150 151 151 151 152 150 150 150 151 151 149 149 149 150 151 148 147 148 150 151 148 148 148 150 150   204 204 204 255 255 153 204 204 204 255 153 153 153 204 204 102 102 102 153 204 51 0 51 153 204 51 51 51 153 153   This range of six values is much smaller than the 256 digital values possible. In order to see the differences in the image the contrast range needs to be changed so that the lowest gray value is dark, and the highest gray value is light. If the image from Fig 1(A) was displayed scaling 0 to 255 as black to white the result would look like Figure 1 (B)    

Contrast stretching 151 151 151 152 152 150 151 151 151 152 150 150 150 151 151 149 149 149 150 151 148 147 148 150 151 148 148 148 150 150   204 204 204 255 255 153 204 204 204 255 153 153 153 204 204 102 102 102 153 204 51 0 51 153 204 51 51 51 153 153 A simple equation shows the procedure for scaling the digital values is the image: [(gray value – MIN gray value )/(MAX gray value – MIN gray value)]* 255 [(147-147)/(152-147)]*255 = 0 or [(152-147)/152-147)]*255=255 The scaling of the gray level values in an image to make hidden information visible is called contrast stretching. The idea behind contrast stretching is to increase the dynamic range of the gray levels in the image

Grey scale manipulation The process of taking the original data numbers and changing them to new values is called mapping. A mathematical description of the mapping is called a mapping function. The simplest case is thresholding where the intensity profile is replaced by a step function, active at a chosen threshold value. In this case any pixel with a grey level below the threshold in the input image gets mapped to 0 in the output image. Other pixels are mapped to 255.

Gray level mapping - Conclusions - used to adjust brightness and/or contrast of an image - point processes - operations at a pixel depend only on that pixel

Linear mapping g(x,y) =f(x,y) + b (1) We can adjust the overall brightness of a greyscale image simply by adding a constant bias, b to pixel values: g(x,y) =f(x,y) + b (1) If b> 0, overall brightness is increased: if b<0, it is decreased. The operation merely shifts the gray level values of all pixels up or down. The effect of this is to make the entire image appear darker or lighter when displayed. Similarly, we can adjust contrast in a greyscale image through multiplication of pixel values by a constant gain, :  g(x,y) =f(x,y) (2) If  > 1, contrast is increased , whereas if  < 1 it is reduced. If  is negative, dark areas become light, light areas become dark.

Linear mapping g(x,y) = T[f(x,y)] = f(x,y) + b (3) (4) We can combine two equations ( 1) and (2) to give a general expression for brightness and contrast modification. In this case, the gray scale transformation function takes the form g(x,y) = T[f(x,y)] = f(x,y) + b (3) Often, we do not want to specify a gain and a bias, but would rather map a particular range of gray levels [f1,f2], onto a new range [g1,g2]The formula for mapping is : (4) It is easy to show that Equation (4) is a linear mapping of pixel gray level too.

Linear mapping - Example Figure :The raw image (A, on the left), and the contrast stretched image (B, on the right) The detail in Figure (A) is contained almost between the gray levels 40 and 110. If we scale the image from 40 to 110 into 0 to 255 the entire grey level range will be used. The actual information in the image does not change, however we will be able to see the image more clearly. The scaled, or contrast stretched image is shown in Figure (B).

Linear mapping - Example The diagram in Figure 4 A) shows how the original data numbers were stretched out so that the lowest value (~40) was set to 0 (black) and the highest value (~110) was set to 255 (white). The original values are represented by the lower axis, and the new mapped values by the upright axis. Figure 4( B) shows a diagram of the mapping function used to contrast stretch Figure ( A) into Figure 3 (B).

There are two special cases of linear mapping that are worthy of note. In the first, we increase the gain factor until two adjacent gray level f1 and f2, are mapped onto the extremes of the 8-bit range (0-255). Consequently, gray levels up to and including f1 are mapped onto 0, whereas gray levels greater than f1 are mapped onto 255. We can say that f1 acts as a threshold. This limiting case produces a two-level (binary ) image The mapping operation is then termed thresholding The second special case of linear mapping is where , the gain factor applied to grey levels is negative. If  is negative, dark areas become light, light areas become dark (image negatives).

Image Negatives

In general the locations of point ( f1(x,y), g1(x,y)) and (f2(x,y) and g2(x,y) ) control the shape of the transformation function f f1 f2 a - Negative transformation b - contrast enhancement (between f1 and f2) c - Brightness thresholding

Linear mapping 1.      If f1(x,y) =g1(x,y) and f2(x,y) = g2(x,y) – the transformation is linear that produces no changes in gray level. 2.      If f1(x,y)=f2(x,y) , g1(x,y) =0 and g2(x,y) = 255 – the transformation becomes a thresholding function that creates a binary image. 3.      Intermediate values of ( f1,g1) and (f2,g2) produce various degrees of spread in the gray levels of the output image, thus effecting its contrast.

Linear mapping -Conclusions g(x,y) = a*f(x,y) + b - a is called the gain - adjusts contrast - b is called the bias - adjusts brightness overall - may want to map input range [f1, f2] onto output range [g1, g2] - gain a = (g2-g1)/(f2-f1) - bias b = g1 - a*f1 - need to clamp g(x,y) to valid range for image type - thresholding - gain is so large that all pixels are mapped to either black or white - negation - gain is negative, resulting in the negative of the image - piecewise linear mappings

Non -linear mapping Non-linear mapping functions have a useful property. Sometimes the dynamic range of a processed image far exceeds the capability of the display device, in which case only the brightest parts of the image are visible on the display screen. An effective way to compress the dynamic range of pixel values is to perform the logarithmic intensity mapping (transformation) function. where c is a scaling constant, and the logarithm function performs the desired compressing of dynamic range. The gain, applied to input grey levels – as measured by the slope of a tangent to the function – can vary. Thus the way is which contrast is modified depends on input grey level.

Non -linear mapping In general, logarithmic mapping is useful if we wish to enhance detail in the darker regions of the image, at the expense of detail in the brighter regions.

Exponential mapping of gray level If we apply exponential mapping of gray level, the effect is the reverse of that obtained with logarithmic mapping; contrast in the brighter parts of an image is increased at the expense of contrast in the darker parts. In this case g1 < f1 and g2 >f2.

We also can use square root function as a non-linear transformation of gray level

Non -linear mapping - Conclusions - function must be single-valued -allows you to stretch contrast in part of the range, reduce contrast in other parts - i.e. the gain varies depending on the input value - logarithmic mapping increases contrast in the darker areas of the image -exponential mapping increases contrast in the brighter areas of the image