#include <vobj_tracker.h>
Public Member Functions | |
vobj_tracker (int width, int height, int levels, int max_motion, visual_database *vdb=0, bool glContext=false, pyr_keypoint::pyr_keypoint_factory_t *kf=0, vobj_frame::vobj_frame_factory_t *ff=0, pyr_track::pyr_track_factory_t *tf=0) | |
virtual pyr_frame * | process_frame (IplImage *im) |
Store a new frame, detect features, and match them with previous frame. | |
virtual pyr_frame * | process_frame_pipeline (IplImage *im) |
Pipelined version of process_frame. | |
int | track_objects (vobj_frame *frame, vobj_frame *last_frame) |
void | remove_visible_objects_from_db (vobj_frame *frame) |
void | incremental_learning (vobj_frame *frame, int track_length, float radius, int max_pts) |
Public Attributes | |
visual_database * | vdb |
std::auto_ptr< incremental_query > | query |
float | score_threshold |
int | max_results |
int | homography_corresp_threshold |
Threshold to determine successful detection for homography. Default: 20. | |
int | fmat_corresp_threshold |
Threshold to determine successful detection for fundamental matrix. Default: 20. | |
bool | use_incremental_learning |
Protected Member Functions | |
void | find_candidates (vobj_frame *frame, std::set< visual_object * > &candidates, vobj_frame *last_frame) |
bool | verify (vobj_frame *frame, visual_object *obj, vobj_instance *instance) |
Definition at line 90 of file vobj_tracker.h.
vobj_tracker::vobj_tracker | ( | int | width, | |
int | height, | |||
int | levels, | |||
int | max_motion, | |||
visual_database * | vdb = 0 , |
|||
bool | glContext = false , |
|||
pyr_keypoint::pyr_keypoint_factory_t * | kf = 0 , |
|||
vobj_frame::vobj_frame_factory_t * | ff = 0 , |
|||
pyr_track::pyr_track_factory_t * | tf = 0 | |||
) |
Definition at line 33 of file vobj_tracker.cpp.
References fmat_corresp_threshold, homography_corresp_threshold, max_results, score_threshold, and use_incremental_learning.
void vobj_tracker::find_candidates | ( | vobj_frame * | frame, | |
std::set< visual_object * > & | candidates, | |||
vobj_frame * | last_frame | |||
) | [protected] |
Definition at line 130 of file vobj_tracker.cpp.
References visual_database::create_incremental_query(), init_query_with_frame(), max_results, query, score_threshold, update_query_with_frame(), vdb, and vobj_frame::visible_objects.
Referenced by track_objects().
void vobj_tracker::incremental_learning | ( | vobj_frame * | frame, | |
int | track_length, | |||
float | radius, | |||
int | max_pts | |||
) |
Definition at line 538 of file vobj_tracker.cpp.
References visual_object::add_keypoint(), back_project(), bucket2d< T >::begin(), pyr_keypoint::cid, point2d::dist(), tracks::keypoint_match_iterator::elem(), tracks::keypoint_match_iterator::end(), vobj_frame::find_closest_match(), vobj_frame::find_instance(), visual_database::finish_update(), tkeypoint::frame, visual_object::get_flags(), homo_transform(), visual_object::nb_points(), vobj_keypoint::obj_kpt, tframe::points, visual_object::representative_image, visual_database::start_update(), tkeypoint::track_length(), vobj_instance::transform, point2d::u, point2d::v, vdb, visual_object::VERIFY_HOMOGRAPHY, vobj_frame::visible_objects, and vobj_keypoint::vobj.
Referenced by process_frame(), and process_frame_pipeline().
pyr_frame * vobj_tracker::process_frame | ( | IplImage * | im | ) | [virtual] |
Store a new frame, detect features, and match them with previous frame.
This method takes care of releasing im.
Reimplemented from kpt_tracker.
Definition at line 52 of file vobj_tracker.cpp.
References tracks::get_nth_frame(), incremental_learning(), track_objects(), and use_incremental_learning.
pyr_frame * vobj_tracker::process_frame_pipeline | ( | IplImage * | im | ) | [virtual] |
Pipelined version of process_frame.
Returns 0 on the first call. This method takes care of releasing im.
Reimplemented from kpt_tracker.
Definition at line 62 of file vobj_tracker.cpp.
References pyr_frame::append_to(), PyrImage::build(), kpt_tracker::create_frame(), kpt_tracker::detect_keypoints(), tracks::get_nth_frame(), incremental_learning(), kpt_tracker::pipeline_stage1, pyr_frame::pyr, kpt_tracker::track_ncclk(), track_objects(), kpt_tracker::traverse_tree(), and use_incremental_learning.
Referenced by vobj_tracker_view::timerEvent().
void vobj_tracker::remove_visible_objects_from_db | ( | vobj_frame * | frame | ) |
Definition at line 457 of file vobj_tracker.cpp.
References bucket2d< T >::begin(), vobj_keypoint::obj_kpt, tframe::points, visual_database::remove_object(), vdb, vobj_frame::visible_objects, and vobj_keypoint::vobj.
Referenced by vobj_tracker_view::keyPressEvent().
int vobj_tracker::track_objects | ( | vobj_frame * | frame, | |
vobj_frame * | last_frame | |||
) |
Definition at line 105 of file vobj_tracker.cpp.
References find_candidates(), TaskTimer::popTask(), TaskTimer::pushTask(), verify(), and vobj_frame::visible_objects.
Referenced by process_frame(), and process_frame_pipeline().
bool vobj_tracker::verify | ( | vobj_frame * | frame, | |
visual_object * | obj, | |||
vobj_instance * | instance | |||
) | [protected] |
Definition at line 273 of file vobj_tracker.cpp.
References check_epipolar_constraint(), point2d::dist(), fmat_corresp_threshold, get_correspondences(), visual_object::get_flags(), vobj_instance::get_transform(), homography_corresp_threshold, visual_object::M, min(), visual_object::nb_points(), vobj_keypoint::obj_kpt, vobj_instance::object, TaskTimer::popTask(), vobj_keypoint::prev_match_vobj(), TaskTimer::pushTask(), ransac_h4(), vobj_instance::support, transform(), vobj_instance::transform, point2d::u, point2d::v, visual_object::VERIFY_FMAT, visual_object::VERIFY_HOMOGRAPHY, and vobj_keypoint::vobj.
Referenced by track_objects().
Threshold to determine successful detection for fundamental matrix. Default: 20.
Definition at line 104 of file vobj_tracker.h.
Referenced by verify(), and vobj_tracker().
Threshold to determine successful detection for homography. Default: 20.
Definition at line 101 of file vobj_tracker.h.
Referenced by verify(), and vobj_tracker().
std::auto_ptr<incremental_query> vobj_tracker::query |
Definition at line 119 of file vobj_tracker.h.
Referenced by vobj_tracker_view::keyPressEvent(), process_frame(), process_frame_pipeline(), and vobj_tracker().
Definition at line 94 of file vobj_tracker.h.
Referenced by find_candidates(), incremental_learning(), and remove_visible_objects_from_db().