Class FeatureSelectUniform<Point>

All Implemented Interfaces:
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.
  • Field Details

    • configUniform

      public ConfigGridUniform configUniform
      Configuration for uniformly selecting a grid
    • rand

      public Random 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 interface FeatureSelectLimit<Point>
      imageWidth - Width of the image the features were detected in
      imageHeight - Height of the image the features were detected in
      prior - (Input) Locations of previously detected features
      detected - (Input) Locations of newly detected features
      limit - (Input) The maximum number of new features detected
      selected - (Output) Selected features. Element count not exceed the limit. Reset on every call.
    • getGridCell

      protected abstract FeatureSelectUniform.Info<Point> getGridCell(Point p)
      Returns the grid cell that contains the point