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

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

[Octave-bug-tracker] [bug #47506] rgb2ind creates colormap incompartible


From: Carnë Draug
Subject: [Octave-bug-tracker] [bug #47506] rgb2ind creates colormap incompartible to ind2rgb
Date: Wed, 23 Mar 2016 16:14:29 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.7.1

Update of bug #47506 (project octave):

              Item Group:                   Crash => Incorrect Result       
                  Status:                    None => Duplicate              
              Depends on:                         => bugs #41851            

    _______________________________________________________

Follow-up Comment #1:

The problem is that your image M is not really a RGB image (or not a very
sensible one at least). It will work if you change its type to uint8.


octave> [Mind, map] = rgb2ind (uint8 (M));
octave> Mrgb = ind2rgb (Mind, map);


Your rgb image is of class double therefore its values should be in the range
[0 1]. The real issue is with ind2rgb  not handling values outside that range.
 This has been addressed in bug #41851 and already fixed (it will be part of
4.2 or whatever is the upcoming minor release).

Note that even with the fix, you will not get back the same values. Your
values will be clipped to the [0 1] range.

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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