2

I have a setup of web application and Hardware(which has camera integrated), My job is to

1.Check cam in hardware is capturing video(when a video call is initiated from the web application to Hardware). 2.Check cam in my laptop is capturing video(when a video call is initiated from hardware to web application).

I don't want to capture video from Cam, All I need to check the status of Camera(whether it is capturing video or not).Is there any way to check this scenario using python?

Thanks in advance.

1

2 Answers 2

2

Pretty sure you're looking for:yourCamVar.isOpened(). This checks if it's capturing video.

Lots of information on that here.

Sign up to request clarification or add additional context in comments.

Comments

2
import numpy as np
import cv2

cap = cv2.VideoCapture(0)

while(True):
    # Capture frame-by-frame
    ret, frame = cap.read()

    if cap.isOpened():
        print("Webcam online.")

# When everything done, release the capture
cap.release()
cv2.destroyAllWindows()

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.