video streaming using cv2 module in python.

0 votes

Hi everyone,

I want to create one Machine Learning model, which detects my photo real time. Is there any python code available for video streaming.

Apr 15 in Python by akhtar
• 10,580 points
64 views

1 answer to this question.

0 votes

Hi@akhtar,

Yes, you can use cv2 module for video streaming. Use the bellow given code for video streaming.

import cv2
cap = cv2.VideoCapture(0)
while True:
    status , photo = cap.read()
    cv2.imshow('My Window' , photo)
    if cv2.waitKey(10) == 13:
        break
cv2.destroyAllWindows()
cap.release()

Hope this will help you.

answered Apr 15 by MD
• 23,050 points

Related Questions In Python

+2 votes
3 answers

How can I play an audio file in the background using Python?

down voteacceptedFor windows: you could use  winsound.SND_ASYNC to play them ...READ MORE

answered Apr 3, 2018 in Python by charlie_brown
• 7,760 points
4,610 views
+1 vote
3 answers
+1 vote
1 answer

How to create plots using python matplotlib in IPython notebook?

I think you should try: I used %matplotlib inline in ...READ MORE

answered Aug 8, 2018 in Python by Priyaj
• 57,530 points
247 views
0 votes
1 answer

Using quotes in python

Both the conventions for enclosing strings are ...READ MORE

answered May 9, 2018 in Python by Nietzsche's daemon
• 4,260 points
37 views
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 947 views
0 votes
0 answers
0 votes
1 answer

How to crop face from a photo using cv2 in python?

Hi@akhtar, You can do this task using cv2 ...READ MORE

answered Apr 9 in Python by MD
• 23,050 points
42 views
0 votes
1 answer

How to read photo using cv2 module in python?

Hi@akhtar, Yes, you can read your image in ...READ MORE

answered Apr 9 in Python by MD
• 23,050 points
29 views