How to obtain entropy , energy of 3d volumetric image on GLCM features ..?
조회 수: 6 (최근 30일)
이전 댓글 표시
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
답변 (1개)
Anusha
2022년 8월 24일
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
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!