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
2
votes
1 answer

ValueError buffer source array is read-only

I'm using this code to extract GLCM features for a certain image but it gives me a value error Code: from PIL import Image from skimage.feature import greycomatrix, greycoprops fname = 'trial.jpg' img = Image.open(fname).convert("L") img =…
Lilly
  • 55
  • 9
2
votes
1 answer

extract glcm matrix using numpy

I want to find the GLCM matrix using python (numpy) I've written this code and it gave me a correct result from the four angles but it very slow , to processes 1000 picture with demonsion 128x128 it take about 35min def getGLCM(image, distance,…
KAnouar
  • 27
  • 5
2
votes
1 answer

Extracting texture features from images by GLCM

I'm using GLCM to get texture features from images to use them in classification algorithms like knn and decision tree. When I run the greycoprops function it returns an array of 4 elements for each feature as follows. Should I get the average of…
2
votes
1 answer

Image texture with skimage

I'm trying to get texture properties from a GLCM I created using greycomatrix from skimage.feature. My input data is an image with multiple bands and I want the texture properties for each pixel (resulting in an image with the dimensions cols x rows…
2
votes
1 answer

Black space in GLCM image

I'm trying to calculate some textural measures using the GLCM described by Haralick (energy, homogeneity, etc.) for a series of 4 band (R, G, B, NIR) aerial photographs that I have. I have tried this on a subset but am ending up with an image that…
GeoMonkey
  • 1,615
  • 7
  • 28
  • 56
2
votes
1 answer

Mahotas library for GLCM calulation and window size

I am using mahotas library to do texture analysis (GLCM) on a satellite image (250 x 200 pixels). GLCM calculations are carried out within a window size. So, for two adjacent positions of the sliding window we need to compute two co-occurrence…
Johny
  • 319
  • 3
  • 12
2
votes
2 answers

Python: taking the GLCM of a non-rectangular region

I have been using the SLIC implementation of skimage to segment images in superpixels. I would like to use GLCMs to extract additional features from these superpixels for a classification problem. These superpixels are not rectangular. In MATLAB you…
Habba
  • 475
  • 2
  • 5
  • 15
2
votes
1 answer

Reduce running time in Texture analysis using GLCM [Python]

I am working on 6641x2720 image to generate its feature images (Haralick features like contrast, second moment etc) using a moving GLCM(Grey level Co-occurrence matrix ) window. But it takes forever to run. The code works fine, as I have tested it…
Abhi
  • 33
  • 8
2
votes
1 answer

Image texture GLCM (mean_Envi)

I am running a Image texture measures from grey-level co-occurrence matrices (GLCM) on Landsat bands using the glcm package in R and I would like to know what is the difference between mean' and 'mean_ENVI' / 'variance' and 'variance_ENVI'. It…
Nery
  • 21
  • 4
2
votes
0 answers

OPENCV ERROR | cv::OutOfMemoryError

Hi I am using OpenCV to prepare a GLCM work, but an error occurred. I am using Qt 5.4.2 MSVC 2013 - 32 bit Starting C:\Workspace\QtProjects\build-iRov-Desktop_Qt_5_4_2_MSVC2013_64bit-Debug\debug\iRov.exe... OpenCV Error: Insufficient memory (Failed…
2
votes
1 answer

Image processing using GLCM

I need to extract homogeneity, correlation, contrast, and energy texture features from a Gray-Level Co-Occurrence Matrix (GLCM). Can anyone tell me any simple algorithm which can calculate these texture features for java implementation?
2
votes
1 answer

Gray level co-occurrence matrix method on C#

Where can I find an implementation Level Cooccurrence Matrix (GLCM) method for the extraction of feature values from color textures on C#? (with source code of course). And need calculation parameters: average or mean value, standard deviation,…
Alexey Semenyuk
  • 3,263
  • 2
  • 32
  • 36
2
votes
1 answer

Extracting texture features from a co-occurrence matrix

I am attempting to create a content based image retrieval system (CBIR) in MATLAB for colour images, and am using a k-means algorithm to extract the feature vectors for images in my database. Each image has four clusters, and each cluster has…
Bharat
  • 463
  • 1
  • 8
  • 17
1
vote
1 answer

Texture feature extraction using Gray Level Cooccurence Matrix

I'm doing a project in liver tumor classification. I used this code and it gave some output. I don't know whether I'm correct. Actually I initially used Region Growing method for liver segmentation and from that I segmented tumor using FCM. So, to…
Gomathi
  • 973
  • 7
  • 17
  • 37
1
vote
1 answer

Sliding window operation using colfilt

I have a function show below glcmcontrast which is applied to an image in a sliding window operation using nlfilter. function s = glcmcontrast(subI) glcm = graycomatrix(subI,'Offset',[0 1],'NumLevels',64,'Symmetric',true); stats =…
MBL
  • 1,197
  • 2
  • 11
  • 17