Calculating energy using MATLAB

血红的双手。 提交于 2019-12-30 07:39:08

问题


Energy, which is as follows:

can be found based on the MATLAB documentation using:

stats = graycoprops(glcm, properties)

For example, I typed this:

>> a = [1 2; 3 4]

a =

     1     2
     3     4

>> stats = graycoprops(a, {'energy'})

stats =

    Energy: 0.3000

If we want to do this manually, how did we get the energy value shown above?

This is the part I didn't get clearly.


回答1:


If I'm not wrong:

ans=sum(a(:).^2)/sum(a(:)).^2


来源:https://stackoverflow.com/questions/14599816/calculating-energy-using-matlab

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!