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
Nested Classes Modifier and Type Class Description static class
FeatureSelectUniform.F32
Implementation forPoint2D_F32
static class
FeatureSelectUniform.F64
Implementation forPoint2D_F64
static class
FeatureSelectUniform.I16
Implementation forPoint2D_I16
static class
FeatureSelectUniform.Info<Point>
Info for each cell -
Field Summary
Fields Modifier and Type Field Description ConfigGridUniform
configUniform
Configuration for uniformly selecting a gridRandom
rand
-
Constructor Summary
Constructors Constructor Description FeatureSelectUniform()
-
Method Summary
Modifier and Type Method Description protected 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
-