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.
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.