필터 지우기
필터 지우기

i can't calculate psnr for below code......

조회 수: 2 (최근 30일)
Nivetha m
Nivetha m 2016년 4월 4일
clc; clear all; close all; fontSize = 20; a=imread('C:\Users\shankar\Documents\MATLAB\measurement\ship.jpg'); subplot(2,2,1),imshow(a),title('original image', 'FontSize', fontSize), b=rgb2gray(a); subplot(2,2,2),imshow(b),title('GRAY image', 'FontSize', fontSize), [m n]=size(b); H=fspecial('laplacian'); b2=imfilter(a,H); subplot(2,2,3),imshow(b2),title('FILTER image', 'FontSize', fontSize),
squaredErrorImage = (double(b) - double(b2)) .^ 2; mse = sum(sum(squaredErrorImage)) / (m * n); RMSE = sqrt(mse); PSNR = 10 * log10( 256^2 / mse); mad = mean2(abs(double(b)-double(b2))); message = sprintf('The mean square error is %.2f.\nThe PSNR = %.2f.\n THE RMSE=%.2f.\n THE mad=%.2f',mse, PSNR,RMSE,mad); msgbox(message);

답변 (0개)

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by