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/evaluate.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/evaluate.sci')
-rw-r--r-- | macros/evaluate.sci | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/macros/evaluate.sci b/macros/evaluate.sci new file mode 100644 index 0000000..9ab7d28 --- /dev/null +++ b/macros/evaluate.sci @@ -0,0 +1,31 @@ +function confMat = evaluate(classifier, imageSet) +// This function is used to evaluate an image classifier. +// +// Calling Sequence +// confMat = evaluate(classifier, imgSet) +// +// Parameters +// confMat: Confusion matrix as a result of the evaluation +// classifier: Image category classifer +// imgSet: An imageSet struct to be evaluated +// +// Description +// This function evaluates an image category classifier on an input image set. +// +// Examples +// imgSet = imageSet(directory,'recursive'); +// [trainingSet testSet] = partition(imgSet,[0.8]); +// bag = bagOfFeatures(trainingSet); +// categoryClassifier = trainImageCategoryClassifier(trainingSet, bag); +// confMatrix = evaluate(categoryClassifer, testSet); +// +// Authors +// Rohit Suri +// Umang Agrawal + + classifier_list = classifierToList(classifier) + imageSet_list = imageSetToList(imageSet) + + confMat = opencv_evaluate(classifier_list, imageSet_list) + +endfunction |