# How to obtain entropy , energy of 3d volumetric image on GLCM features ..?

7 vues (au cours des 30 derniers jours)
Hla Hla le 23 Août 2022
Réponse apportée : Anusha le 24 Août 2022
Hello, I am using GLCM for the texture analysis of 3d volumetric image. But i do not solve this . Error as follow:
Error using graycomatrix
Expected input number 1, I, to be two-dimensional.
Error in graycomatrix>ParseInputs (line 260)
validateattributes(I,{'logical','numeric'},{'2d','real','nonsparse'}, ...
Error in graycomatrix (line 167)
[I, Offset, NL, GL, makeSymmetric] = ParseInputs(varargin{:});
##### 0 commentairesAfficher -2 commentaires plus anciensMasquer -2 commentaires plus anciens

Connectez-vous pour commenter.

### Réponses (1)

Anusha le 24 Août 2022
Hi,
I understand that you are trying to find the GLCM features of a 3-D image (Image3D) and want to calculate the entropy and energy of the obtained GLCM features.
Currently graycomatrix() supports only 2-D intensity images as input. You can convert the 3-D RGB image to an intensity image and obtain the GLCM features as shown below:
% Convert the 3-D RGB image to grayscale
I = im2gray(Image3D)
% Obtain the GLCM features
glcm = graycomatrix(I)
% Calculate energy of the GLCM features
Energy_glcm = graycoprops(glcm,{'energy'})
Please refer to the following documentation for more details regarding “graycoprops“ function : Properties of gray-level co-occurrence matrix - MATLAB graycoprops (mathworks.com)
Thanks,
Anusha
##### 0 commentairesAfficher -2 commentaires plus anciensMasquer -2 commentaires plus anciens

Connectez-vous pour commenter.

### Catégories

En savoir plus sur Texture Analysis dans Help Center et File Exchange

### Community Treasure Hunt

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

Start Hunting!

Translated by