error in spiht algorithm

hello sir!! i am getting an error at a line for uncompression in spiht algorithm.

4 comentarios

Geoff Hayes
Geoff Hayes el 19 de Nov. de 2014
Tanvi - please describe the algorithm that you are using. Is this something from the File Exchange (and if so, provide a link to it). Also, please copy and paste the entire error message that you are observing, including the line (or lines) of code that you are executing that generates the error.
Tanvi
Tanvi el 20 de Nov. de 2014
Editada: Geoff Hayes el 20 de Nov. de 2014
clc;
clear all;
i1=imread('t1.jpg');
i2=rgb2gray(i1);
option='c';
[cr,bpp]=wcompress(option,i2,'i2.wtc','spiht','maxloop',12);
option='u';
Xc=wcompress(option,'i2.wtc');
delete('i2.wtc');
figure(1)
imshow(i2)
imageview(Xc)
error:- ??? 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 ==> cmp3 at 8
Xc=wcompress(option,'i2.wtc');
NANDITA SHARMA
NANDITA SHARMA el 20 de Nov. de 2020
You can add i1=imresize( i1, [256 256]), then run the code. I hope it will successfully run now. 'spiht' runs on square matrix. may be for that reason you are getting the error.
KALYAN ACHARJYA
KALYAN ACHARJYA el 20 de Nov. de 2020
In this case the number of rows and columns of image must be a power of two, though, the post is quite old.

Iniciar sesión para comentar.

Respuestas (0)

Productos

Etiquetas

Preguntada:

el 19 de Nov. de 2014

Comentada:

el 20 de Nov. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by