How to produce a homogeneity image from GLCM stats?
2 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
Rik
2018 年 8 月 28 日
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.
回答 (1 件)
Image Analyst
2018 年 10 月 16 日
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 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!