diff options
author | shamikam | 2017-01-16 02:56:17 +0530 |
---|---|---|
committer | shamikam | 2017-01-16 02:56:17 +0530 |
commit | a6df67e8bcd5159cde27556f4f6a315f8dc2215f (patch) | |
tree | e806e966b06a53388fb300d89534354b222c2cad /macros/binaryFeatures.sci | |
download | FOSSEE_Image_Processing_Toolbox-master.tar.gz FOSSEE_Image_Processing_Toolbox-master.tar.bz2 FOSSEE_Image_Processing_Toolbox-master.zip |
Diffstat (limited to 'macros/binaryFeatures.sci')
-rw-r--r-- | macros/binaryFeatures.sci | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/macros/binaryFeatures.sci b/macros/binaryFeatures.sci new file mode 100644 index 0000000..bd009c9 --- /dev/null +++ b/macros/binaryFeatures.sci @@ -0,0 +1,34 @@ +function [features]=binaryFeatures(featureVectors) +// Object for storing Feature Vectors +// +// Calling Sequence +// features = binaryFeatures(featureVector); +// +// Parameters +// featureVector: M-by-N matrix consisting of M features stored in N uint8 containers +// features: Binary Feature object for the extracted Features +// +// Description +// This object provides the ability to pass data between extractFeatures and matchFeatures function +// +// Examples +// image_1 = imread('sample1.jpg'); +// points_1 = detectFASTFeatures(image_1); +// [ f1 vpts_1 ] = extractFeatures(image_1, points_1); +// features1 = binaryFeatures(f1); +// +// Authors +// Umang Agrawal +// Sridhar Reddy + + [lhs rhs]=argn(0); + if lhs>1 + error(msprintf(" Too many output arguments")); + elseif rhs>1 + error(msprintf(" Too many input arguments")); + elseif inttype(featureVectors) <> 11 then + error(msprintf("wrong argument #%d: FeatureVectors must be uint8",1)); + end + [rows cols]=size(featureVectors); + features=struct('Type','binaryFeatures','Features',featureVectors,'NumBits',cols*8,'NumFeatures',rows); +endfunction |