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
2 answers

Iteration multi-dimensional array in Python

I want to compute some operation (GLCM) over an image using a sliding window. The code to achieve it is: import numpy as np from skimage.feature import greycomatrix, greycoprops from numpy.lib.stride_tricks import as_strided image =…
user3075816
  • 169
  • 1
  • 11
1
vote
0 answers

To classify the roughness of an object's surface in a picture by using Image Processing Toolbox in MATLAB

I would like to analyze the roughness of skin for Honeydew and also Pear(Gong Pear) in images by using Gray Level Cooccurrence Matrix in MATLAB. I have converted the 2 pictures (1st picture contains Honeydew and 2nd picture contains the Pear) into…
1
vote
3 answers

GLCM in opencv2 (Gray-Level Co-occurrence Matrices)

The legacy function GLCM does not perform yet in opencv2. I use the following code: #import cv::Mat inputIm = [in_image CVMat]; cv::Mat grayIm = [in_image CVGrayscaleMat]; // cv::cvtColor(inputIm, grayIm,…
iKK
  • 6,394
  • 10
  • 58
  • 131
1
vote
2 answers

Using a sliding window with GLCM

I'm trying to calculate various image features from the Gray-Level Co-occurence Matrix (GLCM) in MatLab using the graycomatrix function. Example using graycomatrix I = [0 0 1 1; 0 0 1 1; 0 2 2 2; 2 2 3 3]; glcm = graycomatrix(I, 'GrayLimits', [0 3],…
user3851917
  • 41
  • 1
  • 5
1
vote
0 answers

Is there a particular feature descriptor that represents the color and texture feature?

I would like to implement the same kind of feature extraction process in this paper. That is, I'd like the extracted features to be related to color and texture attributes of the image (and shape perhaps). Region of interest of the image has already…
1
vote
2 answers

Calculating energy using MATLAB

Energy, which is as follows: can be found based on the MATLAB documentation using: stats = graycoprops(glcm, properties) For example, I typed this: >> a = [1 2; 3 4] a = 1 2 3 4 >> stats = graycoprops(a, {'energy'}) stats = …
Simplicity
  • 47,404
  • 98
  • 256
  • 385
1
vote
0 answers

calculating glcm on multiple images loop

I would like to calculate GLCM Gray level co-occurence matrices and other texture properties for a stacks of images. I would like to write a loop to make it easier, is this possible? I have tried but it seems my filenames i.e. TopSlice0641... are…
pauljw28
  • 11
  • 2
1
vote
0 answers

OpenCV: Allocation error with 'cvCreateGLCM' method

I am trying to compute GLCM for an input image. I load the image, convert it to grayscale, then I invoke cvCreateGLCM method on the grayscale image. OpenCV Version: 2.4.1, vc10, x64. const char* filePath = "C:\\input.jpg"; IplImage* inputIm =…
Ahmad
  • 51
  • 1
  • 3
1
vote
1 answer

I have a PGM format image with 8bpp 1024 X 1024 size and need to calculate GLCM (Grey Level Co-occurrence Matrix) from it

The image is of big size and I used getPixel and and setPixel methods to access bits but found out that it was way too slow so I went to implement lock and unlock bits but could not get my head around it. I also went through tutorials of Bob Powell…
Sujan
  • 1,542
  • 2
  • 22
  • 42
1
vote
1 answer

Creation of GLCM texture images using MATLAB

I am quite new to image processing and I have question concerning the use of a MATLAB function like a filter (graycoprops). In the problem occurring is that I want to process the image using this function (graycoprops). To be able to do this I need…
user1396713
  • 515
  • 1
  • 4
  • 8
1
vote
1 answer

MATLAB Saving and Loading Feature Vectors

I am trying to load feature vectors into classifiers such as a k-nearest neighbors classifier. I have my code for GLCM, so I get contrast, correlation, energy, homogeneity in numbers (feature vectors). My question is, how can I save every set of…
jacksonY
  • 37
  • 1
  • 6
0
votes
1 answer

the method of calculate the GLCM of a specific point in a image

As we know, GLCM (Grey Level Co-occurrence Matrix) describes the texture characteristics of images. But in usual, the calculation of GLCM in OpenCV, matlab often aim on a picture. But now I just want to get GLCM value of every single point inside…
user909691
  • 25
  • 1
  • 1
  • 8
0
votes
1 answer

I always got the same result, How to remove variable session in flask

I'm building an application for GLCM and RGB extraction and also make prediction. But somehow if I use different data I always get results on the previous data or first data. But not for RGB data, RGB data always manages to get results according to…
maskopi
  • 3
  • 4
0
votes
0 answers

How to speed up mahotas haralick feature calculation for larger distances

I'm using https://github.com/luispedro/mahotas for calculation of GLCM values. My images are of different dimensions and I'm using the argument distance depending on the size of the images. When I increase the distance to greater than 100 or 200…
0
votes
0 answers

How to fix GLCM texture code using graycomatrix in python?

I am trying to develop codes to create GLCM textures images of a geotiff raster image using python. It is working but the resulted texture images are weird and seem to be uncorrect. Could anyone please help me how to fix it? Thank you Following are…