On Mon, Sep 6, 2010 at 5:45 PM, Sean Grove <otokora...@gmail.com> wrote:

> On Sep 6, 2010, at 2:57 PM, Robert McIntyre wrote:
>
> I was wondering if anyone has used clojure for image/video processing
> and how that has worked out.
>
> We've been rolling our own, either using Apple's Core Image framework or
our own OpenGL / FrameBuffer Object library for processing video and gigabit
ethernet machine vision cameras for input. I'm afraid that "Video in Java"
is in pretty rough shape right now.

I haven't personally used it, but I'd take a look at either
http://github.com/ztellman/calx — that's Open*C*L for Clojure or Java or the
Java level bindings for OpenCL (which I have used a bit)  —
http://code.google.com/p/nativelibs4java/wiki/OpenCL . If you can formulate
your problem in OpenCL the speed can be jaw slackening, and it has a far
smaller conceptual footprint than OpenGL.

Images:
>
> For image processing, I've just been using the java2d api, a la
> http://www.javaworld.com/javaworld/jw-09-1998/jw-09-media.html?page=1 It's
> quite low-level, but it works well enough for my basic needs right now.
>
> OpenCV : tried two different jna bindings but had many horrible memory
> leaks and crashes
>
> I've been doing some stuff with OpenCV (yes, there are definite problems
> here, but at least it kind of works) to get access to the webcam. Setting it
> up was a nightmare though...
>

OpenCV is a sprawling library with a long history. Recently, Willow Garage
have taken it over and are now cleaning it up and moving it forward. The
Java bindings that I'm familiar with expose a some sliver of the library,
and never the sliver I'm interested in. There are gems in there though —
just tunnel in through JNI, dig them out and make a quick exit before that
C/C++ smell gets in your hair.

As far as I know it doesn't really have any camera access code in it to call
its own, rather it wraps other libraries. If you want to get serious, I'd go
straight to them (for example libdc1394, or the Java Prosillica SDK).


> Video:
>
> Processing: still don't know at all what this is or how to get it to work.
>
> Processing is a bigger library, I believe OpenCV is a sub-project of it.
>

That's not really the case. There are one or two Java OpenCV bindings that
are targeted at the Processing community. "Processing" refers to 4 things
together — a simplified Java syntax; a simple IDE for writing and compiling
code in this syntax; a core Java API that's mainly for drawing things (that
abstracts away the differences between Java2D, OpenGL and potentially other
renderers) and finally an enormous community of Java libraries usually
designed with simplicity in mind. Only these latter two things are
potentially interesting for people using Clojure — for example, Incanter can
use Processing's core library as its drawing back end.

For video input Processing has traditionally used Quicktime for Java, but as
I understand it they are trying to move to something else, perhaps
GStreamer-java? (http://code.google.com/p/gstreamer-java/). I can't
recommend starting a new project with Quicktime for Java — I feel like it's
been deprecated for a decade.

best of luck!

Marc.
-----------
openendedgroup.com

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to