Questions tagged [glcm]

The gray level co-occurrence matrix (GLCM) is a statistical method of texture analysis that describes texture through a set of statistical measures extracted from a matrix that computes how often pairs of pixels with specific values and in a specified spatial relationship occur in an image.

The GLCM is a tabulation of how often different combinations of pixel brightness values (gray levels) occur in an image for a certain pixel offset (distance and direction). This approach consists in representing texture through a feature vector whose components are statistics computed from the different GLCMs corresponding to the considered distance-direction combinations.

A good start on the field is having a look at The GLCM Tutorial.

115 questions
1
vote
1 answer

How to compute the co-occurrence matrix in Java?

I have a question about the co-occurrence formula. How can I implement in Java the calculation of the GLCM of an image? Concretely, I'm trying to figure out how to compute the number of times a pixel has intensity x and the pixel at its immediate…
Appem
  • 295
  • 1
  • 3
  • 16
1
vote
1 answer

GLCM Texture analysis in Sentinel-1 SNAP toolbox outputs texture with min and max pixel values not between 0 and 1

I have implemented GLCM Texture analysis on the Sentinel-1 SAR imagery. The imagery is high resolution. The parameters for the GLCM texture analysis are: Window size: 5x5 Quantizer: Probablistic Quantizer Quantization: 64 bit Angle: 0 degree…
webapp
  • 710
  • 1
  • 6
  • 16
1
vote
0 answers

How to compare two GLCM to find the similarity?

I want to do comparison between two textures to identify the similarity. I obtained the features of GLCM using the following code: import cv2 import numpy as np from skimage.feature import greycomatrix, greycoprops img =…
Kayal Vizhi
  • 61
  • 1
  • 5
1
vote
2 answers

greycomatrix for RGB image

I am trying to find contrast in an image using greycomatrix here is the code: import cv2 import numpy as np from scipy import misc from skimage.feature import greycomatrix, greycoprops img=cv2.imread('leaf2.jpg') g=greycomatrix(img, [1], [0,…
Muskan Bansal
  • 79
  • 2
  • 13
1
vote
0 answers

glcm R package correlation metric values outside bounds of -1 to +1

I've been using the glcm package in R to calculate various texture measures of raster data sets; however, I've been getting odd values for the correlation measure which should be constrained to -1 to +1. Although most values fall in this range, some…
ailich
  • 100
  • 8
1
vote
1 answer

Using skimage for non-rectangular image areas

Let's say I'm concerned with part of an image that I'm wanting to calculate a GLCM for that's not rectangular. How should I go about this? I've made a masking procedure that zeroes out the portion of the image that I don't care about, I just don't…
1
vote
1 answer

SVM Classifier using GLCM features

My project is acute stroke classification using SVM classifier in MATLAB. The screenshot below shows the 13 feature extraction of acute stroke (21 patients) and normal brain (6 patients) using glcm which is known as training data for svm…
1
vote
1 answer

greycomatrix in python including NaN's

I have an irregular region of interest from an MRI image which I have selected. I would like to do co-occurrence analysis on the image using skimage.feature.greycomatrix library. However, my ROI is irregular in shape. Keeping 0's in the numpy array…
1
vote
1 answer

Grey Level Co-Occurrence Matrix // Python

I am trying to find the GLCM of an image using greycomatrix from skimage library. I am having issues with the selection of levels. Since it's an 8-bit image, the obvious selection should be 256; however, if I select values such as 8 (for the purpose…
troymyname00
  • 670
  • 1
  • 14
  • 32
1
vote
1 answer

How do I mention the direction of neighbours to calculate the glcm in skimage/Python?

I'd some trouble understanding the angle parameter of greycomatrix in skimage. In the example mentioned in the documentation to compute GLCM's for the pixel to the right and up, they mention 4 angles. And they get 4 GLCM's. >>> image = np.array([[0,…
1
vote
3 answers

Black line in GLCM result

It is the result of GLCM matrix. What is the meaning of black horizontal and vertical lines in GLCM image? Are they a problem? N = numel(unique(img)); % img is uint8 glcm = graycomatrix(img, 'NumLevels', N); imshow(glcm)
Omid Omidi
  • 1,670
  • 2
  • 16
  • 23
1
vote
1 answer

Alternatives to GLCM and Gabor filters to get texture information for image segmentation

What's a good alternative to GLCM and Gabor filters to get texture information from an 8 bit image (gray-scale)? The texture information is required in order to be used later during the segmentation of the image.
Hakim
  • 3,225
  • 5
  • 37
  • 75
1
vote
0 answers

jfeaturelib, java for glcm

I am doing my program using jfeaturelib for searching glcm features. I am using this haralick.java and already run my program perfectly using this demo HaralickDemo.java. All I want to know is how to use horizontal neigbhor 0 degree only or 90…
2r83
  • 659
  • 1
  • 11
  • 21
1
vote
0 answers

automatic annotation image using SVM

I have extracted features of an segmented image (mamogram image) using GLCM I = imread('IMAGE1.jpg'); GLCM = graycomatrix(I,'Offset',[2 0;0 2]); stats = graycoprops(GLCM,'all') t1 = struct2array(stats) Now I want to classify using SVM, please…
Deepinfo
  • 31
  • 2
1
vote
2 answers

How to find GLCM matrix in python?

We are using Python 2.7.9.and scikit image library. We are not able to use skimage.feature.greycomatrix because there is no file such as greycomatrix.py in the feature folder. Their documentation seems to be wrong as it says this function is…
Gaurav Patil
  • 483
  • 2
  • 5
  • 10