ccv_tld_new(ccv_dense_matrix_t *a, ccv_rect_t box, ccv_tld_param_t params)
Create a new TLD tracking instance from a given first frame image and the tracking rectangle.
- a: The first frame image.
- box: The initial tracking rectangle.
- params: A ccv_tld_param_t structure that defines various aspects of TLD tracker.
return: A ccv_tld_t object holds temporal information about tracking.
Short-term lucas-kanade tracking parameters
- level: Level of image pyramids
- min_eigen: The minimal eigenvalue for a valid optical flow computation
- min_forward_backward_error: The minimal forward backward error
- win_size: The window size to compute optical flow.
Image pyramid generation parameters (for scale-invariant object detection)
- interval: How many intermediate images in between each image pyramid level (from width => width / 2)
- shift: How much steps sliding window should move
Samples generation parameters
- exclude_overlap: Below this threshold, a bounding box will be positively identified as not overlapping with target
- include_overlap: Above this threshold, a bounding box will be positively identified as overlapping with target
- min_win: The minimal window size of patches for detection
Ferns classifier parameters
- features: How many features for each fern
- structs: How many ferns in the classifier
Nearest neighbor classifier parameters
- bad_patches: How many patches should be evaluated in initialization to collect enough negative examples
- nnc_beyond: The upper bound threshold for adaptive computed threshold
- nnc_collect: The threshold that a negative patch above this will be collected as negative example
- nnc_same: Above this threshold, a given patch will be identified as the same
- nnc_thres: The initial threshold for positively recognize a patch
- nnc_verify: The threshold for a tracking result from short-term tracker be verified as a positive detection
- validate_set: For the conservative confidence score will be only computed on a subset of all positive examples, this value gives how large that subset should be, 0.5 is a reasonable number
Deformation parameters to apply perspective transforms on patches for robustness
- new_deform: Number of deformations should be applied at initialization
- new_deform_angle: The maximal angle for x, y and z axis rotation at initialization
- new_deform_scale: The maximal scale for the deformation at initialization
- new_deform_shift: The maximal shift for the deformation at initialization
- track_deform: Number of deformations should be applied at running time
- track_deform_angle: The maximal angle for x, y and z axis rotation at running time
- track_deform_scale: The maximal scale for the deformation at running time
- track_deform_shift: The maximal shift for the deformation at running time
Speed up parameters
- rotation: When >= 1, using “rotation” technique, which, only evaluate a subset of sliding windows for each frame, but after rotation + 1 frames, every sliding window will be evaluated in one of these frames.
- top_n: Only keep these much positive detections when applying ferns classifier
ccv_comp_t ccv_tld_track_object(ccv_tld_t *tld, ccv_dense_matrix_t *a, ccv_dense_matrix_t *b, ccv_tld_info_t *info)
ccv doesn’t have retain / release semantics. Thus, a TLD instance cannot retain the most recent frame it tracks for future reference, you have to pass that in by yourself.
- tld: The TLD instance for continuous tracking
- a: The last frame used for tracking (ccv_tld_track_object will check signature of this against the last frame TLD instance tracked)
- b: The new frame will be tracked
- info: A ccv_tld_info_t structure that will records several aspects of current tracking
return: The newly predicted bounding box for the tracking object.
comments powered by
- close_matches: How many matches we have inside the tracking (may cause a new learning event)
- clustered_detects: After cluster, how many regions left
- confident_matches: How many matches we have outside of the tracking region (may cause a re-initialization of the short term tracking)
- ferns_detects: How many regions passed ferns classifier
- nnc_detects: How many regions passed nearest neighbor classifier
- perform_learn: Whether we performed learning or not this time
- perform_track: Whether we performed tracking or not this time
- track_success: If we have a successful tracking (thus, short term tracker works)