wcompress
1 回表示 (過去 30 日間)
古いコメントを表示
Hi everybody, can someone please help me with this error, below is my code....
The CR_testImage.tif is unit8 59x64x3
X = imread('CR_testImage.tif');
[CR,BPP] = wcompress('c',X,'w_test.wtc','spiht','maxloop',12);
Xc = wcompress('u','w_test.wtc');
subplot(1,2,1); image(X);
axis square;
title('Original Image')
subplot(1,2,2); image(Xc);
axis square;
title('Compressed Image - 12 steps - bior4.4')
delete('w_test.wtc')
*When I run this code the message show..
??? Subscript indices must either be real positive integers or logicals.
Error in ==> wtc_spiht>wtc_spiht_dec at 524
Signific_MAT(idx_CHILD+d_PIX_Plan) = ...
Error in ==> wtc_spiht at 23
case 2 , [varargout{1:nbout}] = wtc_spiht_dec(varargin{:});
Error in ==> wtcmngr at 98
[varargout{1:nbout}] = funHDL('dec',WTC_Struct,stepFLAG);
Error in ==> wcompress at 452
X_decoded = wtcmngr('read',inputFile,stepFLAG);
Error in ==> Test_wc6 at 11
Xc = wcompress('u','w_test.wtc');
Thank you in advance..
Warin
0 件のコメント
採用された回答
Wayne King
2012 年 4 月 26 日
You need to extend the one dimension of your image to the next power of 2 - 64x64x3, you can pad with zeros, see wextend() for help, then the above will work.
For example:
X = randi([0 255],64,64,3,'uint8');
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Image Processing Toolbox についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!