OpenCV capture from USB not iSight (OSX) - macos

I am having trouble accessing the external USB camera instead of the built-in iSight when using OpenCV with a MacBook Pro under Mac OSX.
When passing an argument to the cvCaptureFromCAM(index) function other than 0 or -1 I will always get a
Warning: Max Camera Num is 0; Using camera 0
The camera is a Sony PS3 EYE working perfectly with the macam driver and quicktime component.
Yet I am unable to access it using OpenCV which will always default to the built-in iSight (even when trying to "occupy" the iSight with a different program).
Any ideas?
Thank you very much in advance, your help is very much appreciated!

I was just messing with the same problem, macam drivers are 32 bit, if your opencv install is compiled as 64 bit it won't work. I end up installing opencv twice 64 bit with mac ports and 32 bit with howebrew whenever I am using ps3eye I switch to 32 bit version.

Related

Genymotion and v4l2loopback

I would like to use a simulated webcam on Genymotion. I have installed v4l2loopback on my Ubuntu Desktop and it works fine (on a webpage or Cheese) but the camera is not available on Genymotion.
Perhaps because the camera is using a v4l2 driver ? Or is there some precise spec (pixel format, colors ...) to adjust ?
Thanks :)
I just tried using the DroidCam as a camera but it doesn't worked for me, but according this issue on the v4l2loopback's repository, the Genymotion have support to v4l2 cameras:
Under Windows the driver can only be openCV, and it's slow. However
under Linux you should be able to use v4l2loopback because we use API
v4l2 to read the camera video stream.
So to have a good performance we recommend using Linux with
v4l2loopback instead of Windows with openCV, but we cannot guaranty
that because have have never conducted any tests on that kind of user
case.

Mirror Drivers not working on Windows 7 64 bit computer

I am trying to develop an application that uses a mirror driver, although I am having an issue getting any mirror driver to work properly on my computer. I always seem to get the same issue no matter which driver I user. I have tried the Mirror Driver in UltraVNC and Also the DemoForge Mirage Driver that is included in TightVNC.
These are the issues I seem to receive- this this the issue from DemoForge Mirage. The error from the other drivers are essentially the same just maybe worded slightly different:
Could not create device driver context!
Unable to map memory for mirror driver!
Considering this is happening with all mirror drivers I am thinking maybe it is an issue with my graphics card or Intel HD graphics.
My display adapters are:
Nvidia GeForce GT525M
Intel HD Graphics 3000
Can anyone tell me what the problem could be and how to fix it? I have thought about just developing on another computer but it doesn't change the fact that I am still having an issue and others will too.

Can SimpleCV read out multiple USB camera simultaneous in Windows 7?

I've been using OpenCV to read out camera output and process the frames. I am on Windows 7, and it turns out that OpenCV cannot simultaneously read multiple USB cameras in Windows. Does anybody have an experience with SimpleCV in Windows 7 in this direction? Is it capable of displaying output of multiple USB cameras in Windows 7 simultaneously?
Thanks!
I'm one of the core developers for SimpleCV and I'm guessing if OpenCV can't do it than it won't work. We have pygame as a graceful fallback on linux and mac but a camera interface doesn't exist to it on windows sadly. I have still yet to find a good open source solution to just viewing a webcam on windows either.

OpenCV 2.3 (C++,QtGui), Problem Initializing some specific USB Devices and Setups

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?
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:
DirectShow (thought VideoInput library)
Microsoft's Video for Windows (VfW) API
CMU 1394 Digital Camera Driver
Matrox Imaging Library (MIL) (opt)
OpenNI camera drivers (opt)
XIMEA API for XIMEA devices (opt)
Linux:
libdc1394 (API v1 or API v2) - IIDC standard compliant cameras (opt)
PvAPI for Prosilica GigE Vision cameras (opt)
unicap - The uniform API for image acquisition devices (opt)
video4linux (V4L or V4L2) (opt)
OpenNI camera drivers (for Kinect) (opt)
XINE (opt)
XIMEA API for XIMEA devices (opt)
OS X:
QuickTime (opt)
QTKit (if no QuickTime, these two are mutually exclusive in OpenCV)
OpenNI camera drivers (opt)
XIMEA API for XIMEA devices (opt)
Android:
builtin Android camera
* (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:
Why can't I use my webcam with other applications?
You can. Please copy the macam.component into the
/Library/QuickTime/ directory (for access by all users on the system)
or into the ~/Library/QuickTime/ (for access by only that user). If
you have a previous copy, please delete it first. A restart is usually
not needed, but if you have trouble, it's a good thing to try. To
verify that your installation works, test with a simple program such
as HackTVCarbon, VideoViewer, or BTV.

QTKit does not enumerate my USB- and virtual cams in 64Bit mode. Is there a workaround?

I have a problem with Quicktime, that means, QTKit. A long time ago I wrote an app, which is using camera devices on Mac OS X. The user could select the camera using a popup box. I populated the device list into a popup box so the user could choose his preferred camera. Now I migrated to 64Bit code. And everything works fine with iSight cam. Audio devices are listed properly, too (including virtual drivers like Soundflower). For my surprise all camera-devices are missing. And QTKit never enumerates the existing cameras. Is there a workaround or does someone know something about this issue?
I encountered the same issue. Haven't found a workaround other than keeping it 32bit. The Quicktime API mailing list has already discussed this here basically stating that the camera device (your camera device) is a Quicktime Component and Quicktime Components are only supported with Quicktime 7 not Quicktime X if I understood this correctly.
So to put it bluntly: Quicktime Components are not supported in 64bit, for whatever reason I don't understand.
Update: another discussion on the quicktime-api-lists also covers this topic here. Search for vdig in the discussion and you'll find statements on the whole 32bit vs. 64bit complications:
Apple has never updated or replaced the VDIG/ SG / QuickTime Component
API to a 64 bit architecture and your VDIG will never show up as a
selectable device under 64 Bit. So your VDIG is screwed, just like
every other Mac 3rd party QT component developer is.
Also, the term QTKitServer pops up, which seems undocumented but is used by Quicktime X in 64bit mode to play movies in 32bit by using Quicktime components.
Maybe QTKitServer is the key?

Resources