X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;f=labelled_image.cc;h=e855f71368ee3439fae008c4440623b9fc1136c2;hb=cd28e9c7489bae20e3abf67331efd1cab45d83df;hp=d02313d0c31d7a607abc06fe19e6c3b38c92538f;hpb=d922ad61d35e9a6996730bec24b16f8bf7bc426c;p=folded-ctf.git
diff --git a/labelled_image.cc b/labelled_image.cc
index d02313d..e855f71 100644
--- a/labelled_image.cc
+++ b/labelled_image.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 //
///////////////////////////////////////////////////////////////////////////
@@ -47,33 +49,6 @@ int LabelledImage::pose_cell_label(PoseCell *cell) {
return 0;
}
-void LabelledImage::crop(int xmin, int ymin, int width, int height) {
- RichImage::crop(xmin, ymin, width, height);
- for(int t = 0; t < _nb_targets; t++) {
- _target_poses[t].translate(- xmin, - ymin);
- }
-}
-
-void LabelledImage::reduce() {
- int xmin = _width, xmax = 0, ymin = _height, ymax = 0;
- if(_nb_targets > 0) {
- for(int t = 0; t < _nb_targets; t++) {
- xmin = min(xmin, int(_target_poses[t]._bounding_box_xmin));
- ymin = min(ymin, int(_target_poses[t]._bounding_box_ymin));
- xmax = max(xmax, int(_target_poses[t]._bounding_box_xmax));
- ymax = max(ymax, int(_target_poses[t]._bounding_box_ymax));
- }
- } else {
- xmin = 0; ymin = 0;
- xmax = 640; ymax = 480;
- }
- xmin = max(0, xmin);
- ymin = max(0, ymin);
- xmax = min(_width, xmax);
- ymax = min(_height, ymax);
- crop(xmin, ymin, xmax - xmin, ymax - ymin);
-}
-
void LabelledImage::write(ostream *out) {
int v = file_format_version;
write_var(out, &v);