Programming9
  • Flowcharts
  • Programs
    • C Programs
    • C++ Programs
    • Java Programs
    • Python Codes
    • HTML Codes
    • Java Script Codes
    • SQL Codes
  • Tutorials
    • Java Tutorials
    • Competitive Programming
    • Python Tutorials
    • C Programming
  • Blog
  • Login
  1. You are here:  
  2. Home
  3. Programs
  4. MATLAB

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

Details
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
programming9.com

Programs and tutorials on Programming and Problem Solving.

C C++ Java Python JavaScript SQL HTML

Programs

  • C Programs
  • C++ Programs
  • Java Programs
  • Python Codes
  • HTML Codes
  • JavaScript Codes
  • SQL Codes

Tutorials

  • Java Tutorials
  • Competitive Programming
  • Python Tutorials
  • C Programming
  • Flowcharts
  • Blog

Site Links

  • Home
  • Login
  • About Us
  • Contact
  • Privacy Policy
  • Sitemap