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 12:30:44 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:20.0) Gecko/20100101 Firefox/20.0

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

                 Summary: ind2rgb tests
                 Project: GNU Octave
            Submitted by: gyom
            Submitted on: Thu 13 Mar 2014 12:30:44 PM GMT
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Matlab Compatibility
                  Status: None
             Assigned to: None
         Originator Name: Guillaume
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: Any

    _______________________________________________________

Details:

The tests for ind2rgb return a different output in MATLAB for floating point
inputs: (using variables from scripts/image/ind2rgb.m)


>> [rgb] = ind2rgb (double(img), map)
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 expects an error.
The other tests in "Test input validation" that do not return an error are:

>> ind2rgb (sparse (1), jet (64))
ans(:,:,1) =
     0
ans(:,:,2) =
     0
ans(:,:,3) =
    0.5625
>> ind2rgb (0, jet (64))
ans(:,:,1) =
     0
ans(:,:,2) =
     0
ans(:,:,3) =
    0.5625
>> ind2rgb (1, ones (2,2,2))
ans(:,:,1) =
     1
ans(:,:,2) =
     1
ans(:,:,3) =
     1
>> ind2rgb (1, ones (2,4))
ans(:,:,1) =
     1
ans(:,:,2) =
     1
ans(:,:,3) =
     1





    _______________________________________________________

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]