calculating energy of an image

I have a code for dual tree 3D,in that i want to calculate energy for each subband ,please help how to calculate energy
x = rand(64,64,16);
J = 1;
[Faf, Fsf] = FSfarras;
[af, sf] = dualfilt1;T=10;
w = dualtree3D(x, J, Faf, af);
y = idualtree3D(w, J, Fsf, sf);

 Accepted Answer

You can calculate the energy as follows
x = rand(64,64,16);
J = 1;
[Faf, Fsf] = FSfarras;
[af, sf] = dualfilt1;T=10;
w = dualtree3D(x, J, Faf, af);
details = w{1}{1}{1};
energy = sum(abs(details(:)).^2);
w{2}{:}{:} contains the approximation coefficients

4 Comments

Thanks a lot wayne another question ,with this same code i have added noise shaping code and have found energy for each subbands,now i want to plot bar graph for energy and energ1,showing the variation before and after noise shaping,please help how to plot ,i am confused because each subband contains more than one value
after you computed the energy there is more than 1 value?
details = w{1}{1}{1};
energy = sum(abs(details).^2);
The above (energy) is a scalar.
i get 32 values for each subband,please tell how to plot for it
what is the unit of above calculated energy please specify

Sign in to comment.

More Answers (0)

Asked:

on 31 May 2012

Community Treasure Hunt

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

Start Hunting!