**MATLAB CVIP Toolbox Functions**

**MATLAB CVIP Toolbox Functions**

## Pattern Classification: Feature Extraction

The pattern classification functions provide a valuable tool for the development of computer vision algorithms. It is a large group with separate function categories for feature extraction, distance and similarity metrics, data normalization, and the classification algorithms. In general there are two types of functions – those that operate on individual objects or individual feature vectors and those that operate on groups of images, objects or feature vectors. The higher level functions that operate on groups use matrices, or comma separated value (csv) files, to pass information between functions. The format of the csv files is similar to the CVIPtools feature files (for details see the Help documentation).

The feature functions available include binary object (shape) features, histogram features, texture features and spectral features. City block, Euclidean, maximum value, and Minkowski distance metrics as well as Tanimoto and vector inner product similarity metrics are available for comparison of feature vectors. For data normalization we include min-max, standard normal density (SND), range based, softmax scaling and unit vector normalization, or the user can opt to perform no data normalization. The pattern classification methods we include are the basic methods: nearest neighbor, K nearest neighbor and nearest centroid. Note that MATLAB has a variety of related functions of interest that can be used in conjunction with our functions. Neural networks, support vector machines, genetic learning algorithms and many others are available for pattern classification, depending on the other toolboxes that are installed.

**area_cvip**- calculates the area in pixels of a binary object**aspect_cvip**- finds the aspect ratio of a binary object**central_moments_cvip**- returns the central moment of the order p and q for an object on the labeled image**centroid_cvip**- finds the centroid of a binary object**cooccurence_cvip**- calculates the co-occurrence matrix for an object**euler_cvip**- finds the Euler number of a binary object**feature_images_cvip**- extracts features from a group of images, where each image contains one object of interest, and uses corresponding mask images, output is a csv file**feature_objects_cvip**- extracts features from a group of objects in a single image and a single image mask for the objects, output is a csv file**hist_feature_cvip**- calculates the 5 first order histogram features for an object**irregular_cvip**- calculates the irregularity ratio of a binary object**label_cvip**- labels objects based on 6-connectivity, NW/SE diagonal**orientation_cvip**- calculates the axis of least second moment for a binary object**perimeter_cvip**- calculates perimeter of a binary object**projection_cvip**- extracts horizontal and vertical projections of a binary object**rst_invariant_cvip**- calculates the 7 RST-invariant features defined in Table 6.1**spectral_features_cvip**- extracts spectral features based on Fourier transform and ring and sector power**texture_features_cvip**- extracts 2nd-order histogram based texture features**thinness_cvip**- calculate the thinness ratio of an object on the labeled image