纹理分析

常用函数:
entropy Entropy of grayscale image
entropyfilt Local entropy of grayscale image
rangefilt Local range of image
stdfilt Local standard deviation of image
graycomatrix Create gray-level co-occurrence matrix from image
graycoprops Properties of gray-level co-occurrence matrix

纹理滤波函数:

在感兴趣像素周围定义一个邻域,计算该邻域的统计特性,并用统计结果作为该感兴趣像素的输出值。

应用举例:

1.检测纹理边缘

I = imread('eight.tif');
imshow(I)
K = rangefilt(I);
figure, imshow(K)

2.统计纹理重复特性
circuitBoard = rot90(rgb2gray(imread('board.tif')));
imshow(circuitBoard);
offsets0 = [zeros(40,1) (1:40)'];

%%Create the GLCMs. Call the graycomatrix function specifying the offsets.

glcms = graycomatrix(circuitBoard,'Offset',offsets0)

%%Derive statistics from the GLCMs using the graycoprops function. The example calculates the contrast and correlation.

stats = graycoprops(glcms,'Contrast Correlation');

%%Plot correlation as a function of offset.

figure, plot([stats.Correlation]);
title('Texture Correlation as a function of offset');
xlabel('Horizontal Offset')
ylabel('Correlation')

plot图在offsets7,15,23和30处出现波峰。观察左图可发现,在垂直方向每隔7个像素有重复的模式出现。
参考:
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值