From 7fbd9ca8fb7358fec1e53a74b96580bc09e768a6 Mon Sep 17 00:00:00 2001 From: esimov Date: Fri, 23 Aug 2019 13:51:03 +0300 Subject: [PATCH] Cycle trough masks back and forth --- examples/puploc_masquerade/puploc.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/puploc_masquerade/puploc.py b/examples/puploc_masquerade/puploc.py index 8a967ec..a284bb2 100644 --- a/examples/puploc_masquerade/puploc.py +++ b/examples/puploc_masquerade/puploc.py @@ -145,6 +145,10 @@ while(True): img_idx += 1 if img_idx > len(source_imgs)-1: img_idx = 0 + elif key & 0xFF == ord('r'): + img_idx -= 1 + if img_idx < 0: + img_idx = len(source_imgs)-1 cap.release() cv2.destroyAllWindows() \ No newline at end of file