$search

ODUFinder Class Reference

#include <odu_finder.h>

Inheritance diagram for ODUFinder:
Inheritance graph
[legend]

List of all members.

Public Types

enum  VisualizationMode { FRAMES, SEQUENCES }

Public Member Functions

void add_image_to_database (vt::Document &doc, std::string &name)
 adds new templates to the database
void build_database (std::string directory)
 builds the vocabulary tree and trains the database
void extract_roi (IplImage *image, std::vector< KeypointExt * > camera_keypoints)
void load_database (std::string &directory)
 loads the database, that is images.tree, images.weights, images.documents
 ODUFinder ()
std::string process_image (IplImage *camera_image)
 Create a visualization window and start the visualization threas.
void process_images (std::string directory)
 only called with "sift_only" command argument for extracting of keypoints
void save_database (std::string &directory)
 saves images.tree, images.weights, images.documents
void save_database_without_tree (std::string &directory)
 saves images.weights, images.documents (faster than save_database function)
void set_visualization (bool enable_visualization_in)
 Create a visualization window and start the visualization threas.
int start ()
void write_stat_summary ()
 writes the statistics of the recognition process in a package
 ~ODUFinder ()

Public Attributes

IplImage * camera_image
size_t camera_keypoints_count
std::vector< unsigned int > cluster_sizes
CvScalar color_table [COLORS]
std::string command
int count_templates
std::string database_location
vt::Database * db
std::vector< vt::Document > docs
std::map< int, DocumentInfo * > documents_map
int enable_clustering
int enable_incremental_learning
bool enable_logging_
int enable_visualization
bool extract_roi_
int frame_number
IplImage * image
std::vector< std::string > image_names
IplImage * image_roi
std::string images_directory
std::string images_for_visualization_directory
std::map< int, int > last_templates
std::ofstream logger
std::map< uint32_t, float > matches_map
int min_cluster_size
int object_id
std::string output_image_topic_
double radius_adaptation_A
double radius_adaptation_K
double radius_adaptation_r_max
double radius_adaptation_r_min
std::vector< std::string > sequence_buffer
std::list< int > sliding_window
int sliding_window_size
std::map< std::string, int > stat_summary_map
IplImage * template_image
int templates_to_show
vt::VocabularyTree< Featuretree
vt::TreeBuilder< Featuretree_builder
int tree_k
int tree_levels
double unknown_object_threshold
VisualizationMode visualization_mode_
int votes_count

Protected Member Functions

void clear_sequence_buffer ()
 Clears the sequence buffer.
Keypoint extract_keypoints (IplImage *image, bool frames_only=false)
 extracts SIFT keypoints
void process_file (std::string &filename, std::vector< FeatureVector > &images, bool onlySaveImages=false)
 extract keypoints from training images and optionally saves them
void save_result_for_sequence (std::string &best_template_filename)
 Adds the current result to the sequence buffer in order to be visualized later by visualize_sequence.
void trace_directory (const char *dir, const char *prefix, std::vector< FeatureVector > &images, bool onlySaveImages=false)
 recursively traces the directory with images
void update_matches_map (vt::Matches &matches, size_t size)
 Accumulates the scores from the clusters and updates the map of matches (matches_map) which is a map of Document IDs and their scores in the database.
void visualize (IplImage *camera_image_in, DocumentInfo **template_document_info, std::vector< KeypointExt * > *camera_keypoints)
 visualization function
void visualize_sequence ()
 Visualizes the stored sequence.

Detailed Description

Definition at line 38 of file odu_finder.h.


Member Enumeration Documentation

Enumerator:
FRAMES 
SEQUENCES 

Definition at line 41 of file odu_finder.h.


Constructor & Destructor Documentation

ODUFinder::ODUFinder (  ) 

Definition at line 55 of file odu_finder.cpp.

ODUFinder::~ODUFinder (  ) 

Definition at line 132 of file odu_finder.cpp.


Member Function Documentation

void ODUFinder::add_image_to_database ( vt::Document &  doc,
std::string &  name 
)

adds new templates to the database

Parameters:
doc full database document
name new template name (object + time stamp in this case)

Definition at line 527 of file odu_finder.cpp.

void ODUFinder::build_database ( std::string  directory  ) 

builds the vocabulary tree and trains the database

Parameters:
directory directory with training images

Definition at line 420 of file odu_finder.cpp.

void ODUFinder::clear_sequence_buffer (  )  [protected]

Clears the sequence buffer.

Definition at line 860 of file odu_finder.cpp.

Keypoint ODUFinder::extract_keypoints ( IplImage *  image,
bool  frames_only = false 
) [protected]

extracts SIFT keypoints

Parameters:
filename input image
frames_only currently redundant : remove??

Definition at line 786 of file odu_finder.cpp.

void ODUFinder::extract_roi ( IplImage *  image,
std::vector< KeypointExt * >  camera_keypoints 
)

publish when object was detected publish rect with ROI region of interest extract an image from another one

Definition at line 822 of file odu_finder.cpp.

void ODUFinder::load_database ( std::string &  directory  ) 

loads the database, that is images.tree, images.weights, images.documents

Parameters:
directory storage location for database

Definition at line 495 of file odu_finder.cpp.

void ODUFinder::process_file ( std::string &  filename,
std::vector< FeatureVector > &  images,
bool  onlySaveImages = false 
) [protected]

extract keypoints from training images and optionally saves them

Parameters:
filename input training image
images extracted keypoints
onlySaveImages whether to save images or not

Definition at line 749 of file odu_finder.cpp.

std::string ODUFinder::process_image ( IplImage *  camera_image  ) 

Create a visualization window and start the visualization threas.

Parameters:
enable_visualization 

Definition at line 147 of file odu_finder.cpp.

void ODUFinder::process_images ( std::string  directory  ) 

only called with "sift_only" command argument for extracting of keypoints

Parameters:
directory directory with training images

Definition at line 458 of file odu_finder.cpp.

void ODUFinder::save_database ( std::string &  directory  ) 

saves images.tree, images.weights, images.documents

Parameters:
directory target directory for database

Definition at line 486 of file odu_finder.cpp.

void ODUFinder::save_database_without_tree ( std::string &  directory  ) 

saves images.weights, images.documents (faster than save_database function)

Parameters:
directory target directory for database

Definition at line 464 of file odu_finder.cpp.

void ODUFinder::save_result_for_sequence ( std::string &  best_template_filename  )  [protected]

Adds the current result to the sequence buffer in order to be visualized later by visualize_sequence.

Parameters:
camera_image_in input camera image
template_document_info which documents to visualize
camera_keypoints keypoints extracted in the input image

Definition at line 852 of file odu_finder.cpp.

void ODUFinder::set_visualization ( bool  enable_visualization_in  ) 

Create a visualization window and start the visualization threas.

Parameters:
enable_visualization (bool)

Definition at line 123 of file odu_finder.cpp.

int ODUFinder::start (  ) 

Definition at line 401 of file odu_finder.cpp.

void ODUFinder::trace_directory ( const char *  dir,
const char *  prefix,
std::vector< FeatureVector > &  images,
bool  onlySaveImages = false 
) [protected]

recursively traces the directory with images

Parameters:
dir parent directory
prefix 
images vector of extracted keypoints
onlySaveImages whether we only extract keypoints and save images with them

Definition at line 536 of file odu_finder.cpp.

void ODUFinder::update_matches_map ( vt::Matches &  matches,
size_t  size 
) [protected]

Accumulates the scores from the clusters and updates the map of matches (matches_map) which is a map of Document IDs and their scores in the database.

Parameters:
matches - vector of Match-es (see vocabulary tree API)
size - currently unused

Definition at line 726 of file odu_finder.cpp.

void ODUFinder::visualize ( IplImage *  camera_image_in,
DocumentInfo **  template_document_info,
std::vector< KeypointExt * > *  camera_keypoints 
) [protected]

visualization function

Parameters:
camera_image_in input camera image
template_document_info which documents to visualize
camera_keypoints a pointer to the vector containing the keypoints extracted in the input image or NULL if no keypoints are provided

Definition at line 575 of file odu_finder.cpp.

void ODUFinder::visualize_sequence (  )  [protected]

Visualizes the stored sequence.

Definition at line 856 of file odu_finder.cpp.

void ODUFinder::write_stat_summary (  ) 

writes the statistics of the recognition process in a package

Definition at line 805 of file odu_finder.cpp.


Member Data Documentation

Definition at line 51 of file odu_finder.h.

Definition at line 67 of file odu_finder.h.

std::vector<unsigned int> ODUFinder::cluster_sizes

Definition at line 53 of file odu_finder.h.

Definition at line 52 of file odu_finder.h.

std::string ODUFinder::command

Definition at line 74 of file odu_finder.h.

Definition at line 79 of file odu_finder.h.

Definition at line 74 of file odu_finder.h.

vt::Database* ODUFinder::db

Definition at line 62 of file odu_finder.h.

std::vector<vt::Document> ODUFinder::docs

Definition at line 59 of file odu_finder.h.

Definition at line 64 of file odu_finder.h.

Definition at line 77 of file odu_finder.h.

Definition at line 77 of file odu_finder.h.

Definition at line 45 of file odu_finder.h.

Definition at line 77 of file odu_finder.h.

Definition at line 48 of file odu_finder.h.

Definition at line 46 of file odu_finder.h.

IplImage * ODUFinder::image

Definition at line 51 of file odu_finder.h.

std::vector<std::string> ODUFinder::image_names

Definition at line 63 of file odu_finder.h.

Definition at line 51 of file odu_finder.h.

Definition at line 74 of file odu_finder.h.

Definition at line 74 of file odu_finder.h.

std::map<int, int> ODUFinder::last_templates

Definition at line 71 of file odu_finder.h.

std::ofstream ODUFinder::logger

Definition at line 44 of file odu_finder.h.

std::map<uint32_t, float> ODUFinder::matches_map

Definition at line 69 of file odu_finder.h.

Definition at line 75 of file odu_finder.h.

Definition at line 75 of file odu_finder.h.

Reimplemented in ODUFinderNode.

Definition at line 54 of file odu_finder.h.

Definition at line 78 of file odu_finder.h.

Definition at line 78 of file odu_finder.h.

Definition at line 78 of file odu_finder.h.

Definition at line 78 of file odu_finder.h.

std::vector<std::string> ODUFinder::sequence_buffer

Definition at line 56 of file odu_finder.h.

std::list<int> ODUFinder::sliding_window

Definition at line 70 of file odu_finder.h.

Definition at line 77 of file odu_finder.h.

std::map<std::string, int> ODUFinder::stat_summary_map

Definition at line 47 of file odu_finder.h.

Definition at line 51 of file odu_finder.h.

Definition at line 77 of file odu_finder.h.

vt::VocabularyTree<Feature> ODUFinder::tree

Definition at line 61 of file odu_finder.h.

vt::TreeBuilder<Feature> ODUFinder::tree_builder

Definition at line 60 of file odu_finder.h.

Definition at line 75 of file odu_finder.h.

Definition at line 75 of file odu_finder.h.

Definition at line 76 of file odu_finder.h.

Definition at line 55 of file odu_finder.h.

Definition at line 75 of file odu_finder.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends


objects_of_daily_use_finder
Author(s): Vladimir Haltakov, Dejan Pangercic
autogenerated on Sun Nov 25 18:50:09 2012