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

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

[Octave-bug-tracker] [bug #55373] [octave forge] (image) random failure


From: Hartmut
Subject: [Octave-bug-tracker] [bug #55373] [octave forge] (image) random failure of unit test in imadjust.m
Date: Thu, 3 Jan 2019 14:19:30 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0

URL:
  <https://savannah.gnu.org/bugs/?55373>

                 Summary: [octave forge]  (image) random failure of unit test
in imadjust.m
                 Project: GNU Octave
            Submitted by: hardy
            Submitted on: Thu 03 Jan 2019 07:19:28 PM UTC
                Category: Octave Forge Package
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Unexpected Error
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.4.1
        Operating System: Any

    _______________________________________________________

Details:

There is a unit test in imadjust.m of the image package, that randomly fails.
Observed with the current image package 2.10.0 release.

The following loop code normally produces this test failure for me (tested on
Ubunt 18.04 and Windows 10 with Octave 4.4.1):


pkg load image
for num = 1:10
    disp (num)
    test imadjust
end


Here is a typical output of the failing test:


***** test
 in_u8 = randi ([0 255], 5, 5, 2, 3, "uint8");
 in_u16 = randi ([0 65535], 5, 5, 2, 3, "uint16");
 in_i16 = randi ([-32768 32767], 5, 5, 2, 3, "int16");
 in_u8_d = im2double (in_u8);
 in_u16_d = im2double (in_u16);
 in_i16_d = im2double (in_i16);

 ## default values
 assert (imadjust (in_u8), im2uint8 (imadjust (in_u8_d)))
 assert (imadjust (in_u16), im2uint16 (imadjust (in_u16_d)))
 assert (imadjust (in_i16), im2int16 (imadjust (in_i16_d)))

 ## single adjustment for all planes
 args = {[.3; .7], [.1; .9], [1.5]};
 assert (imadjust (in_u8, args{:}), im2uint8 (imadjust (in_u8_d, args{:})))
 assert (imadjust (in_u16, args{:}), im2uint16 (imadjust (in_u16_d,
args{:})))
 assert (imadjust (in_i16, args{:}), im2int16 (imadjust (in_i16_d, args{:})))

 ## single adjustment for all planes (mixed with some complement)
 args = {reshape([.2 .3 .25 .1 0 .1; .9 .7 .85 .9 1 .8], [2 2 3]),
         reshape([.1 .2 .05 .9 1 .3; .9 .85 .7 .1 0 .9], [2 2 3]),
         reshape([1 .75 1 1.2 1.5 2], [1 2 3])};
 assert (imadjust (in_u8, args{:}), im2uint8 (imadjust (in_u8_d, args{:})))
 assert (imadjust (in_u16, args{:}), im2uint16 (imadjust (in_u16_d,
args{:})))
 assert (imadjust (in_i16, args{:}), im2int16 (imadjust (in_i16_d, args{:})))

 ## test use of [] as limit and negative
 args = {[], [.95; 0], 1.25};
 assert (imadjust (in_u8, args{:}), im2uint8 (imadjust (in_u8_d, args{:})))
 assert (imadjust (in_u16, args{:}), im2uint16 (imadjust (in_u16_d,
args{:})))
 assert (imadjust (in_i16, args{:}), im2int16 (imadjust (in_i16_d, args{:})))
!!!!! test failed
ASSERT errors for:  assert (imadjust (in_u8),im2uint8 (imadjust (in_u8_d)))

  Location  |  Observed  |  Expected  |  Reason
 (1,3,2,3)       102          103        Abs err 1 exceeds tol 0 by 1
shared variables   scalar structure containing the fields:

    oRGB =

    ans(:,:,1) =

       0.00000
       0.00000
       0.20000
       0.40000
       0.60000
       0.80000
       1.00000
       1.00000
       1.00000
       1.00000

    ans(:,:,2) =

       0.00000
       0.00000
       0.00000
       0.20000
       0.40000
       0.60000
       0.80000
       1.00000
       1.00000
       1.00000

    ans(:,:,3) =

       0.00000
       0.00000
       0.00000
       0.00000
       0.20000
       0.40000
       0.60000
       0.80000
       1.00000
       1.00000





    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?55373>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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