0% found this document useful (0 votes)
37 views12 pages

List of Experiments: Page - 1

The document describes a list of experiments to perform basic image processing and morphological operations using MATLAB. It includes steps to load and manipulate images like creating grayscale, negative, and rotated images. It also describes filtering images using average and median filters, applying convolution, and obtaining image histograms. For morphological operations, it shows how to dilate, erode, open, and close images using structuring elements.

Uploaded by

Manjusha Sanke
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)
37 views12 pages

List of Experiments: Page - 1

The document describes a list of experiments to perform basic image processing and morphological operations using MATLAB. It includes steps to load and manipulate images like creating grayscale, negative, and rotated images. It also describes filtering images using average and median filters, applying convolution, and obtaining image histograms. For morphological operations, it shows how to dilate, erode, open, and close images using structuring elements.

Uploaded by

Manjusha Sanke
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/ 12

LIST OF EXPERIMENTS

1. To create the following images:-


a] a rectangular image of red colour

b] an image with vertical stripes of blue colour.

c] an image with horizontal stripes of green colour.

2. To load the image and scale that image by doubling its width and height.

3. To obtain grayscale of an image.

4. To obtain the histogram of an image.

5. To perform following grayscale transformations:-


a] Negative of an image.

b] Contrast of an image.

6. To perform thresholding of an image.

7. To perform image smoothing using average and median filter.

8. To perform edge detection using Prewitt and Sobel operator.

9. To perform basic image processing operations using MATLAB.

10. To perform morphological operations using MATLAB.

Page | 1
BASIC IMAGE PROCESSING OPERATIONS USING MATLAB

AIM: To perform basic image processing operations using MATLAB.

IMPLEMENTATION:
1) LOADING IMAGE:

>>p=imread('me99.jpg');
>> figure, imshow(p);
>> title('Original image');

2) GRAYSCALE OF AN IMAGE:

Page | 2
>>I = imread('me99.jpg');
>> J = rgb2gray(I);
>> figure, imshow(I), figure, imshow(J);

3) NEGATIVE OF AN IMAGE:

>>X=imread('let3.jpg');
>> BW10 = imcomplement(X);
>> figure, imshow(BW10);

4) ROTATING:

>>BW9 = imrotate(I,35,'bilinear');
Page | 3
>> figure, imshow(BW9);

5) HISTOGRAM & HISTOGRAM EQUALIZATION:


>>I = imread('med.gif');
>> figure,imhist(I);
>> figure, histeq(I,100);
>> figure, imshow(I);

Page | 4
6) FILTERING:

>> I= imread('med.gif');
>> figure, imshow(I);
>> J = imnoise(I,'salt & pepper',0.02);
>> figure, imshow(J);
>> K = filter2(fspecial('average',3),J)/255;
>> figure, imshow(K);
>> L = medfilt2(J,[3 3]);
>> figure, imshow(L);

Page | 5
7) CONVOLUTION:

>>s = [1 2 1; 0 0 0; -1 -2 -1]
s=
1 2 1
0 0 0
-1 -2 -1

>> f = [1 2 3; 4 5 6; 7 8 9]
f=

1 2 3
4 5 6
7 8 9
>> H = conv2(f,s)

H=
1 4 8 8 3
4 13 20 17 6
6 18 24 18 6
-4 -13 -20 -17 -6
-7 -22 -32 -26 -9

>> mesh(H)

Page | 6
CONCLUSION:
Basic image processing operations are implemented using MATLAB.

EXPERIMENT NO. 10 DATE:

Page | 7
BASIC MORPHOLOGICAL OPERATIONS USING MATLAB

AIM: To perform basic morphological operations using MATLAB.

IMPLEMENTATION:

>> SE = strel('ball',10,5);

ORIGINAL IMAGE

>> BW1= imread('morph1.jpg');

>> figure, imshow(BW1);

DILATED IMAGE

>> BW2 = imdilate(BW1,SE);


Page | 8
>> figure, imshow(BW2);

ERODED IMAGE

>> BW3 = imerode(BW1,SE);

>> figure, imshow(BW3);

OPENING

>> BW1= imread('morph1.jpg');


Page | 9
>> figure, imshow(BW1);
>> BW4=imerode(BW1,SE);
>> BW5 = imdilate(BW4,SE);
>> figure, imshow(BW5);

BW1= imread('morph1.jpg');

>> figure, imshow(BW1);

>> BW7=imopen(BW1,SE);

Page | 10
>> figure, imshow(BW7);

CLOSING

>> BW1= imread('morph1.jpg');


>> figure, imshow(BW1);
>> BW2 = imdilate(BW1,SE);
>> BW6=imerode(BW2,SE);
>> figure, imshow(BW6);

Page | 11
BW1= imread('morph1.jpg');
>> figure, imshow(BW1);
>> BW8=imclose(BW1,SE);
>> figure, imshow(BW8);

CONCLUSION:

Basic morphological operations are implemented using MATLAB.

Page | 12

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy