[英]How to change 8-gray level to 32 - gray level (GLCM) using matlab
I want to change 8-gray level to 32 gray level, i have tried to use 8-gray level in my image, but the value is like this: 我想将8灰度级更改为32灰度级,我试图在图像中使用8灰度级,但是值是这样的:
so I want to try use 32-gray level: 所以我想尝试使用32灰度等级:
this is my code 这是我的代码
I = imread('001 A.png');
gray = rgb2gray(I);
offsets = [0 1;-1 1;-1 0;-1 -1];
[GLCMS,SI] = graycomatrix(gray,'Of', offsets);
stats = graycoprops(GLCMS,
{'contrast','homogeneity','correlation','energy'});
maybe anyone can help me 也许有人可以帮我
Thanks in advance 提前致谢
Set Numlevel
to 32 将
Numlevel
设置为32
I = imread('001 A.png');
gray = rgb2gray(I);
offsets = [0 1;-1 1;-1 0;-1 -1];
[GLCMS,SI] = graycomatrix(gray, 'Of', offsets, 'Numlevel', 32);
stats = graycoprops(GLCMS, {'contrast','homogeneity','correlation','energy'});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.