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

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

[Octave-patch-tracker] [patch #8722] [octave forge] (image) implement im


From: Hartmut
Subject: [Octave-patch-tracker] [patch #8722] [octave forge] (image) implement impixelinfo and impixelinfoval
Date: Sat, 22 May 2021 12:21:29 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0

Follow-up Comment #17, patch #8722 (project octave):

I have tested the files from Andreas (see his comment #15) and they work quite
reasonably, already.

Regarding the question in comment #16: Andreas' current implementation shows
the coordinates (1,1) for the top-left most black pixel in this example image.
This is identical to what Matlab shows. Also the displayed coordinate value
for the bottom-right most black pixel is identical to what Matlab displays. I
think there is no need to improve the 0/1 coordinate origin in any way.

Nevertheless I have found some minor issues with this code:
* When the mouse position is outside of the image position this code now
displays "no image". Matlab displays a different dummy text in this situation:
"Pixel Info (X,Y) Intensity".
* The displayed text string currently has a surplus closed bracket at the end
(at least in the case of grayvalue images).
* The function impixelinfo does not return any handle (it should return a
handle to a uipanel object). This could easily be fixed by returning the
already existing h variable.
* The function impixelinfoval does also not return any handle (it should
return a handle to a uicontrol object). This could easily be fixed by
returning the already existing txt variable.
* The function impixelinfoval checks if it is called from inside impixelinfo
and then generates a different text string (including the additional "Pixel
Info" string). This seems overly complex to me. Could we not skip this check
in impixelinfoval, and then add this "Pixel Info" string at the beginning of
the displayed string inside of the calling impixelinfo.m? Or is there a good
reason to do it this way?
* There are also a couple of "fix me" issues mentioned in the code itself:
** The documentation text at the beginning of the file is missing in both
files.
** Indexed images do not yet work.
* I see the error message "error: get: H must be a graphics handle" when
running the test_it.m script and using the mouse in figure 3 (with the 2
subplots).

I think most of the issues could easily be fixed. And I would like to see
these two new functions included into the image package.

@Andreas: Do you know if the Octave issue with the "extent" property, that you
mention in your code, has already been fixed in the meantime?

How should we proceed here? 
* Is anyone currently still working on this? 
* If not: Is anyone willing to work on this with the prospect of having this
included in the image package eventually?
* If also not: Would anyone mind if I changed the code myself? (Only in case I
find the necessary time before someone else does.)

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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