SHARE
TWEET

Untitled

a guest Mar 22nd, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. import cv2
  3. import dlib
  4. import serial
  5.  
  6. cap = cv2.VideoCapture(0)
  7. ser = serial.Serial('COM9', 9600, timeout=1)
  8. ser.flushInput()
  9. Number = ser.readline().decode('utf-8')
  10. while(cap.isOpened()):
  11.     ret, frame = cap.read()
  12.     cv2.putText(frame, ser.readline().decode('utf-8'), (20, 30),
  13.                 cv2.FONT_HERSHEY_SIMPLEX, 1, (0, 0, 255), 2)
  14.     if ret is True:
  15.         cv2.imshow('F', frame)
  16.         if cv2.waitKey(1) & 0xFF == ord('q'):
  17.             break
  18.  
  19. video = cv2.VideoCapture(0)
  20. shape = dlib.shape_predictor('D:\Projects\ONTI_hack_neuro\shape_predictor_68_face_landmarks.dat')
  21.  
  22. cap.release()
  23. cv2.destroyAllWindows()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top