Package boofcv.alg.bow
Class LearnSceneFromFiles
java.lang.Object
boofcv.alg.bow.LearnSceneFromFiles
Abstract class which provides a frame work for learning a scene classifier from a set of images.
TODO describe how it provides learning
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract intGiven an image compute which scene it belongs toprotected ConfusionGiven a set of images with known classification, predict which scene each one belongs in and compute a confusion matrix for the results.findImages(File rootDir) Loads the paths to image files contained in subdirectories of the root directory.voidvoidloadThenSplit(File directory)
-
Field Details
-
rand
-
scenes
-
train
-
cross
-
test
-
-
Constructor Details
-
LearnSceneFromFiles
public LearnSceneFromFiles()
-
-
Method Details
-
evaluateTest
-
evaluate
Given a set of images with known classification, predict which scene each one belongs in and compute a confusion matrix for the results.- Parameters:
set- Set of classified images- Returns:
- Confusion matrix
-
classify
Given an image compute which scene it belongs to- Parameters:
path- Path to input image- Returns:
- integer corresponding to the scene
-
loadSets
-
loadThenSplit
-
findImages
Loads the paths to image files contained in subdirectories of the root directory. Each sub directory is assumed to be a different category of images. -
getScenes
-