21 #ifndef PT_DETECTION_BOX_H
22 #define PT_DETECTION_BOX_H
55 const std::string& model_type
96 std::streamsize w = ost.width();
97 std::streamsize p = ost.precision();
98 std::ios::fmtflags f = ost.flags();
99 ost << std::scientific;
102 ost << std::setw(16) << std::setprecision(8) << dbox.
prob_noise <<
" ";
120 istringstream istr(line);
140 "Cannot read Detection_box: line has wrong format.");
156 const Bbox& model_box,
157 const Bbox& data_box,
158 double area_thresh_lower = 0.6,
159 double area_thresh_upper = 1.2
168 return !gbp(bbot[0], bbot[1]).empty();
Class that represents a detection bounding box from any source.
Definition: pt_detection_box.h:42
Class that represents an axis-aligned 2D rectangle. It is defined in terms of its (2D) center...
Definition: gr_2D_bounding_box.h:51
double prob_noise
Definition: pt_detection_box.h:45
Detection_box(const Bbox &bb, double pnoise, const std::string &model_type)
Create data box from rectangle and 3D ground location.
Definition: pt_detection_box.h:52
Definition: camera_backproject.h:113
friend void swap(Detection_box &b1, Detection_box &b2)
Swap two detection boxes.
Definition: pt_detection_box.h:63
height
Definition: APPgetLargeConnectedEdges.m:33
Vector get_top_center() const
Definition: gr_2D_bounding_box.h:104
This class implements vectors, in the linear-algebra sense, with real-valued elements.
Definition: m_vector.h:87
bool similar_boxes(const Bbox &model_box, const Bbox &data_box, double area_thresh_lower=0.6, double area_thresh_upper=1.2)
Check whether the deva detection box and the model box belong to the same object based on their overl...
Definition: pt_detection_box.cpp:54
std::string type
Definition: pt_detection_box.h:46
#define IFT(a, ex, msg)
Definition: l_exception.h:101
std::vector< Detection_box > parse_detection_file(const std::string &filename)
Read in a vector of Detection_box from a sigle file.
Definition: pt_detection_box.cpp:32
St_perspective_camera for modeling a perspective camera using the classic Forsyth and Ponce parametri...
Definition: perspective_camera.h:93
Detection_box parse_detection_box(const std::string &line)
Read in an Detection_box from a sigle line.
Definition: pt_detection_box.h:116
void swap(kjb::Gsl_Multimin_fdf &m1, kjb::Gsl_Multimin_fdf &m2)
Swap two wrapped multimin objects.
Definition: gsl_multimin.h:693
Bbox bbox
Definition: pt_detection_box.h:44
std::ostream & operator<<(std::ostream &ost, const Complete_state &cs)
outputs the Complete_state.
Definition: pt_complete_state.h:86
bool operator<(const Detection_box &b1, const Detection_box &b2)
Compares to boxes using middle of box. Needed because we have associated containers of these...
Definition: pt_detection_box.h:77
bool box_on_ground(const Detection_box &dbox, const Perspective_camera &cam)
Checks whether the bottom of a box back-projects to the ground.
Definition: pt_detection_box.h:164
Object thrown when input or output fails.
Definition: l_exception.h:496
Definition for the Vector class, a thin wrapper on the KJB Vector struct and its related functionalit...
Vector get_bottom_center() const
Definition: gr_2D_bounding_box.h:105