資源簡介
文章《MATLAB:圖像旋轉(zhuǎn)與插值并比較前后MSE》對應(yīng)代碼。

代碼片段和文件信息
clc
clear;
I?=?imread(‘cameraman.tif‘);
[r1c1]=size(I);?
J?=?uint8(myimrotatef(I30));%rotate?30?degrees?clockwise
K?=?uint8(myimrotatef(J-30));%rotate?30?degrees?anticlockwise
[r2c2]=size(K);?
K?=?K((r2-r1)/2+1:(r2+r1)/2(c2-c1)/2+1:(c2+c1)/2);%cut?the?picture?as?large?as?the?sample
subplot(131)imshow(I)title(“Sample?256*256“)
subplot(132)imshow(J)title(“Rotation1?350*350“)
subplot(133)imshow(K)title(“Rotation2?256*256“);
[PSNR?MSE]?=?psnr_mse(I?K);%calculate?MSE?and?display?MSE
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????3122??2018-09-12?21:11??myimrotatef.m
?????文件????????488??2018-09-12?20:45??psnr_mse.m
?????文件????????514??2019-01-27?19:54??h2.m
-----------?---------??----------?-----??----
?????????????????4124????????????????????3
- 上一篇:算法帝國.mobi
- 下一篇:雙邊濾波圖像處理方法MATLAB程序
評論
共有 條評論