Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
ImageJ vs. Image Processing Toolkit

Subject: ImageJ vs. Image Processing Toolkit

From: Yair Altman

Date: 25 Aug, 2010 18:24:04

Message: 1 of 13

Many are aware that there are two main alternatives for image processing in Matlab:
- MathWork's commercial Image Processing Toolkit (IPT) - http://www.mathworks.com/products/image/
- The open-source ImageJ toolkit - http://rsb.info.nih.gov/ij/

(I know there are others, but let's focus this thread on the two above which appear to be the most popular - let's not start a religious war here)

The basic comparison between IPT/ImageJ is simple:
- IPT costs $$$; ImageJ is free
- IPT is proprietary; ImageJ is public-domain
- IPT is Matlab-friendly; ImageJ requires Java integration/knowledge

Can users of both toolkits provide a more technical comparison of IPT vs. ImageJ? For example: extensibility (e.g., creating filters), ease of use, performance, memory, bugs, features, accuracy, documentation, etc.

ImageAnalyst - are you there?...

Thanks,
Yair Altman
http://UndocumentedMatlab.com

Subject: ImageJ vs. Image Processing Toolkit

From: ImageAnalyst

Date: 25 Aug, 2010 19:07:26

Message: 2 of 13

Yair:
My main complaints against ImageJ are:

1) I could never get used to the image, and imageplus objects. Each
object class had it's own properties and methods and it seemed like no
matter what I wanted to do, the thing I wanted was in the other object
class. If I wanted to do a "method1" say (e.g. a median filter), and
I had an image object, then the image object didn't support that, only
the imageplus object did. So in the end I had to keep copies of both
hanging around and just guess which class had it (the image or the
imageplus), and switch to the other one if it didn't. Basically it
was a confusing nightmare and bookkeeping headache. MATLAB is much
easier in that the images are simply arrays. There aren't two similar
but different complicated image classes, just simple arrays. Sure
MATLAB has quirks too (like not being able to multiply integer arrays
by floating arrays or integer arrays of different bit depths), but
it's nowhere near as complicated as ImageJ's classes.

2) It didn't seem like there was that much built into ImageJ. Coming
from other full featured and easy to learn/use packages (like ImagePro
Plus or Optimas), ImageJ seemed pretty primitive in the quantity of
"built in" things. It seemed like it could never do what you wanted
and you always had to go out to their "file exchange" to see if there
was something similar to what you wanted to do and then adapt it. I
know MATLAB also has a file exchange where you can do that, and that
MATLAB is also lacking in a nice full featured UI for experimenting
with your images, but at least the code editor and command window of
MATLAB seems like it's easier to do experimenting/exploring algorithms
than programming in Java with ImageJ's crazy image classes.

Because of those annoyances I haven't programmed in ImageJ in about 4
years or so. I still use it but only for their color gamut plug in
(http://rsb.info.nih.gov/ij/plugins/color-inspector.html), which is
very very nice - I wish MATLAB had that. I tried to write my own one
time but it was just too big a job so I decided just to keep using
ImageJ's.

ImageJ does have an advantage over MATLAB in that it at least HAS a
UI, where MATLAB'S IPT is almost completely command line/programming
oriented. It would be nice if MATLAB could add a UI. However ImageJ
can't compete (in my opinion) with nice full-fledged, but expensive,
programs like ImagePro Plus, which has excellent GUIs.
-ImageAnalyst

Subject: ImageJ vs. Image Processing Toolkit

From: Yair Altman

Date: 26 Aug, 2010 06:47:04

Message: 3 of 13

thanks, IA

Subject: ImageJ vs. Image Processing Toolkit

From: Malcolm Lidierth

Date: 6 Sep, 2010 17:19:05

Message: 4 of 13

I am working on a MATLAB Interface for ImageJ/Fiji at the moment (For Fiji see http://pacific.mpi-cbg.de/wiki/index.php/Fiji - it addresses some of the issues about ImageJ not having many features).

It is very easy to integrate these into MATLAB - using an occassional undocumented feature you'll be pleased to hear Yair! Basically ImageJ is invoked from MATLAB then its menus and toolbar are parasitised for a MATLAB figure. The ImageJ menus already contain the commands needed for ImageJ so the MATLAB menu callbacks simply invoke the ImageJ Executor class trough a call to MATLAB's AWTUtilities.invokeAndWait. Very little additional programming is needed and because the menus etc are copied dynamically, the MATLAB interface should update automatically with new releases of ImageJ/Fiji

The only real issue is how best to deal with the mutiple windows (AWT Frames) used by ImageJ to show its images. These can be left floating in mid-air and all is well but I would like to put them in a single figure. Presently, I am using a JTabbedPane and copying the undelying AWT canvas to the pane. I now think it would be better just to position the AWT Frame to the centre of the MATLAB figure, use the ResizeFcn to keep it there, and use the Tabs only to control the ImageJ currentWindow property. Any thoughts Yair?

Regards
Malcolm

Subject: ImageJ vs. Image Processing Toolkit

From: David Young

Date: 6 Sep, 2010 18:37:07

Message: 5 of 13

Interesting question and interesting replies. Thank you!

Subject: ImageJ vs. Image Processing Toolkit

From: Yair Altman

Date: 6 Sep, 2010 21:02:05

Message: 6 of 13

> The only real issue is how best to deal with the multiple windows (AWT Frames) used by ImageJ to show its images. These can be left floating in mid-air and all is well but I would like to put them in a single figure. Presently, I am using a JTabbedPane and copying the underlying AWT canvas to the pane. I now think it would be better just to position the AWT Frame to the centre of the MATLAB figure, use the ResizeFcn to keep it there, and use the Tabs only to control the ImageJ currentWindow property. Any thoughts Yair?


Interesting ideas indeed. Using tabs to control the displayed contents is actually Matlab's chosen implementation of their uitab/uitabgroup functions, using some clever callback hooks. You can perhaps even use Matlab's uitab/uitabgroup to save programming, although you'd need to fix the bug that prevents switching non-uicontrol container contents.

This *might* have the benefit of reducing system resources vs. a full-JTabbedPane implementation, where all images are "live" at the same time. Drawbacks might be performance and flicker. It would also be more difficult to implement correctly than a simple JTP approach.

Then again, if everything were simple, where would all the fun be?

Best,
Yair Altman
http://UndocumentedMatlab.com

Subject: ImageJ vs. Image Processing Toolkit

From: James Tursa

Date: 7 Sep, 2010 02:33:09

Message: 7 of 13

ImageAnalyst <imageanalyst@mailinator.com> wrote in message <8de93b53-037b-4136-b684-491df765d773@a36g2000yqc.googlegroups.com>...
>
> MATLAB has quirks too (like not being able to multiply integer arrays
> by floating arrays or integer arrays of different bit depths)

FYI, it wouldn't be too difficult to write a mex routine to do this. If it is something you could really use just let me know. (I assume by multiply you mean times, not mtimes?)

James Tursa

Subject: ImageJ vs. Image Processing Toolkit

From: Mahirah

Date: 22 Feb, 2012 01:05:10

Message: 8 of 13

I have an image of paddy, grass and branch.
i need to find the long of the branch and discriminate between the grass, paddy and branch.
Can anyone give me some ideas?
And another one, i have some processing algorithm, but i don't know how to do the programming. can anyone help me?

Subject: ImageJ vs. Image Processing Toolkit

From: Nesanet

Date: 25 Mar, 2013 15:27:05

Message: 9 of 13

Hello Malcom. Is your MATLAB interface publicly available and is it specifically writting for the Fiji version of ImageJ or for the original ImageJ as well? Thank you.

"Malcolm Lidierth" wrote in message <i637q9$so6$1@fred.mathworks.com>...
> I am working on a MATLAB Interface for ImageJ/Fiji at the moment (For Fiji see http://pacific.mpi-cbg.de/wiki/index.php/Fiji - it addresses some of the issues about ImageJ not having many features).
>
> It is very easy to integrate these into MATLAB - using an occassional undocumented feature you'll be pleased to hear Yair! Basically ImageJ is invoked from MATLAB then its menus and toolbar are parasitised for a MATLAB figure. The ImageJ menus already contain the commands needed for ImageJ so the MATLAB menu callbacks simply invoke the ImageJ Executor class trough a call to MATLAB's AWTUtilities.invokeAndWait. Very little additional programming is needed and because the menus etc are copied dynamically, the MATLAB interface should update automatically with new releases of ImageJ/Fiji
>
> The only real issue is how best to deal with the mutiple windows (AWT Frames) used by ImageJ to show its images. These can be left floating in mid-air and all is well but I would like to put them in a single figure. Presently, I am using a JTabbedPane and copying the undelying AWT canvas to the pane. I now think it would be better just to position the AWT Frame to the centre of the MATLAB figure, use the ResizeFcn to keep it there, and use the Tabs only to control the ImageJ currentWindow property. Any thoughts Yair?
>
> Regards
> Malcolm

Subject: ImageJ vs. Image Processing Toolkit

From: Malcolm Lidierth

Date: 26 Mar, 2013 20:04:08

Message: 10 of 13

Nesanet

I did not complete this but a quick test shows its seems to work - albeit with a couple of quirks - with recent ImageJ's (Fiji is not required although I tailored a few features to it as I recall).

There are only a few m-files. I would happily zip them and make them available if you have a use for them.

ML

Subject: ImageJ vs. Image Processing Toolkit

From: Yi

Date: 28 Sep, 2013 08:32:08

Message: 11 of 13

"Malcolm Lidierth" wrote in message <kisuvo$t4r$1@newscl01ah.mathworks.com>...
> Nesanet
>
> I did not complete this but a quick test shows its seems to work - albeit with a couple of quirks - with recent ImageJ's (Fiji is not required although I tailored a few features to it as I recall).
>
> There are only a few m-files. I would happily zip them and make them available if you have a use for them.
>
> ML

Hi,

That a wonderful work, I'd like a copy of it too.

Thank you very much!

Yi

Subject: ImageJ vs. Image Processing Toolkit

From: Joe Yeh

Date: 15 Oct, 2013 18:05:05

Message: 12 of 13

ImageAnalyst <imageanalyst@mailinator.com> wrote in message <8de93b53-037b-4136-b684-491df765d773@a36g2000yqc.googlegroups.com>...
> Yair:
> My main complaints against ImageJ are:
>
> 1) I could never get used to the image, and imageplus objects. Each
> object class had it's own properties and methods and it seemed like no
> matter what I wanted to do, the thing I wanted was in the other object
> class. If I wanted to do a "method1" say (e.g. a median filter), and
> I had an image object, then the image object didn't support that, only
> the imageplus object did. So in the end I had to keep copies of both
> hanging around and just guess which class had it (the image or the
> imageplus), and switch to the other one if it didn't. Basically it
> was a confusing nightmare and bookkeeping headache. MATLAB is much
> easier in that the images are simply arrays. There aren't two similar
> but different complicated image classes, just simple arrays. Sure
> MATLAB has quirks too (like not being able to multiply integer arrays
> by floating arrays or integer arrays of different bit depths), but
> it's nowhere near as complicated as ImageJ's classes.
>
> 2) It didn't seem like there was that much built into ImageJ. Coming
> from other full featured and easy to learn/use packages (like ImagePro
> Plus or Optimas), ImageJ seemed pretty primitive in the quantity of
> "built in" things. It seemed like it could never do what you wanted
> and you always had to go out to their "file exchange" to see if there
> was something similar to what you wanted to do and then adapt it. I
> know MATLAB also has a file exchange where you can do that, and that
> MATLAB is also lacking in a nice full featured UI for experimenting
> with your images, but at least the code editor and command window of
> MATLAB seems like it's easier to do experimenting/exploring algorithms
> than programming in Java with ImageJ's crazy image classes.
>
> Because of those annoyances I haven't programmed in ImageJ in about 4
> years or so. I still use it but only for their color gamut plug in
> (http://rsb.info.nih.gov/ij/plugins/color-inspector.html), which is
> very very nice - I wish MATLAB had that. I tried to write my own one
> time but it was just too big a job so I decided just to keep using
> ImageJ's.
>
> ImageJ does have an advantage over MATLAB in that it at least HAS a
> UI, where MATLAB'S IPT is almost completely command line/programming
> oriented. It would be nice if MATLAB could add a UI. However ImageJ
> can't compete (in my opinion) with nice full-fledged, but expensive,
> programs like ImagePro Plus, which has excellent GUIs.
> -ImageAnalyst

I recently have to process fluorescent resonant energy transfer images, which basically involving dividing one image by another to get ratio image, which is then used as hue and applied back to the image channel that has higher intensity which serves to illustrate cell shapes. My images are a time series of two channel serial optical sections and I need to browse through both space and time. I find it extremely awkward to do this in ImageJ since it is not really very flexible. And coding with ImageJ is just overwhelming !! After spending two weeks googling and going through documents and online courses, however, this is done rather satisfactorily in Matlab. (also, I learned that ImageJ can not open compressed Tiff files...)

However, I did find ImageJ to perform much better in handling routine works like browsing through files. I can easily glide through a very thick stack of RGB tiff images without any problem wile the slider in Matlab GUI can not tolerate continuous action too well and was eventually arrested. Could it be the way I code it? I wonder if anyone has any experience or thoughts on this?

Thanks

Joe

Subject: ImageJ vs. Image Processing Toolkit

From: Brett Shoelson

Date: 17 Oct, 2013 12:49:38

Message: 13 of 13

"Joe Yeh" wrote in message <l3k04h$7ah$1@newscl01ah.mathworks.com>...
> ImageAnalyst <imageanalyst@mailinator.com> wrote in message <8de93b53-037b-4136-b684-491df765d773@a36g2000yqc.googlegroups.com>...
> > Yair:
> > My main complaints against ImageJ are:
> >
> > 1) I could never get used to the image, and imageplus objects. Each
> > object class had it's own properties and methods and it seemed like no
> > matter what I wanted to do, the thing I wanted was in the other object
> > class. If I wanted to do a "method1" say (e.g. a median filter), and
> > I had an image object, then the image object didn't support that, only
> > the imageplus object did. So in the end I had to keep copies of both
> > hanging around and just guess which class had it (the image or the
> > imageplus), and switch to the other one if it didn't. Basically it
> > was a confusing nightmare and bookkeeping headache. MATLAB is much
> > easier in that the images are simply arrays. There aren't two similar
> > but different complicated image classes, just simple arrays. Sure
> > MATLAB has quirks too (like not being able to multiply integer arrays
> > by floating arrays or integer arrays of different bit depths), but
> > it's nowhere near as complicated as ImageJ's classes.
> >
> > 2) It didn't seem like there was that much built into ImageJ. Coming
> > from other full featured and easy to learn/use packages (like ImagePro
> > Plus or Optimas), ImageJ seemed pretty primitive in the quantity of
> > "built in" things. It seemed like it could never do what you wanted
> > and you always had to go out to their "file exchange" to see if there
> > was something similar to what you wanted to do and then adapt it. I
> > know MATLAB also has a file exchange where you can do that, and that
> > MATLAB is also lacking in a nice full featured UI for experimenting
> > with your images, but at least the code editor and command window of
> > MATLAB seems like it's easier to do experimenting/exploring algorithms
> > than programming in Java with ImageJ's crazy image classes.
> >
> > Because of those annoyances I haven't programmed in ImageJ in about 4
> > years or so. I still use it but only for their color gamut plug in
> > (http://rsb.info.nih.gov/ij/plugins/color-inspector.html), which is
> > very very nice - I wish MATLAB had that. I tried to write my own one
> > time but it was just too big a job so I decided just to keep using
> > ImageJ's.
> >
> > ImageJ does have an advantage over MATLAB in that it at least HAS a
> > UI, where MATLAB'S IPT is almost completely command line/programming
> > oriented. It would be nice if MATLAB could add a UI. However ImageJ
> > can't compete (in my opinion) with nice full-fledged, but expensive,
> > programs like ImagePro Plus, which has excellent GUIs.
> > -ImageAnalyst
>
> I recently have to process fluorescent resonant energy transfer images, which basically involving dividing one image by another to get ratio image, which is then used as hue and applied back to the image channel that has higher intensity which serves to illustrate cell shapes. My images are a time series of two channel serial optical sections and I need to browse through both space and time. I find it extremely awkward to do this in ImageJ since it is not really very flexible. And coding with ImageJ is just overwhelming !! After spending two weeks googling and going through documents and online courses, however, this is done rather satisfactorily in Matlab. (also, I learned that ImageJ can not open compressed Tiff files...)
>
> However, I did find ImageJ to perform much better in handling routine works like browsing through files. I can easily glide through a very thick stack of RGB tiff images without any problem wile the slider in Matlab GUI can not tolerate continuous action too well and was eventually arrested. Could it be the way I code it? I wonder if anyone has any experience or thoughts on this?
>
> Thanks
>
> Joe

@Joe:
I use sliders all the time (I particularly like sliderPanel: http://www.mathworks.com/matlabcentral/fileexchange/13845-sliderpanel). I wonder if the sluggishness you're seeing with them can be addressed by modifying 'interruptible' or 'busyaction' properties of the sliders. Also, there are ways of making image displays faster--like reusing existing graphics objects by (for example) modifying the cdata and x- y-limits, versus re-issuing an imshow. Moreover, there are often many ways to do the same thing, in MATLAB as in any language; it's hard to say without looking at your code if you've followed good coding practices. You might also consider creating an ND array (MxNx[3 or 1]xP), and using IMPLAY to scan through your images.

I also have some thoughts and questions relating to the original thread topic (Yair, ImageAnalyst...). Because that thread is so old, I'm going to post those comments in a new on-(original)-topic thread.

Best regards,
Brett

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us