Skip to content

Latest commit

 

History

History
 
 

Capture Image and Save in Local

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Capture and save an image in local using webcam

Description

This snippet of code will allow you to capture images from your webcam and save in your local system.

Requirements

$ pip install opencv-python

Steps To Execution

  • 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.

Code Output

How the webcam window will look How the directory structure looks