簡體   English   中英

如何僅利用小波變換的水平系數來重建圖像?

[英]How to re-construct an image with just the horizontal co-efficient of 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%

iswt2/reconsLOC錯誤(第153行)
ca(sR,sC)ch(sR,sC,k)cv(sR,sC,k)cd(sR,sC,k) ,...
iswt2錯誤(第122行) a = reconsLOC(a,h,v,d);

我該如何解決?

您已經省略了錯誤消息的第一行,它提供了問題所在的線索:

索引超出矩陣尺寸。

問題是您不能只將矩陣設置為標量0 ,而必須將整個矩陣設置為零,以使它仍然具有與H相同的大小。 這將起作用:

A(:) = 0;  % Fills every element of A with zero
V(:) = 0;
D(:) = 0;
Y = iswt2(A, H, V, D, 'sym4');

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM