Capture Image using Webcam Python Program
In this, we are gonna build a python code to capture an image using webcam.
# install package pip install opencv-python
Program -
import cv2
imgCapture = cv2.VideoCapture(0)
result = True
while(result):
ret, frame = imgCapture.read()
cv2.imwrite("test.jpg", frame)
result = False
print("Image Captured.. ")
imgCapture.release()
0 Comments