Class TldDetection<T extends ImageGray<T>>


public class TldDetection<T extends ImageGray<T>> extends Object
Runs a detection cascade for each region. The cascade is composed of a variance test, Fern classifier, and finally the template classifier. The next test in the cascade is only considered if the previous passes. Several changes have been made in how the cascade operates compared to the original paper. See code for comments.
  • Field Details

  • Constructor Details

  • Method Details

    • detectionCascade

      protected void detectionCascade(DogArray<ImageRectangle> cascadeRegions)
      Detects the object inside the image. Eliminates candidate regions using a cascade of tests
    • computeTemplateConfidence

      protected void computeTemplateConfidence()
      Computes the confidence for all the regions which pass the fern test
    • selectBestRegionsFern

      protected void selectBestRegionsFern(double totalP, double totalN)
      compute the probability that each region is the target conditional upon this image the sumP and sumN are needed for image conditional probability NOTE: This is a big change from the original paper
    • selectBest

      @Nullable public @Nullable TldRegion selectBest()
    • getBest

      @Nullable public @Nullable TldRegion getBest()
    • isAmbiguous

      public boolean isAmbiguous()
    • getNonmax

      public TldNonMaximalSuppression getNonmax()
    • getStorageMetric

      public DogArray_F64 getStorageMetric()
    • getStorageRect

      public List<ImageRectangle> getStorageRect()
    • getCandidateDetections

      public DogArray<TldRegion> getCandidateDetections()
    • getLocalMaximums

      public DogArray<TldRegion> getLocalMaximums()
    • getAmbiguousRegions

      public List<ImageRectangle> getAmbiguousRegions()
    • getFernInfo

      public DogArray<TldRegionFernInfo> getFernInfo()
    • getSelectedFernRectangles

      public List<ImageRectangle> getSelectedFernRectangles()
      Rectangles selected by the fern classifier as candidates
      List of rectangles
    • isSuccess

      public boolean isSuccess()