Improved error messages from object detector.

This commit is contained in:
Davis King 2011-12-15 20:30:32 -05:00
parent dcb8b6ff2a
commit 331b2d753f

View File

@ -184,6 +184,9 @@ namespace dlib
sout << "The offending rectangles are:\n"; sout << "The offending rectangles are:\n";
sout << "rect1: "<< mapped_rects[i] << endl; sout << "rect1: "<< mapped_rects[i] << endl;
sout << "rect2: "<< mapped_rects[j] << endl; sout << "rect2: "<< mapped_rects[j] << endl;
sout << "overlap amount: " <<
mapped_rects[i].intersect(mapped_rects[j]).area()/(double)( mapped_rects[i]+mapped_rects[j]).area()
<< endl;
throw dlib::impossible_labeling_error(sout.str()); throw dlib::impossible_labeling_error(sout.str());
} }
} }