java.lang.Object
boofcv.alg.feature.detect.interest.GeneralFeatureDetector<I,D>
- Type Parameters:
I
- Input image type.D
- Image derivative type.
Detects features which are local maximums and/or local minimums in the feature intensity image.
A list of pixels to exclude as candidates can be provided. Image derivatives need to be computed
externally and provided as needed. The passed in GeneralFeatureIntensity
is used to determine if local
maximums or minimums should be detected.
If a maximum number of features is specified then the N most intense features are returned. By default all found features are returned. Set to a value ≤ 0 to detect all features.
-
Field Summary
Modifier and TypeFieldDescriptionprotected @Nullable QueueCorner
Corners which should be excluded from detectionprotected @Nullable NonMaxSuppression
protected @Nullable NonMaxSuppression
extracts corners from the intensity imageprotected int
The maximum number of features that can be detected.protected QueueCorner
protected GeneralFeatureIntensity<I,
D> protected QueueCorner
protected QueueCorner
protected FastArray<Point2D_I16>
protected FeatureSelectLimitIntensity<Point2D_I16>
-
Constructor Summary
ModifierConstructorDescriptionprotected
GeneralFeatureDetector
(GeneralFeatureIntensity<I, D> intensity, @Nullable NonMaxSuppression extractorMin, @Nullable NonMaxSuppression extractorMax, FeatureSelectLimitIntensity<Point2D_I16> selectMax) Specifies which algorithms to use and configures the detector. -
Method Summary
Modifier and TypeMethodDescriptionboolean
If the image gradient is required for calculations.boolean
If the image Hessian is required for calculations.int
float
Returns the current feature extraction threshold.boolean
true if it will detector local maximumsboolean
true if it will detector local minimumsvoid
Computes point features from image gradients.void
setSearchRadius
(int radius) Species the search radius for the featurevoid
setThreshold
(float threshold) Changes feature extraction threshold.
-
Field Details
-
maximums
-
minimums
-
exclude
Corners which should be excluded from detection -
selectMax
-
selected
-
featureLimit
protected int featureLimitThe maximum number of features that can be detected. If both maximums and minimums can be detected the the limit per set will be half this. If not a positive value then there is no limit. -
extractorMin
extracts corners from the intensity image -
extractorMax
-
intensity
-
found
-
-
Constructor Details
-
GeneralFeatureDetector
public GeneralFeatureDetector(GeneralFeatureIntensity<I, D> intensity, @Nullable @Nullable NonMaxSuppression extractorMin, @Nullable @Nullable NonMaxSuppression extractorMax, FeatureSelectLimitIntensity<Point2D_I16> selectMax) Specifies which algorithms to use and configures the detector.- Parameters:
intensity
- Computes how much like the feature the region around each pixel is.extractorMin
- Extracts the corners from intensity image
-
GeneralFeatureDetector
protected GeneralFeatureDetector()
-
-
Method Details
-
process
public void process(I image, @Nullable D derivX, @Nullable D derivY, @Nullable D derivXX, @Nullable D derivYY, @Nullable D derivXY) Computes point features from image gradients.- Parameters:
image
- Original image.derivX
- image derivative in along the x-axis. Only needed ifgetRequiresGradient()
is true.derivY
- image derivative in along the y-axis. Only needed ifgetRequiresGradient()
is true.derivXX
- Second derivative. Only needed ifgetRequiresHessian()
is true.derivXY
- Second derivative. Only needed ifgetRequiresHessian()
is true.derivYY
- Second derivative. Only needed ifgetRequiresHessian()
is true.
-
getRequiresGradient
public boolean getRequiresGradient()If the image gradient is required for calculations.- Returns:
- true if the image gradient is required.
-
getRequiresHessian
public boolean getRequiresHessian()If the image Hessian is required for calculations.- Returns:
- true if the image Hessian is required.
-
getIntensity
-
setThreshold
public void setThreshold(float threshold) Changes feature extraction threshold.- Parameters:
threshold
- The new feature extraction threshold.
-
getThreshold
public float getThreshold()Returns the current feature extraction threshold.- Returns:
- feature extraction threshold.
-
isDetectMinimums
public boolean isDetectMinimums()true if it will detector local minimums -
isDetectMaximums
public boolean isDetectMaximums()true if it will detector local maximums -
setSearchRadius
public void setSearchRadius(int radius) Species the search radius for the feature- Parameters:
radius
- Radius in pixels
-
getSearchRadius
public int getSearchRadius() -
getImageType
-
getDerivType
-