Class FeatureSelectUniform<Point>
java.lang.Object
boofcv.alg.feature.detect.selector.FeatureSelectUniform<Point>
- All Implemented Interfaces:
FeatureSelectLimit<Point>
- Direct Known Subclasses:
FeatureSelectUniform.F32
,FeatureSelectUniform.F64
,FeatureSelectUniform.I16
public abstract class FeatureSelectUniform<Point>
extends Object
implements FeatureSelectLimit<Point>
Attempts to select features uniformly across the image. This is done by breaking the image up into a grid and
selecting a specific number randomly from each grid cell.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Implementation forPoint2D_F32
static class
Implementation forPoint2D_F64
static class
Implementation forPoint2D_I16
static class
Info for each cell -
Field Summary
Modifier and TypeFieldDescriptionConfiguration for uniformly selecting a grid -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract FeatureSelectUniform.Info<Point>
getGridCell
(Point p) Returns the grid cell that contains the pointvoid
select
(int imageWidth, int imageHeight, @Nullable FastAccess<Point> prior, FastAccess<Point> detected, int limit, FastArray<Point> selected) Selects features inside the image.
-
Field Details
-
configUniform
Configuration for uniformly selecting a grid -
rand
-
-
Constructor Details
-
FeatureSelectUniform
public FeatureSelectUniform()
-
-
Method Details
-
select
public void select(int imageWidth, int imageHeight, @Nullable @Nullable FastAccess<Point> prior, FastAccess<Point> detected, int limit, FastArray<Point> selected) Description copied from interface:FeatureSelectLimit
Selects features inside the image.- Specified by:
select
in interfaceFeatureSelectLimit<Point>
- Parameters:
imageWidth
- Width of the image the features were detected inimageHeight
- Height of the image the features were detected inprior
- (Input) Locations of previously detected featuresdetected
- (Input) Locations of newly detected featureslimit
- (Input) The maximum number of new features detectedselected
- (Output) Selected features. Element count not exceed the limit. Reset on every call.
-
getGridCell
Returns the grid cell that contains the point
-