summaryrefslogtreecommitdiff
path: root/macros/invertedIndexImages.sci
diff options
context:
space:
mode:
authorshamikam2017-01-16 02:56:17 +0530
committershamikam2017-01-16 02:56:17 +0530
commita6df67e8bcd5159cde27556f4f6a315f8dc2215f (patch)
treee806e966b06a53388fb300d89534354b222c2cad /macros/invertedIndexImages.sci
downloadFOSSEE_Image_Processing_Toolbox-a6df67e8bcd5159cde27556f4f6a315f8dc2215f.tar.gz
FOSSEE_Image_Processing_Toolbox-a6df67e8bcd5159cde27556f4f6a315f8dc2215f.tar.bz2
FOSSEE_Image_Processing_Toolbox-a6df67e8bcd5159cde27556f4f6a315f8dc2215f.zip
First CommitHEADmaster
Diffstat (limited to 'macros/invertedIndexImages.sci')
-rw-r--r--macros/invertedIndexImages.sci32
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