#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Mar 14 13:42:57 2020

@author: jessefilho
"""
# conda install opencv
import cv2

#%%
cap = cv2.VideoCapture(0)

while(True):
    ret, frame = cap.read()
    rgb = cv2.cvtColor(frame, cv2.COLOR_BGR2BGRA)

    cv2.imshow('frame', rgb)
    if cv2.waitKey(1) & 0xFF == ord('q'):
        out = cv2.imwrite('capture.jpg', frame)
        break

#%%
cap.release()

#%%
cv2.destroyAllWindows()





33b1fbcd587e4fd6da1c9905b4b5ab491e69a360
<mask token>

<mask token>
while True:
    ret, frame = cap.read()
    rgb = cv2.cvtColor(frame, cv2.COLOR_BGR2BGRA)
    cv2.imshow('frame', rgb)
    if cv2.waitKey(1) & 255 == ord('q'):
        out = cv2.imwrite('capture.jpg', frame)
        break
cap.release()
cv2.destroyAllWindows()

<mask token>
cap = cv2.VideoCapture(0)
while True:
    ret, frame = cap.read()
    rgb = cv2.cvtColor(frame, cv2.COLOR_BGR2BGRA)
    cv2.imshow('frame', rgb)
    if cv2.waitKey(1) & 255 == ord('q'):
        out = cv2.imwrite('capture.jpg', frame)
        break
cap.release()
cv2.destroyAllWindows()

<mask token>
import cv2
cap = cv2.VideoCapture(0)
while True:
    ret, frame = cap.read()
    rgb = cv2.cvtColor(frame, cv2.COLOR_BGR2BGRA)
    cv2.imshow('frame', rgb)
    if cv2.waitKey(1) & 255 == ord('q'):
        out = cv2.imwrite('capture.jpg', frame)
        break
cap.release()
cv2.destroyAllWindows()

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Mar 14 13:42:57 2020

@author: jessefilho
"""
# conda install opencv
import cv2

#%%
cap = cv2.VideoCapture(0)

while(True):
    ret, frame = cap.read()
    rgb = cv2.cvtColor(frame, cv2.COLOR_BGR2BGRA)

    cv2.imshow('frame', rgb)
    if cv2.waitKey(1) & 0xFF == ord('q'):
        out = cv2.imwrite('capture.jpg', frame)
        break

#%%
cap.release()

#%%
cv2.destroyAllWindows()




