FEATURE_IMAGES_CVIP

feature_images_cvip() - extracts features from a group of images.

Contents

SYNTAX

[ out_table ] = feature_images_cvip( folder , out_file_name, bin_feat, his_feat, rst_feat, tex_feat, spec_feat,varargin)

Input parameters include :

DESCRIPTION

The function extracts the features from a group of images present in the input folder file and outputs a .CSV file that contains all the extracted features. These features depend on the feature selection given as input by the user. The user can select different features from five different feature areas. The function is most useful in Image analysis applications.

REFERENCE

1.Scott E Umbaugh. DIGITAL IMAGE PROCESSING AND ANALYSIS: Applications with MATLAB and CVIPtools, 3rd Edition.

EXAMPLE

% Read input image folder

 folder = 'C:\Users\lgorant\Desktop\Abnormal';

% Output file name ,Output is a CSV file

 out_file_name=  'the_output_of_feat_imgs';

% Binary features row vector 8 elements at most

 bin_feat = [1 0 1 1 0 0 1];

% Histogram features row vector 5 elements at most

 his_feat = [0 1 1];

% RST feature row vector 7 elements at most

 rst_feat = [1 0 1 1];

% Texture features  row vector 20 elements at most

 tex_feat = [1 0 0 0];

% Spectral features row vector 2 elements at most

 spec_feat = [0 0];

% Optional texDist,quantLv1,statsType

 texDist  = 4;

 quantLvl = 2;

 statsType = [0 0 1];

% Output features

[ out_table ] = feature_images_cvip( folder, out_file_name , bin_feat,his_feat, rst_feat, tex_feat, spec_feat,'statstype', [1 0 1]);

 disp(out_table);
  Columns 1 through 5

    'obj_id'    'ASM_Avg'    'ASM_Var'       'rst1'      'rst3'      
    [     1]    [ 0.2881]    [5.2638e-04]    [0.2106]    [    0.0017]
    [     2]    [ 0.3113]    [3.3035e-06]    [0.2155]    [    0.0042]
    [     3]    [ 0.2702]    [4.3471e-05]    [0.1701]    [4.0394e-04]
    [     4]    [ 0.2825]    [2.1622e-04]    [0.1960]    [7.8158e-04]
    [     5]    [ 0.2637]    [1.4136e-05]    [0.1735]    [7.0466e-04]
    [     6]    [ 0.2537]    [3.2133e-06]    [0.2077]    [    0.0012]
    [     7]    [ 0.2641]    [6.3356e-05]    [0.1850]    [6.9265e-04]
    [     8]    [ 0.2762]    [6.9977e-05]    [0.1867]    [5.8746e-04]
    [     9]    [ 0.2660]    [1.0736e-04]    [0.1945]    [4.7313e-04]
    [    10]    [ 0.2615]    [8.2639e-05]    [0.1918]    [2.8142e-04]
    [    11]    [ 0.3259]    [9.2798e-05]    [0.1948]    [2.1630e-04]
    [    12]    [ 0.2642]    [1.6752e-07]    [0.1869]    [    0.0016]
    [    13]    [ 0.2712]    [1.1934e-04]    [0.1771]    [3.7520e-04]
    [    14]    [ 0.2781]    [1.8811e-05]    [0.1845]    [7.0526e-04]

  Columns 6 through 10

    'rst4'          'Area'     'Centroid_r'    'Centroid_c'    'Euler'
    [2.4795e-04]    [28926]    [       105]    [       120]    [    1]
    [4.8774e-04]    [28429]    [       100]    [        90]    [    1]
    [3.2132e-06]    [58849]    [       111]    [       185]    [    1]
    [2.6899e-05]    [33660]    [       108]    [       228]    [    1]
    [4.9977e-07]    [46365]    [       110]    [       130]    [    1]
    [1.4829e-04]    [33462]    [       110]    [       223]    [    1]
    [1.9046e-06]    [43027]    [       109]    [       193]    [    1]
    [2.3185e-05]    [38588]    [       111]    [       213]    [    1]
    [7.6221e-05]    [34812]    [       112]    [       143]    [    1]
    [1.2701e-05]    [35826]    [       114]    [       209]    [    1]
    [3.5763e-05]    [40567]    [       117]    [       185]    [    1]
    [2.6307e-05]    [39248]    [       105]    [       203]    [    1]
    [5.0085e-05]    [45266]    [       113]    [       128]    [    1]
    [2.1621e-05]    [37221]    [       109]    [       118]    [    1]

  Columns 11 through 15

    'Proj_H_1'    'Proj_H_2'    'Proj_H_3'    'Proj_H_4'    'Proj_H_5'
    [       5]    [       5]    [       5]    [       5]    [       4]
    [       6]    [       6]    [       5]    [       5]    [       5]
    [       0]    [       9]    [       9]    [       9]    [       9]
    [       7]    [       7]    [       7]    [       7]    [       6]
    [       0]    [       9]    [       9]    [       9]    [       9]
    [       6]    [       6]    [       5]    [       5]    [       5]
    [       0]    [       9]    [       7]    [       7]    [       7]
    [       7]    [       7]    [       7]    [       6]    [       6]
    [       6]    [       6]    [       7]    [       7]    [       7]
    [       6]    [       6]    [       6]    [       6]    [       6]
    [       0]    [       6]    [       7]    [       7]    [       6]
    [       8]    [       8]    [       8]    [       6]    [       6]
    [       0]    [       9]    [       9]    [       8]    [       7]
    [       7]    [       7]    [       7]    [       7]    [       6]

  Columns 16 through 20

    'Proj_H_6'    'Proj_H_7'    'Proj_H_8'    'Proj_H_9'    'Proj_H_10'
    [       5]    [       4]    [       4]    [       3]    [        0]
    [       3]    [       3]    [       3]    [       3]    [        0]
    [       9]    [       8]    [       7]    [       0]    [        0]
    [       6]    [       5]    [       5]    [       4]    [        0]
    [       7]    [       7]    [       6]    [       7]    [        0]
    [       4]    [       5]    [       5]    [       5]    [        0]
    [       6]    [       6]    [       6]    [       6]    [        0]
    [       5]    [       6]    [       6]    [       5]    [        0]
    [       6]    [       6]    [       5]    [       5]    [        0]
    [       5]    [       6]    [       6]    [       5]    [        0]
    [       6]    [       6]    [       6]    [       0]    [        0]
    [       6]    [       5]    [       5]    [       5]    [        0]
    [       7]    [       8]    [       8]    [       6]    [        0]
    [       6]    [       6]    [       5]    [       4]    [        0]

  Columns 21 through 25

    'Proj_W_1'    'Proj_W_2'    'Proj_W_3'    'Proj_W_4'    'Proj_W_5'
    [       0]    [       0]    [       4]    [       6]    [       8]
    [       0]    [       5]    [       6]    [       8]    [       9]
    [       5]    [       6]    [       7]    [       7]    [       7]
    [       0]    [       4]    [       6]    [       8]    [       9]
    [       4]    [       6]    [       8]    [       8]    [       8]
    [       0]    [       2]    [       5]    [       9]    [       9]
    [       1]    [       4]    [       6]    [       8]    [       8]
    [       0]    [       6]    [       9]    [       9]    [       9]
    [       0]    [       5]    [       7]    [       8]    [       9]
    [       0]    [       3]    [       9]    [       9]    [       9]
    [       1]    [       2]    [       6]    [       7]    [       7]
    [       0]    [       4]    [       9]    [       9]    [       9]
    [       7]    [       8]    [       8]    [       8]    [       8]
    [       0]    [       4]    [       7]    [       8]    [       9]

  Columns 26 through 30

    'Proj_W_6'    'Proj_W_7'    'Proj_W_8'    'Proj_W_9'    'Proj_W_10'
    [       9]    [       9]    [       4]    [       0]    [        0]
    [       8]    [       3]    [       0]    [       0]    [        0]
    [       7]    [       7]    [       7]    [       7]    [        0]
    [       9]    [       9]    [       9]    [       0]    [        0]
    [       8]    [       8]    [       8]    [       5]    [        0]
    [       9]    [       7]    [       5]    [       0]    [        0]
    [       8]    [       8]    [       8]    [       3]    [        0]
    [       9]    [       8]    [       5]    [       0]    [        0]
    [       9]    [       9]    [       7]    [       1]    [        0]
    [       9]    [       8]    [       5]    [       0]    [        0]
    [       7]    [       6]    [       5]    [       3]    [        0]
    [       9]    [       8]    [       6]    [       3]    [        0]
    [       8]    [       7]    [       5]    [       3]    [        0]
    [       9]    [       9]    [       9]    [       0]    [        0]

  Columns 31 through 32

    'STD_1'      'Skew_1' 
    [15.6761]    [-2.2913]
    [17.9970]    [-1.9336]
    [11.9590]    [ 0.7631]
    [14.2356]    [-2.3815]
    [20.8042]    [-0.7656]
    [16.0049]    [-0.8762]
    [17.4432]    [-0.9965]
    [17.2746]    [-2.7127]
    [20.6128]    [-0.9511]
    [15.1631]    [-3.3073]
    [15.4346]    [-1.9310]
    [15.7601]    [-1.2107]
    [13.6662]    [ 0.0093]
    [15.7707]    [-1.7351]

CREDITS

Author: Mehrdad Alvandipour, March 2017
Copyright © 2017-2018 Scott E Umbaugh
For updates visit CVIP Toolbox Website