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/invertedIndexImages.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/invertedIndexImages.sci')
-rw-r--r-- | macros/invertedIndexImages.sci | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/macros/invertedIndexImages.sci b/macros/invertedIndexImages.sci new file mode 100644 index 0000000..a92b728 --- /dev/null +++ b/macros/invertedIndexImages.sci @@ -0,0 +1,32 @@ +function [invertedImageIndexStruct]=invertedIndexImages(imgSet,bagOfFeatures) +// This function creates image search index +// +// Calling Sequence +// imageIndex = invertedIndexImages(imgSet, bagOfFeatures ); +// +// Parameters +// imgSet: Collection of images with their location and labels +// bagOfFeatures: Bag of Visual Words +// SaveFeatureLocations [Optional Input Argument]: A boolean value inicating whether feature locations has to be saved or not. Values: [True(default)|False] +// imageIndex: Search Index Object containing the mapping of visual vocabulary to each image in the image set +// +// Description +// Creates a search Index Object that has been mapped to visual words that can be used for retrieve Images +// +// Examples +// imgSet = imageSet(directory,'recursive'); +// [trainingSet testSet] = partition(imgSet,[0.8]); +// bag = bagOfFeatures(trainingSet); +// imageindex = invertedIndexImages(trainingSet, bag); +// +// With Optional Arguments: +// imageindex = invertedIndexImages(trainingSet, bag, "SaveFeatureLocations", 1); +// +// Authors +// Umang Agrawal +// Rohit Suri +// Sridhar Reddy + + invertedImageIndexList=indexImages(imgSet,bagOfFeatures); + invertedImageIndexStruct=struct('Type','invertedImageIndex','ImageLocation',invertedImageIndexList(5), 'ImageWords',invertedImageIndexList(2), 'WordFrequency',invertedImageIndexList(3),'BagOfFeatures',bagOfFeatures,) +endfunction |