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, 2020 in Python by akhtar
• 38,220 points
254 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, 2020 by MD
• 95,320 points

Related Questions In Python

0 votes
1 answer

How to fetch HTML code using urllib module in Python?

Hi@akhtar, You can use urllib module to fetch ...READ MORE

answered Jun 26, 2020 in Python by MD
• 95,320 points
299 views
0 votes
1 answer

How to remove a file using the OS module in Python?

Hi@akhtar, In Python, you can use the os. remove() method to remove ...READ MORE

answered Oct 18, 2020 in Python by MD
• 95,320 points
221 views
+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 4, 2018 in Python by charlie_brown
• 7,780 points
9,841 views
+1 vote
7 answers
0 votes
2 answers
+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 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 2,486 views
0 votes
1 answer
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, 2020 in Python by MD
• 95,320 points
218 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, 2020 in Python by MD
• 95,320 points
165 views
0 votes
1 answer