Meとチームメイトは、プロジェクトのJPEG2000同様の圧縮方式を使用しています。これは、MATLABとウェーブレットツールボックスを利用しています。MATLABに関する問題:ウェーブレットツールボックスを使用したJPEG2000圧縮方式
2つの問題があります。 JPEG2000の知識が不足しているため、私はこの圧縮プロセスの手順が不足していると考えています。第2の問題は、実際のエラーです。[dict,avglen] = huffmandict(cQ,p); % Create dictionary.
エラー: ???エラーが==> huffmandictを使用して174 ソースシンボルが繰り返される
ランレングスコーディングが行われていないため、行列の値を繰り返す必要があるかどうかはわかりません。
==> 41のプロジェクトでエラーが発生しました。 [dict、avglen] = huffmandict(cQ、p); %辞書を作成します。
ヒントや情報は役に立ちます。
はまた、私は私が前処理工程を必要とするかどうかわからないよ
コードは次のとおりです。
%wavelet based compression sub-band coding
clear all;
close all;
x=imread('1.png');%input image
n=input('enter the desired decompositon level '); %decompositon level
Q=input('enter the desired quantization step size '); %quantization level
%begin wavelet decomposition
c = [];
sx = size(x);
s = zeros(n+2,length(sx));
if isempty(x) , return; end
s(end,:) = size(x);
for i=1:n
[x,h,v,d] = dwt2(x,'haar'); % decomposition
c = [h(:)' v(:)' d(:)' c]; % store details
s(n+2-i,:) = size(x); % store size
end
% Last approximation.
c = [x(:)' c];
s(1,:) = size(x);
%Begin Quantization
cQ=round(c/Q);
%Begin Entropy Encoding
scQ=length(cQ);
l=1;
for i=1:(scQ-1);
l=l/2;
p(i)=l;
end
p(scQ)=p(scQ-1);
[dict,avglen] = huffmandict(cQ,p); % Create dictionary.
actualsig = randsrc(100,1,[cQ; p]); % Create data using p.
comp = huffmanenco(actualsig,dict); % Encode the data.
Updateを使用する必要があります。私たちはwcompressを使用することはできません関数。 –