This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materials including this page, select Japan from the country navigator on the bottom of this page.

binaryFeatures class

Object for storing binary feature vectors


This object provides the ability to pass data between the extractFeatures and matchFeatures functions. It can also be used to manipulate and plot the data returned by extractFeatures.


features= binaryFeatures(featureVectors) constructs a binaryFeatures object from the M-by-N input matrix, featureVectors. This matrix contains M feature vectors stored in N uint8 containers.

features = binaryFeatures(featureVectors,Name,Value) uses additional options specified by one or more Name,Value pair arguments.

Input Arguments


Input feature vectors, specified as an M-by-N input matrix. This matrix contains M binary feature vectors stored in N uint8 containers.



Feature vectors, stated as an M-by-N input matrix. This matrix consists of M feature vectors stored in N uint8 containers.


Number of bits per feature, which is the number of uint8 feature vector containers times 8.


Number of feature vectors contained in the binaryFeatures object.


expand all

Input feature vectors.

features1 = binaryFeatures(uint8([1 8 7 2; 8 1 7 2]));

features2 = binaryFeatures(uint8([8 1 7 2; 1 8 7 2]));

Match the vectors using the Hamming distance.

[indexPairs matchMetric] = matchFeatures(features1, features2)

Introduced in R2013a