Main Content

binaryFeatures

Object for storing binary feature vectors

Description

This object provides the ability to pass data between theextractFeaturesandmatchFeaturesfunctions. It can also be used to manipulate and plot the data returned byextractFeatures.

Creation

Description

example

features= binaryFeatures(featureVectors)constructs abinaryFeaturesobject from theM-by-Ninput matrix,featureVectors. This matrix containsMfeature vectors stored inNuint8 containers.

Input Arguments

expand all

Input feature vectors, specified as anM-by-Ninput matrix. This matrix containsMbinary feature vectors stored inNuint8 containers.

Properties

expand all

Input feature vectors, saved as anM-by-Ninput matrix. This matrix containsMbinary feature vectors stored inNuint8 containers.

Number of bits per feature, saved as an integer.NumBitsequals the number of uint8 feature vector containers times 8.

Number of feature vectors contained in thebinaryFeaturesobject, saved as a positive integer.

Examples

collapse 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)
indexPairs =2x2 uint32 matrix1 2 2 1
matchMetric =2x1 single column vector0 0

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Version History

Introduced in R2013a