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->_belly_xc = x1;
pose->_belly_yc = y1;
- body_defined = true;
+ belly_defined = true;
}
}
}