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

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

[Octave-bug-tracker] [bug #41851] ind2rgb tests


From: Guillaume
Subject: [Octave-bug-tracker] [bug #41851] ind2rgb tests
Date: Thu, 13 Mar 2014 17:46:50 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:20.0) Gecko/20100101 Firefox/20.0

Follow-up Comment #2, bug #41851 (project octave):

Sorry about that, I should have copied the exact code I used:


img = [2 4 5; 3 2 5; 1 2 4];
map = [0.0  0.0  0.0
       0.2  0.4  0.6
       0.4  0.4  0.5
       0.3  0.7  1.0
       0.1  0.5  0.8];
img = uint8 (img -1);
[rgb] = ind2rgb (double(img), map)


MATLAB returns:

rgb(:,:,1) =
         0    0.4000    0.3000
    0.2000         0    0.3000
         0         0    0.4000
rgb(:,:,2) =
         0    0.4000    0.7000
    0.4000         0    0.7000
         0         0    0.4000
rgb(:,:,3) =
         0    0.5000    1.0000
    0.6000         0    1.0000
         0         0    0.5000


while Octave dev returns:

error: ind2rgb: X must be an indexed image


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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