HIST_FEATURE_CVIP

hist_feature_cvip() - calculates the 5 first order histogram features for an object.

Contents

SYNTAX

h = hist_feature_cvip(originalImage, labeledImage, objLabel,featSelect)

Input Parameters include :

Output Parameter include :

DESCRIPTION

The function calculates the five first order HIstogram features of an input image or a binary object. The FIve features correspond to the Mean, Standard Deviation, Skew, Energy and Entropy. The function calculates the user specified features from these five histogram features of a binary object in an image characterized by the label given as an input to the function.

REFERENCE

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

EXAMPLE

% Read image

  originalImage = imread('Stripey.jpg');

% Labeled Image

  labeledImage = zeros(size(originalImage));

  labeledImage = labeledImage(:,:,1);

  labeledImage(50:200,25:95) = 1;

  labeledImage(100:300,255:400) = 2;

 % Feature selection

  featSelect = [1 0 1 0 1];

 % Object label

 objLabel = [1 ;2];

% Output features

 output = hist_feature_cvip(originalImage, labeledImage,objLabel,featSelect)
output = 

  Columns 1 through 5

    'obj_id'    'Mean_1'      'Mean_2'      'Mean_3'      'Skew_1' 
    [     1]    [155.0287]    [161.6867]    [174.3474]    [-0.5756]
    [     2]    [340.3228]    [225.1499]    [178.3310]    [-0.6471]

  Columns 6 through 10

    'Skew_2'     'Skew_3'     'Entropy_1'    'Entropy_2'    'Entropy_3'
    [-0.9963]    [-1.0611]    [   6.9187]    [   7.0673]    [   7.1503]
    [ 0.1495]    [ 0.4221]    [   7.2843]    [   7.6111]    [   7.6501]

CREDITS

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