error-Cannot support cell array

I have a code for dual tree and reducing the co-efficients but i get error,please help
error is
Error using ==> cell2mat at 55
Cannot support cell arrays containing cell arrays or objects.
Error in ==> final at 9
w=cell2mat(w)
x=imread('st.tif');
x1=rgb2gray(x)
x=double(x1)
J = 3;
[Faf, Fsf] = FSfarras;
[af, sf] = dualfilt1;
w = dualtree2D(x, J, Faf, af)
threshold=0.624525
w=cell2mat(w)
NewData = w;
idx = w >= threshold;
NewData(idx) = threshold - eps(threshold);
size(I);
size(NewData);

 採用された回答

Walter Roberson
Walter Roberson 2012 年 2 月 6 日

0 投票

That's because your cell array output, w, contains cell arrays within it.
Go back to your dualtree2D source code, and read the paragraph that begins,
The wavelet coefficients w are stored as a cell array.

5 件のコメント

kash
kash 2012 年 2 月 6 日
but walter can u please tell how to solve ,it in my document,there is no detail about dualtree,just it tells" perform dualtree,and reduce the co=efficients",this is only mentioned
Walter Roberson
Walter Roberson 2012 年 2 月 6 日
http://eeweb.poly.edu/iselesni/WaveletSoftware/dt2D.html
kash
kash 2012 年 2 月 7 日
walter i took codes from there only can u please tell how to display those co-efficients of w in command window please and from that to reducethe co-efficients
Walter Roberson
Walter Roberson 2012 年 2 月 7 日
If all the dimensions are not equal, then you will need to specify the output format you want.
If all the dimensions are equal at all levels, start at the innermost cell and cell2mat that, and having done that for all of the cells, go up one level and cell2mat _that_ and do that for all the cells at that level... then go to the level above and cell2mat again... and keep going until you end up with just a matrix.
kash
kash 2012 年 2 月 7 日
Walter can u please tell how to do it ,am struck dont know how to proceed plz

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeProgramming についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by