- Details
- Written by: vijay
- Category: MATLAB
% To perform the filtering operation on simple images using gaussian filter % % This program code implemented MATLAB 2014a % close clear clc A=imread('C:\Users\S VIJAY KUMAR\Documents\MATLAB\lena.jpg'); H=fspecial('gaussian',[3 3],0.5); B=imfilter(A,H); subplot(1,2,1) imshow(A) title('original') subplot(1,2,2) imshow(B) title('guassian filtered image') [peaksnr, snr] = psnr(A, B); fprintf('\n the peak-SNR value is %0.4f', peaksnr); fprintf('\n The SNR value is %0.4f \n', snr);
OUTPUT:
the peak-SNR value is 40.5818 The SNR value is 35.4224