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

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

[Octave-patch-tracker] [patch #10095] [octave forge] (image) new functio


From: Hartmut
Subject: [Octave-patch-tracker] [patch #10095] [octave forge] (image) new function imshowpair
Date: Thu, 16 Dec 2021 05:04:20 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0

Follow-up Comment #4, patch #10095 (project octave):

I have eventually found the time to have a closer took into this new function
contribution imshowpair.m. The following points are already very good:

* I have tried all the code examples on the Mathworks help page to this
function, and the results looked visually the same to me. 
* I have checked all allowed image input types, and they all worked properly.
* I have checked all allowed input parameters, and they all work fine. Only
the parameter "Interpolation" is not implemented yet, but this new functions
works nevertheless and just emits a useful warning message.

In general I would be happy to see this new function pushed to the image
repository. There are just a few things that should  probably be improved
before:

* There are two code lines with an akward line break (currently line 85 and
108), those should probably be fixed.
* The help string for this new function is a bit too short. This probably be
extended to a hand full of sentences to desribe what the function does (and
not only refer to the help text of imfuse).
* There are currently no tests at all included. Since this functions mostly
only processes the input parameters and then calls imfuse.m, the tests could
well be very few in this case, but there should be at least some.

Here is my suggestion for a simple test that only checks once for each type of
input argument. It could be added at the bottom to the code of imshowpair.m:


%!test
%! A = uint8 (200.*rand (100));
%! B = uint8 (150.*rand (100));
%! RA = imref2d (size (A), 0.5, 0.5);
%! RB = imref2d (size (B), 0.5, 0.5);
%! figure;
%! Ax=axes;
%! assert (imshowpair (A, B));
%! assert (imshowpair (A, RA, B, RB));
%! assert (imshowpair (A, B, "blend"));
%! assert (imshowpair (A, B, "falsecolor", "ColorChannels", "red-cyan"));
%! assert (imshowpair (A, B, "Parent", Ax));
%! assert (imshowpair (A, B, "montage", "Scaling", "joint"));
%! close;


@Avinoam: Could you change the above small things, add my (or more if you
like) small BIST test to the code, and then push it to the image repo?

@Martin Janda: Thanks for this nice peace of code for the image package.

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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