Seeking Camera Capture API Advice

371 views
Skip to first unread message

Jason von Nieda

unread,
Jan 8, 2016, 11:18:30 PM1/8/16
to ope...@googlegroups.com
Hi folks,

I'm beginning to accept that I can't continue to use OpenCV for capturing images from cameras if I want OpenPnP to really shine when it comes to computer vision. OpenCV is great for processing images, but it's terrible for capturing them.

So, with that in mind, I'm looking for some advice on which camera APIs might be best to use various platforms. If these already have Java bindings, that will be ideal, but even if not, I am willing to invest the time to make bindings.

My short list of requirements is:
* Available for one or more of our supported platforms (Windows, Linux, Mac)
* Open source, or at least free (commercial included).
* Able to enumerate cameras.
* Able to control resolution and video format. Video format is going to be very important in solving our multiple cameras on one USB port issue.
* Able to control auto exposure and brightness settings for cameras that support it.

That's really all we need to get going. I am currently experimenting with libuvc on Mac and it is showing some promise. libuvc is also well supported on Linux, so I might be able to use one library for both Mac and Linux. That would leave Windows.

So, if you've got direct experience with any of these APIs, or can suggest others, or really anything helpful, please speak up!

Thanks,
Jason




Anthony Webb

unread,
Jan 8, 2016, 11:39:14 PM1/8/16
to OpenPnP
SimpleCV compares pretty favorably, although I think OpenCV is probably a little faster I do like the simplicity of SimpleCV, might be worth a look?

Jason von Nieda

unread,
Jan 9, 2016, 12:09:29 AM1/9/16
to OpenPnP
Hi Anthony,

Have you worked with SimpleCV? I'm looking specifically for better camera support, not CV functions, and SimpleCV doesn't look like it has a very robust camera API. I can't even find API docs for the camera API aside from their two line example.

Jason


--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/02276bdd-f17c-46eb-b1bf-813f0ebd54d2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

cha...@thefnf.org

unread,
Jan 9, 2016, 12:20:38 AM1/9/16
to ope...@googlegroups.com
On 2016-01-08 22:18, Jason von Nieda wrote:
> Hi folks,
>
> I'm beginning to accept that I can't continue to use OpenCV for
> capturing images from cameras if I want OpenPnP to really shine when
> it comes to computer vision. OpenCV is great for processing images,
> but it's terrible for capturing them.
>

Are you targeting primarily USB cameras? UVC (
https://en.wikipedia.org/wiki/USB_video_device_class ) ?

I was searching around and found
https://github.com/openxc/android-webcam ... would that work on other
platforms?

>
> My short list of requirements is:
> * Available for one or more of our supported platforms (Windows,
> Linux, Mac)

Java would meet that quite nicely. Or rather you know issues already
with Java on multiple platforms. Devil you know... :)


> * Open source, or at least free (commercial included).
> * Able to enumerate cameras.

A quick search just turned up
http://jphoto.sourceforge.net/ which looks somewhat old , and lots of
people asking for Java camera APIs and help.


> * Able to control resolution and video format. Video format is going
> to be very important in solving our multiple cameras on one USB port
> issue.

Multiple independent? Multiple together? Ordering (sequential?)

> * Able to control auto exposure and brightness settings for cameras
> that support it.

So on Linux, you have gphoto(2). I found
https://github.com/mvysny/gphoto2-java

Thinking of other popular cross platform languages, we have QT. This
brings my mind to VLC which is written in QT. However that's playing
video, not acquiring it. (Sorry just riffing out loud to try and get
creative thoughts going among the folks here).

Looks like Windows has
https://msdn.microsoft.com/en-us/library/windows/desktop/ms630368(v=vs.85).aspx

>
> That's really all we need to get going. I am currently experimenting
> with libuvc on Mac and it is showing some promise. libuvc is also well
> supported on Linux, so I might be able to use one library for both Mac
> and Linux. That would leave Windows.

Yes. That's the best I can find.

Java seems to be some sort of dead end with image acquisition. Some
random threads about TWAIN/JTWAIN.

Ooooo i just found
https://www.ptgrey.com/flycapture-sdk
https://github.com/bytedeco/javacv

from http://bytedeco.org/

Anthony Webb

unread,
Jan 9, 2016, 12:22:21 AM1/9/16
to OpenPnP
It was many moons ago that I played with SimpleCV, went hunting to see if I could jog my memory and it looks like it is fallen somewhat out of date.  Thats a bummer, there really should be a good alternative to OpenCV but it seems like most everyone uses it.

Are you just looking for broader camera support?  Or are there some more glaring issues? What version of opencv are you working with?

Cri S

unread,
Jan 9, 2016, 6:41:30 AM1/9/16
to OpenPnP
http://www.webcam-capture.sarxos.pl/

But it's highly driver and system depend and not well suite as generic solution.
It have all the bells, support for notification when you unplug the camera, ... .

Reply all
Reply to author
Forward
0 new messages