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!