我正在尝试从 MacBook High Sierra 网络摄像头获取流,mac 没有 /dev/video0
有什么方法可以访问 MacOS 网络摄像头吗?
我在 golang 中编程,我正在使用 golang.org/x/sys/unix
最佳答案
您可以使用 OpenCV 绑定(bind)并从相机获取帧。
一个简短的例子:
index := 0 // example
camera := opencv.NewCameraCapture(index)
if camera.GrabFrame() {
frame := camera.RetrieveFrame(1)
img := frame.ToImage()
}
关于macos - 什么是 macbook 网络摄像头的正确路径,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49461222/