TEXTURE_FEATURES_CVIP
texture_features_cvip() - Image texture features computation using GLCM method.
Contents
SYNTAX
texfeats = texture_features_cvip(inputImage, labelImage, textDist, quantLvl, objLabel, featSelect, statsType, className)
Input Parameters include :
- inImage - Input image can be gray image or rgb image of MxN size. If rgb image,the image is converted to gray image.
- labelImage - Label image of MxN size with single object or multiple objects. Each object has unique gray value.
- texDist - Texture distance (1,2,... and so on). The textDist is positive integer.
- quantLvl - Number of gray-levels to quantize GLCM. GLCM will be of quantLvl X quantLvl size. The quantLvl is of integer class. If -1,no quantization in GLCM computation.
- objLabel - Labels of the objects. Column vector (Yx1) or Yx2 matrix. If row vector, objLabel must be unique gray value corresponding to each object. If Yx2 matrix, objLabel must have row index in first column and col index in second column for each object.
- featSelect - Empty matrix '[ ]'or Row vector of size 1x20 with values 1 or 0(1->Select or 0->No Select).If [ ],then all 20 features are selected.Refer*List of Feature Names in next section for indexing of feat_select.
- statsType - Statistics type([Avg Range Var]) of the feature values. A row vector of 1x3 size with each element either 0 or 1.If particular element is '1',then corresponding statistics is selected.
- className - Class name of each labeled object.Row vector or column vector of string or cell class.
Output Parameter includes :
- texfeats - Cell array containing object name,object label,r feature data for selected features,and class name.
SN Name Abbreviated Name Index in featSelect
1. Angular Second Moment ASM 1
2. Contrast Contr 2
3. Correlation Corr 3
4. Variance Var 4
5. Inverse Difference Moment IDM 5
6. Sum Average SumAvg 6
7. Sum Entropy SumEnt 7
8. Sum Variance SumVar 8
9. Entropy Entr 9
10. Difference Variance DiffVar 10
11. Difference Entropy DiffEnt 11
12. Auto Correlation AuCorr 12
13. Dissimilarity Dismlr 13
14. Cluster Shade CShad 14
15. Cluster Prominence CProm 15
16. Maximum Probability MaxPr 16
17. Inverse Difference Normalized IDNorm 17
18. Inverse Differemce Moment Normalized IDMNorm 18
19. Information Measure of Correlation 1 InfoMC1 19
20. Information Measure of Correlation 2 InfoMC2 20
DESCRIPTION
This function calculates the Gray level co-occurence matrix based texture features of the input image given by the user. The texture of an image is related to the smoothness, coarseness, roughness and regular patterns in the image. GLCM is a method to measure the texture of the image using second order histogram methods. These features are based on distance between the pixels and angle between the pixel pairs. The function calculates the GLCM for the features selcted by the user uot of the 20 given features using the textDist as the distance between the textures. The function output a cell array that contains information on the object's textures and the class name of the object.
REFERENCE
1.Scott E Umbaugh. DIGITAL IMAGE PROCESSING AND ANALYSIS: Applications with MATLAB and CVIPtools, 3rd Edition.
EXAMPLE
Read image
I = imread('acl.tif'); % mask image M = imread('acl_mask.tif'); % texture distance td = 3; % selects 4 features among the first five in the list featsel = [1 1 1 0 1]; % number of quantization levels qL = 100; % object label, only one object olevel = 255; % statistics type stats = [1 0 1]; %class of the single object cN = 'abnormal'; % Texture features featurevalue = texture_features_cvip(I,M,td,featsel,olevel,qL,stats,cN)
featurevalue = Columns 1 through 5 'obj_id' 'ASM_Avg' 'ASM_Var' 'Contr_Avg' 'Contr_Var' [ 255] [ 0.0190] [2.8228e-05] [ 13.2278] [ 50.3138] Columns 6 through 10 'Corr_Avg' 'Corr_Var' 'IDM_Avg' 'IDM_Var' 'ClassName' [ 0.0151] [2.3494e-07] [ 0.6218] [ 0.0131] 'abnormal'
CREDITS
Author: Norsang Lama, February 2017
Copyright © 2017-2018 Scott
E Umbaugh
For updates visit CVIP Toolbox Website