Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c213c01

Browse files
Capture Images from WebCam using Python
1 parent 35ea451 commit c213c01

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

‎WebCam[ImgCap]/webcam-img-cap.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import cv2
2+
import time
3+
4+
imgcapture = cv2.VideoCapture(0)
5+
result = True
6+
7+
while(result):
8+
ret, frame = imgcapture.read()
9+
name = int(round(time.time() * 1000))
10+
name = 'E:/Python-Programs/PythonProjects/WebCam/Images-Captured/{}.jpg'.format(name)
11+
cv2.imwrite(name, frame)
12+
result = False
13+
print("Image Captured.. ")
14+
15+
16+
imgcapture.release()

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /