[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: imresize and ImageJ

From: James Sherman Jr.
Subject: Re: imresize and ImageJ
Date: Tue, 19 Aug 2014 15:18:28 -0400

On Tue, Aug 19, 2014 at 12:36 PM, ijourneaux <address@hidden> wrote:
I am trying to understand some differences in the results between ImageJ and
Octave when resizing an image

In imageJ If I start with a gray scale image that is 4000x1200 pixels and
scale it down to 1000x300  then down to 250x75. The default for ImageJ are

If I repeat the same steps in Octave, i.e. imresize(a, .25, linear) the std
deviations are not what I would have expected.
Here are the stdev
                     ImageJ       Octave
4000x1200      4.694          4.694
1000x300        3.253          4.711
250x75           2.007          4.555

The drop in std dev seen in ImageJ seem to be what I would have expected.
With Octave, the fact that the std dev actaully increased in the first
resize operation seems particularly odd.

Perhaps I am misinterpreting what imresize is supposed to do in Octave?
Appreciate any thoughts.

View this message in context:
Sent from the Octave - General mailing list archive at

Help-octave mailing list

I'm not familiar with ImageJ, but when you're shrinking an image by a particular factor (in this case by 4) that is an evenly divisible by the size of the image, then you should just end up with a straightforward subsampled image, no interpolation needed.  For a toy example, take a simple 16x16 image:

> rampim = uint8(reshape(0:255,[16 16]));
> smallim = imresize(rampim, .25);

and then compare smallim to a simple subsampling:

> rampim(1:5:end, 1:5:end)

From my work in image processing, I believe this to be the standard behavior and I'm not sure what ImageJ is doing in this scenario.  You could try a comparison with increasing the size of the image or resizing by a factor that isn't evenly divisible by the image size, but wouldn't a better comparison be by looking at the images themselves?

James Sherman

reply via email to

[Prev in Thread] Current Thread [Next in Thread]