bugGNU Octave - Bugs: bug #33612, Imread returns slightly different...

 
 

bug #33612: Imread returns slightly different values than MATLAB

Submitter:  Andrew Dougherty <adougher>
Submitted:  Tue 21 Jun 2011 07:22:28 PM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Works For Me Assigned to:  None
Originator Name:  Andrew Dougherty Open/Closed:  * Closed
Release:  * 3.4.0 Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Mon 24 Jun 2013 04:08:37 AM UTC, comment #10: 

Under Cygwin with Octave 3.6.4 the results are the same as before.  They come with a disclaimer however:

warning: your version of GraphicsMagick limits images to 16 bits per pixel

Perhaps a different build of GraphicsMagick would make the results match.  I think if this is in fact a bug it is not with Octave but with GraphicsMagick and/or Cygwin.  Accordingly, I think the bug can be closed.

Andrew Dougherty <adougher>
Sat 22 Jun 2013 12:53:20 PM UTC, comment #9: 

Does this issue still exist under Cygwin with a recent development version of Octave? Can  this bug be closed ?

D.

David Bateman <dbateman>
Group Member
Sun 31 Jul 2011 07:00:10 PM UTC, comment #8: 

But it is a bug nonetheless. I don't know where it should be reported, but ideally I wish it were also here. Unfortunately, we have very few people working on the Windows build, and they generally don't follow this bug tracker, I don't think.

Try the Cygwin mailing list or perhaps the Octave-Forge lists.

Jordi Gutiérrez Hermoso <jordigh>
Group Member
Sun 31 Jul 2011 01:24:25 PM UTC, comment #7: 

It looks like the issue is, indeed, with the Cygwin build, so, as far as OCTAVE itself is concerned, the bug can be safely closed.

On another topic, that have I reported: my warning "your version of GraphicsMagick limits images to 8 bits per pixel" is not a bug, but a feature, e.g. http://octave.1599824.n4.nabble.com/GraphicsMagick-limitations-td3523937.html

Andrew <andrewknyazev>
Sun 31 Jul 2011 01:11:06 PM UTC, comment #6: 

On my FC15 setup, see below, I get the same results in MATLAB and OCTACT, e.g.,

octave:36> M=imread('cars.jpg');
octave:37>  M(1:10,1:10)
ans =

  99  71  53  45  40  41  50  50  50  49
  88  71  58  52  49  49  49  46  48  48
  67  61  48  39  44  46  44  42  44  46
  58  55  35  19  26  33  34  37  39  42
  60  55  33  12  15  22  25  29  33  36
  37  32  21  10  12  16  18  20  26  29
  20  13  12  14  13  13  17  16  21  22
  28  16  18  24  16  13  14  11  18  20
  19  12  10  13  17  15  11  11  20  20
  18  11   8  13  16  14  13  13  19  21

Andrew <andrewknyazev>
Sun 31 Jul 2011 05:58:16 AM UTC, comment #5: 

Sure here's the file's location:

http://math.ucdenver.edu/~adougher/images/cars.jpg

Andrew Dougherty <adougher>
Sat 30 Jul 2011 12:43:48 PM UTC, comment #4: 

On my FC15, I have the latest RPMs: 6:octave-3.4.0-6.fc15.x86_64 and GraphicsMagick-1.3.12-4.fc15.x86_64

GraphicsMagick-1.3.12 is the latest available version on the developer web site.

Andrew, could you please upload the file cars.jpeg somewhere and post its location here? I cannot reproduce the problem on a jpeg file that I have tried.

However, I run into a different(?) problem:

M=imread('synthgif01.gif');
warning: your version of GraphicsMagick limits images to 8 bits per pixel

and the values are completely different from those in MATLAB.


Andrew <andrewknyazev>
Fri 29 Jul 2011 04:07:05 AM UTC, comment #3: 

I can't reproduce this bug in my GNU/Linux dev build. I think it's a peculiarity of the Windows build. Can you try a more recent build? I think other people have reported problems with Marco's Cygwin build.

Jordi Gutiérrez Hermoso <jordigh>
Group Member
Fri 29 Jul 2011 03:55:15 AM UTC, comment #2: 

Same answer for any other volunteer-drive project: when it's ready, sooner if you help. If it's easier for you to state that your package doesn't work with Octave than to help us fix Octave, go ahead.

Jordi Gutiérrez Hermoso <jordigh>
Group Member
Fri 29 Jul 2011 03:32:11 AM UTC, comment #1: 

How long might it take to get a response and/or fix on this bug report?  If it is not addressed promptly we may have to drop octave support for the image segmentation package found here:

http://code.google.com/p/blopex/downloads/list

Regards,
Andrew

Andrew Dougherty <adougher>
Tue 21 Jun 2011 07:22:28 PM UTC, original submission:  

in Cygwin 1.7.9 (a recent fresh install including Octave 3.4.0 and GraphicMagick-1.3.12)

Running the following using the first attached file:


M=imread('cars.jpeg');
M(1:10,1:10)


in both Octave and MATLAB(7.10.0.499 (R2010a)) produces


ans =

  99  73  53  46  38  41  50  50  50  49
  88  73  58  52  49  49  49  46  48  48
  67  61  47  39  44  46  44  42  44  46
  58  55  35  19  26  34  34  38  40  42
  59  55  31  12  15  22  25  29  33  37
  37  32  21  10  12  17  18  20  26  29
  20  13  11  14  13  13  17  16  21  24
  28  16  18  24  16  13  14  12  18  20
  19  12  10  13  17  15  11  11  18  20
  18  12   8  13  16  14  13  13  19  21



ans =

   99   71   53   45   40   41   50   50   50   49
   88   71   58   52   49   49   49   46   48   48
   67   61   48   39   44   46   44   42   44   46
   58   55   35   19   26   33   34   37   39   42
   60   55   33   12   15   22   25   29   33   36
   37   32   21   10   12   16   18   20   26   29
   20   13   12   14   13   13   17   16   21   22
   28   16   18   24   16   13   14   11   18   20
   19   12   10   13   17   15   11   11   20   20
   18   11    8   13   16   14   13   13   19   21


Respectively.

These slight differences exist for other files I tested as well, but hopefully this example will suffice in demonstrating the problem.

Andrew Dougherty <adougher>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #23547:  cars.jpg added by adougher (35KiB - image/jpeg)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by dbateman (Posted a comment)
  • -email is unavailable- added by andrewknyazev (Posted a comment)
  • -email is unavailable- added by jordigh (Posted a comment)
  • -email is unavailable- added by adougher (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-06-24 dbateman Open/ClosedOpen Closed
    2011-07-29 jordigh StatusNone Works For Me
    2011-06-21 adougher Attached File- Added cars.jpg, #23547

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code