我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

Macbook网络摄像头的正确路径是什么

I am trying to get a stream from MacBook High Sierra webcam, mac does not have /dev/video0
is there any way to access MacOS webcam ?
I am programming in golang and I am using golang.org/x/sys/unix

You can use OpenCV bindings and get frame from camera.

Have a look at godoc for go-opencv

A short example:

index := 0 // example
camera := opencv.NewCameraCapture(index)

if camera.GrabFrame() {
    frame := camera.RetrieveFrame(1)
    img := frame.ToImage()
}

近期文章

  • 如何使函数的参数成为“通用”结构
  • bytes.Buffer ReadFrom与r.Read不同吗?
  • 使用正则表达式同时读取两个文件
  • emersion / go-imap-如何检索和列出未见消息
  • 在%PATH%中找不到GCC
  • 暂停for循环的执行
  • IntelliJ Golang插件无法导入默认软件包
  • Go构建/运行执行期间发生错误
  • 解压缩具有不同名称的工件
  • 如何使用标准Go测试包实施BDD实践?
  • 如何处理将另一种类型封装为参数的结构片
  • GOLANG是否从内存加载JWK(JSON Web密钥),而不是从URL加载? 取
  • 带有for循环的golang通道行为
  • 从html.Node检索原始数据
  • 对预检请求的响应未通过访问控制检查:“ Access-
  • 如何使用“放入”到RunInTransaction中来获取密钥,而无需等到交易之后
  • 必要时中断Anaconda的Twitter流
  • 转到xml.Unmarshal仅获得列表的最后一项
  • 插入一个简单的单链表
  • 检索具有完整数据的bson.Binary

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华