How to change parameters of GLCM so that it accounts for some pixel variation?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Hello, I currently have a 100x100 .tif file that I am loading into the code below in order to output a gray-level co-occurrence matrix from the image:
if true
I = imread('17_11985-12030_12005_SHG.tif');
imshow(I);
glcms = graycomatrix(I)
stats = graycoprops(glcms)
[glcms,SI] = graycomatrix(I)
end
The code is working correctly. However, I am wondering if there is a way to do the following: a GLCM returns the number of times a pixel has the same value as the pixel next to it (horizontally, vertically, and diagonally). I want to know if there is a way to do this yet have the GLCM account for error and say that two pixels next to each other that are within 10% of each other are counted as having the same value as well. For example, if two pixels next to each other both have values of 153, the GLCM counts these as the same, AND if two other pixels next to each other have values of 150 and 153, I want the GLCM to also count these as the same. Any help would be greatly appreciated please!
1 comentario
Rik
el 28 de Ag. de 2018
I think you'll either need to re-implement graycomatrix, or downsample your image values.
Re-implementing graycomatrix would look something like this: generate the offset image, convert to double. Now you can start your comparison (e.g. by dividing one by the other, using that to round your values).
Or you could brute-force it with a lot of nested loops.
Respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!