Ticker

6/recent/ticker-posts

Capture Image using Webcam Program

 


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()



Post a Comment

0 Comments