boofcv.alg.feature.detect.interest
Class GeneralFeatureDetector<I extends ImageGray,D extends ImageGray>
- java.lang.Object
-
- boofcv.alg.feature.detect.interest.GeneralFeatureDetector<I,D>
-
- Type Parameters:
I- Input image type.D- Image derivative type.
public class GeneralFeatureDetector<I extends ImageGray,D extends ImageGray> extends java.lang.ObjectDetects 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
GeneralFeatureIntensityis 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.
-
-
Constructor Summary
Constructors Constructor and Description GeneralFeatureDetector(GeneralFeatureIntensity<I,D> intensity, NonMaxSuppression extractor)Specifies which algorithms to use and configures the detector.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description GrayF32getIntensity()QueueCornergetMaximums()Returns a list of all the found maximums.QueueCornergetMinimums()Returns a list of all the found maximums.booleangetRequiresGradient()If the image gradient is required for calculations.booleangetRequiresHessian()If the image Hessian is required for calculations.floatgetThreshold()Returns the current feature extraction threshold.booleanisDetectMaximums()true if it will detector local maximumsbooleanisDetectMinimums()true if it will detector local minimumsvoidprocess(I image, D derivX, D derivY, D derivXX, D derivYY, D derivXY)Computes point features from image gradients.voidsetExcludeMaximum(QueueCorner exclude)Specify points which are excluded when detecting maximumsvoidsetExcludeMinimum(QueueCorner exclude)Specify points which are excluded when detecting maximumsvoidsetMaxFeatures(int numFeatures)Turns on select best features and sets the number it should return.voidsetSearchRadius(int radius)Species the search radius for the featurevoidsetThreshold(float threshold)Changes feature extraction threshold.
-
-
-
Constructor Detail
-
GeneralFeatureDetector
public GeneralFeatureDetector(GeneralFeatureIntensity<I,D> intensity, NonMaxSuppression extractor)
Specifies which algorithms to use and configures the detector.- Parameters:
intensity- Computes how much like the feature the region around each pixel is.extractor- Extracts the corners from intensity image
-
-
Method Detail
-
process
public void process(I image, D derivX, D derivY, D derivXX, D derivYY, 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.
-
setMaxFeatures
public void setMaxFeatures(int numFeatures)
Turns on select best features and sets the number it should return. If a list of excluded features is passed in, then the maximum number of returned features is 'numFeatures' minus the number of excluded features.- Parameters:
numFeatures- Return at most this many features, which are the best.
-
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
public GrayF32 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.
-
setExcludeMaximum
public void setExcludeMaximum(QueueCorner exclude)
Specify points which are excluded when detecting maximums- Parameters:
exclude- List of points being excluded
-
getMaximums
public QueueCorner getMaximums()
Returns a list of all the found maximums.- Returns:
- found point features
-
setExcludeMinimum
public void setExcludeMinimum(QueueCorner exclude)
Specify points which are excluded when detecting maximums- Parameters:
exclude- List of points being excluded
-
getMinimums
public QueueCorner getMinimums()
Returns a list of all the found maximums.- Returns:
- found point features
-
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
-
-
DataMelt 3.0 © DataMelt by jWork.ORG