I am doing image compression using wavelets by using the function wcompress .My program is not working and giving errors. kindly help me.
조회 수: 1 (최근 30일)
이전 댓글 표시
Sir, I am doing image compression using wavelets with the help of the function wcompress. I am using matlab R2014a and I do have Wavelet Toolbox.The code is given below.
% X = imread('lowpass_approx_nonROI.bmp');
[cr,bpp] = wcompress('c',X,'lowpass_approx_nonROI.wtc','spiht','maxloop',12)
Xc = wcompress('u','lowpass_approx_nonROI.wtc');
delete('lowpass_approx_nonROI.wtc')
colormap gray;
subplot(1,2,1); image(X); title('Original Image');
axis square
subplot(1,2,2); image(Xc); title('Compressed Image');
axis square
It is giving error
Subscript indices must either be real positive integers or logicals.
Error in wtc_spiht>wtc_spiht_dec (line 523)
Signific_MAT(idx_CHILD+d_PIX_Plan) = ...
Error in wtc_spiht (line 22)
case 2 , [varargout{1:nbout}] = wtc_spiht_dec(varargin{:});
Error in wtcmngr (line 97)
[varargout{1:nbout}] = funHDL('dec',WTC_Struct,stepFLAG);
Error in wcompress (line 458)
X_decoded = wtcmngr('read',inputFile,stepFLAG);
Error in comp_using_wavelets (line 3)
Xc = wcompress('u','lowpass_approx_nonROI.wtc');
Sir, kindly help me. The image is enclosed herewith. thanks and regards Debarpita Chaudhuri.
댓글 수: 0
답변 (1개)
Abdullah Sarwar
2021년 1월 13일
try after resize !
it basically work on squire image resolution like 512*512 and 256*256
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Denoising and Compression에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!