Package boofcv.alg.tracker.tld
Class TldVarianceFilter<T extends ImageGray<T>>
java.lang.Object
boofcv.alg.tracker.tld.TldVarianceFilter<T>
Compute the variance for a rectangular region using the integral image. Supports both U8 and F32 input images.
For each new image in the sequence a call to
setImage(ImageGray) must be done
so that it can compute the required integral images. See paper for mathematical details on how the variance
is computed using integral images.-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTldVarianceFilter(Class<T> imageType) Constructor which specifies the input image type. -
Method Summary
Modifier and TypeMethodDescriptionbooleanPerforms variance test at the specified rectangleprotected doublecomputeVariance(int x0, int y0, int x1, int y1) Computes the variance inside the specified rectangle.protected doublecomputeVarianceSafe(int x0, int y0, int x1, int y1) Computes the variance inside the specified rectangle.doublevoidSelects a threshold based on image statistics.voidSets the input image.static voidtransformSq(GrayF32 input, GrayF64 transformed) Integral image of pixel value squared.static voidtransformSq(GrayU8 input, GrayS64 transformed) Integral image of pixel value squared.
-
Constructor Details
-
Method Details
-
setImage
Sets the input image. Must be called before other functions/- Parameters:
gray- input image
-
selectThreshold
Selects a threshold based on image statistics. The paper suggestions 1/2 the variance in the initial patch -
checkVariance
Performs variance test at the specified rectangle- Returns:
- true if it passes and false if not
-
computeVariance
protected double computeVariance(int x0, int y0, int x1, int y1) Computes the variance inside the specified rectangle. x0 and y0 must be > 0.- Returns:
- variance
-
computeVarianceSafe
protected double computeVarianceSafe(int x0, int y0, int x1, int y1) Computes the variance inside the specified rectangle.- Returns:
- variance
-
transformSq
Integral image of pixel value squared. integer -
transformSq
Integral image of pixel value squared. floating point -
getThresholdLower
public double getThresholdLower()
-