I got an error - " Integers can only be combined with integers of the same class, or scalar doubles" .. i have given my code below.. Can you help me out with this error? This is to find MSE value and PSNR value
1 view (last 30 days)
Show older comments
%INPUT OBTAINING
[file path] = uigetfile('*.bmp;''pick an image');
a = imread(file);
figure;
imshow(a);
title('Input Image');
a1 = imnoise(a,'salt & pepper',0.02);
%PREPROCESSING
a=imresize(a,[256 256]);
a1=im2bw(a);
a1=medfilt2(a1);
figure;
imshow(a1);
title('Preprocessed Image')
SquardErrorImage=((a1-a).^2)
0 Comments
Answers (2)
Image Analyst
on 1 Dec 2015
Use the functions immse() and psnr() built in to the Image Processing Toolbox.
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!