Package boofcv.alg.tracker.tld
Class TldDetection<T extends ImageGray<T>>
java.lang.Object
boofcv.alg.tracker.tld.TldDetection<T>
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 Summary
Modifier and TypeFieldDescriptionprotected boolean
protected ConfigTld
protected DogArray<TldRegionFernInfo>
protected List<ImageRectangle>
protected TldTemplateMatching<T>
-
Constructor Summary
ModifierConstructorDescriptionprotected
TldDetection
(TldFernClassifier<T> fern, TldTemplateMatching<T> template, TldVarianceFilter<T> variance, ConfigTld config) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Computes the confidence for all the regions which pass the fern testprotected void
detectionCascade
(DogArray<ImageRectangle> cascadeRegions) Detects the object inside the image.@Nullable TldRegion
getBest()
Rectangles selected by the fern classifier as candidatesboolean
boolean
@Nullable TldRegion
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
-
Field Details
-
template
-
fernInfo
-
config
-
fernRegions
-
candidateDetections
-
ambiguous
protected boolean ambiguous
-
-
Constructor Details
-
TldDetection
public TldDetection(TldFernClassifier<T> fern, TldTemplateMatching<T> template, TldVarianceFilter<T> variance, ConfigTld config) -
TldDetection
protected TldDetection()
-
-
Method Details
-
detectionCascade
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
-
getBest
-
isAmbiguous
public boolean isAmbiguous() -
getNonmax
-
getStorageMetric
-
getStorageRect
-
getCandidateDetections
-
getLocalMaximums
-
getAmbiguousRegions
-
getFernInfo
-
getSelectedFernRectangles
Rectangles selected by the fern classifier as candidates- Returns:
- List of rectangles
-
isSuccess
public boolean isSuccess()
-