Class DetectDescribeFusion<T extends ImageGray<T>,​TD extends TupleDesc<TD>>

java.lang.Object
boofcv.abst.feature.detdesc.DetectDescribeFusion<T,​TD>
All Implemented Interfaces:
DescriptorInfo<TD>, DetectDescribePoint<T,​TD>, FeatureSets, FoundPointSO, InterestPointDetector<T>

public class DetectDescribeFusion<T extends ImageGray<T>,​TD extends TupleDesc<TD>>
extends Object
implements DetectDescribePoint<T,​TD>
Wrapper class around independent feature detectors, region orientation, and descriptors, that allow them to be used as a single integrated unit. Providing an algorithm for estimating orientation is optional. If one is provided, any orientation estimate provided by the detector is ignored.
See Also:
InterestPointDetector, OrientationImage, DescribePointRadiusAngle
  • Constructor Details

    • DetectDescribeFusion

      public DetectDescribeFusion​(InterestPointDetector<T> detector, @Nullable @Nullable OrientationImage<T> orientation, DescribePointRadiusAngle<T,​TD> describe)
      Configures the algorithm.
      Parameters:
      detector - Feature detector
      orientation - (Optional) orientation estimation algorithm
      describe - Describes features
  • Method Details

    • createDescription

      public TD createDescription()
      Description copied from interface: DescriptorInfo
      Creates new description instance which can be processed by this class
      Specified by:
      createDescription in interface DescriptorInfo<T extends ImageGray<T>>
      Returns:
      New descriptor
    • getDescription

      public TD getDescription​(int index)
      Description copied from interface: DetectDescribePoint

      Returns the feature descriptor at the specified index.

      WARNING: The returned data structure is recycled each time InterestPointDetector.detect(boofcv.struct.image.ImageBase) is called. Create a copy if this is a problem.

      Specified by:
      getDescription in interface DetectDescribePoint<T extends ImageGray<T>,​TD extends TupleDesc<TD>>
      Parameters:
      index - Which feature
      Returns:
      Feature descriptor
    • getInputType

      public ImageType<T> getInputType()
      Description copied from interface: InterestPointDetector
      Get the expected input image type
      Specified by:
      getInputType in interface InterestPointDetector<T extends ImageGray<T>>
    • getDescriptionType

      public Class<TD> getDescriptionType()
      Description copied from interface: DescriptorInfo
      The type of region descriptor generated
      Specified by:
      getDescriptionType in interface DescriptorInfo<T extends ImageGray<T>>
      Returns:
      Returns the descriptor type.
    • detect

      public void detect​(T input)
      Description copied from interface: InterestPointDetector
      Detects interest points inside the provided image.
      Specified by:
      detect in interface InterestPointDetector<T extends ImageGray<T>>
      Parameters:
      input - Input features are detected inside of.
    • getNumberOfSets

      public int getNumberOfSets()
      Description copied from interface: FeatureSets
      The number of feature sets.
      Specified by:
      getNumberOfSets in interface FeatureSets
      Returns:
      number of feature sets
    • getSet

      public int getSet​(int index)
      Description copied from interface: FeatureSets
      Returns the set that a feature belongs in
      Specified by:
      getSet in interface FeatureSets
      Parameters:
      index - Which feature
    • getNumberOfFeatures

      public int getNumberOfFeatures()
      Description copied from interface: FoundPointSO
      Returns the number of interest points found.
      Specified by:
      getNumberOfFeatures in interface FoundPointSO
      Returns:
      Number of interest points.
    • getLocation

      public Point2D_F64 getLocation​(int featureIndex)
      Description copied from interface: FoundPointSO

      The center location of the feature inside the image.

      WARNING: Do not save the returned reference, copy instead. The returned point can be recycled each time this function is called.

      Specified by:
      getLocation in interface FoundPointSO
      Parameters:
      featureIndex - The feature's index.
      Returns:
      Location of the feature in image pixels.
    • getRadius

      public double getRadius​(int featureIndex)
      Description copied from interface: FoundPointSO

      Returns the detected object's circular radius

      Specified by:
      getRadius in interface FoundPointSO
      Parameters:
      featureIndex - Feature whose radius is being requested.
      Returns:
      Object's radius
    • getOrientation

      public double getOrientation​(int featureIndex)
      Description copied from interface: FoundPointSO
      Returns the features found orientation.
      Specified by:
      getOrientation in interface FoundPointSO
      Parameters:
      featureIndex - Feature whose
      Returns:
      Orientation in radians.
    • hasScale

      public boolean hasScale()
      Description copied from interface: InterestPointDetector
      Does the interest point detector have scale information. This made available through the radius.
      Specified by:
      hasScale in interface InterestPointDetector<T extends ImageGray<T>>
      Returns:
      true if it has scale information and false otherwise
    • hasOrientation

      public boolean hasOrientation()
      Description copied from interface: InterestPointDetector
      If the interest point detector estimates the feature's orientation
      Specified by:
      hasOrientation in interface InterestPointDetector<T extends ImageGray<T>>
      Returns:
      true if it estimates the orientation