X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=pose.cc;h=b2b189199cc10681679bdb64b16ac6f1a0a022f6;hb=aed34255065b18c445d096f51bd2091833810a81;hp=f0aa9d303e0eff8e774f680204cca28b725e4cac;hpb=f7e3efe41ffb65d89e8f2ce814c23ff90ad24f34;p=folded-ctf.git diff --git a/pose.cc b/pose.cc index f0aa9d3..b2b1891 100644 --- a/pose.cc +++ b/pose.cc @@ -12,7 +12,9 @@ // You should have received a copy of the GNU General Public License // // along with this program. If not, see . // // // -// Written by Francois Fleuret, (C) IDIAP // +// Written by Francois Fleuret // +// (C) Idiap Research Institute // +// // // Contact for comments & bug reports // /////////////////////////////////////////////////////////////////////////// @@ -29,29 +31,6 @@ void Pose::horizontal_flip(scalar_t scene_width) { _belly_xc = scene_width - 1 - _belly_xc; } -void Pose::translate(scalar_t dx, scalar_t dy) { - _bounding_box_xmin += dx; - _bounding_box_ymin += dy; - _bounding_box_xmax += dx; - _bounding_box_ymax += dy; - _head_xc += dx; - _head_yc += dy; - _belly_xc += dx; - _belly_yc += dy; -} - -void Pose::scale(scalar_t factor) { - _bounding_box_xmin *= factor; - _bounding_box_ymin *= factor; - _bounding_box_xmax *= factor; - _bounding_box_ymax *= factor; - _head_xc *= factor; - _head_yc *= factor; - _head_radius *= factor; - _belly_xc *= factor; - _belly_yc *= factor; -} - const scalar_t tolerance_scale_ratio_for_hit = 1.5; const scalar_t tolerance_distance_factor_for_hit = 1.0; @@ -117,6 +96,7 @@ bool Pose::collide(int level, Pose *pose) { } void Pose::draw(int thickness, int r, int g, int b, int level, RGBImage *image) { + // Draw the head circle image->draw_ellipse(thickness, r, g, b, @@ -140,6 +120,7 @@ void Pose::draw(int thickness, int r, int g, int b, int level, RGBImage *image) } // An ugly way to make a filled disc + for(scalar_t u = 0; u < belly_radius; u += thickness / 2) { image->draw_ellipse(thickness, r, g, b, _belly_xc, _belly_yc, u, u, 0); }