This snippet of code will allow you to capture images from your webcam and save in your local system.
$ pip install opencv-python
- Fork this repo and navigate to Capture Image and Save in Local folder
- Run capture_img.py using
$ python capture_img.py
- A webcam window is displayed. Adjust the desired object in position and press the Spacebar key to capture.
- Check the command prompt for a success or failure message.
- If successful, you will see an image with name opencv_frame_0.png in the same directory as the python script.
- Press the Escape key to close the webcam window.