38 #include <boost/optional.hpp>
49 Vector t(-cam_width/2.0, -cam_height/2.0);
60 Vector t(-cam_width/2.0, -cam_height/2.0);
85 Vector t(cam_width/2.0, cam_height/2.0);
96 Vector t(cam_width/2.0, cam_height/2.0);
130 const Box_data& data,
134 boost::optional<const Perspective_camera&> cam_p = boost::none,
135 boost::optional<const Facemark_data&> fm_data_p = boost::none
165 inline bool operator()
171 return p1.y_bottom < p2.y_bottom;
181 const Target& target,
182 const std::vector<Integral_flow>& x_flows,
183 const std::vector<Integral_flow>& y_flows,
184 const std::vector<Integral_flow>& back_x_flows,
185 const std::vector<Integral_flow>& back_y_flows,
198 return 1.0/(1.0 + exp(-(3.50281 + chi_square_dist * (-64.49790))));
204 typedef std::map<const Detection_box*, Matrix>
Hist_map;
210 const std::vector<Hist_map>& hist,
211 const std::vector<Integral_flow>& flows_x,
212 const std::vector<Integral_flow>& flows_y
218 std::vector<double> operator()
228 const std::vector<Hist_map>& m_hists;
229 const std::vector<Integral_flow>& m_flows_x;
230 const std::vector<Integral_flow>& m_flows_y;
243 const Visibility& vis
251 std::vector<Deva_detection>& deva_boxes,
255 double average_height
Vector & resize(int new_length, Value_type pad=Value_type(0))
Resize vector, retaining previous values.
Definition: m_vector.cpp:242
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
void update_facemarks(const Ascn &ascn, const Facemark_data &fms)
Update facemark detections for face trajectories.
Definition: pt_util.cpp:721
void translate(kjb::Axis_aligned_rectangle_2d &box, const kjb::Vector &t)
Definition: gr_2D_bounding_box.h:258
Generic_trajectory_map< Bbox > Box_trajectory_map
Definition: pt_box_trajectory.h:44
double x
Definition: pt_util.h:154
Definition: d_deva_facemark.h:34
mcmcda::Association< Target > Ascn
Definition: pt_association.h:30
height
Definition: APPgetLargeConnectedEdges.m:33
This class implements vectors, in the linear-algebra sense, with real-valued elements.
Definition: m_vector.h:87
Bbox box
Definition: pt_util.h:156
Vector average_box_flow(const Integral_flow &fx, const Integral_flow &fy, const Bbox &box, const Visibility &vis)
Compute the average flow in a box, ignoring occluded parts.
Definition: pt_util.cpp:632
double chi_squared_dist_to_prob(double chi_square_dist)
Given the chi-square distance between the histograms of two detection boxes.
Definition: pt_util.h:196
double y_bottom
Definition: pt_util.h:155
Vector projective_to_euclidean_2d(const Vector &v)
Converts coordinates in (2D) projective space to coordinates in (2D) euclidean space.
Definition: g_util.cpp:109
St_perspective_camera for modeling a perspective camera using the classic Forsyth and Ponce parametri...
std::vector< std::vector< Deva_facemark > > Facemark_data
Definition: pt_data.h:129
std::map< const Detection_box *, Matrix > Hist_map
Scores based on histogram.
Definition: pt_util.h:204
Box_data make_gt_data(const Box_trajectory_map >_btrajs, double width, double height)
Create data from GT box trajectories and compute association based upon it.
Definition: pt_util.cpp:325
Definition: perspective_camera.h:93
x
Definition: APPgetLargeConnectedEdges.m:100
Class that represents a target moving through space.
Definition: pt_target.h:50
int origin_frame
Definition: pt_util.h:157
Propagated 2D information using optical flow.
Definition: pt_util.h:152
void clear_facemarks(const Ascn &ascn)
Update facemark detections for face trajectories.
Definition: pt_util.cpp:810
Definition: pt_util.h:205
Vector project_point(const Perspective_camera &cam, const Vector &x)
Projects a 3D point into a 2D point using camera.
Definition: pt_util.h:260
Comparator for Propagated_2d_info.
Definition: pt_util.h:163
std::map< int, std::vector< Propagated_2d_info > > propagate_boxes_by_flow(const Target &target, const std::vector< Integral_flow > &x_flows, const std::vector< Integral_flow > &y_flows, const std::vector< Integral_flow > &back_x_flows, const std::vector< Integral_flow > &back_y_flows, size_t duration)
Propagate the detection boxes based on optical flow to neighboring frames.
Definition: pt_util.cpp:353
Definition: flow_integral_flow.h:38
Feature_score(const std::vector< Hist_map > &hist, const std::vector< Integral_flow > &flows_x, const std::vector< Integral_flow > &flows_y)
Definition: pt_util.h:209
void unstandardize(Vector &v, double cam_width, double cam_height)
Changes vector to unstandard (image) coordinate system.
Definition: pt_util.h:83
Ascn make_gt_association(const Box_data &data, const Box_trajectory_map >_btrajs, double width, double height, boost::optional< const Perspective_camera & > cam_p=boost::none, boost::optional< const Facemark_data & > fm_data_p=boost::none)
Create data from GT box trajectories and compute association based upon it.
Definition: pt_util.cpp:205
Class representing an axis-aligned, 2D rectangle.
const Matrix & get_camera_matrix() const
Definition: perspective_camera.h:473
void standardize(Vector &v, double cam_width, double cam_height)
Changes Vector to standard (camera) coordinate system.
Definition: pt_util.h:47
void prune_by_height(std::vector< Deva_detection > &deva_boxes, double image_width, double image_height, const Perspective_camera &camera, double average_height)
Prune the deva boxes based on the average entity height.
Definition: pt_util.cpp:680
void scale(kjb::Axis_aligned_rectangle_2d &box, const kjb::Vector &s)
Definition: gr_2D_bounding_box.cpp:108
Definition for the Vector class, a thin wrapper on the KJB Vector struct and its related functionalit...