0% found this document useful (0 votes)
128 views3 pages

Experiment 5: Digital

This experiment involves performing digital image processing techniques using MATLAB. The objectives are to learn MATLAB commands for image processing and simulate concepts like image enhancement with histogram equalization, spatial and frequency domain filtering using weighted averaging and median filters, and morphological operations including erosion, dilation, opening, and closing. These operations are applied to images to modify and analyze them. The experiment involves displaying original and processed images and concluding with observations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
128 views3 pages

Experiment 5: Digital

This experiment involves performing digital image processing techniques using MATLAB. The objectives are to learn MATLAB commands for image processing and simulate concepts like image enhancement with histogram equalization, spatial and frequency domain filtering using weighted averaging and median filters, and morphological operations including erosion, dilation, opening, and closing. These operations are applied to images to modify and analyze them. The experiment involves displaying original and processed images and concluding with observations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 3

Year & Branch: TY Elex and ETC Subject: Robotics Subject Code: EL and ET3204

Experiment 5
Title: Digital Image Processing and Analysis using MATLAB

Aim: Simulation of fundamental techniques in digital image processing.


Objective:
1) To learn MATLAB basic commands for digital image processing.
2) To simulate fundamental concepts of digital image processing using
MATLAB.
Software:

MATLAB.

Reference for digital image:


http://www.vision.caltech.edu/html-files/archive.html , https://testimages.org/
Select an appropriate image for this experiment.

Theory:

This lab experiment consists of five parts. Write in short on Part 1, 2 3 and 5.
Read fourth part and implement on suitable image.

Part 1 Basic MATLAB commands for image processing.


imread Load an image
imwrite Save an image
imshow Display an image
imfinfo Display image information
mean2 Compute global mean value of an image
std2 Compute the global standard deviation of an image
improfile Select a line along which to take an intensity profile
imhist Compute and display the image histogram
fspecial Generate a predefined filter mask
filter2 Perform a 2-D convolution
rgb2gray Convert RGB to grayscale

Part 2: Image Enhancement


Histogram and histogram equalization.

Part 3: Spatial and frequency domain filters


Weighted averaging filter
Median filter
Frequency domain filtering:https://www.cs.uregina.ca/Links/class-info/425-nova/Lab5/

Part 4: Morphological image operations.

Apply morphological operators on any binary image.


Morphological image operations-erosion, dilation, opening and closing.

Morphological operations: including erosion, dilation, opening, closing and Users can arbitrarily
choose one of the morphological operations
Structuring Element (SE):

SE size: users can dynamically change the SE size through moving the slider.
SE type: there are 3 types of SE which are implemented in the program, including diamond,
square and octagon. Users can dynamically change SE type through the pop-up menu.
User-defined SE: users can arbitrarily change the SE through pressing the mouse button. When
users press the specific radio button, MorphPic will show the corresponding resultant
morphological operations on the original picture.

Erosion:
The basic idea of erosion is just like soil erosion only, it erodes away the boundaries of
foreground object (Always try to keep foreground in white). The kernel slides through the image
(as in 2D convolution). A pixel in the original image (either 1 or 0) will be considered 1 only if
all the pixels under the kernel is 1, otherwise it is eroded (made to zero).All the pixels near
boundary will be discarded depending upon the size of kernel. So the thickness or size of the
foreground object decreases or simply white region decreases in the image. It is useful for
removing small white noises detach two connected objects.
Erosion Algorithm:
‘A’ is the original picture, ‘B’ is the structural element, and ‘C’ is the resultant picture of the
erosion of A with B. In Matlab, erosion can be implemented by a function, called ‘imerode’.
Dilation:
It is just opposite of erosion. Here, a pixel element is ‘1’ if at least one pixel under the kernel is
‘1’. So it increases the white region in the image or size of foreground object increases.
Normally, in cases like noise removal, erosion is followed by dilation. Because, erosion removes
white noises, but it also shrinks our object. So we dilate it. Since noise is gone, they won’t come
back, but our object area increases. It is also useful in joining broken parts of an object.
Dilation Algorithm:
‘C’, is the resultant picture of the dilation of ‘A’ with ‘B’. In Matlab, dilation can be
implemented by a function, called ‘imdilate’.
Opening is just another name of erosion followed by dilation. It is useful in removing noise,
as we explained above.

Opening Algorithm:

‘C’, is the resultant picture of the opening of A with B. The opening is to do erosion on A by B,
and then do dilation on A by B. In Matlab, opening can be implemented by a function, called
‘imopen’.

Closing is reverse of Opening, Dilation followed by Erosion. It is useful in closing small holes
inside the foreground objects, or small black points on the object. In Matlab, closing can be
implemented by a function, called ‘imclose’.

Closing Algorithm:
‘C’ is the resultant picture of the closing of A with B. The closing is to do dilation on A by B,
and then do erosion on A by B.

Algorithm:
1. Read the input image
2. Apply structure element on input image
3. Use the function for dilation, erosion, opening and closing.
4. Display the original image & output images.

Results:

Enclose original image and results after processing it.

Conclusion:

You might also like