KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pt_face_flow_likelihood.h
Go to the documentation of this file.
1 /* =========================================================================== *
2 |
3 | Copyright (c) 1994-2008 by Kobus Barnard (author).
4 |
5 | Personal and educational use of this code is granted, provided that this
6 | header is kept intact, and that the authorship is not misrepresented, that
7 | its use is acknowledged in publications, and relevant papers are cited.
8 |
9 | For other use contact the author (kobus AT cs DOT arizona DOT edu).
10 |
11 | Please note that the code in this file has not necessarily been adequately
12 | tested. Naturally, there is no guarantee of performance, support, or fitness
13 | for any particular task. Nonetheless, I am interested in hearing about
14 | problems that you encounter.
15 |
16 | Authors:
17 | Jinyan Guan
18 |
19 * =========================================================================== */
20 
21 /* $Id: pt_face_flow_likelihood.h 16018 2013-11-15 05:31:53Z jguan1 $ */
22 
23 #ifndef PT_FACE_FLOW_LIKELIHOOD_H
24 #define PT_FACE_FLOW_LIKELIHOOD_H
25 
32 
33 namespace kjb {
34 namespace pt {
35 
43 {
44 public:
47  (
48  const std::vector<Integral_flow>& flows_x,
49  const std::vector<Integral_flow>& flows_y,
50  double img_width,
51  double img_height,
52  double x_scale,
53  double y_scale,
54  double bg_x_scale,
55  double bg_y_scale
56  ) :
57  m_flows_x(flows_x),
58  m_flows_y(flows_y),
59  m_width(img_width),
60  m_height(img_height),
61  m_x_dist(0.0, x_scale),
62  m_y_dist(0.0, y_scale),
63  m_bg_x_dist(0.0, bg_x_scale),
64  m_bg_y_dist(0.0, bg_y_scale)
65  {}
66 
68  double operator()(const Scene& scene) const;
69 
71  double at_trajectory(const Target& target) const;
72 
74  double at_face(const Face_2d& face_2d, size_t cur_frame) const;
75 
76 private:
77  // data members
78  const std::vector<Integral_flow>& m_flows_x;
79  const std::vector<Integral_flow>& m_flows_y;
80  double m_width;
81  double m_height;
82  Laplace_distribution m_x_dist;
83  Laplace_distribution m_y_dist;
84  Laplace_distribution m_bg_x_dist;
85  Laplace_distribution m_bg_y_dist;
86 
87 }; // class Face_flow_likelihood
88 
89 }} //namespace kjb::pt
90 
91 #endif
92 
Face_flow_likelihood(const std::vector< Integral_flow > &flows_x, const std::vector< Integral_flow > &flows_y, double img_width, double img_height, double x_scale, double y_scale, double bg_x_scale, double bg_y_scale)
Construct a face OF likelihood with the given parameters.
Definition: pt_face_flow_likelihood.h:47
Definition of various standard probability distributions.
Class to compute face optical flow likelihood.
Definition: pt_face_flow_likelihood.h:42
Class that represents a full scene in the PT universe.
Definition: pt_scene.h:40
double at_trajectory(const Target &target) const
Evaluate likelihood at boxes of a trajectory.
Definition: pt_face_flow_likelihood.cpp:47
boost::math::laplace Laplace_distribution
Definition: prob_distribution.h:67
2D face information resulting from projecting the 3D head/face.
Definition: pt_face_2d.h:37
Class that represents a target moving through space.
Definition: pt_target.h:50
double at_face(const Face_2d &face_2d, size_t cur_frame) const
Evaluate likelihood at a single box.
Definition: pt_face_flow_likelihood.cpp:66
double operator()(const Scene &scene) const
Evaluate this likelihood at the given scene.
Definition: pt_face_flow_likelihood.cpp:34