Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created October 23, 2020 08:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amankharwal/b9b08335e0f68cf7460a39c27ccd8aae to your computer and use it in GitHub Desktop.
Save amankharwal/b9b08335e0f68cf7460a39c27ccd8aae to your computer and use it in GitHub Desktop.
def main():
camera = cv2.VideoCapture(0)
ret, frame = camera.read()
while ret:
ret, frame = camera.read()
frame = read_barcode(frame)
cv2.imshow('Barcode/QR code reader', frame)
if cv2.waitKey(1) & 0xFF == 27:
break
camera.release()
cv2.destroyAllWindows()
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment