30 #include <boost/format.hpp>
85 bool respect_changed =
true,
86 bool infer_head =
true
97 bool infer_head =
true,
115 const std::string& tracks_dp,
116 const std::string& ass_fp,
117 const std::string& cam_fp,
118 const std::string& params_fp,
119 bool infer_head =
true
133 const std::string& tracks_dp,
134 bool infer_head =
true
140 tracks_dp +
"/association.txt",
141 tracks_dp +
"/camera.txt",
142 tracks_dp +
"/params.txt",
161 const std::string& tracks_dp,
162 const std::string& ass_fp,
163 const std::string& cam_fp,
164 const std::string& params_fp
180 tracks_dp +
"/association.txt",
181 tracks_dp +
"/camera.txt",
182 tracks_dp +
"/params.txt");
195 std::string cur_dir = boost::str(boost::format(
"/%04d") % i++);
206 std::string parent_dir;
212 public std::iterator<std::output_iterator_tag, void, void, void, void>
226 parent_dir(dir), n(sn){}
231 std::string cur_dir = boost::str(boost::format(
"/%04d") % n);
265 std::string parent_dir;
277 const Target& target,
281 bool infer_head =
true
291 const Target& target1,
292 const Target& target2,
298 bool infer_head =
true
313 bool infer_head =
true
335 bool infer_head =
true
356 const Target& target,
369 const Target& target1,
370 const Target& target2,
392 double d = target.
trajectory()[frame - 1]->value.body_dir;
413 double d1 = target1.
trajectory()[frame1 - 1]->value.body_dir;
414 double d2 = target2.
trajectory()[frame2 - 1]->value.body_dir;
430 const Target& target,
443 const Target& target1,
444 const Target& target2,
500 const Target& target,
508 const Target& target,
void set_trajectory_face_dir_at_frame(const Scene &scene, const Target &target, size_t frame, const Vector2 &dir, bool vis_off)
Function that changes a single face direction at a single frame, and performs all the necessary updat...
Definition: pt_scene.cpp:373
Scene_recorder(const std::string &dir)
Definition: pt_scene.h:190
Scene value_type
Definition: pt_scene.h:218
void update_scene_state(const Scene &scene, const Facemark_data &fmdata, bool infer_head=true, bool refine=true)
Update the (mostly) 3D state of a scene. To be called after an association change.
Definition: pt_scene.cpp:40
void update_model_directions(const Target &target, size_t frame, const Perspective_camera &cam)
Helper function for the set_trajectory_* functions.
Definition: pt_scene.h:515
Scene(const Ascn &assoc, const Perspective_camera &cam, double k, double t, double l)
Definition: pt_scene.h:44
Trajectory & trajectory() const
Get this target's current 3D positions.
Definition: pt_target.h:85
double lambda
Definition: pt_scene.h:63
Class that represents a full scene in the PT universe.
Definition: pt_scene.h:40
Ascn association
Definition: pt_scene.h:59
for k
Definition: APPgetLargeConnectedEdges.m:61
void read_scene(Scene &s, const std::string &tracks_dp, const std::string &ass_fp, const std::string &cam_fp, const std::string ¶ms_fp, bool infer_head=true)
Read a scene.
Definition: pt_scene.cpp:144
void reset()
Reset current sample number.
Definition: pt_scene.h:259
void swap(Scene &s1, Scene &s2)
Swap two scenes.
Definition: pt_scene.h:69
int refine
Definition: triangle.c:716
double theta
Definition: pt_scene.h:62
Write_scene_iterator & operator++()
Increments scene index.
Definition: pt_scene.h:253
void update_face_model_directions(const Target &target, size_t frame, const Perspective_camera &cam)
Helper function for the set_trajectory_* functions.
Definition: pt_scene.cpp:504
Fake container type. Needed for recorder to find the type.
Definition: pt_scene.h:216
Record a series of scenes to a directory.
Definition: pt_scene.h:187
Write_scene_iterator & operator++(int)
Increments scene index.
Definition: pt_scene.h:246
size_t dims(const Scene &scene, bool respect_changed=true, bool infer_head=true)
Computes the number of variables in this scene.
Definition: pt_scene.cpp:106
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
void move_trajectory_at_frame(const Scene &scene, const Target &target, size_t frame, const Vector3 &dv, bool vis_off, bool infer_head=true)
Function that moves a single trajectory at a single frame, and performs all the necessary updates...
Definition: pt_scene.h:307
void reset() const
Reset current sample number.
Definition: pt_scene.h:200
void move_trajectory_face_dirs_at_frames(const Scene &scene, const Target &target1, const Target &target2, size_t frame1, size_t frame2, const Vector2 &dd1, const Vector2 &dd2, bool vis_off)
Function that moves a pair of directions at a pair of frames, and performs all the necessary updates...
Definition: pt_scene.h:476
Definition: perspective_camera.h:93
void operator=(const Scene &scene)
Upon assignment, write a scene.
Definition: pt_scene.h:229
void set_trajectory_at_frame(const Scene &scene, const Target &target, size_t frame, const Vector3 &v, bool vis_off, bool infer_head=true)
Function that changes a single trajectory at a single frame, and performs all the necessary updates...
Definition: pt_scene.cpp:210
Write_scene_iterator(const std::string &dir)
Construct an iterator.
Definition: pt_scene.h:222
Class that represents a target moving through space.
Definition: pt_target.h:50
void set_trajectory_face_dirs_at_frames(const Scene &scene, const Target &target1, const Target &target2, size_t frame1, size_t frame2, const Vector2 &dir1, const Vector2 &dir2, bool vis_off)
Function that changes a pair of face directions at a pair of frames, and performs all the necessary u...
Definition: pt_scene.cpp:434
void update_body_model_directions(const Target &target, size_t frame, const Perspective_camera &cam)
Helper function for the set_trajectory_* functions.
Definition: pt_scene.cpp:465
Perspective_camera camera
Definition: pt_scene.h:60
void set_trajectory_dirs_at_frames(const Scene &scene, const Target &target1, const Target &target2, size_t frame1, size_t frame2, double dir1, double dir2, bool vis_off)
Function that changes a pair of directions at a pair of frames, and performs all the necessary update...
Definition: pt_scene.cpp:342
void move_trajectory_face_dir_at_frame(const Scene &scene, const Target &target, size_t frame, const Vector2 &dd, bool vis_off)
Function that moves a single face direction at a single frame, and performs all the necessary updates...
Definition: pt_scene.h:458
void swap(kjb::Gsl_Multimin_fdf &m1, kjb::Gsl_Multimin_fdf &m2)
Swap two wrapped multimin objects.
Definition: gsl_multimin.h:693
Write_scene_iterator(const std::string &dir, size_t &sn)
Construct an iterator.
Definition: pt_scene.h:225
void operator()(const Scene &scene) const
Record a scene.
Definition: pt_scene.h:193
void set_trajectory_dir_at_frame(const Scene &scene, const Target &target, size_t frame, double dir, bool vis_off)
Function that changes a single direction at a single frame, and performs all the necessary updates...
Definition: pt_scene.cpp:295
void move_trajectories_at_frames(const Scene &scene, const Target &target1, const Target &target2, size_t frame1, size_t frame2, const Vector3 &dv1, const Vector3 &dv2, bool vis_off, bool infer_head=true)
Function that moves a pair of trajectories at a pair of frames, and performs all the necessary update...
Definition: pt_scene.h:326
void set_trajectories_at_frames(const Scene &scene, const Target &target1, const Target &target2, size_t frame1, size_t frame2, const Vector3 &v1, const Vector3 &v2, bool vis_off, bool infer_head=true)
Function that changes a pair of trajectories at a pair of frames, and performs all the necessary upda...
Definition: pt_scene.cpp:263
Write_scene_iterator & operator*()
Return itself on redirection. This complies with the output iterator concept, as *it = sc produces th...
Definition: pt_scene.h:240
void move_trajectory_dirs_at_frames(const Scene &scene, const Target &target1, const Target &target2, size_t frame1, size_t frame2, double dd1, double dd2, bool vis_off)
Function that moves a pair of directions at a pair of frames, and performs all the necessary updates...
Definition: pt_scene.h:402
Record a series of scenes to a directory.
Definition: pt_scene.h:211
void move_trajectory_dir_at_frame(const Scene &scene, const Target &target, size_t frame, double dd, bool vis_off)
Function that moves a single direction at a single frame, and performs all the necessary updates...
Definition: pt_scene.h:384
void write_scene(const Scene &s, const std::string &tracks_dp, const std::string &ass_fp, const std::string &cam_fp, const std::string ¶ms_fp)
Write a scene.
Definition: pt_scene.cpp:182
double kappa
Definition: pt_scene.h:61