Intensity Transformations and Spatial Filtering

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 Ch3: Intensity Transformation and spatial filters
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
BYST Eh-1 DIP - WS2002: Enhancement in the Spatial Domain Digital Image Processing Bundit Thipakorn, Ph.D. Computer Engineering Department Image Enhancement.
E.G.M. PetrakisFiltering1 Linear Systems Many image processing (filtering) operations are modeled as a linear system Linear System δ(x,y) h(x,y)
Image Enhancement by Modifying Gray Scale of Individual Pixels
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
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
Lecture 2. Intensity Transformation and Spatial Filtering
Lecture 4 Digital Image Enhancement
Digital Image Processing, 3rd ed. © 1992–2008 R. C. Gonzalez & R. E. Woods Gonzalez & Woods Chapter 3 Intensity Transformations.
Chap2 Image enhancement (Spatial domain)
Digital Image Processing
University of Ioannina - Department of Computer Science Intensity Transformations (Point Processing) Christophoros Nikou Digital Image.
CS654: Digital Image Analysis Lecture 17: Image Enhancement.
Chapter 3 Image Enhancement in the Spatial Domain.
CS6825: Point Processing Contents – not complete What is point processing? What is point processing? Altering/TRANSFORMING the image at a pixel only.
DIGITAL IMAGE PROCESSING
EE663 Image Processing Dr. Samir H. Abdul-Jauwad Electrical Engineering Department King Fahd University of Petroleum & Minerals.
Intensity Transformations or Translation in Spatial Domain.
Digital Image Processing Lecture9: Intensity (Gray-level) Transformation Functions using MATLAB.
Ch5 Image Restoration CS446 Instructor: Nada ALZaben.
Digital Image Processing EEE415 Lecture 3
Prepared by: Hanan Hardan
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.
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.
Image Enhancement in the Spatial Domain.
Fundamentals of Spatial Filtering:
IMAGE ENHANCEMENT TECHNIQUES
Digital Image Processing
IMAGE PROCESSING INTENSITY TRANSFORMATION AND SPATIAL FILTERING
Digital Image Processing
Image Enhancement.
CIS 601 – 03 Image ENHANCEMENT SPATIAL DOMAIN Longin Jan Latecki
- photometric aspects of image formation gray level images
Fundamentals of Image Processing A Seminar on By Alok K. Watve
Image Enhancement in the Spatial Domain
Image Enhancement in the
CSC 381/481 Quarter: Fall 03/04 Daniela Stan Raicu
Image Processing Ch3: Intensity Transformation and spatial filters
Image filtering
Image filtering
Histogram Equalization
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.
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
Image Enhancement in the Spatial Domain
Image Enhancement in Spatial Domain: Point Processing
Presentation transcript:

Intensity Transformations and Spatial Filtering T490 (IP): Tutorial 3 Chapter 3: Intensity Transformations and Spatial Filtering 11/11/2018

3.1.1 The Basics of Intensity Transformations and Spatial Filtering 3.1 Background 3.1.1 The Basics of Intensity Transformations and Spatial Filtering Spatial domain refers to the aggregate of pixels composing an image Spatial domain processes will be denoted by the expression: where f(x, y) is the input image, g(x, y) is the processed image, and T is an operator on f, defined over some neighbourhood of (x, y). 11/11/2018

11/11/2018

Spatial Filtering: It is the procedure of moving the location of neighbourhood and performing a predefined operation. The neighbourhood, along with the predefined operation is called a spatial filter. Other names for spatial filter are spatial mask, kernel, template or window. 11/11/2018

Intensity transformation function: Let the neighbourhood be of size 1x1 (that is, a single pixel). In this case, g depends only on the value of f at (x, y), and T becomes a intensity (also called a gray-level or mapping) transformation function of the form s=T(r) where, for simplicity in notation, r and s are variables denoting, respectively, the gray level of f(x, y) and g(x, y) at any point (x, y). 11/11/2018

11/11/2018

The opposite effect takes place for values of r above k. Example of Fig 3.2: Contrast stretching 3.2(a): An image of higher contrast than the original is produced by darkening the levels below k and brightening the levels above k in the original image. Values of r below k are compressed by the transformation function into a narrow range of s, toward black. The opposite effect takes place for values of r above k. Thresholding 3.2(b): In the limiting case, T(r) produces a two-level (binary) image. 11/11/2018

3.1.2 About Examples in this Chapter Image Enhancement. It is the process of manipulating an image so that the result is more suitable than original. There is no “general theory” of Image Enhancement. 11/11/2018

3.2 Some Basic Intensity Transformation Functions Three basic types of functions used frequently for image enhancement (Fig 3.3): Linear (negative and identity transformations), logarithmic (log and inverse-log transformations), power-law (nth power and nth root transformations). 11/11/2018

11/11/2018

Try Q4(iv) of TMA1. Is there a Scilab built-in function for this task? 3.2.1 Image Negatives The negative of an image with gray levels in the range [0,L-1]is obtained by using the negative transformation shown in Fig. 3.3, which is given by the expression: s = L - 1 - r. Reversing the intensity levels of an image in this manner produces the equivalent of a photographic negative. This type of processing is particularly suited for enhancing white or gray detail embedded in dark regions of an image, especially when the black areas are dominant in size. Try Q4(iv) of TMA1. Is there a Scilab built-in function for this task? 11/11/2018

where c is a constant, and it is assumed that . 3.2.2 Log Transformations The general form is: where c is a constant, and it is assumed that . It maps a narrow range of low gray-level values in the input image into a wider range of output levels. The opposite is true of higher values of input levels. Used to expand the values of dark pixels in an image while compressing the higher-level values. The opposite is true of the inverse log. The power-law transformations are much more versatile for this purpose than the log transformation 11/11/2018

3.2.3 Power-Law Transformations Power-law transformations have the basic form Where c and gamma are positive constants. Plots of s versus r for various values of gamma are shown in Fig. 3.6. As in the case of the log transformation, power-law curves with fractional values of gamma map a narrow range of dark input values into a wider range of output values, with the opposite being true for higher values of input levels. 11/11/2018

11/11/2018

11/11/2018

Example3.1: 11/11/2018

3.2.4 Piecewise-Linear Transformation Functions It is Piecewise-Linear (Fig 3.10a). The principal advantage of piecewise linear functions is that the form of piecewise functions can be arbitrarily complex. In fact, a practical implementation of some important transformations can be formulated only as piecewise functions. The principal disadvantage of piecewise functions is that their specification requires considerably more user input. 11/11/2018

Contrast stretching (CS): One of the simplest piecewise linear functions is a contrast-stretching transformation. Low-contrast images can result from poor illumination, lack of dynamic range in the imaging sensor, or even wrong setting of a lens aperture during image acquisition. The idea behind contrast stretching is to increase the dynamic range of the gray levels in the image being processed. Fig 3.10. 11/11/2018

CS: 11/11/2018

Intensity-level slicing: Highlighting a specific range of gray levels in an image. Applications include enhancing features such as masses of water in satellite imagery and enhancing flaws in X-ray images. There are several ways of doing level slicing, but most of them are variations of two basic themes. One (Fig. 3.11(a)), approach is to display a high value for all gray levels in the range of interest and a low value for all other gray levels producing a binary image. The second (Fig. 3.11(a)), approach, brightens the desired range of gray levels but preserves the background and gray-level tonalities in the image. 11/11/2018

Fig 3.11: 11/11/2018

Bit-plane slicing (Figure 3.13) : Suppose that each pixel in an image is represented by 8 bits. Imagine that the image is composed of eight 1-bit planes, ranging from bit-plane 0 to bit-plane 7 plane 0 contains all the lowest order bits and plane 7 contains all the high-order bits. The higher-order bits (especially the top four) contain the majority of the visually significant data. The other bit planes contribute to more subtle details in the image. Separating a digital image into its bit planes is useful for analyzing the relative importance played by each bit of the image, a process that aids in determining the adequacy of the number of bits used to quantize each pixel. Also, this type of decomposition is useful for image compression. 11/11/2018

11/11/2018

Histogram Processing: n=MN. 11/11/2018

Role of histogram processing in image enhancement: Consider Fig. 3.16. It is shown in four basic gray-level characteristics: dark, light, low contrast, and high contrast. 11/11/2018

Four Basic Image Types: 11/11/2018

3.3.1 Histogram Equalization For discrete vales, a transformation function of particular importance in image processing has the form (equation 3.3.8): Where k=0,1,2,....,L-1 Equalization. 11/11/2018

Example 3.5: Suppose a 3-bit image of size 64x64 pixels (MN=4096) has the intensity distribution shown in Table 3.1. Perform the Histogram Equalization. 11/11/2018

Solution: 11/11/2018

Example 3.6: 11/11/2018

3.3.2 Histogram Matching (Specification) Histogram equalization seeks to produce a uniform histogram. Sometimes, attempting to base enhancement on a uniform histogram is not the best approach. It is useful sometimes to be able to specify the shape of the histogram that we wish the processed image to have. The method used to generate a processed image that has a specified histogram is called histogram matching or histogram specification. It is usually a trail-and-error process. 11/11/2018

3.3.3 Local Histogram Processing Global: pixels are modified based on entire image Local: neighbourhood of a pixel is used 11/11/2018

3.3.4 Use of Histogram Statistics for Image Enhancement From Histogram: The nth moment of a random variable r about its mean is defined as: Without computing Histogram: From the sample values. See Example 3.12 for use in enhancement. 11/11/2018

Sample Mean and Variance: 11/11/2018

3.4 Fundamentals of Spatial Filtering Filtering operations that are performed directly on the pixels of an image are called spatial filtering to differentiate this type of process from the more traditional frequency domain filtering. Spatial filters are also called spatial masks, kernels, templates, and windows. 11/11/2018

3.4.1The mechanics of spatial filtering The mechanics of spatial filtering are illustrated in Fig. 3.28. In general, linear filtering of an image f of size MxN with a filter mask of size mxn is given by the expression: For a mask of size mxn, we assume that m=2a+1 and n=2b+1, where a and b are positive integers. 11/11/2018

11/11/2018

3.4.2 Spatial Correlation and Convolution Correlation: It is the process of moving a filter mask over the image and computing the sum of products at each location. Convolution: It is the same as above except that the filter mask if rotated by 180 degrees. 11/11/2018

1-D 11/11/2018

2-D 11/11/2018

3.4.3 Vector representation of linear filtering When interest lies in the response, R, of an mxn mask at any point (x, y), it is common practice to simplify the notation by using the following expression: In Matrix form: 11/11/2018

3.4.4 Generating Spatial Filter Masks Generating mxn Linear Spatial Filter requires that we specify mn mask coefficients. These coefficients are selected based on what the filter does. E.g: 3x3 averaging filter Each coefficient value is 1/9. 11/11/2018

Scilab: Some suggested functions to get help on: Imhist, imcomplement, imfilter, fspecial, filter2, mean2 , std2 , stdev2, corr2, plot, mesh etc 11/11/2018