MTF
Public Member Functions | List of all members
utils::ObjUtils Class Reference

utility functions to obtain initial object location for tracking - either read from a ground truth file or selected interactively by the user More...

#include <objUtils.h>

Public Member Functions

 ObjUtils (const vector_s &_obj_cols=vector_s(), double _resize_factor=1.0)
 
const cv::Scalar & getCol (int col_id)
 
const cv::Scalar & getCol (const std::string &col_name)
 
void getCols (vector< cv::Scalar > &cols)
 
const vpColor & getColVp (int col_id)
 
const vpColor & getColVp (const std::string &col_name)
 
void getCols (vector< vpColor > &cols)
 
bool addRectObject (InputBase *input, string selection_window, int line_thickness=2, int patch_size=0)
 allows the user to select a rectangle by clicking on its opposite corners
 
bool addQuadObject (InputBase *input, string selection_window, int line_thickness=2)
 allows the user to select a quadrilateral by clicking on its 4 corners
 
bool selectObjects (const cv::Mat &img, int no_of_objs, int patch_size=0, int line_thickness=1, int write_objs=0, bool sel_quad_obj=false, const char *filename="selected_objects.txt")
 overloaded variant for non-live input feed
 
bool selectObjects (InputBase *input, int no_of_objs, int patch_size=0, int line_thickness=1, int write_objs=0, bool sel_quad_obj=false, const char *filename="selected_objects.txt")
 
bool addRectObjectVP (InputBase *input, string selection_window, int line_thickness=2, int patch_size=0)
 
bool addQuadObjectVP (InputBase *input, string selection_window, int line_thickness=2)
 
bool selectObjectsVP (const cv::Mat &img, int no_of_objs, int patch_size=0, int line_thickness=1, int write_objs=0, bool sel_quad_obj=false, const char *filename="selected_objects.txt")
 overloaded variant for non-live input feed
 
bool selectObjectsVP (InputBase *input, int no_of_objs, int patch_size=0, int line_thickness=1, int write_objs=0, bool sel_quad_obj=false, const char *filename="selected_objects.txt")
 
void writeObjectsToFile (int no_of_objs, const char *filename="sel_objs/selected_objects.txt")
 
bool readObjectFromGT (string source_name, string source_path, int n_frames, int _init_frame_id=0, bool use_opt_gt=false, string opt_gt_ssm="2", bool _use_reinit_gt=false, bool _invert_seq=false, int debug_mode=0)
 
bool getObjStatus () const
 
const ObjStructgetObj (int obj_id=0) const
 
const cv::Mat & getGT (int frame_id, int _reinit_frame_id=-1)
 
const cv::Mat & getReinitGT (int frame_id, int _reinit_frame_id=-1)
 
const vector< cv::Mat > & getGT ()
 
int getGTSize ()
 
bool readGT (string source_name, string source_path, int n_frames=1, int init_frame_id=0, int debug_mode=0, bool use_opt_gt=false, string opt_gt_ssm="2")
 
bool readReinitGT (string source_name, string source_path, int _reinit_frame_id, int _n_frames, bool use_opt_gt=false, string opt_gt_ssm="2")
 
bool readObjectsFromFile (int no_of_objs, const char *filename="sel_objs/selected_objects.txt", int debug_mode=0)
 
cv::Point getMeanPoint (cv::Point *pt_array, int no_of_points)
 
void cornersToPoint2D (cv::Point2d(&cv_corners)[4], const cv::Mat &cv_corners_mat)
 

Detailed Description

utility functions to obtain initial object location for tracking - either read from a ground truth file or selected interactively by the user


The documentation for this class was generated from the following file: