当前位置:网站首页>How to use an oak camera as a webcam?
How to use an oak camera as a webcam?
2022-06-29 18:28:00 【Oak China_ official】
edit :OAK China
First episode :oakchina.cn
Like it , Please do more ️
▌ Preface
Hello, Hello everyone , Here is OAK China , I'm your assistant .
This month, several friends want to OAK When UVC For camera , Let's talk about how to use it in this issue !
OAK The camera can also be used as a webcam . To enable this feature , You can run DepthAI demonstration uvc Application or use UVC Function branch . Make sure to use USB3 Line , Otherwise, in some cases ,USB2 Don't work .
▌ Use DepthAI Demo script
First , install DepthAI.
If you use QT GUI, Please select here UVC Applications .

perhaps , Run directly from the terminal :
python3 depthai_demo.py --app uvc▌ Use UVC Characteristic branch
【 course 】 How to integrate OAK-D-Lite Use as a webcam ?
Video link :B standing -OAK China
# Skip cloning if you already have depthai-python repo
git clone https://github.com/luxonis/depthai-python.git
cd depthai-python
# Navigate to the custom branch
git checkout gen2_uvc
python3 examples/install_requirements.py
python3 examples/rgb_uvc.pyNow? , You can open your favorite conferencing application , Such as Zoom or Slack, Then select... From the webcam selection menu Luxonis Device: UVC Video Contr.
▌ A workaround
at present , There are some problems with the above method . Even in Linux On ,UVC Nodes are not currently applicable to all applications . because UVC representative USB Video Class, Use UVC Pipe open OAK PoE series Our equipment is not good . Another known problem is in Windows operating system Upper use UVC The pipe does not work , because UVC The descriptor . Here's the solution :
1.Python Virtual camera
One option is to use a virtual camera , Such as pyvirtualcam modular . You need pip Install the package and install its dependencies ( As described in the link ). Here is a demo code :
import pyvirtualcam
import depthai as dai
# Create pipeline
pipeline = dai.Pipeline()
cam = pipeline.create(dai.node.ColorCamera)
cam.setColorOrder(dai.ColorCameraProperties.ColorOrder.RGB)
cam.setPreviewSize(1280,720)
xout = pipeline.create(dai.node.XLinkOut)
xout.setStreamName("rgb")
cam.preview.link(xout.input)
# Connect to device and start pipeline
with dai.Device(pipeline) as device, pyvirtualcam.Camera(width=1280, height=720, fps=20) as uvc:
qRgb = device.getOutputQueue(name="rgb", maxSize=4, blocking=False)
print("UVC running")
while True:
frame = qRgb.get().getFrame()
uvc.send(frame)2.OBS forward UVC Data flow
We noticed that , In some applications , such as Discord or Google Meet,Luxonis Device: UVC It won't work . One solution is to use OBS Proxy the flow and use OBS Internal virtual camera . What I'm running is Linux, To make the virtual camera work , I have to install sudo apt install v4l2loopback-dkms( It's also in Installation instructions I mentioned ).
( Two ) How to integrate OAK The camera is used as a webcam ?OBS forward UVC Data flow
Video link :B standing -OAK China
This video will show you how to do this .
3.OBS Capture cv2 window
Another solution is to transmit the video stream data to the host , And capture cv2.imshowOBS Windows in :
- stay depthai-python repo Inside , function
python3 examples/ColorCamera/rgb_video.py. This will open a display 1080P New window for video streaming . - stay OBS in , Under the source menu , single click
+, Add new source . - Click on Window Capture (Xcomposite) Options , And then choose
video. - then , You can click Start Video Camera stay OBS Inside , Use from OAK PoE equipment As a webcam source .
( 3、 ... and ) How to integrate OAK PoE The camera is used as a webcam ?
Video link :B standing -OAK China
▌ Reference material
https://docs.oakchina.cn/en/latest/
https://www.oakchina.cn/selection-guide/
OAK China
| OpenCV AI Kit Official agents and technical service providers in China
| track AI New developments in technology and products
stamp 「+ Focus on 」 Get the latest information
边栏推荐
- 山东大学项目实训(七)添加导航栏选择城市
- Anaconda安装并配置jupyter notebook远程
- 第八届“互联网+”大赛 | 云原生赛道邀你来挑战
- shell教程之循环语句for,while,until用法
- [wangdingbei 2020 Qinglong formation]areuserialz
- Error [warning] neural network information was performed on socket 'RGB', depth frame is aligned to socket
- Adobe Premiere基础-常用的视频特效(裁剪,黑白,剪辑速度,镜像,镜头光晕)(十五)
- JDBC knowledge
- SD6.25集训总结
- Adobe Premiere foundation - cool text flash (14)
猜你喜欢
Detailed analysis on the use of MySQL stored procedure loop

Wechat applet development reserve knowledge

山东大学项目实训(八)设计轮播图进入页面

【网络是怎么连接的】第三章 探索集线器,交换机和路由器

Adobe Premiere基础-时间重映射(十)

jdbc认识上手
![[how the network is connected] Chapter 3 explores hubs, switches and routers](/img/a9/39f7c474331b7de0bdaf6e59f0d15b.png)
[how the network is connected] Chapter 3 explores hubs, switches and routers

codeforces每日5题(均1700)-第二天

Adobe Premiere foundation - material nesting (animation of Tiktok ending avatar) (IX)

Error building SqlSession问题
随机推荐
Adobe Premiere Basics - general operations for editing material files (offline files, replacing materials, material labels and grouping, material enabling, convenient adjustment of opacity, project pa
JWT login authentication
优雅书写Controller(参数验证+统一异常处理)
Adobe Premiere foundation - material nesting (animation of Tiktok ending avatar) (IX)
Travel card "star picking" hot search first! Stimulate the search volume of tourism products to rise
BeanUtils属性复制的用法
How to use idea?
Abc253 D fizzbuzz sum hard (tolerance exclusion theorem)
MySql存储过程循环的使用分析详解
Markdown common fonts
踩坑记:JSON.parse和JSON.stringify
Shell基本语法--流程控制
Servlet student management system (Mengxin hands-on version)
Adobe Premiere基础-常用的视频特效(裁剪,黑白,剪辑速度,镜像,镜头光晕)(十五)
Yolov6+tensorrt+onnx: deployment based on win10+tensorrt8+yolov6+onnx
Adobe Premiere foundation - cool text flash (14)
SD6.22集训总结
美法官裁定,被控掩盖黑客行为的Uber前安全主管必须面对欺诈指控
Request header field xxxx is not allowed by Access-Control-Allow-Headers in preflight response问题
VMware installation esxi