~estraw/visual-odometry

811ef389135491e9be7387b20737d41f69ea1b10 — Evan Straw 3 months ago 9a72efb
Add pause feature to demo program
1 files changed, 13 insertions(+), 0 deletions(-)

M src/visual_odometry_demo.py
M src/visual_odometry_demo.py => src/visual_odometry_demo.py +13 -0
@@ 148,6 148,19 @@ while not done:
    k = cv2.waitKey(10)
    if k == ord('q'):
        done = True
    elif k == ord(' '):
        pause = True
        p_frame = cv2.putText(out_frame, "PAUSED",
                              (4, 44), cv2.FONT_HERSHEY_SIMPLEX, 2,
                              (100, 100, 255), 2)
        while pause:
            cv2.imshow(WIN_NAME, p_frame)
            k = cv2.waitKey(100)
            if k == ord(' '):
                pause = False
            elif k == ord('q'):
                pause = False
                done = True

# Clean up; release cameras and close the window.
del cap