KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pt_body_2d.h
Go to the documentation of this file.
1 /* =========================================================================== *
2  |
3  | Copyright (c) 1994-2011 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  | Author: Ernesto Brau
17  * =========================================================================== */
18 
19 /* $Id$ */
20 
21 #ifndef PT_BODY_2D_H
22 #define PT_BODY_2D_H
23 
26 #include <detector_cpp/d_bbox.h>
28 #include <m_cpp/m_vector.h>
29 #include <vector>
30 
31 namespace kjb {
32 namespace pt {
33 
35 struct Body_2d
36 {
41 
42  Body_2d() {}
43 
44  Body_2d
45  (
46  const Bbox& full_box,
47  const Bbox& body_box,
48  const Vector& mdir = Vector()
49  ) :
50  full_bbox(full_box), body_bbox(body_box), model_dir(mdir)
51  {}
52 };
53 
55 Body_2d project_cstate
56 (
57  const Complete_state& cs,
58  const Perspective_camera& cam,
59  double height,
60  double width,
61  double girth
62 );
63 
66 (
67  const Complete_state& cs1,
68  const Complete_state& cs2,
69  const Perspective_camera& cam,
70  double height,
71  double width,
72  double girth
73 );
74 
77 (
78  const std::vector<Vector>& pts,
79  const Vector& bot,
80  const Vector& top
81 );
82 
83 }} //namespace kjb::pt
84 
85 #endif /*PT_BODY_2D_H */
86 
Class that represents an axis-aligned 2D rectangle. It is defined in terms of its (2D) center...
Definition: gr_2D_bounding_box.h:51
Bbox cylinder_bounding_box(const std::vector< Vector > &pts, const Vector &bot, const Vector &top)
Computes the cylinder of a bounding box given 2D points.
Definition: pt_body_2d.cpp:111
2D body information resulting from projecting the 3D body.
Definition: pt_body_2d.h:35
height
Definition: APPgetLargeConnectedEdges.m:33
Bbox body_bbox
Definition: pt_body_2d.h:38
This class implements vectors, in the linear-algebra sense, with real-valued elements.
Definition: m_vector.h:87
Visibility visibility
Definition: pt_body_2d.h:39
Represents the information regarding visibility of an actor at a given frame and given all other acto...
Definition: pt_visibility.h:38
Body_2d()
Definition: pt_body_2d.h:42
St_perspective_camera for modeling a perspective camera using the classic Forsyth and Ponce parametri...
Definition: perspective_camera.h:93
Vector model_direction(const Complete_state &cs1, const Complete_state &cs2, const Perspective_camera &cam, double height, double width, double girth)
Compute the (2D) model direction for the body.
Definition: pt_body_2d.cpp:77
Bbox full_bbox
Definition: pt_body_2d.h:37
Body_2d project_cstate(const Complete_state &cs, const Perspective_camera &cam, double height, double width, double girth)
Project a complete state into a body box.
Definition: pt_body_2d.cpp:39
Definition for the Vector class, a thin wrapper on the KJB Vector struct and its related functionalit...
Vector model_dir
Definition: pt_body_2d.h:40