Subscripted assignment dimension mismatch

Hi everybody, can someone please help me with this error, below is my code
tic
X = imread('T1.jpg');
[CR,BPP]=wcompress('c',X,'image_c.wtc','aswdr', 'maxloop',11 ,'wname','bior6.8' );
CR
Xc = wcompress('u','image_c.wtc');
time=toc
set(gcf,'Color',[1 1 1])
subplot(1,2,1); image(X);
axis square;
title('Original Image')
subplot(1,2,2); image(Xc);
axis square;
title('Uncompressed Image')
xlabel({['Compression Ratio: ' num2str(CR,'%1.2f %%')], ...
['BPP: ' num2str(BPP,'%3.2f')]})
Image T1.jpg is truecolor image, class is uint8.
When I start the program, display an error
??? Subscripted assignment dimension mismatch.
Error in ==> wtc_aswdr>wtc_aswdr_enc at 118
scan_Plan_INI(:,bp) = scan_IDX+(bp-1)*nb_PIX;
Error in ==> wtc_aswdr at 32
case 1 , [varargout{1:nbout}] = wtc_aswdr_enc(varargin{:});
Error in ==> wtcmngr at 58
varargout{1} = feval(funNAME,'enc',varargin{2:end});
Error in ==> wcompress at 426
Encoded_wtbx_DEC = wtcmngr('enc',method_COMP,X, ...
Error in ==> simulacija at 4
[CR,BPP]=wcompress('c',X,'image_c.wtc','aswdr', 'maxloop',11 ,'wname','bior6.8' );
Thanks in advance!

2 Commenti

Would you upload your 'T1.jpg' image??
http://www.mathworks.com/matlabcentral/answers/7924-where-can-i-upload-images-and-files-for-use-on-matlab-answers

Accedi per commentare.

 Risposta accettata

Wayne King
Wayne King il 29 Nov 2011
With the error that you are reporting, I suspect your problem is that your input image does not have X and Y dimensions that are power of two in length.
size(X,1) and size(X,2) must be a power of two.

1 Commento

Thank you Wayne, my problem is solved thanks to you. Input image must have X and Y dimensions that are power of two in length.

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Images in Centro assistenza e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by