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

5 visualizaciones (últimos 30 días)
javad danesh
javad danesh el 25 de Dic. de 2021
Respondida: yanqi liu el 27 de Dic. de 2021
Hi, I want to apply arithmetic coding to the image. Can anyone help me?
  2 comentarios
Jan
Jan el 25 de Dic. de 2021
The question is too vague to be answered.
javad danesh
javad danesh el 25 de Dic. de 2021
MATLAB code I wanted arithmetic encoding for images.

Iniciar sesión para comentar.

Respuestas (2)

Walter Roberson
Walter Roberson el 25 de Dic. de 2021

yanqi liu
yanqi liu el 27 de Dic. de 2021
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));

Community Treasure Hunt

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

Start Hunting!

Translated by