programming9
  • Flowcharts
  • Programs
      • Back
      • C Programs
      • C++ Programs
      • Java Programs
      • Python Codes
      • HTML Codes
      • Java Script Codes
      • SQL Codes
  • Tutorials
      • Back
      • Java Tutorials
      • Competitive Programming
      • Python Tutorials
      • C Programming
  • Blog
  • Login

Matlab Code to Perform the Filtering Operation on Images using the Gaussian filter and Compute the PSNR and SNR of Image

Written by: vijay
  • 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:

untitled

the peak-SNR value is 40.5818 The SNR value is 35.4224
  • Privacy Policy
  • Cookie Policy
© programming9.com 2025
Back to top