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

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

[Octave-bug-tracker] [bug #61845] [octave forge] (image) speed of imrota


From: Christof Kaufmann
Subject: [Octave-bug-tracker] [bug #61845] [octave forge] (image) speed of imrotate with bicubic interpolation increased
Date: Thu, 27 Jan 2022 09:21:25 -0500 (EST)

Follow-up Comment #4, bug #61845 (project octave):

I made a simple patch (as full file and as diff) for imremap, that uses
"single" for 8 and 16 bit integer (and also for "single") images. It just does
not make sense to convert these to double. I have not checked it very
thoroughly, since imremap is lacking tests, but the patch is quite simple. It
should improve the performance quite a bit:

I = uint16 (checkerboard (1000) * 65535);
tic;
J = imrotate(I,36,'bicubic','crop',1);
t=toc

* before: 63.032
* with patch: 44.580
But also some of the other methods are faster:

I = uint16 (checkerboard (1000) * 65535);
tic;
J = imrotate(I,36,'pchip','crop',1);
t=toc

* before: 38.220
* with patch: 28.364
Although especially pchip would be faster for multi-channel images, if interp2
supported them.
For "linear" there seems to be no speed-up.

(file #52748, file #52749)
    _______________________________________________________

Additional Item Attachment:

File name: imremap.m                      Size:11 KB
    <https://file.savannah.gnu.org/file/imremap.m?file_id=52748>

File name: imremap_cast.diff              Size:2 KB
    <https://file.savannah.gnu.org/file/imremap_cast.diff?file_id=52749>



    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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