octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #61760] [octave forge] (image) imresize - anti


From: Christof Kaufmann
Subject: [Octave-bug-tracker] [bug #61760] [octave forge] (image) imresize - antialiasing is not implemented
Date: Wed, 5 Jan 2022 11:16:36 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0

Follow-up Comment #1, bug #61760 (project octave):

So anti-aliasing can be avoided by reducing high-frequency components in the
image before downscaling. This can be done e. g. by applying a gaussian blur
with sigma = 1/scale/2. I tried that, but it gives quite different results
than the method used by Matlab.

Then I found this blog:
https://blogs.mathworks.com/steve/2017/01/16/aliasing-and-image-resizing-part-3/

With this anti-aliasing method I get the same results as in Matlab. However, I
only tried bicubic interpolation yet, since the method requires convolution
based interpolation and we only do this for bicubic interpolation currently.
So, my opinion is, that because of anti-aliasing we should implement all
interpolation methods as convolution kernels. This would also allow to
implement "box", "lanczos2" and "lanczos3" interpolation methods, which exist
in Matlab, but not in Octave yet. For upscaling and for downlscaling without
anti-aliasing we could still use interp2 for bilinear and nearest neighbour
methods, but I am not sure whether it wouldn't be simpler to do it all by
convolution then. What is your opinion?

Also the defaults should be updated to bicubic with anti-aliasing (only in
case of downscaling).

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?61760>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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