X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=folded-ctf.git;a=blobdiff_plain;f=list_to_pool.cc;h=9297cd7832f71b89f8a4d92957e3d029c8899789;hp=c1496e59912b877126c5b0c6884353d15e91a3d9;hb=8236ef5635eda3f1532acc126ce0569d6bb8869e;hpb=28fa0ccaecec204d1781135c75c2b2ab13153312 diff --git a/list_to_pool.cc b/list_to_pool.cc index c1496e5..9297cd7 100644 --- a/list_to_pool.cc +++ b/list_to_pool.cc @@ -61,7 +61,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 +148,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 +160,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 +174,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 +183,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 +231,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 +240,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; } } }