Upload
abhishekvb
View
365
Download
4
Embed Size (px)
Citation preview
IMAGE CONTRAST ENHANCEMENT METHODS
7-10-2015
ANALYSIS OF CONTRAST ENHANCEMENT METHODS
Contrast is the difference in visual properties that makes an object (or image) distinguishable from other objects and the background.
It is the different between the darker and the lighter pixel of the image, if it is big the image will have high contrast and in the other case the image will have low contrast.
CONTRAST DEFINITION
CONTRAST ENHANCEMENT METHODS
The principal objective of enhancement is to process an image so that the result is more suitable than the original image for a specific application.
For example, a method that is quite useful for enhancing X-ray images may not necessarily be the best approach for enhancing pictures of Mars transmitted by a space probe.
Image enhancement
Spatial domain methods
Frequency domain methods
SPATIAL DOMAIN METHODS The term spatial domain refers to the image
plane itself. Spatial domain methods are procedures that
operate directly on these pixels in an image. Spatial domain processes will be denoted by
the expression g(x,y)=T[f(x,y)], 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 neighborhood of (x, y).
FREQUENCY DOMAIN METHODS Frequency domain processing techniques are
based on modifying the Fourier transform of an image.
More suitable for filtering spectrums. Any function that periodically repeats itself
can be expressed as the sum of sines and cosines of different frequencies, each multiplied by a different coefficient.
LOGARITHMIC TRANSFORMATION
The general form is s = c * log (1 + r),
where s is the output value, r is the input value and c is a constant. This transformation maps a narrow range of
low gray-level values in the input image into a wider range of output levels.
MATHEMATICAL MODELING
FLOW CHART FOR IMPLEMENTATION OF
LOGARITHMIC TRANSFORMATION
CODE FOR LOGARITHMIC TRANSFORMATIONim=imread('cameraman.tif');subplot(231),imshow(im);title('original image');imd=im2double(im);c=2.5;d=0.5;im3=c*log(1+imd);im4=d*log(1+imd);subplot(232),imshow(im3);title('transformed image(c=2.5)');subplot(233),imshow(im4);title('transformed image(c=0.5)');subplot(234),imhist(im);title('histogram of the original image');subplot(235),imhist(im3);title('histogram of the transformed image(c=2.5)');subplot(236),imhist(im4);title('histogram of the transformed image(c=0.5)');
EXPERIMENTAL RESULTS
POWER-LAW TRANSFORMATION The general form is s = c * ,
where c and are positive constants.
Power-law curves with fractional values of 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.
FLOW CHART FOR IMPLEMENTATION OF POWER
LAW TRANSFORMATION
CODE FOR POWER LAW TRANSFORMATION
im=imread('cameraman.tif');subplot(231),imshow(im);title('original image');imd=im2double(im);gamma=0.25;im3=imd.^gamma;gamma=2.5;im4=imd.^gamma;subplot(232),imshow(im3);title('transformed image(gamma=0.25)');subplot(233),imshow(im4);title('transformed image(gamma=2.5)');subplot(234),imhist(im);title('histogram of the original image');subplot(235),imhist(im3);title('histogram of the transformed image(gamma=0.5)');subplot(236),imhist(im4);title('histogram of the transformed image(gamma=2.5)');
EXPERIMENTAL RESULTS
GAMMA CORRECTION The exponent in the
power-law equation is referred to as gamma. The process used to correct this power-law response phenomena is called gamma correction.
The process used to correct power-law response phenomena is called gamma correction.
< 2.5
HISTOGRAM EQUALIZATION The general form is
= where k=0,1,2,…L-1, r and s are the input and output pixels of the image, L is the different values that can be the pixels, and and are the maximum and minimum gray values of the input image.
This method usually increase the global contrast of the image. This allows for area’s of lower contrast to gain higher contrast.
EXPERIMENT RESULTS
CODE FOR HISTOGRAM EQUALIZATION
input_image=imread('dollars.tif');input_image_process=input_image;output_image_process=histeq(input_image_process);output_image=im2uint8(mat2gray(output_image_process));input_hist=imhist(input_image);output_hist=imhist(output_image);subplot(2,2,1),imshow(input_image),title('Input image')subplot(2,2,2),imshow(output_image),title('Output image')subplot(2,2,3),plot(input_hist),title('Input histogram')xlabel('Gray levels')ylabel('Relative frecuency')set(gca, 'xlim', [0 255]);subplot(2,2,4),plot(output_hist),title('Output histogram')xlabel('Gray levels'),ylabel('Relative frecuency')set(gca, 'xlim', [0 255]);
FLOW CHART FOR HISTOGRAM EQUALIZATION
ADVANTAGES The method is useful in images with backgrounds
and foregrounds that are both bright or both dark.
A advantage of the method is that it is a fairly straightforward technique and an invertible operator.
DISADVANTAGE A disadvantage of the method is that it is
indiscriminate. It may increase the contrast of background noise, while decreasing the usable signal.
CONTRAST STRETCHING 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.
CONTRAST STRETCHING FLOWCHART
CODE FOR CONTRAST STRECHINGim=imread('cameraman.tif');subplot(231),imshow(im);title('original image');imd=double(im);m=80;e=3;im3=1 ./ (1 + (m./imd).^e);subplot(222),imshow(im3);title('contrast stretched image(m=80,e=3)');subplot(223),imhist(im);title('histogram of the original image');subplot(224),imhist(im3);title('histogram of contrast stretched image(m=80,e=3)');
EXPERIMENTAL RESULTS
APPLICATION
(Left) Original sensed fingerprint; (center) image enhanced by detection and thinning of ridges; (right) identification of special features called minutia", which can be used for matching to millions of fingerprint representations in a database.
CONCLUSION Image enhancement is basically improving the
interpretability or perception of information in images for human viewers and providing `better' input for other automated image processing techniques.
For dark images with low contrast the better results will be with the logarithm and the power law transformations using in the second one gamma values lower than 1.
For light images it would be use the power law transformation with gamma higher than 1.
For image with low contrast in gray scale the better methods are histogram equalization and contrast stretching.
THANK YOU