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

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

[Octave-bug-tracker] [bug #47115] label2rgb from image-package doesn't w


From: Hartmut
Subject: [Octave-bug-tracker] [bug #47115] label2rgb from image-package doesn't work for labels with value above the uint16 limit
Date: Wed, 29 Mar 2017 14:57:16 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0

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

When running the "example code" from comment #0 in Matlab, then I do NOT get
an error. The result is of class uint8 and the values are 255 everywhere, and
at position (1,1) the value is (128,0,0). I get the same Matlab result, when I
use uint32(lw) as input for label2rgb.

In the Matlab documentation for label2rgb they say that "The input label
matrix L can have any numeric class.  It must contain finite, nonnegative
integers. The output of label2rgb is of class uint8."

In the Matlab documentation for ind2rgb they say that "[The input] X can be of
class uint8, uint16, or double. [The output] RGB is an m-by-n-by-3 array of
class double."

Conclusion: The class support of (core) Octave's ind2rgb seems to be Matlab
compatible. But the class support of (image packag's) label2rgb seems to NOT
be Matlab compatible, currently.

We could still do "better" than Matlab and also support uint32 in ind2x.m
(called from ind2rgb.m) if this doesn't harm any other function that also uses
ind2x.m.

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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