Undefined function 'immse' for input arguments of type 'uint8'.
6 次查看(过去 30 天)
显示 更早的评论
im1=imread('stallite1.JPG'); figure subplot(1,3,1),imshow(im1),title('original image') ref=rgb2gray(im1); subplot(1,3,2),imshow(ref),title('gray image')
N = imnoise(ref,'salt & pepper', 0.02); subplot(1,3,3),imshow(N),title('noise image') error = immse(N, ref); fprintf('\n The mean-squared error is %0.4f\n', error)
采纳的回答
Guillaume
2018-4-24
immse was introduced in version R2014b and requires the image processing toolbox. If you're on an earlier version or don't have the image processing toolbox, you'll get the error you see.
Since imnoise does not error we can conclude that you're using a version before R2014b.
4 个评论
Guillaume
2018-4-24
If you're on a software maintenance service then the upgrade (to any version) is free. Otherwise, yes you will have to pay. You're better off contacting mathworks directly with your license number. They'll be able to tell you directly if it's free and if not, how much.
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Resizing and Reshaping Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!