Java
Java
I M. Sc (Information Technology)
Register No: _
Subject code:
2.
INDEX
5 Histogram Equalization
6 Non-linear filtering
11 DWT of images
12 Segmentation
Ex no: 1
Date: Read and Display digital images
Aim:
To read and display digital images using matlab
Algorithm:
Open a MATLAB application
Read the image using imread() function
Plot the images and given the title
Show the image using imshow() function
Save the file using .m extension
Run the file output will be display result.Thus the program was verified and the output
was verified.
Program Coding:
I=imread('C:\Users\PGCSLAB02\Desktop\mat lab images\nature.jpg');
subplot(2,2,1);imshow(I);subimage(I);title('Image 1');
I=imread('C:\Users\PGCSLAB02\Desktop\mat lab images\white.jpg');
subplot(2,2,2);imshow(I);subimage(I);title('Image 2');
I=imread('C:\Users\PGCSLAB02\Desktop\mat lab images\butterfly.jpg');
subplot(2,2,3);imshow(I);subimage(I);title('Image 3');
I=imread('C:\Users\PGCSLAB02\Desktop\mat lab images\bird.jpg');
subplot(2,2,4);imshow(I);subimage(I);title('Image 4');
Output:
Ex no:2
Result:
Thus the program was executed successfully and the output was verified.
Date: Implement the image arithmetic operation
Aim:
To perform arithmetic operation on image
Algorithm:
Open MATLAB application
Read the two images using imread() function.
To perform arthimetic operations images must be in the same size
Perform resize using resize() function
Perform arithmetic operations and display the images
Save the file using .m extension.
Program Coding:
clear all;
close all;
clc;
I1=imread('C:\Users\PGCSLAB02\Desktop\mat lab images\emoji.jpg');
I2=imread('C:\Users\PGCSLAB02\Desktop\mat lab images\smiley.jpg');
[r,c,z]=size(I2);
I1r=imresize(I1,[r,c]);
A=I1r+I2;
B=I2-I1r;
C=I1r.*I2;
D=I2.\I1r;
figure
subplot(231);
imshow(I1r);
subplot(232);
imshow(I2);
subplot(233);
imshow(A);
subplot(234);
imshow(B);
subplot(235);
imshow(C);
subplot(236);
imshow(D);
output
Result:
Thus the program was executed successfully and the output was verified
Ex no:3
Aim:
Algorithm:
Result:
Thus the program was executed successfully and the output was verified.
Ex no:4
Aim:
Algorithm:
Result:
Thus the program was executed successfully and the output was
verified.
Ex no:5
Aim:
Algorithm:
Result:
Thus the program was executed successfully and the output was
verified.
Ex no:6
Aim:
Algorithm:
Result:
Thus the program was executed successfully and the output was
verified
Ex no:7
Edge detection using a operator
Date:
Aim:
Algorithm:
Result:
Thus the program was executed successfully and the output was verified
Ex no:8
2D- DFT
2D-DFT
Aim:
Algorithm:
2D-DCT
Aim:
Algorithm:
2D-DFT
i=imread('C:\Users\PGCSLAB02\Desktop\mat lab images\baby.jpg');
i1=fft2(i);
i2=fftshift(i1);
i3=ifft(i2);
subplot(2,2,1),imshow(i),title('Original Image');
subplot(2,2,2),imshow(i1),title('Fourier Image');
subplot(2,2,3),imshow(i2),title('Shifted Fourier Image');
subplot(2,2,4),imshow(uint8(i3)),title('Inverse Fourier Image');
2D-DCT
RGB=imread('D:\MATLAB RAMYA\pictures\brd1.jpg');
I=rgb2gray(RGB);
J=dct2(I);
J(abs(J)<10)=0;
K=idct2(J);
subplot(2,2,1),imshow(RGB),title('Original Image');
subplot(2,2,2),imshow(I),title('Grayscale image');
subplot(2,2,3),imshow(log(abs(J)),[]),colormap(jet),colorbar,title('Colorbar for discrete
cosine transform');
subplot(2,2,4),imshow(K,[0 255]),title('Inverse discrete cosine');
Result:
Thus the program was executed successfully and the output was verified
Ex no:9
Aim:
Algorithm:
Aim:
Algorithm:
Result:
Thus the program was executed successfully and the output was verified
Ex no:11
DWT of Images
Date:
Aim:
Algorithm:
Date: segmentation
Aim:
Algorithm:
Thus the program was executed successfully and the output was verifed