-
-///////////////////////////////////////////////////////////////////////////
-// This program is free software: you can redistribute it and/or modify //
-// it under the terms of the version 3 of the GNU General Public License //
-// as published by the Free Software Foundation. //
-// //
-// This program is distributed in the hope that it will be useful, but //
-// WITHOUT ANY WARRANTY; without even the implied warranty of //
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //
-// General Public License for more details. //
-// //
-// You should have received a copy of the GNU General Public License //
-// along with this program. If not, see <http://www.gnu.org/licenses/>. //
-// //
-// Written by Francois Fleuret, (C) IDIAP //
-// Contact <francois.fleuret@idiap.ch> for comments & bug reports //
-///////////////////////////////////////////////////////////////////////////
+/*
+ * folded-ctf is an implementation of the folded hierarchy of
+ * classifiers for object detection, developed by Francois Fleuret
+ * and Donald Geman.
+ *
+ * Copyright (c) 2008 Idiap Research Institute, http://www.idiap.ch/
+ * Written by Francois Fleuret <francois.fleuret@idiap.ch>
+ *
+ * This file is part of folded-ctf.
+ *
+ * folded-ctf is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3 as
+ * published by the Free Software Foundation.
+ *
+ * folded-ctf is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with folded-ctf. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
#include <fstream>
bool open_current_cat = false;
bool head_defined = false;
bool bounding_box_defined = false;
- bool body_defined = false;
+ bool belly_defined = false;
int nb_ears = 0;
while(!list_stream.eof() && (global.nb_images < 0 || nb_scenes < global.nb_images)) {
open_current_cat = true;
head_defined = false;
bounding_box_defined = false;
- body_defined = false;
+ belly_defined = false;
nb_ears = 0;
}
parse_error("Undefined bounding box ", list_name, line_number);
}
- if(head_defined && body_defined) {
+ if(head_defined && belly_defined) {
if(current_image->get_target_pose(nb_cats)->_head_radius > global.min_head_radius &&
current_image->get_target_pose(nb_cats)->_head_radius < global.max_head_radius) {
nb_cats++;
cerr.flush();
}
} else {
- parse_warning("Cat ignored since either the body, head or belly are undefined",
+ parse_warning("Cat ignored since either the head and/or the belly are undefined",
list_name, line_number);
}
//////////////////////////////////////////////////////////////////////
- else if(strcmp(token, "BODYBOX") == 0) {
+ else if(strcmp(token, "BOUNDINGBOX") == 0) {
if(!open_current_cat) parse_error("Undefined cat ", list_name, line_number);
if(bounding_box_defined) parse_error("Two bounding box", list_name, line_number);
int xmin = -1, ymin = -1, xmax = -1, ymax = -1;
if(s) { s = next_word(token, s, buffer_size); xmin = atoi(token); }
- else parse_error("BODYBOX parameter xmin missing ", list_name, line_number);
+ else parse_error("BOUNDINGBOX parameter xmin missing ", list_name, line_number);
if(s) { s = next_word(token, s, buffer_size); ymin = atoi(token); }
- else parse_error("BODYBOX parameter ymin missing ", list_name, line_number);
+ else parse_error("BOUNDINGBOX parameter ymin missing ", list_name, line_number);
if(s) { s = next_word(token, s, buffer_size); xmax = atoi(token); }
- else parse_error("BODYBOX parameter xmax missing ", list_name, line_number);
+ else parse_error("BOUNDINGBOX parameter xmax missing ", list_name, line_number);
if(s) { s = next_word(token, s, buffer_size); ymax = atoi(token); }
- else parse_error("BODYBOX parameter ymax missing ", list_name, line_number);
+ else parse_error("BOUNDINGBOX parameter ymax missing ", list_name, line_number);
current_image->get_target_pose(nb_cats)->_bounding_box_xmin = xmin;
current_image->get_target_pose(nb_cats)->_bounding_box_ymin = ymin;
current_image->get_target_pose(nb_cats)->_bounding_box_xmax = xmax;
if(s) { s = next_word(token, s, buffer_size); y1 = atoi(token); }
else parse_error("BELLYLOCATION parameter y1 missing ", list_name, line_number);
- if(body_defined) {
- parse_error("More than one body location. ", list_name, line_number);
+ if(belly_defined) {
+ parse_error("More than one belly location. ", list_name, line_number);
} else {
Pose *pose = current_image->get_target_pose(nb_cats);
- pose->_body_xc = x1;
- pose->_body_yc = y1;
+ pose->_belly_xc = x1;
+ pose->_belly_yc = y1;
- body_defined = true;
+ belly_defined = true;
}
}
}