简体   繁体   中英

how do I control a camera from Java?

As I am building an application for a project I am working on, I am at a cross roads. I am researching trying to find an API used for controlling camera functionality from Java. JMF is dead, and this is not going to run on a windows platform. I've looked into DSJ, but not running it on a windows platform sort of negates running it. I've also seen some examples that are supposedly grabbing the camera output, but it was grabbing the desktop, and not working, and using Java AWT / Swing is not what I am trying to do either. This is not an android based project either or I would use the API's for that.

My thoughts are #1 - does ANYONE know of a suitable framework in java that would allow the programmatic control of a camera and perhaps servos(optional)? and #2 - If java is java, could I simply import the android packages used for controlling a phone camera?

It might be a little clearer if I try to explain what I am trying to do. I have 2 ODroid-X boards that I am trying to run Ubuntu on and cluster together. Either I want to write an application to run across an Apache Tomcat cluster running on them, or write an in depth application using Open-MPI and set it up in a true cluster.

The ultimate goal is to convert my RC plane into a UAV. I know there are some out of the box solutions, but none fit my application and I am starting to think I understand why...

Any information on getting a camera to work with Java would be greatly appreciated. Thanks in advance!

Warmest Regards,

Josh

As an example, Jitsi does it like this:

[...] there are things that the Java Runtime Environment (JRE) does not support or does not do the way we'd like it to, such as capturing video from your webcam. Therefore, we need to use DirectShow on Windows, QTKit on Mac OS X, and Video for Linux 2 on Linux.

Not very encouraging, but since it's open source, you could take a look at how they did it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM