# Image processing in ruby

**URL:** <https://www.ruby-forum.com/t/image-processing-in-ruby/181753>\
**Category:** Ruby\
**Created:** [January 17, 2010, 9:55pm UTC](https://www.ruby-forum.com/t/image-processing-in-ruby/181753 "2010-01-17T21:55:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michal\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/779978/32.png) [@Michal\_S](https://www.ruby-forum.com/u/Michal_S)\
**Post date:** [January 17, 2010, 9:55pm UTC](https://www.ruby-forum.com/t/image-processing-in-ruby/181753/1 "2010-01-17T21:55:57Z")

</div>

Hello

I was wondering if I could do image processing in Ruby or would have  
to resort to something else for that.

Looking at available bindings I find

- ImageScience - thumbnailer only, useless
- RMagick - no useful functions
- Ruby-Processing - only drawing and very basic math
- ruby-dcl
- Camellia - a few basic functions
-

---

<div class="post-metadata">

**Author:** ![Michal\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/779978/32.png) [@Michal\_S](https://www.ruby-forum.com/u/Michal_S)\
**Post date:** [January 17, 2010, 10:36pm UTC](https://www.ruby-forum.com/t/image-processing-in-ruby/181753/2 "2010-01-17T22:36:21Z")

</div>

> I was wondering if I could do image processing in Ruby or would have  
> to resort to something else for that.
> 
> Looking at available bindings I find
> 
> - ImageScience - thumbnailer only, useless
> - RMagick - no useful functions
> - Ruby-Processing - only drawing and very basic math
> - ruby-dcl
> - Camellia - a few basic functions

RMagick has no useful functions? I beg to differ. What kind of image  
processing do you need? RMagick has always done the job for me.

-Jonathan N.

---

<div class="post-metadata">

**Author:** ![Michal\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/779978/32.png) [@Michal\_S](https://www.ruby-forum.com/u/Michal_S)\
**Post date:** [January 17, 2010, 10:46pm UTC](https://www.ruby-forum.com/t/image-processing-in-ruby/181753/3 "2010-01-17T22:46:19Z")

</div>

> RMagick has no useful functions? I beg to differ. What kind of image  
> processing do you need? RMagick has always done the job for me.

OK, after looking at Camellia, I think I see what you want… you want  
to be able to ‘detect’ things in images? I guess I had my definitions  
for image processing mixed up if that’s the case… I’ve never had to  
do that so I don’t have any useful advice, sorry…

-Jonathan N.

---

<div class="post-metadata">

**Author:** ![Michal\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/779978/32.png) [@Michal\_S](https://www.ruby-forum.com/u/Michal_S)\
**Post date:** [January 18, 2010, 12:25am UTC](https://www.ruby-forum.com/t/image-processing-in-ruby/181753/4 "2010-01-18T00:25:13Z")

</div>

Sorry, ignore the previous message.

Looking at available bindings I find

- ImageScience - thumbnailer only, useless

- RMagick - no useful functions

- DevIL - besides supporting some odd image formats just another  
ImageMagick

- Ruby-Processing - only drawing, 3D and very basic math (and IDE/GUI  
which might be useful) (documentation mentions JRuby)

- ruby-dcl - documented mostly in Japanese, the English documentation  
suggests only drawing, UI, and basic math although the docs claim use  
in oceanography and atmosphere research

- VTK-Ruby - only drawing, 3D, UI, and some basic math

- HornetsEye - seems to have a few basic functions but does not come  
with pre-built docs and I cannot build it

- Camellia - a few basic functions

- Ruby/OpenCV - a companion to Camelia (uses same data format) -  
quite a few useful funcions  
- edge detection (multiple methods)  
- FFT  
- other dissection methods that might be useful

- ITK - companion to VTK, is supposed to be geared towards image  
processing but only Java bindings are available

- includes edge detection, FFT, MI

- perhaps could be imported into JRuby - found nice articles on that  
[VTK/Using JRuby - KitwarePublic](http://www.itk.org/Wiki/VTK/Using_JRuby)  
[Metaprogramming with Ruby: Mapping Java Packages Onto Ruby Modules | Depth-First](http://depth-first.com/articles/2006/10/24/metaprogramming-with-ruby-mapping-java-packages-onto-ruby-modules)

Overall ITK seems about on par or perhaps more complete than OpenCV  
which are the best tools I could find.

ITK seems best suited so far because it is fairly complete according  
to the docs and ability to use JRuby means I could add stuff that runs  
at decent speeds in the Sun JVM without resorting to something like C.

If somebody can suggest a better library I have overlooked I would like  
to know.

Thanks

Michal

[http://seattlerb.rubyforge.org/ImageScience.html](http://seattlerb.rubyforge.org/ImageScience.html)  
[http://rmagick.rubyforge.org/](http://rmagick.rubyforge.org/)

> **[DevIL - A full featured cross-platform Image Library](https://openil.sourceforge.net/)**
>
> DevIL: A full featured cross-platform image library.

> **[GitHub - jashkenas/ruby-processing: Code as Art, Art as Code. Processing and...](https://github.com/jashkenas/ruby-processing)**
>
> Code as Art, Art as Code. Processing and Ruby are meant for each other. - GitHub - jashkenas/ruby-processing: Code as Art, Art as Code. Processing and Ruby are meant for each other.

[http://ruby.gfd-dennou.org/products/ruby-dcl/](http://ruby.gfd-dennou.org/products/ruby-dcl/)  
[http://www.gfd-dennou.org/arch/ruby/products/ruby-vtk/](http://www.gfd-dennou.org/arch/ruby/products/ruby-vtk/)  
[http://camellia.sourceforge.net/index.html](http://camellia.sourceforge.net/index.html)  
[http://rubyforge.org/projects/opencv/](http://rubyforge.org/projects/opencv/)  
[http://www.itk.org/](http://www.itk.org/)
