Error in iswt2/reconsLOC (line 153) ca(sR,sC),​ch(sR,sC,k​),cv(sR,sC​,k),cd(sR,​sC,k), ... Error in iswt2 (line 122) a = reconsLOC(a,h,v,d);

1 次查看(过去 30 天)
Hi I am trying to reconstruct the input image with just the horizontal coefficients of stationary wavelet transform,
[A,H,V,D ] = swt2(x,1,'sym4');
A = 0; V = 0; D = 0; %i am setting other co-efficents to zero since i am only intersted in the values of H %
Y = iswt2(A,H,V,D,'sym4') ; %this gives the following error below%
Error in iswt2/reconsLOC (line 153) ca(sR,sC),ch(sR,sC,k),cv(sR,sC,k),cd(sR,sC,k), ...
Error in iswt2 (line 122) a = reconsLOC(a,h,v,d);
How can i resolve this?

回答(1 个)

Walter Roberson
Walter Roberson 2017-5-17
You need to set the coefficients to a matrix of 0 the same size as H, not to scalar 0.
A = zeros(size(H),class(H));

类别

Help CenterFile Exchange 中查找有关 Image Analysis 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by