フィルターのクリア

hii sir i had a doubt in this program ? in this program in fifth line its showing error can yoo help me what is the mistake in dat line please?

1 回表示 (過去 30 日間)
ref = imread('pout.tif');
H = fspecial('Gaussian',[11 11],1.5);
A = imfilter(ref,H,'replicate');
subplot(1,2,1); imshow(ref); title('Reference Image');
subplot(1,2,2); imshow(A); title('Blurred Image');
[ssimval, ssimmap] = ssim(A,ref);
fprintf('The SSIM value is %0.4f.\n',ssimval);
figure, imshow(ssimmap,[]);
title(sprintf('ssim Index Map - Mean ssim Value is %0.4f',ssimval));
  1 件のコメント
Walter Roberson
Walter Roberson 2016 年 2 月 16 日
It would be a lot easier on us if you showed us a copy of the error message. And also if you told us which MATLAB version you are using.

サインインしてコメントする。

回答 (1 件)

Ashish Sheikh
Ashish Sheikh 2016 年 2 月 17 日
Heyya ,
I have executed your code snippet and I don't see any error in the code.(except one single error)
In my case , I got an error because , The image which i imported pout.tiff was of type LOGICAL . I just converted those variables A and Ref to double type using A=double(A) ..
Apart from this the code is working fine.(until unless your A and ref are logical type , you should not get an error)

製品

Community Treasure Hunt

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

Start Hunting!

Translated by