public interface NonMaxSuppression
Detects local minimums and/or maximums in an intensity image inside square regions. This is known as non-maximum suppression. The detector can be configured to ignore pixels along the image border by a user specified distance. Some implementations require candidate locations for the features. This allows for a sparse algorithm to be used, resulting in a significant speed boost. Pixel values with a value of -Float.MAX_VALUE or Float.MAX_VALUE will not be considered for local minimum/maximum, respectively. This is a good way to ignore previously detected features.
Not all implementations will search for both minimums or maximums. Be sure you are using the correct one. If you don't intend on detecting a minimum or maximum pass in null for the candidate list and the output found list.
An extractor which uses candidate features must always be provided them. However, an algorithm which does not
use candidate features will simply ignore that input and operate as usual. Can check capabilities at runtime
using the canDetectMinimums() and canDetectMaximums() functions.
A border can be specified around the outside of the image in which extremes can't be detected. However, a pixel
outside this border can influence if a pixel is a maximum inside, if the local search radius extends that far.
This is specified by the border parameter and the valid region is defined as follows:
border ≤ x < width-border AND border ≤ y < height-border
| Modifier and Type | Method and Description |
|---|---|
boolean |
canDetectMaximums()
True if it can detect local maximums.
|
boolean |
canDetectMinimums()
True if it can detect local minimums.
|
int |
getIgnoreBorder()
Returns the size of the image border.
|
int |
getSearchRadius()
Describes how large the region is that is being searched.
|
float |
getThresholdMaximum()
Minimum value for detected maximums
|
float |
getThresholdMinimum()
Maximum value for detected minimums
|
boolean |
getUsesCandidates()
Returns true if the algorithm requires a candidate list of corners.
|
void |
process(boofcv.struct.image.GrayF32 intensity,
boofcv.struct.QueueCorner candidateMin,
boofcv.struct.QueueCorner candidateMax,
boofcv.struct.QueueCorner foundMin,
boofcv.struct.QueueCorner foundMax)
Process a feature intensity image to extract the point features.
|
void |
setIgnoreBorder(int border)
Defines the region inside the image in which a pixel can be an extreme.
|
void |
setSearchRadius(int radius)
Species the search radius for the feature
|
void |
setThresholdMaximum(float threshold)
Change the feature selection threshold for finding local maximums.
|
void |
setThresholdMinimum(float threshold)
Change the feature selection threshold for finding local minimums.
|
void process(boofcv.struct.image.GrayF32 intensity,
boofcv.struct.QueueCorner candidateMin,
boofcv.struct.QueueCorner candidateMax,
boofcv.struct.QueueCorner foundMin,
boofcv.struct.QueueCorner foundMax)
intensity - (Input) Feature intensity image. Not modified.candidateMin - (Input) (Optional) List of candidate local minimum features. Can be null if not used.candidateMax - (Input) (Optional) List of candidate local maximum features Can be null if not used.foundMin - (Output) Storage for found minimums. Can be null if not used.foundMax - (Output) Storage for found maximums. Can be null if not used.boolean getUsesCandidates()
float getThresholdMinimum()
float getThresholdMaximum()
void setThresholdMinimum(float threshold)
threshold - The new selection threshold.void setThresholdMaximum(float threshold)
threshold - The new selection threshold.void setIgnoreBorder(int border)
border - Border size in pixels.int getIgnoreBorder()
void setSearchRadius(int radius)
radius - Radius in pixelsint getSearchRadius()
boolean canDetectMaximums()
boolean canDetectMinimums()