Package boofcv.alg.scene.vocabtree
Class LearnHierarchicalTree<Point>
java.lang.Object
boofcv.alg.scene.vocabtree.LearnHierarchicalTree<Point>
- All Implemented Interfaces:
VerbosePrint
The graph is constructed using a depth first search. Each level has its own k-means algorithm. Labeling results
are used to segment points for each branch before going to the next level.
-
Field Summary
Modifier and TypeFieldDescriptionprotected final DogArray<StandardKMeans<Point>>
protected final DogArray<PackedArray<Point>>
protected final DogArray<DogArray_F64>
If a node has less than this number of points it will not spawn children.protected int
protected int
protected @Nullable PrintStream
-
Constructor Summary
ConstructorDescriptionLearnHierarchicalTree
(BoofLambdas.Factory<PackedArray<Point>> factoryStorage, BoofLambdas.Factory<StandardKMeans<Point>> factoryKMeans, long randomSeed) Constructor which specifies factories for internal data structures which are dynamic bsaed on the maximum number of levels -
Method Summary
Modifier and TypeMethodDescriptionvoid
process
(PackedArray<Point> points, HierarchicalVocabularyTree<Point> tree) Performs clusteringvoid
setVerbose
(@Nullable PrintStream out, @Nullable Set<String> set)
-
Field Details
-
minimumPointsForChildren
If a node has less than this number of points it will not spawn children. This is intended to avoid over fitting. If relative then it will be relative to the total number of points. -
listPoints
-
listKMeans
-
listWeights
-
pointsRequiredForChildren
protected int pointsRequiredForChildren -
totalPoints
protected int totalPoints -
verbose
-
-
Constructor Details
-
LearnHierarchicalTree
public LearnHierarchicalTree(BoofLambdas.Factory<PackedArray<Point>> factoryStorage, BoofLambdas.Factory<StandardKMeans<Point>> factoryKMeans, long randomSeed) Constructor which specifies factories for internal data structures which are dynamic bsaed on the maximum number of levels- Parameters:
factoryStorage
- Factory for point storagefactoryKMeans
- Factory for new K-Means instancesrandomSeed
- Seed used in random number generators
-
-
Method Details
-
process
Performs clustering- Parameters:
points
- (Input) points which are to be segmented into the hierarchical treetree
- (Output) generated tree
-
setVerbose
- Specified by:
setVerbose
in interfaceVerbosePrint
-