Giving more keypress feedback on the console.

pull/4/head
Alessandro Cauduro 4 years ago
parent f718dd5a93
commit 0a7eb27c3a

@ -113,7 +113,7 @@ $ v4l2-ctl --list-formats -d /dev/video1
## Mac Support
Unfortunately, Apple and NVidia have stopped collaborating and CUDA support is no longer available for the Mac. If we get it running on the Mac (which is possible), it will be very slow as everything will be running on the CPU whihc is not ideal.
Unfortunately, Apple and NVidia have stopped collaborating and CUDA support is no longer available for the Mac. If we get it running on the Mac (which is possible), it will be very slow as everything will be running on the CPU.
## Images

@ -120,7 +120,7 @@ def main():
cv2.resizeWindow('Stream', webcam_width,webcam_width)
print("Press C to center Webcam, Press N for next image in media directory, R to alter between relative and absolute transformation")
print("Press C to center Webcam, Press N for next image in media directory, T to alter between relative and absolute transformation, Q to quit")
x1,y1,x2,y2 = [0,0,0,0]
relative = True
while True:
@ -164,18 +164,23 @@ def main():
k = cv2.waitKey(1)
# Hit 'q' on the keyboard to quit!
if k & 0xFF == ord('q'):
print("Quiting")
video_capture.release()
break
elif k==ord('c'):
print("Centering the image")
# center
reset = True
elif k==ord('n'):
# rotate images
print("Loading new image")
source_image = readnextimage()
reset = True
elif k==ord('t'):
# rotate images
# rotate
relative = not relative
print("Changing transform mode")
cv2.destroyAllWindows()
exit()

Loading…
Cancel
Save