OpenCV 2.3(C++,QtGui),初始化某些特定 USB 设备和设置时出现问题
我使用 OpenCV 一段时间了,我发现某些特定捕获设备(PS3 Eye、Logitech C940、iSight)即使在不同平台上也会出现一些奇怪的行为。
在 Windows 中使用 OpenCV:上面提到的所有摄像头都运行良好。但是,当我想使用 2 个摄像头并因此创建第二个捕获时,它将取决于我在双摄像头设置中使用的设备。
PS3 Eye + C940:没问题 2x C940:没有问题
2x PS3 Eye:没有机会,只有首先连接的特定设备才会初始化。另一个 PS3 Eye 无法同时使用...没有错误事件,也没有显示有关问题的信息。
现在在 MacOSX 10.7 中使用 OpenCV(对于 10.6.x 也是如此),使用相同的设备甚至相同的 QtGui 应用程序和 2 个独立的 GLWidgets 用于在 QtGui 中显示 cv 输出会出现不同的问题。
只要不使用 Mac OS 中的 PS Eye,每个设置都很棒。我尝试了 macam 和其他几个工具,但我就是无法让 OpenCV 在 OSX 中初始化这个摄像头(我为我的项目购买了 3 个,所以不太可能出现硬件问题)。
我仍然想知道问题出在哪里...如果单个 PS Eye 可以在 OSX 中工作,也许 2 个 PS Eye 可以工作?我不知道。
我什至可以同时从 2 个罗技全高清网络摄像头进行捕捉,并且性能良好。
您知道 Windows 中 Dual PS Eye 的限制在哪里吗?也许是USB?为什么 OSX Capture 中的 OpenCV 无法从 PSEye 访问摄像头,但 macam 可以访问摄像头?
我只是想了解发生了什么事。也许你们中有人找到了在 OSX 中使用至少一个 PS Eye 的方法?或者这是不可能的? opencv 不能以某种方式使用 macam 组件吗?
I'm playing around with OpenCV since a while and I found some strange behavior of some specific capturing devices (PS3 Eye, Logitech C940, iSight) even on different Platforms.
Using OpenCV in Windows: All cams mentioned above work well. But when I want to use 2 cams and therefore create a second capture it will depend on the devices that I use in my Dual Cam Setup.
PS3 Eye + C940: no problems
2x C940: no problems
2x PS3 Eye: No chance, only the specific device that was connected first will initialize. The other PS3 Eye cannot be used the same time...No error events and no information about the problem is shown.
Now using OpenCV in MacOSX 10.7 (same for 10.6.x) there's different problems using the same devices and even the same QtGui-Application with 2 independent GLWidgets for displaying cv output in the QtGui.
Every Setup is great as long as it doesn't use a PS Eye in Mac OS. I tried macam and several other tools, but I just cannot get OpenCV to init this cam in OSX (I bought 3 for my project so hardware probs not very likely).
I'm still wondering where the problem is...Maybe 2 PS Eye's would work in OSX if a single one did? I can't tell.
I can even capture from 2x Logitech FULL HD Webcams simultaniously with nice performance.
Any Idea where Limitation could be with Dual PS Eye in Windows? Perhaps USB? And why can't OpenCV in OSX Capture from PSEye but macam can access the cam?
I just want to understand what's happening. Perhaps anyone of you found a way to use at least a singe PS Eye in OSX? Or is this just not possible? Can't opencv somehow use the macam component?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
视频捕获是非常依赖平台的领域。因此,Windows 和 OS X 之间的差异是可以预料到的,而不是奇怪的。 OpenCV 利用大量视频捕获 API 来支持尽可能多的设备模型。目前(OpenCV 2.3.1)它在后端使用以下库/API:
Windows:
Linux:
OS X:
Android:
* (opt) - 这些接口是可选的 - 可以打开或关闭在 OpenCV 构建期间,可能需要一些额外的 SDK。
关于 PS3 Eye - 在 Windows 上,这很可能是 VideoInput 库或安装的驱动程序的一些限制。在 OS X 上 - 首先,确保您的 OpenCV 是使用 QuickTime 支持构建的。其次,确保 macam.component 正确安装到 QuickTime 中。以下是他们的常见问题解答中的一段话:
Video capturing is very platform-dependent area. So difference between Windows and OS X is rather expected than wondering. OpenCV utilizes a lot of video capturing APIs to support as many device models as possible. At the moment (OpenCV 2.3.1) it uses following libs/APIs on the back-end:
Windows:
Linux:
OS X:
Android:
* (opt) - these interfaces are optional - can be turned on or off during the OpenCV build and may require some additional SDK.
About PS3 Eye - on Windows, it is most probably some limitation of VideoInput library or installed driver. On OS X - first, ensure that your OpenCV is built with QuickTime support. And second, ensure that macam.component is correctly installed into the QuickTime. Here is a quote from their FAQ: