Skip to content

Commit

Permalink
Replaced the raw_input() calls with a call into dlib since raw_input(…
Browse files Browse the repository at this point in the history
…) isn't

available in python3.
  • Loading branch information
davisking committed Mar 22, 2015
1 parent e2680f0 commit e00f6f6
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion python_examples/face_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@
win.clear_overlay()
win.set_image(img)
win.add_overlay(dets)
raw_input("Hit enter to continue")
dlib.hit_enter_to_continue()
2 changes: 1 addition & 1 deletion python_examples/face_landmark_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@
win.add_overlay(shape)

win.add_overlay(dets)
raw_input("Hit enter to continue")
dlib.hit_enter_to_continue()
4 changes: 2 additions & 2 deletions python_examples/train_object_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
win.clear_overlay()
win.set_image(img)
win.add_overlay(dets)
raw_input("Hit enter to continue")
dlib.hit_enter_to_continue()



Expand Down Expand Up @@ -150,7 +150,7 @@

# 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
Expand Down
2 changes: 1 addition & 1 deletion python_examples/train_shape_predictor.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,5 +123,5 @@
win.add_overlay(shape)

win.add_overlay(dets)
raw_input("Hit enter to continue")
dlib.hit_enter_to_continue()

11 changes: 11 additions & 0 deletions tools/python/src/other.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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.");
}

0 comments on commit e00f6f6

Please sign in to comment.