boofcv.alg.tracker.tld
Class TldFernClassifier<T extends ImageGray>
- java.lang.Object
-
- boofcv.alg.tracker.tld.TldFernClassifier<T>
-
public class TldFernClassifier<T extends ImageGray> extends java.lang.ObjectManages ferns, creates their descriptions, compute their values, and handles their probabilities.
-
-
Constructor Summary
Constructors Constructor and Description TldFernClassifier(java.util.Random rand, int numFerns, int descriptorSize, int numLearnRandom, float fernLearnNoise, InterpolatePixelS<T> interpolate)Configures fern algorithm
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intgetMaxN()intgetMaxP()voidlearnFern(boolean positive, ImageRectangle r)Learns a fern from the specified region.voidlearnFernNoise(boolean positive, ImageRectangle r)Computes the value for each fern inside the region and update's their P and N value.booleanlookupFernPN(TldRegionFernInfo info)For the specified regions, computes the values of each fern inside of it and then retrives their P and N values.voidrenormalizeN()Renormalizes fern.numN to avoid overflowvoidrenormalizeP()Renormalizes fern.numP to avoid overflowvoidreset()Discard all information on fern values and their probabilitiesvoidsetImage(T gray)Call before any other functions.
-
-
-
Constructor Detail
-
TldFernClassifier
public TldFernClassifier(java.util.Random rand, int numFerns, int descriptorSize, int numLearnRandom, float fernLearnNoise, InterpolatePixelS<T> interpolate)Configures fern algorithm- Parameters:
rand- Random number generated used for creating fernsnumFerns- Number of ferns to created. Typically 10descriptorSize- Size of each fern's descriptor. Typically 10numLearnRandom- Number of ferns which will be generated by adding noise to the imagefernLearnNoise- The noise's standard deviationinterpolate- Interpolation function for the image
-
-
Method Detail
-
reset
public void reset()
Discard all information on fern values and their probabilities
-
setImage
public void setImage(T gray)
Call before any other functions. Provides the image that is being sampled.- Parameters:
gray- Input image.
-
learnFern
public void learnFern(boolean positive, ImageRectangle r)Learns a fern from the specified region. No noise is added.
-
learnFernNoise
public void learnFernNoise(boolean positive, ImageRectangle r)Computes the value for each fern inside the region and update's their P and N value. Noise is added to the image measurements to take in account the variability.
-
lookupFernPN
public boolean lookupFernPN(TldRegionFernInfo info)
For the specified regions, computes the values of each fern inside of it and then retrives their P and N values. The sum of which is stored inside of info.- Parameters:
info- (Input) Location/Rectangle (output) P and N values- Returns:
- true if a known value for any of the ferns was observed in this region
-
renormalizeP
public void renormalizeP()
Renormalizes fern.numP to avoid overflow
-
renormalizeN
public void renormalizeN()
Renormalizes fern.numN to avoid overflow
-
getMaxP
public int getMaxP()
-
getMaxN
public int getMaxN()
-
-
DataMelt 3.0 © DataMelt by jWork.ORG