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

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

[Octave-bug-tracker] [bug #40664] Inconsistent handling of N-dimensional


From: Adam H Aitkenhead
Subject: [Octave-bug-tracker] [bug #40664] Inconsistent handling of N-dimensional RGB images
Date: Fri, 22 Nov 2013 16:51:15 +0000
User-agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36

Follow-up Comment #6, bug #40664 (project octave):

Matlab's implementation for gray2ind works for ND arrays, we can't say if
that's through accident or intent.  Whether other functions work properly for
ND or not would have to be checked individually.  But either way, if
equivalent Octave functions can be written which do handle ND arrays
correctly, then there is no downside to allowing it.  If that ability is
documented and clear to anyone wishing to use it, then all is good.

Input checks which block valid (although perhaps not common) uses of a
function seem like a recipe for frustration with little benefit in return.  If
a user unwittingly inputs an ND array to rgb2ind or ind2rgb then the lack of
an error message is unlikely to be a problem for them.  They might even think
'That's cool, Octave still meaningfully processes that unusual data.'

The use of ind2rgb and rgb2ind needn't be limited to the capabilities of other
read/write image functions.  There are other more general uses - which is how
I came across this issue in the first place.  (Also, the current
implementation of ind2rgb blocks the use of 4D images.  It can only handle 2D
or 3D RGB images.)



    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?40664>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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