Question: compute Haralick features
gravatar for jenesaispas1990
2.8 years ago by
jenesaispas19900 wrote:

Dear all,

I have some questions concerning the function "computeFeatures.haralick" in the EBImage package.

At first, things that I have hopefully understood:
The function computes 13 GLCM features for every object in an image. Thus, it computes the GLCM in the same way as eCognition does, which makes me happy :-)


- However, I have not found what is meant by haralick.scales? I have got different results depending on the scale.

- Does the results in the output matrix contain for each GLCM features the mean or range value and of how many directions?

- Is there any possibility to calculate the GLCM per direction (i.e. 45°)?

- What is meant by "haralick.nbins"? - Is that the matrix needed to calcualte the GLCMs? For example eCognition uses a 256 x 256 matrix, thus I would set this parameter to 256.

I found this page "" which helped me to understand the GLCM, but the questions under "EBImage Explorations" are still open.


I would be very pleased to get any reply :-)
Kind regards

ADD COMMENTlink modified 2.8 years ago by Bernd Fischer540 • written 2.8 years ago by jenesaispas19900
Answer: compute Haralick features
gravatar for Bernd Fischer
2.8 years ago by
Bernd Fischer540
Germany / Heidelberg / DKFZ
Bernd Fischer540 wrote:

In a nutshell, Haralick features compute the correlation of intensities of neighboring pixels. In this way you compute, if a certain pattern is repeated or not. However, there exists textures with difference scale. Some textures are repeated every two pixels others are repeated every 10 pixels. With haralick.scales, you define the scales on which the texture is measured. As far as I know, this is achieved by downsampling of the image in the computeFeatures.haralick function.

GLCM per direction: The implemented Haralick features are rotation invariant, Each value is an average over all four possible directions. If you want to compute direction specific texture features, I would recommend to use other feature extortion methods. E.g. Zernike moments or Gabor wavelets. There used to be Zernike moments implemented in EBImage, but it seems that they have been removed.

haralick.nbins: When the correlations of intensity values are computed for neighboring pixels, the intensity values are first binned into haralick.nbins values. A smaller haralick.nbins can give more accurate estimates of the correlation, because the number of events per bin is higher. While a higher value will give more sensitivity.

ADD COMMENTlink written 2.8 years ago by Bernd Fischer540
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 215 users visited in the last hour