#include <visual_database.h>
Classes | |
struct | annotation |
struct | correspondence |
Public Types | |
enum | { VERIFY_HOMOGRAPHY = 1, VERIFY_FMAT = 2 } |
typedef std::multiset < db_keypoint > | db_keypoint_vector |
typedef std::vector < correspondence > | correspondence_vector |
typedef std::vector< annotation > | annotations_vector |
typedef annotations_vector::const_iterator | annotation_iterator |
Public Member Functions | |
visual_object (visual_database *, sqlite3_int64 id, const char *comment="", int flags=0) | |
virtual | ~visual_object () |
void | prepare () |
void | find (unsigned id, db_keypoint_vector::iterator &start, db_keypoint_vector::iterator &end) |
db_keypoint * | add_keypoint (pyr_keypoint *p, img_id img) |
unsigned | add_frame (pyr_frame *frame) |
void | add (db_keypoint &p) |
unsigned | get_total () const |
float | get_correspondences (pyr_frame *frame, correspondence_vector &corresp) |
float | get_correspondences_std (pyr_frame *frame, correspondence_vector &corresp) |
float | verify (pyr_frame *frame, correspondence_vector &corresp) |
const std::string & | get_comment () const |
int | get_flags () const |
unsigned long | get_id () |
void | add_annotation (float x, float y, int type, const std::string &text) |
unsigned | get_annotations_count () const |
annotation_iterator | annotation_begin () const |
annotation_iterator | annotation_end () const |
const annotation & | get_annotation (unsigned id) const |
int | nb_points () const |
Public Attributes | |
img_id | representative_image |
CvMat * | M |
visual_database * | vdb |
Protected Attributes | |
annotations_vector | annotations |
bool | sorted |
db_keypoint_vector | points |
sqlite3_int64 | obj_id |
std::string | comment |
int | flags |
Friends | |
class | visual_database |
Each frame or group of frames representing an object is stored in the database as a histogram of the cluster ids of its keypoints. The histogram itself is in the parent class: id_cluster.
Definition at line 55 of file visual_database.h.
typedef annotations_vector::const_iterator visual_object::annotation_iterator |
Definition at line 104 of file visual_database.h.
typedef std::vector<annotation> visual_object::annotations_vector |
Definition at line 103 of file visual_database.h.
typedef std::vector<correspondence> visual_object::correspondence_vector |
Definition at line 83 of file visual_database.h.
typedef std::multiset<db_keypoint> visual_object::db_keypoint_vector |
Definition at line 59 of file visual_database.h.
anonymous enum |
visual_object::visual_object | ( | visual_database * | vdb, | |
sqlite3_int64 | id, | |||
const char * | comment = "" , |
|||
int | flags = 0 | |||
) |
visual_object::~visual_object | ( | ) | [virtual] |
void visual_object::add | ( | db_keypoint & | p | ) |
Definition at line 36 of file visual_database.cpp.
References pyr_keypoint::cid, and points.
Referenced by visual_database::connect_to_db().
void visual_object::add_annotation | ( | float | x, | |
float | y, | |||
int | type, | |||
const std::string & | text | |||
) |
Definition at line 677 of file visual_database.cpp.
References annotations, visual_database::db, visual_database::get_cached_stmt(), obj_id, and vdb.
unsigned visual_object::add_frame | ( | pyr_frame * | frame | ) |
Definition at line 519 of file visual_database.cpp.
References visual_database::add_image(), add_keypoint(), bucket2d< T >::begin(), visual_database::exec_sql(), PyrImage::images, tframe::points, pyr_frame::pyr, representative_image, vdb, and id_cluster_collection::version.
db_keypoint * visual_object::add_keypoint | ( | pyr_keypoint * | p, | |
img_id | img | |||
) |
Definition at line 478 of file visual_database.cpp.
References patch_tagger::descriptor::_rotated, pyr_keypoint::cid, visual_database::db, pyr_keypoint::descriptor, tkeypoint::frame, visual_database::get_cached_stmt(), pyr_keypoint::id, obj_id, patch_tagger::descriptor::orientation, points, pyr_keypoint::scale, point2d::u, id_cluster_collection::update_cluster(), point2d::v, and vdb.
Referenced by add_frame(), and vobj_tracker::incremental_learning().
annotation_iterator visual_object::annotation_begin | ( | ) | const [inline] |
annotation_iterator visual_object::annotation_end | ( | ) | const [inline] |
void visual_object::find | ( | unsigned | id, | |
db_keypoint_vector::iterator & | start, | |||
db_keypoint_vector::iterator & | end | |||
) |
Definition at line 56 of file visual_database.cpp.
References points, and prepare().
Referenced by get_correspondences(), and get_correspondences_std().
const annotation& visual_object::get_annotation | ( | unsigned | id | ) | const [inline] |
unsigned visual_object::get_annotations_count | ( | ) | const [inline] |
const std::string& visual_object::get_comment | ( | ) | const [inline] |
Definition at line 88 of file visual_database.h.
References comment.
Referenced by VSView::script_exec(), and VSView::timerEvent().
float visual_object::get_correspondences | ( | pyr_frame * | frame, | |
correspondence_vector & | corresp | |||
) |
Definition at line 536 of file visual_database.cpp.
References flags, get_correspondences_std(), verify(), VERIFY_FMAT, and VERIFY_HOMOGRAPHY.
Referenced by VSView::timerEvent().
float visual_object::get_correspondences_std | ( | pyr_frame * | frame, | |
correspondence_vector & | corresp | |||
) |
Definition at line 544 of file visual_database.cpp.
References incremental_query::begin(), bucket2d< T >::begin(), pyr_keypoint::cid, incremental_query::end(), find(), tkeypoint::frame, id_cluster::histo, pyr_keypoint::id, id_cluster_collection::id2cluster, pyr_track::id_histo, id_cluster_collection::idf(), tframe::points, bucket2d< T >::size(), incremental_query::sort_results_min_ratio(), tkeypoint::track, and vdb.
Referenced by get_correspondences().
int visual_object::get_flags | ( | ) | const [inline] |
Definition at line 91 of file visual_database.h.
References flags.
Referenced by vobj_tracker::incremental_learning(), and vobj_tracker::verify().
unsigned long visual_object::get_id | ( | ) | [inline] |
unsigned visual_object::get_total | ( | ) | const [inline] |
Definition at line 74 of file visual_database.h.
References id_cluster::total.
Referenced by VSView::paintGL().
int visual_object::nb_points | ( | ) | const [inline] |
Definition at line 125 of file visual_database.h.
References points.
Referenced by vobj_tracker::incremental_learning(), and vobj_tracker::verify().
void visual_object::prepare | ( | ) |
Definition at line 46 of file visual_database.cpp.
Referenced by visual_database::connect_to_db(), and find().
float visual_object::verify | ( | pyr_frame * | frame, | |
correspondence_vector & | corresp | |||
) |
Definition at line 618 of file visual_database.cpp.
References flags, M, VERIFY_FMAT, and VERIFY_HOMOGRAPHY.
Referenced by get_correspondences().
friend class visual_database [friend] |
Definition at line 132 of file visual_database.h.
annotations_vector visual_object::annotations [protected] |
Definition at line 106 of file visual_database.h.
Referenced by add_annotation(), annotation_begin(), annotation_end(), visual_database::connect_to_db(), get_annotation(), and get_annotations_count().
std::string visual_object::comment [protected] |
int visual_object::flags [protected] |
Definition at line 130 of file visual_database.h.
Referenced by get_correspondences(), get_flags(), and verify().
CvMat* visual_object::M |
Definition at line 115 of file visual_database.h.
Referenced by vobj_tracker::verify(), verify(), visual_object(), and ~visual_object().
sqlite3_int64 visual_object::obj_id [protected] |
Definition at line 122 of file visual_database.h.
Referenced by add_annotation(), add_keypoint(), get_id(), and visual_database::remove_object().
db_keypoint_vector visual_object::points [protected] |
Definition at line 120 of file visual_database.h.
Referenced by add(), add_keypoint(), find(), and nb_points().
Definition at line 67 of file visual_database.h.
Referenced by add_frame(), visual_database::connect_to_db(), vobj_tracker::incremental_learning(), and visual_database::remove_object().
bool visual_object::sorted [protected] |
Definition at line 118 of file visual_database.h.
Definition at line 127 of file visual_database.h.
Referenced by add_annotation(), add_frame(), add_keypoint(), get_correspondences(), and get_correspondences_std().