Replaced the raw_input() calls with a call into dlib since raw_input() isn't

available in python3.
This commit is contained in:
Davis King 2015-03-22 18:45:08 -04:00
parent e2680f087b
commit e00f6f63ca
5 changed files with 16 additions and 5 deletions

View File

@ -58,4 +58,4 @@ for f in sys.argv[1:]:
win.clear_overlay()
win.set_image(img)
win.add_overlay(dets)
raw_input("Hit enter to continue")
dlib.hit_enter_to_continue()

View File

@ -81,4 +81,4 @@ for f in glob.glob(os.path.join(faces_folder_path, "*.jpg")):
win.add_overlay(shape)
win.add_overlay(dets)
raw_input("Hit enter to continue")
dlib.hit_enter_to_continue()

View File

@ -117,7 +117,7 @@ for f in glob.glob(os.path.join(faces_folder, "*.jpg")):
win.clear_overlay()
win.set_image(img)
win.add_overlay(dets)
raw_input("Hit enter to continue")
dlib.hit_enter_to_continue()
@ -150,7 +150,7 @@ detector2 = dlib.train_simple_object_detector(images, boxes, options)
# Now let's look at its HOG filter!
win_det.set_image(detector2)
raw_input("Hit enter to continue")
dlib.hit_enter_to_continue()
# Note that you don't have to use the XML based input to
# test_simple_object_detector(). If you have already loaded your training

View File

@ -123,5 +123,5 @@ for f in glob.glob(os.path.join(faces_folder, "*.jpg")):
win.add_overlay(shape)
win.add_overlay(dets)
raw_input("Hit enter to continue")
dlib.hit_enter_to_continue()

View File

@ -74,6 +74,14 @@ double _assignment_cost (
// ----------------------------------------------------------------------------------------
void hit_enter_to_continue()
{
std::cout << "Hit enter to continue";
std::cin.get();
}
// ----------------------------------------------------------------------------------------
void bind_other()
{
using boost::python::arg;
@ -140,5 +148,8 @@ present in the output. "
ensures \n\
- saves the data to the given file in libsvm format "
);
def("hit_enter_to_continue", hit_enter_to_continue,
"Asks the user to hit enter to continue and pauses until they do so.");
}