[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #41851] ind2rgb tests
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #41851] ind2rgb tests |
Date: |
Thu, 13 Mar 2014 21:42:20 +0000 |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:27.0) Gecko/20100101 Firefox/27.0 |
Follow-up Comment #3, bug #41851 (project octave):
I don't know what Matlab is doing, but I think Octave is correct in rejecting
the variable img as not being an indexed image.
When the img is of type double, a 1 in the matrix points to the first row in
the colormap. When the img is an integer type, such as uint8, then an offset
of 1 is used such that a 0 in the matrix points to the first row in the
colormap. See Matlab's own documentation for more information
(http://www.mathworks.com/help/matlab/creating_plots/image-types.html).
In the posted code, the image is originally in uint8 format and thus has 0
values. Using double() to convert a uint8 image is not correct. You actually
need to do
img_double = double (img) + 1;
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?41851>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #41851] ind2rgb tests, Guillaume, 2014/03/13
- [Octave-bug-tracker] [bug #41851] ind2rgb tests, Carnë Draug, 2014/03/13
- [Octave-bug-tracker] [bug #41851] ind2rgb tests, Guillaume, 2014/03/13
- [Octave-bug-tracker] [bug #41851] ind2rgb tests,
Rik <=
- [Octave-bug-tracker] [bug #41851] ind2rgb tests, Carnë Draug, 2014/03/13
- [Octave-bug-tracker] [bug #41851] ind2rgb tests, Carnë Draug, 2014/03/13
- [Octave-bug-tracker] [bug #41851] ind2rgb tests, Guillaume, 2014/03/14
- [Octave-bug-tracker] [bug #41851] ind2rgb values outside range of colour map, Carnë Draug, 2014/03/14
- [Octave-bug-tracker] [bug #41851] ind2rgb values outside range of colour map, Guillaume, 2014/03/17
- [Octave-bug-tracker] [bug #41851] ind2rgb values outside range of colour map, Carnë Draug, 2014/03/17
- [Octave-bug-tracker] [bug #41851] ind2rgb values outside range of colour map, Rik, 2014/03/17
- [Octave-bug-tracker] [bug #41851] ind2rgb values outside range of colour map, Guillaume, 2014/03/17
- [Octave-bug-tracker] [bug #41851] ind2rgb values outside range of colour map, Carnë Draug, 2014/03/17
- [Octave-bug-tracker] [bug #41851] ind2rgb values outside range of colour map, Rik, 2014/03/17