0% found this document useful (0 votes)
10 views24 pages

DIP LAB_RECORD

Uploaded by

Sharu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views24 pages

DIP LAB_RECORD

Uploaded by

Sharu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

SRI KRISHNA ARTS AND SCIENCE COLLEGE

An Autonomous College affiliated to Bharathiar University


Re-Accredited by NAAC with ‘A’ Grade
COIMBATORE-641 008

RECORD NOTE
DEPARTMENT OF SOFTWARE SYSTEMS

NAME ROLL NUMBER

PROGRAMME MSc SOFTWARE SYSTEMS CLASS V MSc SS

COURSE PRACTICAL - IMAGE PROCESSING LAB


SRI KRISHNA ARTS AND SCIENCE COLLEGE
An Autonomous College affiliated to Bharathiar University
Re-Accredited by NAAC with ‘A’ Grade
COIMBATORE-641 008

ROLL NUMBER:

Certified bonafide record of work done by_____________________________


during the year 2023-2024.

Staff In-charge Head of the Department

Submitted to the Sri Krishna Arts and Science College (Autonomous) End
Semester Examinations held on

Internal Examiner External Examiner


DECLARATION

I ___________________________________ hereby declare that

this record of observations is based on the experiments carried out and

recorded by me during the laboratory classes of “_PRACTICAL -

IMAGE PROCESSING LAB ” conducted by SRI KRISHNA ARTS

AND SCIENCE COLLEGE, Coimbatore – 641 008.

Date: Signature of the Student

Name of the Student :


Roll Number :

Countersigned by Staff
[
CONTENTS
\

S.No. Date Title of the Experiment Page No. Sign

Create the Histogram of the image


1 20.06.2023 01
using Scilab

Create the Histogram Equalization of


2 21.06.2023 04
the Image using Scilab

Create the Enhanced Image using


3 28.06.2023 07
Scilab

Create Combined image by arithmetic


4 17.07.2023 10
operation using Scilab

Display of 2D filters frequency


5 22.07.2023 responses and processing the images 13
using filters

Create Scaled and rotated image using


6 24.07.2023 Image transformation method in Scilab 16

Create Image negative using Point


7 31.07.2023 operations – Linear transformation in 19
Scilab

Display RGB components of a color


8 01.08.2023 image by Color Image Manipulations in 22
Scilab

9 08.08.2023 Create Dilated Image using 25


Morphological Operations
Create LOG Masks implementation for
10 09.08.2023 gray and color images
28
PROGRAM:

clc;
clear;
img = imread("C:\Users\User\Downloads\images.jpg");
if ndims(img) == 3 then
img1 = rgb2gray(img);
end
hist = histc(img1(:),0:255)
subplot(1,3,1);
imshow(img);
title("Original Image");
subplot(1,3,2);
imshow(img1);
title("Gray scale Image");
subplot(1,3,3);
bar(hist,'b');
title("Image Histogram");
xlabel("Pixel Value");
ylabel("Frequency");
OUTPUT:

RESULT

The program was executed successfully and output verified.


PROGRAM:

clc;
clear;
close;
img = imread("C:\Users\User\Downloads\images.jpg");
grayimg = rgb2gray(img);
hist = histc(grayimg(:), 0:255);
cdf = cumsum(hist);
cdf_normal = (cdf-min (cdf))/(max (cdf)-min (cdf))*255;
eqimg = cdf_normal (grayimg+1);
histl = histc(eqimg(:), 0:255);
subplot(1,3,1);
bar(histl,'g');
title("Image Histogram");
subplot(1,3,2);
imshow(img);
title("Original Image");
subplot(1,3,3);
bar (hist, 'g');
title("Histogram Equalization");
OUTPUT:

RESULT

The program was executed successfully and output verified.


PROGRAM:

img = imread("C:\Users\User\Downloads\images.jpg");

maping=imadjust(img, [0.3 0.7], [0 1]);

subplot(1,2,1);

imshow(img);

title("Original Image");

subplot(1,2,2);

imshow(maping);

title("Enhanced Image")
OUTPUT:

RESULT

The program was executed successfully and output verified.


PROGRAM:

clc;
clear;
close;
i=imread('C:\Users\User\Downloads\sunflower.jpg');
j=imread('C:\Users\User\Downloads\lotusflower.jpg');
k=imadd(i,j);
subplot(3,2,1)
imshow(i);
title('Original Image 1')
subplot(3,2,2)
imshow(j);
title('Original Image 2')
subplot(3,2,3)
imshow(k);
title('Addition');
d=imabsdiff(i,j);
subplot(3,2,4)
imshow(d);
title('Difference');
m=immultiply(i,j);
subplot(3,2,5)
imshow(m);
title('Multiply');
v=imdivide(i,j);
subplot(3,2,6)
imshow(v);
title('divide')
OUTPUT:

RESULT

The program was executed successfully and output verified.


PROGRAM:

clc()
clear()
img=imread("C:\Users\User\Downloads\images.jpg");
a=double(img);
subplot(1,3,1);
imshow(img);
title('Original Image')
[m,n]=size(a);
w=[-1 -1 -1;-1 8 -1;-1 -1 -1];
for i=2:m-1
for j=2:n-1 b(i,j)=[w(1)*a(i-1,i+1)+w(2)*a(i,j+1)+w(3)*a(i+1,j+1)+w(4)*a(i-
1,j)+w(5)*a(i,j)+w(6)*a(i+1,j)+w(7)*a(i-1,j-1)+w(8)*a(i,j-1)+w(9)*a(i+1,j-1)]/9
end
end
c=uint8(b);
subplot(1,3,2);
imshow(c);
title('High pass filter')
u=[1 1 1;1 1 1;1 1 1];
for i=2:m-1
for j=2:n-1 b(i,j)=[u(1)*a(i-1,i+1)+u(2)*a(i,j+1)+u(3)*a(i+1,j+1)+u(4)*a(i-
1,j)+u(5)*a(i,j)+u(6)*a(i+1,j)+u(7)*a(i-1,j-1)+u(8)*a(i,j-1)+u(9)*a(i+1,j-1)]/9
end
end
d=uint8(b);
subplot(1,3,3);
imshow(d);
title('Low pass filter')
OUTPUT:

RESULT

The program was executed successfully and output verified.


PROGRAM:

clc;
clear;
close;
I=imread("C:\Users\User\Downloads\lotusflower.jpg")
[m n]=size(I);
for i=1:m
for j=1:n
J(2*i,2*j)=I(i,j)
p=i*cos(%pi/2)+j*sin(%pi/2);
q=-i*sin(%pi/2)+j*cos(%pi/2);
p=ceil(abs(p)+0.0001);
q=ceil(abs(q)+0.0001);
K(p,q)=I(i,j);
u=i+0.2*j;
v=j;
L(u,v)=I(i,j)
end
end
subplot(2,2,1)
imshow(I)
title("Original Image")
subplot(2,2,2)
imshow(J)
title("Scaled Image")
subplot(2,2,3)
imshow(K)
title("Rotated Image")
subplot(2,2,4)
imshow(L)
title("Translated Image")
OUTPUT:

RESULT

The program was executed successfully and output verified.


PROGRAM:

clc;
clear;
close;
I=imread('C:\Users\User\Downloads\images.jpg')
subplot(1,2,1);
imshow(I);
title('Original Image')
I=double(I);
J=255-I;
subplot(1,2,2);
imshow(J);
title('Linear Transformation”)
OUTPUT:

RESULT

The program was executed successfully and output verified.


PROGRAM:

clc;
clear;
close;
RGB=imread("C:\Users\User\Downloads\rgb-colors.jpg");
subplot(2,2,1)
title('Original Image')
imshow(RGB);
R=RGB(:,:,1);
G=RGB(:,:,2);
B=RGB(:,:,3);
subplot(2,2,2)
title('Red')
imshow(R);
subplot(2,2,3)
title('Green')
imshow(G);
subplot(2,2,4)
title('Blue')
imshow(B);
OUTPUT:

RESULT

The program was executed successfully and output verified.


PROGRAM:

sbin=imread('C:\Users\User\Downloads\sunflower.jpg')
subplot(1,3,1)
imshow(sbin);
title('Orignial Image')
se=imcreatese('ellipse',15,15);
sd=imdilate (sbin,se);
subplot(1,3,2)
imshow(sd);
title('Dilated image')
se=imerode (sbin,se);
subplot(1,3,3)
imshow(se);
title('Eroded image')
OUTPUT:

RESULT

The program was executed successfully and output verified.


PROGRAM:

clc;
clear;
j=imread("C:\Users\User\Downloads\sunflower.jpg");
j1=rgb2gray(j);
n=25*rand(size(j1,1),size(j1,2));
subplot(3,2,1);
imshow(j);
title("Original Image");
subplot(3,2,2);
imshow(j1);
title("Gray scale Image");
subplot(3,2,3);
imshow(n);
title("Generated noise");
j2=n+j1;
subplot(3,2,4);
imshow(j2);
title("Noise+Image")
Lap=[0 -1 0; -1 4 -1; 0 -1 0];
j2=double(j2)
j3=conv2(j2, Lap, 'same');
subplot(3,2,5);
imshow(j3);
title("Detected edge after LOG");
OUTPUT:

RESULT

The program was executed successfully and output verified.

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