Can someone share GLCM code for python to me?

I already create my own GLCM code but it always error, can someone share GLCM code for python to me?

By GCLM do you mean " Gray-Level Co-Occurrence Matrix"? Can you show us your code and the error? Have you seen Gray Level Co-occurrence Matrix (Python code)?

Yes what i mean is Gray-Level Co-Occurrence Matrix, and here is my code (1.9 KB)

I looked at your code, and you seem to be implementing GLCM from scratch but need to spend time learning more about Python and numpy. Is there a reason you can’t use GCLM in the SNAP GIU or with gpt? Are you planning make changes to the algorithm? Even so, you might do better to start with a widely used implementation such as scikit-image as used in the example from the link I posted. This package also has some additional texture analysis functions not available in SNAP.

Okay thanks for the help

Maybe this example can help you… You can implement GLCM from scikit-image. Scikit-image also have other textural feature extration methods like Local Binary Patterns, Multi-Block LBP, Gabor-Wavelet filters… Maybe cv2 (OpenCV) for Python have GLCM algorithm, but I have not work with cv2.