0

Suppose I have block of pixels form an image as following

8  5  22 94 63 
65 98 52 41 32 
65 21 48 59 77  
20 14 15 63 52 
21 63 77 85 95 

how can I find homogeneity and energyof these pixels (block)

and I tried to compute entropy for these values as following :

H=hist(block(:));
pro=H./25;
pro(pro==0)=[];            % remove zeros 
Ent=-sum(pro.*log2(pro));  %entropy equation 

Is this correct way to calculate the entropy?

Autonomous
  • 8,935
  • 1
  • 38
  • 77
  • Which are the definitions you are using for them? – Brethlosze May 27 '15 at 01:51
  • there are set of feature that extracted from `GLCM` `homo,energy, contrast` ,, using a function `graycoprops()` >> but the equation of 'homogeneity ' and 'energy' I think used only for `GLCM` >> but when i apply same the equation of homogeneity on an image block directly it's give me a good result(accuracy) on my system <<<<<< note that I'm working on CBIR system >>> – Ahmed Tarawneh May 27 '15 at 12:05
  • I divide image into block and the `homo,energy` extracted from each block << and used to create a feature vector ,, and please what about the calculation of entropy in my question ? – Ahmed Tarawneh May 27 '15 at 12:08
  • Sorry, what is GLCM and CBIR? – Brethlosze May 27 '15 at 13:04
  • GLCM => gray level co-occurrence matrix and CBIR refer to content based image retrieval – Ahmed Tarawneh May 27 '15 at 14:03

0 Answers0