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

댓글 수: 4

Geoff Hayes
Geoff Hayes 2014년 11월 19일
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 2014년 11월 20일
편집: Geoff Hayes 2014년 11월 20일
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 2020년 11월 20일
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 2020년 11월 20일
In this case the number of rows and columns of image must be a power of two, though, the post is quite old.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

질문:

2014년 11월 19일

댓글:

2020년 11월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by