Reputation: 1711
I need an extremely efficient webcam library (I'll explain later) that works on all platforms.
Basically there will be two webcams and I need to alternate between them at a very fast rate (a least 50fps, it has to be a fluid video still)
Anybody have experience in this field and have some suggestions?
Upvotes: 3
Views: 5562
Reputation: 2674
While developing my Webcam Capture project I've tested several frameworks and decided to use part of OpenIMAJ framework. I actually had to extract part of its core-video-capture subproject and refince code to remove all necessary dependencies it has. When I included refine code in my project I was able to stream 250 FPS (EDIT: due to bug in Windows impl) 50 FPS as BufferedImage
objects (on Windows XP, without painting, just fetch image from webcam). I can honestly recommend it since it is compatible with most operating systems - Windows (x86 and x64), Linux (x86, x64 and ARM), Mac OS. If you are interested, you can find refined code here.
JMF is also very fast, but its pretty outdated and not maintained any more. It's not portable - when you want to use it, you have to install JMF.
I don't recommend JavaCV, it require huge OpenCV installation package (~100MB), have no Java documentation and it's not portable.
LTI-CIVIL / FMJ are also outdated, not being maintained any more.
VLCj work correctly only on Linux (since it is using V4L4j) and you have to have VLC installed on your PC (not portable).
Upvotes: 4
Reputation: 1229
A while ago I used Java Media Framework to process and save stream from webcam (Didn't had any performance issues with it). Maybe it could help you in your task.
Upvotes: 0
Reputation: 745
I have used OpenCV for Java ( http://ubaa.net/shared/processing/opencv/ )
It is very "user-friendly", but I do not know the exact parameters about its efficiency.
Upvotes: 1