How to produce a homogeneity image from GLCM stats?
6 visualizaciones (ú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)
end
I get an output with the following statistics:
if true
stats =
struct with fields:
Contrast: 6.0606e-04
Correlation: 0.3997
Energy: 0.9984
Homogeneity: 0.9997
end
I want to see if there is a way for me to recreate my 100x100 .tif file with the homogeneity values. I want to go into my .tif file and replace each pixel with its corresponding homogeneity value and save that as a new .tif file.
1 comentario
Rik
el 28 de Ag. de 2018
Homogeneity is a whole image metric (although you could apply it to smaller regions). So what do you mean? You could of course write an image with only 0.9997 as values, but I doubt that is what you want.
Respuestas (1)
Image Analyst
el 16 de Oct. de 2018
The answer is that if you did that, you'd end up with a 100x100 image of all one value. I don't think that would be of any value to you.
0 comentarios
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!