webcam

Microsoft Media Foundation Webcam Interface

纵然是瞬间 提交于 2020-12-31 13:58:19
问题 I've been working on a c++ interface to capture images from all types of webcams via the Micrsoft Media Foundation. I've already got a bit of code that can connect with several types of webcams and is able to capture images in different resolutions and formats. I know that under WinXP it is possible to change different parameters of the webcam (like white balance, exposure time e.g.) by using the Direct Show library. Unfortunately the interface in the Direct Show library that made it possible

WebRTC stop local tracks not disabling webcam after using replaceTrack

梦想与她 提交于 2020-12-16 04:37:27
问题 I try to stop the browser webcam permissions indicator by using track.stop() like this: myLocalStream.getTracks().forEach(track => { track.stop(); }); In most cases this works fine. But if during the session I have switched between different cameras by using replaceTrack() it will not work. The browser still shows a running webcam. The code for switching between tracks looks like this: pc.getSenders().map(sender => { sender.replaceTrack(myLocalStream.getTracks().find(t => t.kind == sender

Webcam + Open CV Python | Black screen

懵懂的女人 提交于 2020-12-13 07:23:06
问题 I am using the code below, but I get a black image. Could you please help me rectify the error? import cv2 import numpy as np c = cv2.VideoCapture(0) while(1): _,f = c.read() cv2.imshow('e2',f) if cv2.waitKey(5)==27: break cv2.destroyAllWindows() 回答1: Update : See github.com/opencv/opencv/pull/11880 and linked conversations, only few backends support -1 as index. Although this is an old post, this answer can help people who are still facing the same problem. If you have a single webcam but it

How do I get usb webcam property IDs for OpenCV

好久不见. 提交于 2020-08-10 22:51:54
问题 I want to lock the focus on my USB webcam I'm using with OpenCV but how do I find the Property ID numbers for that webcam so I can set them. I used vid = cv2.VideoCapture(2) for i in range(64): print(f'ID {i} = {vid.get(i)}') to get all the values but I don't know which bool value is which. Driver: Realtek Semiconductor Corp. FULL HD 1080P Webcam Cam: Nextech Autofocus 1080P HD Webcam ID 0 = 0.0 ID 1 = -1.0 ID 2 = -1.0 ID 3 = 640.0 ID 4 = 480.0 ID 5 = 30.0 ID 6 = 1196444237.0 ID 7 = -1.0 ID 8

How do I get usb webcam property IDs for OpenCV

被刻印的时光 ゝ 提交于 2020-08-10 22:51:40
问题 I want to lock the focus on my USB webcam I'm using with OpenCV but how do I find the Property ID numbers for that webcam so I can set them. I used vid = cv2.VideoCapture(2) for i in range(64): print(f'ID {i} = {vid.get(i)}') to get all the values but I don't know which bool value is which. Driver: Realtek Semiconductor Corp. FULL HD 1080P Webcam Cam: Nextech Autofocus 1080P HD Webcam ID 0 = 0.0 ID 1 = -1.0 ID 2 = -1.0 ID 3 = 640.0 ID 4 = 480.0 ID 5 = 30.0 ID 6 = 1196444237.0 ID 7 = -1.0 ID 8