I am doing image compression using wavelets by using the function wcompress .My program is not working and giving errors. kindly help me.
2 次查看(过去 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!