[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #41851] ind2rgb tests
From: |
Carnë Draug |
Subject: |
[Octave-bug-tracker] [bug #41851] ind2rgb tests |
Date: |
Thu, 13 Mar 2014 23:03:55 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20140207 Firefox/24.0 Iceweasel/24.3.0 |
Update of bug #41851 (project octave):
Status: None => Invalid
_______________________________________________________
Follow-up Comment #4:
I second Rik's opinion.
Ignoring the case of the class explanation, you will notice that in your
example, the indexed image has indices with a value of "zero" and "one" (the
first and third row of the first column). From your example, it seems that
Matlab assigns the same colour to both of them. How come two different indices
give the same colour when there's no repeated colours in the colormap?
This is yet another case where Matlab returns rubbish due to improper input
check. A matrix of class double is only an indexed image if all values are
positive integers. Rather than returning a wrong answer, Octave gives an
error. That sounds right to me so I'm marking this as invalid.
Another suggestion. Instead of using
img_double = double (img) + 1;
I'll instead recommend to use the image package which has a set of functions
meant to convert an image between different types. If they are indexed, you
can do
im2double (img, "indexed")
which handles all the details for you.
_______________________________________________________
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, 2014/03/13
- [Octave-bug-tracker] [bug #41851] ind2rgb tests,
Carnë Draug <=
- [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