Escolar Documentos
Profissional Documentos
Cultura Documentos
Supervised By:
Group Members:
Dr. Jameel Ahmed
Nisar Ahmed Rana
Engr. Waqas Ahmed
Sheikh M. Arshad
Ghazal Arshad
Maria Minhas
Digital Image Enhancement
In computer graphics, the process of improving the quality of a digitally stored image by manipulating
the image with software is called image enhancement. It is quite easy, for example, to make an image
lighter or darker, or to increase or decrease contrast. Advanced image enhancement software also
supports many filters for altering images in various ways.
An image can be synthesized from a micrograph of various cell organelles by assigning a light
intensity value to each cell organelle. The sensor signal is “digitized”-- converted to an array of
numerical values, each value representing the light intensity of a small area of the cell. The digitized
values are called picture elements, or “pixels,” and are stored in computer memory as a digital image.
A typical size for a digital image is an array of 512 by 512 pixels, where each pixel has value in the
range of 0 to 255. The digital image is processed by a computer to achieve the desired result.
Image enhancement improves the quality (clarity) of images for human viewing. Removing blurring
and noise, increasing contrast, and revealing details are examples of enhancement operations. For
example, an image might be taken of an endothelial cell, which might be of low contrast and
somewhat blurred. Reducing the noise and blurring and increasing the contrast range could enhance
the image. The original image might have areas of very high and very low intensity, which mask
details. An adaptive enhancement algorithm reveals these details. Adaptive algorithms adjust their
operation based on the image information (pixels) being processed. In this case the mean intensity,
contrast, and sharpness (amount of blur removal) could be adjusted based on the pixel intensity
statistics in various areas of the image.
Image enhancement refers to sharpening of image features such as edges, boundaries, or contrast to
make a graphic display more useful for display and analysis. The enhancement process does not
increase the inherent information content in the data. But it does increase the dynamic range of the
chosen features so that they can be detected easily. Image enhancement includes gray level and
contrast manipulation, noise reduction, edge sharpening and so on. Image processing is useful in
virtually all image processing applications.
Image processing technology is used by planetary scientists to enhance images of Mars, Venus, or
other planets. Doctors use this technology to manipulate CAT scans and MRI images. Image
processing in the laboratory can motivate students and make science relevant to student learning.
Image processing is an excellent topic for classroom application of science research techniques.
1
Digital Image Enhancement
PROJECT DESCRIPTION
Image Acquisition
Image enhancement
Image restoration
Graphical user interface
IMAGE ENHANCEMENT
Histogram Modeling
The histogram of an image represents the relative frequency occurrence of the various gray levels
in the image. Histogram modeling modifies an image so that its histogram has a desired shape.
This is useful in stretching the low-contrast level of images with narrow histograms. Histogram
modeling is found to be a powerful technique for image enhancement.
Histogram Equalization
Histeq() enhances the contrast of images by transforming the values in an intensity image, so
that the histogram of the output image approximately matches a specified histogram.
adapthisteq() enhances the contrast of the grayscale image I by transforming the values using
contrast-limited adaptive histogram equalization (CLAHE).CLAHE operates on small regions
in the image, called tiles, rather than the entire image. Each tile's contrast is enhanced, so
that the histogram of the output region approximately matches the histogram specified by the
'Distribution' parameter. The neighboring tiles are then combined using bilinear interpolation
to eliminate artificially induced boundaries.
Contrast Enhancement
Intensity adjustment
To increase the contrast of the image, we need to adjust the intensity of an image.Using
imadjust() the contrast is enhanced.
ir=I(:,:,1); ig=I(:,:,2); ib=I(:,:,3);
ir=imadjust(ir); ig=imadjust(ig); ib=imadjust(ib);
img(:,:,1)=ir; img(:,:,2)=ig; img(:,:,3)=ib;
img is the output image with better contrast.
1
Digital Image Enhancement
Brightness
The brightness of the input image is increased to the desired level by taking the value from
the user and increasing the intensity of input image to that level.
bright=str2num(b);
img=I+bright;
imshow(img);
IMAGE RESTORATION
The purpose of image restoration is to "compensate for" or "undo" defects which degrade an image.
Degradation comes in many forms such as motion blur, noise, and camera miss-focus. In cases like
motion blur, it is possible to come up with an very good estimate of the actual blurring function and
"undo" the blur to restore the original image. In cases where the image is corrupted by noise, the best
we may hope to do is to compensate for the degradation it caused.
Deblur
Weiner Filtering
Image restoration using wiener filtering provides us with the optimal trade-off between de-
noising and inverse filtering.
Weiner Filtering is implemented in IPT using function deconvwnr
J = deconvwnr (I, PSF) restores image I that was degraded by convolution with a
point-spread function PSF and possibly by additive noise.
PSF is obtained using fspecial() which creates a two dimensional filter of specified
type and parameters. Parameters will be defined by the user of his own requirment,
using the Edit Text Box in the user friendly GUI. It is implemented using:
psf=fspecial('motion',len,theta);
img=deconvwnr(I,psf);
Blind Deconvolution
In this method, we assume nothing about the image. We do not have any information about
the blurring function or on the additive noise. The most difficult problems in image restoration
are obtaining a suitable estimate of the PSF to use in restoration algorithms.
Image restoration methods that are not based on specific knowledge of the
PSF are called blind deconvolution algorithms. Blind deconvolution is
implemented in IPT using function deconvblind
[J,PSF] = deconvblind (I, INITPSF) deconvolves image I using the maximum
likelihood algorithm, returning both the deblurred image J and a restored
point-spread function PSF.
Inverse Filter
In this method we look at an image assuming a known blurring function. Restoration is good
when noise is not present and not so good when it is present.
Denoise
Median filtering is similar to using an averaging filter, in that each output pixel is set to an
average of the pixel values in the neighborhood of the corresponding input pixel. However,
with median filtering, the value of an output pixel is determined by the median of the
2
Digital Image Enhancement
neighborhood pixels, rather than the mean. The median is much less sensitive than the mean
to extreme values (called outliers). Median filtering is therefore better able to remove these
outliers without reducing the sharpness of the image. The medfilt2 function implements
median filtering.
The wiener2 function applies a Wiener filter (a type of linear filter) to an image adaptively,
tailoring itself to the local image variance. Where the variance is large, wiener2 performs little
smoothing. Where the variance is small, wiener2 performs more smoothing. This approach
often produces better results than linear filtering. The adaptive filter is more selective than a
comparable linear filter, preserving edges and other high-frequency parts of an image. In
addition, there are no design tasks; the wiener2 function handles all preliminary computations
and implements the filter for an input image. wiener2, however, does require more
computation time than linear filtering. wiener2 works best when the noise is constant-power
("white") additive noise, such as Gaussian noise.
3
Digital Image Enhancement
Push Button: Several functions are performed using a push buttion. Clicking on the push
button, performs the operation specified.
Axes: Axes components enable our GUI to display graphics, such as graphs and images.
Slider: Sliders accept numeric input within a specified range by enabling the user to move a
sliding bar, which is called a slider or thumb. Users move the slider by clicking the slider and
dragging it, by clicking in the trough, or by clicking an arrow. The location of the slider
indicates the relative location within the specified range.
Edit Box: Edit text components are fields that enable to enter or modify text strings. Edit
text are used where we want text as input. Users can enter numbers, and it is converted to
their numeric equivalents using str2num().
4
Digital Image Enhancement
Menu Title: Because clicking a menu title automatically displays the menu below it, we dnt
need to program callbacks at the title level. However, the callback associated with a menu
title can be a good place to enable or disable menu items below it.
Load Function:
Image Resize:
function Resize_Callback(hObject, eventdata, handles)
global I;
global img;
str=get(handles.re,'String');
scale=str2num(str);
scale=scale/100;
img=imresize(I,scale);
axes(handles.axes);
imshow(img);
Image Rotate:
function Rotate_Callback(hObject, eventdata, handles)
global I;
global img;
str=get(handles.ro,'String');
theta=str2num(str);
img=imrotate(I,theta);
axes(handles.axes);
imshow(img);
Image Crop:
function Crop_Callback(hObject, eventdata, handles)
global I;
global img;
str=get(handles.hi,'String'); str=get(handles.vf,'String');
hi=str2num(str); vf=str2num(str);
str=get(handles.hf,'String'); img=I(50:305,60:315,:);
hf=str2num(str); axes(handles.axes);
str=get(handles.vi,'String'); imshow(img);
vi=str2num(str);
5
MANAGEMENT SUMMARY
The project design team consisted of 4 members from Electrical Engineering Department. The team
was split into a number of technical groups with a designated leader for each. The team leader was
responsible for running meetings, procurement and other administrative tasks. Each member of the
design team belonged to at least one technical group.
TECHNICAL GROUPS
Each technical group was assigned a leader who was responsible for getting the group to meet the
deadlines set forth by the GL and the rest of the team.
Project Planning
Technical Group
Implementation
Documentation
User Manual
GUI Design
Debugging
Testing
Coding
Member Name
Nisar Ahmed Rana 1 2 2 1 1 3 2 1
Sheikh Arshad 2 2 2 2 3 1 1 2
Ghazal Arshad 2 1 2 3 3 2 3 2
Maria Minhas 2 3 1 2 3 3 2 3
The Project Planning group is incharge of all the groups in designing and idea generation. Testing
group is responsible for testing the performance of the software and save the results. The
implementation group designs the software and delegate the program assignment to the
programmers. The debugging group debugs the errors if reported by testing group. Coding group
assist the programmer in writing codes and studying algorithms. GUI design group assist the designer
in designing and modification of Graphical User Interface of application. The Documentation group
Digital Image Enhancement
was responsible for documenting the design and writing the report. User manual group write the user
manual with the help of Documentation and Coding group.
TIME SCHEDULING
The first task for the team was to set an aggressive, yet achievable schedule. To ensure the
successful completion of the project, the task as a whole has been broken up into various sub-tasks.
These sub-tasks were chosen after evaluating the problem and finding crucial steps that could be
followed to completion. In order to meet the aggressive schedule, two team meetings were held each
nd
week one under the co-supervisor and the 2 under group leader throughout the project. The group
has to report its performance to its supervisor after every 15 days. In addition, each technical group
met at least once a week when it had an approaching deadline. The deadlines that have been chosen
will be adhered to unless requested otherwise by the Supervisor.
Gantt Chart
In the Gantt chart shown, tasks illustrated in blue are completed. Areas in green depict the tasks that
our team will be focusing on during the specified given period. It should be noted, that the direct
development and testing of code is placed on this chart. This is an ongoing process comprising the
latter part of the project. Key areas that will involve a significant amount of time to prepare include the
user manual.