Skip to main content

Java for real-time ComputerVision

4 replies [Last post]
krzysztof_trzewiczek
Offline
Joined: 2009-08-15

Hi,

I spent some time looking for the real-world answer for that question, but with no effect. Maybe you could help me. The question is:

Is Java good choice for real-time computer vision software for the performance arts usage?

I'd prefer to work in Java, 'cause it's clean and coder-friendly, but still - real-time is real-time and theatre performance doesn't like 10 fps.

There are some obvious solutions in C++ (OpenCV, openframeworks, GIL) where efficiency is mostly a matter of coders skills in optimiziation and there are real-world C++ examples - it all works fine. The cost of more complex production stage is still not the issue in comparison with "10fps" (I'm aware it's not really 10 fps - just figurative speach!). Please, help!

Best,
Krzysztof Trzewiczek

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jmarranz
Offline
Joined: 2006-05-06

You could build a Java layer on top of OpenCV or similar.

I've already done that with JNIEasy to bring LAME to Java and the result is LAMEOnJ. In my experience, if native calls are time consuming (this is the case of LAME and OpenCV) the overhead added by the Java layer and Java-C++ bridge is negligible.

JNIEasy is commercial but you can download temporary licenses for evaluation purposes with no limit and no registration.

krzysztof_trzewiczek
Offline
Joined: 2009-08-15

Thank you both.

In fact I supposed that there's no good answer for that general question, but still. Probably I'm gonna try with the prototype of some kind and will see.

I use to work with Processing, but it's not the most efficient environment possible. That's why I ask. I've heard the stories about interactive installations written in Processing and then re-written in C++.

Anyway - thanks a lot for help,
Trzewiczek

nsigma
Offline
Joined: 2004-12-13

Hi,

I'm working in a similar field to you and use Java for all of my work. I suppose the answer depends on exactly what you want to do! I've done lots of stuff with detecting levels of motion in various parts of a camera input which is obviously simpler than tracking objects. You can see a video of one of my installations if you're interested - http://video.google.co.uk/videoplay?docid=-1631892283027158552

I'm currently rewriting and opening up the framework I used to create this, along with much other work, at http://code.google.com/p/praxis. This is a message passing framework for intermedia art, but don't expect too much for another couple of months! Reason I bring it up is that I'm intending to use the JNA bindings to OpenCV at some point in the future - http://code.google.com/p/nativelibs4java. This might prove a better option than trying to write all the computer vision stuff in Java - again depends on what exactly you want to do. I like JNA - have already written a wrapper to the Jack audio library with it, and JNA makes this much simpler.

There's also some basic pure java stuff in the Processing libraries, which you may have seen, but have no idea how usable it is.

Hope this helps a bit.

Best wishes, Neil

--
http://neilcsmith.net

Fabrizio Giudici

jai-interest@javadesktop.org wrote:
> Hi,
>
> I spent some time looking for the real-world answer for that question, but with no effect. Maybe you could help me. The question is:
>
> [b]Is Java good choice for real-time computer vision software for the performance arts usage?[/b]
>
> I'd prefer to work in Java, 'cause it's clean and coder-friendly, but still - real-time is real-time and theatre performance doesn't like 10 fps.
>
> There are some obvious solutions in C++ (OpenCV, openframeworks, GIL) where efficiency is mostly a matter of coders skills in optimiziation and there are real-world C++ examples - it all works fine. The cost of more complex production stage is still not the issue in comparison with "10fps" (I'm aware it's not really 10 fps - just figurative speach!). Please, help!
>
Of course I hope that somebody can answer with his own experience in the
field. But in case nobody does, I think that the best answer is in
trying yourself with an architectural spike. I myself faced with a
near-real time application in Java five years ago (not in the imaging
field) and nobody could provide answers at the time, so the customer was
first prompted to pay for an architectural spike; it demonstrated the
feasibility of the project and in the end everything was fine.

--
Fabrizio Giudici - Java Architect, Project Manager
Tidalwave s.a.s. - "We make Java work. Everywhere."
weblogs.java.net/blog/fabriziogiudici - www.tidalwave.it/blog
Fabrizio.Giudici@tidalwave.it - mobile: +39 348.150.6941

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@jai.dev.java.net
For additional commands, e-mail: interest-help@jai.dev.java.net