Image analysis library recommendations

228 views
Skip to first unread message

Nils Blum-Oeste

unread,
Apr 23, 2013, 2:54:20 PM4/23/13
to clo...@googlegroups.com
Hi,

I would like to do some image analysis with clojure. So I am looking for good libraries for that.

Most important would be a good support for image segmentation. Tresholding, histogram based methods, edge detection and region growing are among the things I would like to have. Support for real time image analysis is not needed, I want to transform static image files.
Furthermore I am looking for a nice image import/export. This does not have to be the same library, but would be great if things work together nicely.

Of course a pure clojure thing would be awesome, but using java interop would be okay too.
I have some background in image analysis and don't need to have all the matrix stuff abstracted away. However, I don't want to rebuild all the necessary algorithms myself, but focus on getting the parametrization right and figuring out the best segmenation strategy instead.

Currently I am evaluating incanter (also interested in this is a general data analysis tool) and I wanted to have a look at OpenCV.

If someone could recommend good libraries would be great. I really appreciate any hints, recommendations and shared experience.

Thanks and cheers
Nils

Cedric Greevey

unread,
Apr 23, 2013, 5:47:49 PM4/23/13
to clo...@googlegroups.com
On Tue, Apr 23, 2013 at 2:54 PM, Nils Blum-Oeste <nblum...@googlemail.com> wrote:
Furthermore I am looking for a nice image import/export. This does not have to be the same library, but would be great if things work together nicely.

If you're using ClojureJVM, at least, you have this already (and even the capacity to add format plugins!).

Check out javax.imageio.

One plugin in particular you might want to get is the TIF plugin. It adds both .tif image format support *and* the ability to extract exif metadata from any format that supports it, including jpeg. It's handy if you want to get the info that cameras put in jpegs they take, or the keywords, caption, and rating that Windows users can give to jpegs using the default Windows picture previewer. Sadly, there's no simple "getKeywords" function or similar, though; you need to do a bit of hacking to retrieve particular exif metadata fields, and a bit of Googling to find out what those are. On the other hand, creating a wrapper library in Clojure to provide a much nicer interface to the exif metadata might be worthwhile -- perhaps a function to read the metadata from an image file and return a Clojure map with meaningful keys and the corresponding values that were found in the image, such as

{:focal-length "3.50 mm"
 :keywords ["tree" "pine" "white pine" "Pinus strobus" "Appalachia" "Pennsylvania" "nature"]
 :caption "White pine growing at 1780ft elevation in the central Appalachia"
 :date-taken <java.util.Date whatever>}

Nils Blum-Oeste

unread,
Apr 26, 2013, 1:02:34 PM4/26/13
to clo...@googlegroups.com
I had a look at incanter/processing meanwhile. But this does not offer very much for image analysis. However processing will become useful to modify/render images.

Next I am going to evaluate OpenCV which recently got Java bindings. Setting it up wasn't as straight forward as I thought but in the end it did work and I was able to rewrite an example from OpenCV documentation in Clojure. Setup and this example are described in a new post on my blog.

I am going to post another update here once I did work a little more with OpenCV. Meanwhile, please share your experience with image analysis in clojure please.

Nils Blum-Oeste

unread,
Apr 26, 2013, 1:05:29 PM4/26/13
to clo...@googlegroups.com
Thx Cedric!

Indeed I am using ClojureJVM. Getting images from filesystem isn't a big deal. Of course javax.imageio does a good job here, like you said!
Also I am not intersted (yet) in meta information of the images.

My concern about image IO was more about not having to transform back and forth data between differents types and formats during import, processing and export.

Good to know that exif data is at hand though, thanks!

Herwig Hochleitner

unread,
Apr 26, 2013, 3:04:07 PM4/26/13
to clo...@googlegroups.com
Maybe the opencv stack can do something for you: http://opencv.org/
It's got java bindings.

cheers


2013/4/26 Nils Blum-Oeste <nblum...@googlemail.com>

--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@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+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Mikera

unread,
Apr 26, 2013, 9:19:07 PM4/26/13
to clo...@googlegroups.com
Maybe my hobby project Clisk can be of some use:

https://github.com/mikera/clisk

It's Clojure based and geared towards image generation but does have some capabilities for image analysis and processing, particularly if you are interesting in warping / filtering etc.

Stathis Sideris

unread,
Apr 29, 2013, 9:52:38 AM4/29/13
to clo...@googlegroups.com
There is a Clojure wrapper for OpenCV: http://nakkaya.com/vision.html
Reply all
Reply to author
Forward
0 new messages