#include <kpttracker.h>
Classes | |
class | recycler_t |
Public Member Functions | |
kpt_tracker (int width, int height, int levels, int max_motion, bool glContext=false, pyr_keypoint::pyr_keypoint_factory_t *kf=0, pyr_frame::pyr_frame_factory_t *ff=0, pyr_track::pyr_track_factory_t *tf=0) | |
virtual | ~kpt_tracker () |
bool | load_from_db (sqlite3 *db) |
bool | load_from_db (const char *dbfile) |
bool | load_tree (sqlite3 *db) |
bool | load_tree (const char *fn) |
bool | load_clusters (sqlite3 *db) |
bool | load_clusters (const char *fn) |
void | set_size (int width, int height, int levels, int max_motion) |
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. | |
pyr_frame * | add_frame (IplImage *im) |
void | traverse_tree (pyr_frame *frame) |
void | detect_keypoints (pyr_frame *f) |
void | track_ncclk (pyr_frame *f, pyr_frame *lf) |
void | clear () |
remove all frames, all keypoints, and all tracks. | |
pyr_keypoint * | best_match (pyr_keypoint *templ, tracks::keypoint_frame_iterator it) |
Public Attributes | |
pyr_yape * | detector |
keypoint * | points |
kmean_tree::node_t * | tree |
id_cluster_collection * | id_clusters |
int | nb_points |
int | max_motion |
int | nb_levels |
int | patch_size |
float | ncc_threshold |
float | ncc_threshold_high |
Protected Member Functions | |
pyr_frame * | create_frame (IplImage *im) |
Protected Attributes | |
pyr_frame * | pipeline_stage1 |
Friends | |
class | pyr_keypoint |
Definition at line 158 of file kpttracker.h.
kpt_tracker::kpt_tracker | ( | int | width, | |
int | height, | |||
int | levels, | |||
int | max_motion, | |||
bool | glContext = false , |
|||
pyr_keypoint::pyr_keypoint_factory_t * | kf = 0 , |
|||
pyr_frame::pyr_frame_factory_t * | ff = 0 , |
|||
pyr_track::pyr_track_factory_t * | tf = 0 | |||
) |
Definition at line 96 of file kpttracker.cpp.
References detector, id_clusters, license(), ncc_threshold, ncc_threshold_high, patch_tagger::patch_size, patch_size, pipeline_stage1, points, yape::set_radius(), and tree.
kpt_tracker::~kpt_tracker | ( | ) | [virtual] |
Definition at line 63 of file kpttracker.cpp.
References clear(), detector, id_clusters, points, and tree.
pyr_frame * kpt_tracker::add_frame | ( | IplImage * | im | ) |
Definition at line 269 of file kpttracker.cpp.
References pyr_frame::append_to(), PyrImage::build(), create_frame(), and pyr_frame::pyr.
Referenced by pic_randomizer::detect_kpts().
pyr_keypoint * kpt_tracker::best_match | ( | pyr_keypoint * | templ, | |
tracks::keypoint_frame_iterator | it | |||
) |
Definition at line 920 of file kpttracker.cpp.
References cmp_ncc(), ncc_threshold, and ncc_threshold_high.
Referenced by track_ncclk().
void kpt_tracker::clear | ( | ) |
remove all frames, all keypoints, and all tracks.
Definition at line 77 of file kpttracker.cpp.
References tracks::frames, and tracks::remove_unmatched_tracks().
Referenced by ~kpt_tracker().
pyr_frame * kpt_tracker::create_frame | ( | IplImage * | im | ) | [protected] |
Definition at line 277 of file kpttracker.cpp.
References tracks::get_nth_frame(), PyrImage::images, nb_levels, pyr_frame::pyr, and tracks::tframe_factory.
Referenced by add_frame(), process_frame(), vobj_tracker::process_frame_pipeline(), and process_frame_pipeline().
void kpt_tracker::detect_keypoints | ( | pyr_frame * | f | ) |
Definition at line 299 of file kpttracker.cpp.
References pyr_keypoint::cid, pyr_keypoint::descriptor, pyr_yape::detect(), detectAdaptiveTresholdKeypoints(), detector, pyr_keypoint::dispose(), tframe::has_point_in(), pyr_keypoint::id, PyrImage::images, M_PI, nb_points, PyrImage::nbLev, patch_tagger::descriptor::orientation, patch_size, points, TaskTimer::popTask(), TaskTimer::pushTask(), pyr_frame::pyr, pyr_keypoint::set(), pyr_keypoint::stdev, patch_tagger::descriptor::total, and pyr_frame::tracker.
Referenced by pic_randomizer::detect_kpts(), process_frame(), vobj_tracker::process_frame_pipeline(), and process_frame_pipeline().
bool kpt_tracker::load_clusters | ( | const char * | fn | ) |
Definition at line 187 of file kpttracker.cpp.
References id_clusters, id_cluster_collection::load(), and id_cluster_collection::QUERY_NORMALIZED_FREQ.
bool kpt_tracker::load_clusters | ( | sqlite3 * | db | ) |
Definition at line 153 of file kpttracker.cpp.
References id_clusters, id_cluster_collection::load(), and id_cluster_collection::QUERY_NORMALIZED_FREQ.
Referenced by load_from_db().
bool kpt_tracker::load_from_db | ( | const char * | dbfile | ) |
bool kpt_tracker::load_from_db | ( | sqlite3 * | db | ) |
Definition at line 173 of file kpttracker.cpp.
References load_clusters(), and load_tree().
Referenced by load_from_db(), and main().
bool kpt_tracker::load_tree | ( | const char * | fn | ) |
bool kpt_tracker::load_tree | ( | sqlite3 * | db | ) |
Definition at line 140 of file kpttracker.cpp.
References kmean_tree::load(), and tree.
Referenced by pic_randomizer::detect_kpts(), and load_from_db().
pyr_frame * kpt_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 in vobj_tracker.
Definition at line 243 of file kpttracker.cpp.
References pyr_frame::append_to(), PyrImage::build(), create_frame(), detect_keypoints(), tracks::get_nth_frame(), TaskTimer::popTask(), TaskTimer::pushTask(), pyr_frame::pyr, track_ncclk(), and traverse_tree().
Referenced by main(), and VSView::timerEvent().
pyr_frame * kpt_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 in vobj_tracker.
Definition at line 213 of file kpttracker.cpp.
References pyr_frame::append_to(), PyrImage::build(), create_frame(), detect_keypoints(), tracks::get_nth_frame(), pipeline_stage1, pyr_frame::pyr, track_ncclk(), and traverse_tree().
Referenced by VSView::timerEvent().
void kpt_tracker::set_size | ( | int | width, | |
int | height, | |||
int | levels, | |||
int | max_motion | |||
) |
Definition at line 201 of file kpttracker.cpp.
References detector, and nb_levels.
Referenced by pic_randomizer::detect_kpts().
Definition at line 454 of file kpttracker.cpp.
References bucket2d< T >::begin(), best_match(), pyr_keypoint::cid, bucket2d< T >::closest_point(), cmp_ncc(), pyr_keypoint::descriptor, pyr_keypoint::dispose(), pyr_keypoint::id, tkeypoint::matches, max_motion, MAX_TRACK_FT, myCalcOpticalFlowPyrLK(), PyrImage::nbLev, ncc_threshold, mlist_elem< T >::next, patch_tagger::descriptor::orientation, patch_size, tframe::points, TaskTimer::popTask(), mlist_elem< T >::prev, TaskTimer::pushTask(), pyr_frame::pyr, pyr_keypoint::scale, pyr_keypoint::score, bucket2d< T >::search(), pyr_keypoint::set(), tracks::set_match(), tkeypoint::track, tkeypoint::track_is_longer(), tkeypoint::track_length(), pyr_frame::tracker, point2d::u, tracks::unset_match(), and point2d::v.
Referenced by process_frame(), vobj_tracker::process_frame_pipeline(), and process_frame_pipeline().
void kpt_tracker::traverse_tree | ( | pyr_frame * | frame | ) |
Definition at line 718 of file kpttracker.cpp.
References patch_tagger::descriptor::array(), bucket2d< T >::begin(), kmean_tree::descriptor_t::descriptor, pyr_keypoint::descriptor, kmean_tree::node_t::get_id(), pyr_keypoint::id, pyr_keypoint::node, tframe::points, TaskTimer::popTask(), TaskTimer::pushTask(), and tree.
Referenced by pic_randomizer::detect_kpts(), process_frame(), vobj_tracker::process_frame_pipeline(), and process_frame_pipeline().
friend class pyr_keypoint [friend] |
Definition at line 260 of file kpttracker.h.
Definition at line 200 of file kpttracker.h.
Referenced by detect_keypoints(), kpt_tracker(), set_size(), and ~kpt_tracker().
Definition at line 217 of file kpttracker.h.
Referenced by init_query_with_frame(), kpt_tracker(), load_clusters(), pyr_track::point_added(), update_query_with_frame(), and ~kpt_tracker().
Definition at line 223 of file kpttracker.h.
Referenced by best_match(), kpt_tracker(), and track_ncclk().
Definition at line 222 of file kpttracker.h.
Referenced by detect_keypoints(), kpt_tracker(), and track_ncclk().
pyr_frame* kpt_tracker::pipeline_stage1 [protected] |
Definition at line 263 of file kpttracker.h.
Referenced by kpt_tracker(), vobj_tracker::process_frame_pipeline(), and process_frame_pipeline().
Definition at line 201 of file kpttracker.h.
Referenced by detect_keypoints(), kpt_tracker(), and ~kpt_tracker().
Definition at line 216 of file kpttracker.h.
Referenced by pic_randomizer::group_ids(), kpt_tracker(), load_tree(), traverse_tree(), and ~kpt_tracker().