Skip to content

Commit e139df1

Browse files
version 0.0
1 parent 6b74925 commit e139df1

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

main.py

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Please Subscribe our YouTube channel @problemsolvewithridoy
2+
import cv2
3+
import winsound
4+
5+
cap = cv2.VideoCapture(0)
6+
cap.set(3, 1280)
7+
cap.set(4, 720)
8+
9+
counter = 0
10+
11+
while True:
12+
_, img = cap.read()
13+
cv2.imshow("My own Camera",img)
14+
if cv2.waitKey(1) == ord("c"):
15+
counter += 1
16+
cv2.imwrite(f"myimage{counter}.jpg",img)
17+
winsound.Beep(500, 100)
18+
if cv2.waitKey(1) == ord("q"):
19+
break
20+
21+
22+

0 commit comments

Comments
 (0)