digital image processing techniques

52

Upload: shab-bi

Post on 14-Apr-2017

743 views

Category:

Software


0 download

TRANSCRIPT

Page 1: Digital image processing techniques
Page 2: Digital image processing techniques

Digital image processing

Topic Image Enhancement And Analysis Of Thermal Image Using Various Techniques Of Image Processing

Page 3: Digital image processing techniques

Presented by;

o Amna Iqbal 2013-MCS-003o Asma Iqbal 2013-MCS(ss)-063o Faiza Zahid 2013-MCS(ss)-066o Shabana Kausar 2013-MS-047o Tahseen Fatima 2013-MCS(ss)-070

Page 4: Digital image processing techniques

Image Enhancement• Image enhancement is to process an image so that

result is more suitable than original image for specific application.

• Image enhancement make images more useful.• The reasons for doing this include:

• Highlighting interesting detail in images• Removing noise from images,• Making images more visually appealing• edge enhancement • increase the contrast of the image.

Page 5: Digital image processing techniques

Thermal Image enhancement

▪ Thermal image enhancement used in▪Problem Diagnostics▪Research and Development,▪Insurance Risk Assessment▪Digital infrared thermal imaging in health care▪ law enforcement and defense.

Page 6: Digital image processing techniques

Image enhancementIt has two domains:

▪Spatial Domain

▪Frequency Domain Filtering

Page 7: Digital image processing techniques

Image Enhancement And Analysis

Techniques

1) Conversion of the RGB to GRAYSCALE 2) Histogram ,histogram equalization and

contrast enhancement3) Linear filtering and noise removal4) Morphology5) FFT transforms

Page 8: Digital image processing techniques

PROPOSED FLOW CHART of Image Enhancement

Read the image

Convert RGB into Gray scale image

Apply Histogram equalization

Compare with gray image and its

histogram

Perform linear filtering operation in

the above image

Remove the noise by adaptive filtering

Compare result with linear filtering image

Page 9: Digital image processing techniques

PROPOSED FLOW CHART of Image Enhancement

Successive Erosion and dilation of the image using

Morphological operation

Compare histogram with original image

Histogram plotting and mesh plotting

Subtracting non uniform background from original image

and plot histogram

Apply FFT transform on the Morphological image and obtained

restored image by IFFT

Original image with uniform background is attained

Enhanced image(result)

Page 10: Digital image processing techniques

1.Conversion of the RGB image into GRAYSCALE image

• In RGB image , for every pixel there are correspond 3 values. Where as in grayscale each pixel is a shade of gray, normally from 0 (black) to 255 (white). This range means that each pixel can be represented by eight bits, or exactly one byte. Other grayscale ranges are used, but generally they are a power of 2.

• Gray image takes less space in memory in comparison to RGB images.

Page 11: Digital image processing techniques

2. Histogram • The histogram of an image shows us the distribution of grey

levels in the image massively useful in image processing.• Histogram of images provide a global description of their

appearance.

• The shape of the histogram of an image gives us useful information about the possibility for contrast enhancement

Page 12: Digital image processing techniques

Histogram equalization

Page 13: Digital image processing techniques

Histogram equalization

Gray scale image histogram Resulting histogram after histogram equalization

Page 14: Digital image processing techniques

3.Filtering• Filtering is a technique for modifying or enhancing an image. For

example, you can filter an image to emphasize certain features or remove other features. Image processing operations implemented with filtering include smoothing, sharpening, and edge enhancement.

• Two main types of spatial domain filtering• linear spatial filtering (convolution filter/mask/kernel)and• nonlinear spatial filtering

• Linear filtering: is filtering in which the value of an output pixel is a linear combination of the values of the pixels in the input pixel's neighborhood.

Page 15: Digital image processing techniques

Linear spatial filtering• There are two closely related concepts that must be understood clearly

when performing linear spatial filtering. One is Correlation, the other is Convolution.

• Correlation: is the process of passing the mask w by the image array f. • Convolution: is the same process, except that w is rotated by 180 degrees

prior to passing it by f.

If the filter mask is symmetric then correlation and convolution yield the same result

Page 16: Digital image processing techniques

Linear spatial filtering• Smoothing Spatial Filters Smoothing filters are used for noise reduction and blurring

operations. • There are two main types of Smoothing filters:

• Smoothing Linear Filters • Smoothing Nonlinear Filters

• Smoothing Linear Filters/Averaging FiltersThe response of a smoothing linear spatial filter is simply the average of the pixels contained in the neighborhood of the filter mask.

These kind of filters are called averaging filters or lowpass filters.

Page 17: Digital image processing techniques

Smoothing Linear Filters/Averaging Filters

• In Smoothing filters it replace the value of every pixel in an image by the average of the gray levels defined by the filter mask.

• This process result in an image with reduced sharp transitions in intensities.

• The most obvious application is noise reduction. Because random noise is typically consist of sharp transitions in intensity level.

• The undesirable effects of the averaging filters is the blurring of edges.

1 1 11 1 11 1 1

1 1 11 1 11 1 1

1/9 1/16

Page 18: Digital image processing techniques

Smoothing Linear Filters/Averaging Filters

Page 19: Digital image processing techniques

Smoothing Linear Filters/Averaging Filters

Page 20: Digital image processing techniques

Adaptive filtering-noise filter• Adaptive filter is performed on the degraded image that contains

original image and noise. The mean and variance are the two statistical measures that a local adaptive filter depends with a defined m x n window region.

Page 21: Digital image processing techniques

Adaptive filtering-noise filter• Define a window of size mxn.• For instance consider a matrix B

• Pad matrix with zero.

Page 22: Digital image processing techniques

Adaptive filtering-noise filter

Noisy image After adaptive filtering

Page 23: Digital image processing techniques

4.Morphology

• The word morphology refers to the scientific branch that deals the forms and structures of animals/plants.

• Morphology in image processing is a tool for extracting image components that are useful in the representation and description of region shape, such as ✓ boundaries ✓Skeletons

• The language of the Morphology comes from the set theory, where image objects can be represented by sets.

Page 24: Digital image processing techniques

Morphological image processing• Mathematically Morphologic image processing

technology is based on geometry. • The theoretical foundations of morphological image

processing lies in Set theory .• The operators are particularly useful for the analysis

of binary images and common usages include edge detection, noise removal, image enhancement and image segmentation.

Page 25: Digital image processing techniques

Basic set theory

Page 26: Digital image processing techniques

Logical Operation Involving Binary Images

❑ Note that the black indicates binary 1 and white indicates binary 0 here.

Page 27: Digital image processing techniques

Morphological image processing

• Morphological techniques typically probe an image with a small shape or template known as a structuring element.

• The structuring element is positioned at all possible locations in the image and it is compared with the corresponding neighborhood of pixels.

• The structuring element is sometimes called the kernel.• small set to probe the image under study• for each SE, define origin• shape and size must be adapted to geometric properties for

the objects

Page 28: Digital image processing techniques

Morphological image processing

• Capable of removing noise • Medical image analysis : Tumor detection, measurement

of size and shape of internal organs.

• Recognition and interpretation of objects in a scene.

Page 29: Digital image processing techniques

Basic morphological operations

• Erosion

• Dilation

• Opening

• Closing

Page 30: Digital image processing techniques

Dilation• Does the structuring element hit the set?• dilation of a set A by structuring element B: all z in A such that B hits A when origin of B=z• grow the object

Page 31: Digital image processing techniques

Dilation

A A B

Page 32: Digital image processing techniques

Dilation: bridging gapsThe simplest application of Dilation

• Given the following distorted text image where the maximum length of the broken characters are 2 pixels. The image can be enhanced by bridging the gaps by using the structuring element given below:

• Note that the broken characters are joined.

Page 33: Digital image processing techniques

Erosion• Does the structuring element fit the set?• erosion of a set A by structuring element B: all z in A

such that B is in A when origin of B=z

• shrink the object

Page 34: Digital image processing techniques

Erosion

A A Ө B

Page 35: Digital image processing techniques

Useful• Erosion removal of structures of certain shape and

size, given by SE.• Dilation filling of holes of certain shape and size, given

by SE

Page 36: Digital image processing techniques

Combining Erosion and Dilation

• WANTED: remove structures / fill holes without affecting remaining parts• SOLUTION:• combine erosion and dilation (using same SE)

Page 37: Digital image processing techniques

Erosion : eliminating irrelevant detail structure

❑ Given the following binary image with squares on size 1,3,5,7,9 and 15. You can get rid of all the squares less than size of 15 by erosion followed by dilation of a structuring element of 13x13.

Page 38: Digital image processing techniques

Opening and Closing• The process of erosion followed by dilation is called opening. It has the effect of eliminating small and thin objects, breaking the objects at

thin points and smoothing the boundaries/contours of the objects.• Opening of A by structuring element B is defined by:

• The process of dilation followed by erosion is called closing. It has the effect of filling small and thin holes, connecting nearby objects and smoothing the boundaries/contours of the objects.

• Closing of A by structuring element B is defined by:

Page 39: Digital image processing techniques

Opening

Page 40: Digital image processing techniques

Closing

Page 41: Digital image processing techniques

Useful: open and close

Page 42: Digital image processing techniques

Useful: open and close• Noise Filtering: The morphological operations can be used to remove the noise as in the following example:

result of opening followed by closing

❑ Note that impulsive noise within the background and the fingerprints is removed

Page 43: Digital image processing techniques

FFT Filters

• In digital image processing Fast Fourier Transform is applied to convert an image from the image (spatial) domain to the frequency domain.

• The image is converted into spatial frequencies using a Fast Fourier Transform, the appropriate filter is applied.

• Then the image is converted back using an inverse FFT.

Page 44: Digital image processing techniques

Why apply fast fourier Transform?

• The advantage of representing an image in the frequency space is that performing some operations on the frequencies is much more efficient than doing the same in the image space i.e.

✓ Applying filters to images in frequency domain is computationally faster than to do the same in the image domain

Page 45: Digital image processing techniques

FFT• The Fourier Transform

( in this case, the 2D Fourier Transform ) is the series expansion of an image function ( over the 2D space domain ) in terms of "cosine" image (orthonormal) basis functions.

• The definitions of the transform (to expansion coefficients) and the inverse transform are given below:

F(u,v) = SUM{ f(x,y)*exp(-j*2*pi*(u*x+v*y)/N) } f(x,y) = SUM{ F(u,v)*exp(+j*2*pi*(u*x+v*y)/N) }Where,

u = 0,1,2,...,N-1 v = 0,1,2,...,N-1 x = 0,1,2,...,N-1 y = 0,1,2,...,N-1 j = SQRT( -1 )

Page 46: Digital image processing techniques

FFT• Note that f(x,y) is the image and is REAL, but F(u,v ) is COMPLEX.• Generally, F is represented by its MAGNITUDE and PHASE rather that

its REAL and IMAGINARY parts, where:– MAGNITUDE(F) = SQRT( REAL(F)^2+IMAGINARY(F)^2 )– PHASE(F) = ATAN( IMAGINARY(F)/REAL(F) )

• Briefly, the MAGNITUDE tells "how much" of a certain frequency component is present and the PHASE tells "where" the frequency component is in the image.

Page 47: Digital image processing techniques

Example

Figure 1: The original image displayed in gray scale

Figure 2: The normal mode of the image after applying the FFT

Page 48: Digital image processing techniques

Example• There is strong periodic component in the vertical direction for the bricks image. Horizontal components appear closer together in the FT. • In the blocks image, a bright line going to high frequencies perpendicular to the strong edges in the image. Anytime an image has a strong-contrast, sharp edge the gray values must change very rapidly. It takes lots of high frequency power to follow such an edge so there is usually such a line in its magnitude spectrum.

Page 49: Digital image processing techniques

Example• Letters have quite different

FTS• especially at the lower

Frequencies.

• The FTS also tend to have bright lines that are perpendicular to lines in the original letter.

• If the letter has circular segments, then so does the FTS.

Page 50: Digital image processing techniques

Outcomes • Image improved• The histogram obtained from these images is also improved

which shows that image is enhanced, the intensity range is also better .

• The mesh plot is also better in the morphology operation and the FFT mesh plot is only change the domain. The image obtained after the morphology operation is much clear than the other images, that will be helpful in problem diagnostics.

• FFT convert the domain of the image. So, it is necessary to enhance an image so that its information can be used that the image contain.

Page 51: Digital image processing techniques

Effects of Techniques a)

d)c)

b)

(a) gray scale image (b) Resulting image after histogram equalization (c) image after morphological operation (d) restored image after the FFT transform

Original image

Page 52: Digital image processing techniques