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

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

[Octave-patch-tracker] [patch #9717] [octave forge] (image) new function


From: Hartmut
Subject: [Octave-patch-tracker] [patch #9717] [octave forge] (image) new function imapplymatrix
Date: Mon, 25 Jan 2021 16:05:22 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0

Follow-up Comment #1, patch #9717 (project octave):

@Martin Janda: Thank you for this nice piece of code for the Octave image
package. And I feel sorry that it took so long for you to get any feedback on
it.

@Carne, @Avinoam: I would like to push this new function "imapplymatrix.m" to
the image repo during in roughly two weeks. Please have a look if you have any
objections against this.

Here is what I have looked at already in this new function imapplymatrix.m:

* All BIST tests pass. And there is a fair amount of useful tests included.
* All BIST tests test for fully Matlab compatible results. (Except for the
very last test, this one tests "Octave only" behavior.)
* Coding style looks all right. (Though there might be a few lines where I
missed a missing space character.)
* The function also works fine under Octave 4.2.2 (The oldest Octave version,
that the image package currently still supports.)
* When running the demo code on the Matlab help page for this function, then I
get (visually) the same results as in Matlab.
* There is a useful help text included.
* Maybe we should add a single semicolon at the end of line #181. (A line
break in a BIST test here generates a second row in a matrix.) I can do this
AFTER pushing.
* There is some reshaping of the input data going on, in order to use the
(fast) matrix multiplication of Octave to do the core calculation job. This
looks good to me.
** I have tested the run time: X=rand(1e4,1e4,3); imapplymatrix([1,1,1],X)
takes roughly 3sec to compute on my laptop. Compared to 1sec to do X.*X this
computation speed looks alright to me.
* This function also supports Nd images (ndims >=4). The Matlab function can
only deal with 3d images. So for n=>4 this behavior is "Octave only". But this
is fine.
* The function seems to support all the input data types that Matlab supports.
(Although this is not explicitly tested for every single data type in a BIST
test.)

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/patch/?9717>

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




reply via email to

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