Class CirculantTracker<T extends ImageGray>
- java.lang.Object
-
- boofcv.alg.tracker.circulant.CirculantTracker<T>
-
public class CirculantTracker<T extends ImageGray> extends java.lang.ObjectTracker that uses the theory of Circulant matrices, Discrete Fourier Transform (DCF), and linear classifiers to track a target and learn its changes in appearance [1]. The target is assumed to be rectangular and has fixed size and location. A dense local search is performed around the most recent target location. The search is done quickly using the DCF.
Tracking is performed using texture information. Since only one description of the target is saved, tracks can drift over time. Tracking performance seems to improve if the object has distinctive edges.
CHANGES FROM PAPER:
- Input image is sampled into a square work region of constant size to improve runtime speed of FFT.
- Peak of response is found using mean-shift. Provides sub-pixel precision.
- Pixels outside the image are assigned random values to avoid the tracker from fitting to them. Ideally they wouldn't be processed, but that is complex to implement
[1] Henriques, Joao F., et al. "Exploiting the circulant structure of tracking-by-detection with kernels." Computer Vision–ECCV 2012. Springer Berlin Heidelberg, 2012. 702-715.
-
-
Constructor Summary
Constructors Constructor and Description CirculantTracker(double output_sigma_factor, double sigma, double lambda, double interp_factor, double padding, int workRegionSize, double maxPixelValue, InterpolatePixelS<T> interp)Configure tracker
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static voidcircshift(GrayF64 a, GrayF64 b)voiddense_gauss_kernel(double sigma, GrayF64 x, GrayF64 y, GrayF64 k)Gaussian Kernel with dense sampling.static voidelementMultConjB(InterleavedF64 a, InterleavedF64 b, InterleavedF64 output)Element-wise multiplication of 'a' and the complex conjugate of 'b'GrayF64getResponse()RectangleLength2D_F32getTargetLocation()The location of the target in the imageGrayF64getTargetTemplate()Visual appearance of the targetstatic doubleimageDotProduct(GrayF64 a)Computes the dot product of the image with itselfvoidinitialize(T image, int x0, int y0, int regionWidth, int regionHeight)Initializes tracking around the specified rectangle regionvoidperformLearning(T image)Update the alphas and the track's appearancevoidperformTracking(T image)Search for the track in the image and
-
-
-
Constructor Detail
-
CirculantTracker
public CirculantTracker(double output_sigma_factor, double sigma, double lambda, double interp_factor, double padding, int workRegionSize, double maxPixelValue, InterpolatePixelS<T> interp)Configure tracker- Parameters:
output_sigma_factor- spatial bandwidth (proportional to target) Try 1.0/16.0sigma- Sigma for Gaussian kernel in linear classifier. Try 0.2lambda- Try 1e-2interp_factor- Try 0.075padding- Padding added around the selected target. Try 1workRegionSize- Size of work region. Best if power of 2. Try 64maxPixelValue- Maximum pixel value. Typically 255
-
-
Method Detail
-
initialize
public void initialize(T image, int x0, int y0, int regionWidth, int regionHeight)
Initializes tracking around the specified rectangle region- Parameters:
image- Image to start tracking fromx0- top-left corner of regiony0- top-left corner of regionregionWidth- region's widthregionHeight- region's height
-
performTracking
public void performTracking(T image)
Search for the track in the image and- Parameters:
image- Next image in the sequence
-
performLearning
public void performLearning(T image)
Update the alphas and the track's appearance
-
dense_gauss_kernel
public void dense_gauss_kernel(double sigma, GrayF64 x, GrayF64 y, GrayF64 k)Gaussian Kernel with dense sampling. Evaluates a gaussian kernel with bandwidth SIGMA for all displacements between input images X and Y, which must both be MxN. They must also be periodic (ie., pre-processed with a cosine window). The result is an MxN map of responses.- Parameters:
sigma- Gaussian kernel bandwidthx- Input imagey- Input imagek- Output containing Gaussian kernel for each element in target region
-
imageDotProduct
public static double imageDotProduct(GrayF64 a)
Computes the dot product of the image with itself
-
elementMultConjB
public static void elementMultConjB(InterleavedF64 a, InterleavedF64 b, InterleavedF64 output)
Element-wise multiplication of 'a' and the complex conjugate of 'b'
-
getTargetLocation
public RectangleLength2D_F32 getTargetLocation()
The location of the target in the image
-
getTargetTemplate
public GrayF64 getTargetTemplate()
Visual appearance of the target
-
getResponse
public GrayF64 getResponse()
-
-
DataMelt 3.0 © DataMelt by jWork.ORG