Hi, I want to apply arithmetic coding to the image. Can anyone help me?

4 次查看(过去 30 天)
Hi, I want to apply arithmetic coding to the image. Can anyone help me?

回答(2 个)

Walter Roberson
Walter Roberson 2021-12-25

yanqi liu
yanqi liu 2021-12-27
clc; clear all;
close all;
img = imread('cameraman.tif');
data = img(:);
input=double(data);
[alphabet,~,seq]=unique(input);
counts = histc(input,alphabet);
code = arithenco(seq,counts);
dseq = arithdeco(code,counts,length(input));
dseq = reshape(dseq,size(img,1),size(img,2));

类别

Help CenterFile Exchange 中查找有关 Image Processing Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by