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 comentarios

Chandra Kurniawan
Chandra Kurniawan el 29 de Nov. de 2011
Would you upload your 'T1.jpg' image??
Walter Roberson
Walter Roberson el 29 de Nov. de 2011
http://www.mathworks.com/matlabcentral/answers/7924-where-can-i-upload-images-and-files-for-use-on-matlab-answers

Iniciar sesión para comentar.

 Respuesta aceptada

Wayne King
Wayne King el 29 de Nov. de 2011

0 votos

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 comentario

Marina
Marina el 30 de Nov. de 2011
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.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Images en Centro de ayuda y File Exchange.

Preguntada:

el 29 de Nov. de 2011

Community Treasure Hunt

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

Start Hunting!

Translated by