X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;f=list_to_pool.cc;h=6cb9a1d0fe12bdff6d42521550a8439b28887b8e;hb=cd28e9c7489bae20e3abf67331efd1cab45d83df;hp=c1496e59912b877126c5b0c6884353d15e91a3d9;hpb=f7e3efe41ffb65d89e8f2ce814c23ff90ad24f34;p=folded-ctf.git
diff --git a/list_to_pool.cc b/list_to_pool.cc
index c1496e5..6cb9a1d 100644
--- a/list_to_pool.cc
+++ b/list_to_pool.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 //
///////////////////////////////////////////////////////////////////////////
@@ -61,7 +63,7 @@ void list_to_pool(char *main_path, char *list_name, char *pool_name) {
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)) {
@@ -148,7 +150,7 @@ void list_to_pool(char *main_path, char *list_name, char *pool_name) {
open_current_cat = true;
head_defined = false;
bounding_box_defined = false;
- body_defined = false;
+ belly_defined = false;
nb_ears = 0;
}
@@ -160,7 +162,7 @@ void list_to_pool(char *main_path, char *list_name, char *pool_name) {
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++;
@@ -174,7 +176,7 @@ void list_to_pool(char *main_path, char *list_name, char *pool_name) {
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);
}
@@ -183,18 +185,18 @@ void list_to_pool(char *main_path, char *list_name, char *pool_name) {
//////////////////////////////////////////////////////////////////////
- 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;
@@ -231,8 +233,8 @@ void list_to_pool(char *main_path, char *list_name, char *pool_name) {
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);
@@ -240,7 +242,7 @@ void list_to_pool(char *main_path, char *list_name, char *pool_name) {
pose->_belly_xc = x1;
pose->_belly_yc = y1;
- body_defined = true;
+ belly_defined = true;
}
}
}