error in arithenco and arithdeco
4 次查看(过去 30 天)
显示 更早的评论
original=imread('Lena.bmp'); % Read an image Lena 512*512 to original variable
seq=mortonx(original); % convert the matrix original into a vector by morton scan order which is a fucntion i made up by myself
ta=tabulate(seq); % create a three column with the internal function ... first column is the symbol... second is the times it occured ... third is the propability
count=ta(:,2); %copy the count column into count variable from ta variable
code=arithenco(seq,count); %appply the arithmetic coding ...
new=arithdeco(code,count,262144); %apply the arithmetic decoding to restore the original image ...
isequal(seq,new); % to see if seq and new are equal ....
% ??? Error using ==> arithenco at 36
% The symbol sequence parameter must be a vector of positive finite integers.
1 个评论
vishnu
2012-2-29
can you send the or post the function which converts the image into vector by morton scanning
回答(2 个)
Wayne King
2011-10-26
arithenco() expects an input like [1 2 3 4].
what is seq?
1 个评论
Wayne King
2011-10-26
I mean you told us seq comes from your function mortonx, but is it a vector of positive integers?
Diyar Aldusky
2011-10-27
1 个评论
Wayne King
2011-10-27
Diyar, it's not important just that it is a vector, what are the values in original, are they all positive integers as I asked you in my first answer.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Denoising and Compression 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!