📄 exrle.m
字号:
clear all;
I = imread('cameraman.tif');
I = im2bw(I, 0.4);
[zipped, info] = RLEncode(I);
unzipped = RLEdecode(zipped, info);
%显示原始图像和经编解码后的图像,显示压缩比,并计算均方根误差得erms=0,
%表示RLE是无失真编码。
I2 = logical(unzipped);
subplot(121);imshow(I);
subplot(122);imshow(I2);
erms = compare(I, I2)
cr = info.ratio
whos I unzipped zipped
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -