Class FeatureSelectUniformBest<Point>
java.lang.Object
boofcv.alg.feature.detect.selector.FeatureSelectUniformBest<Point>
- All Implemented Interfaces:
FeatureSelectLimitIntensity<Point>
public class FeatureSelectUniformBest<Point>
extends Object
implements FeatureSelectLimitIntensity<Point>
Attempts to select features uniformly across the image with a preference for locally more intense features. This
is done by breaking the image up into a grid. Then features are added by selecting the most intense feature from
each grid. If a cell has a prior feature in it then it is skipped for that iteration and the prior counter is
decremented. This is repeated until the limit has been reached or there are no more features to add.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Info for each cell -
Field Summary
Modifier and TypeFieldDescriptionConfiguration for uniformly selecting a grid -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected FeatureSelectUniformBest.Info<Point>
getGridCell
(Point p) Returns the grid cell that contains the pointvoid
select
(@Nullable GrayF32 intensity, int width, int height, boolean positive, @Nullable FastAccess<Point> prior, FastAccess<Point> detected, int limit, FastArray<Point> selected) Selects features using a rule given the limit on detection objects.void
setSampler
(SampleIntensity<Point> sampler) Specifies how the intensity will be sampled.
-
Field Details
-
configUniform
Configuration for uniformly selecting a grid
-
-
Constructor Details
-
FeatureSelectUniformBest
-
FeatureSelectUniformBest
public FeatureSelectUniformBest()
-
-
Method Details
-
select
public void select(@Nullable @Nullable GrayF32 intensity, int width, int height, boolean positive, @Nullable @Nullable FastAccess<Point> prior, FastAccess<Point> detected, int limit, FastArray<Point> selected) Description copied from interface:FeatureSelectLimitIntensity
Selects features using a rule given the limit on detection objects. If the limit is higher than the number of detected features and prior is null then the detected features should be copied into selected. How prior features are used is dependent upon the implementation and their affect isn't specified in general.
NOTE: The reason a null input image is supported is for the situation where the intensity image is no longer available and intensity has been copied into points. See SIFT
- Specified by:
select
in interfaceFeatureSelectLimitIntensity<Point>
- Parameters:
intensity
- (Input) Intensity image. If null that means the point will provide intensity information. Nullable.width
- (Input) if image is null then this must be the image's widthheight
- (Input) if image is null then this must be the image's heightpositive
- (Input) true if better features have more positive values, false if it's more negative valuesprior
- (Input) Locations of previously detected features. Nullabledetected
- (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.
-
setSampler
Description copied from interface:FeatureSelectLimitIntensity
Specifies how the intensity will be sampled.- Specified by:
setSampler
in interfaceFeatureSelectLimitIntensity<Point>
-
getGridCell
Returns the grid cell that contains the point
-