bugGNU Octave - Bugs: bug #33615, imwrite not taking same colormaps...

 
 

bug #33615: imwrite not taking same colormaps as parameters as MATLAB

Submitted by:  Andrew Dougherty <adougher>
Submitted on:  Tue 21 Jun 2011 07:32:00 PM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 04 Nov 2013 10:14:16 PM UTC, comment #4:

The problem was because the given colormap [1 1 1; 0 0 0] does not have enough colors for the image (indexed) that had values up to 256.

Apparently, Matlab silently fills the colormap with black (RGB 0,0,0). It does NOT convert the indices without a matching value on the colormap (I checked reading back the image, and the colormap had been extended, and not the indices above the colormap that were brought to a valid color)

I have pushed a change (cset 45e325002810) that fixes this. I don't like the behavior of changing the colormap so I made Octave issue a warning when this happens.

There is a very very small problem though. Because the way Graphics Magick works, when reading that image back, it is read as an indexed logical matrix. This is because the colormap has actually only 2 colors. This is likely to be a very rare occasion, if the colormap has 3 colors, there is no issue at all.

Carnë Draug <carandraug>
Project Member
Mon 30 Sep 2013 01:57:53 AM UTC, comment #3:

Some progress on this. The first example

now works in the current development version of Octave.

The second example causes Octave to crash

Mike Miller <mtmiller>
Project Administrator
Fri 29 Jul 2011 03:55:02 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>
Project Administrator
Fri 29 Jul 2011 03:33:56 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:32:00 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 commands:

OR

Produces the following error, which does not occur in MATLAB:

Andrew Dougherty <adougher>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by jordigh (Posted a comment)
  • -unavailable- added by adougher (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 04 Nov 2013 10:14:16 PM UTCcarandraugStatusNeed Info=>Fixed
      Open/ClosedOpen=>Closed
    Mon 30 Sep 2013 01:57:53 AM UTCmtmillerCategoryNone=>Octave Function
      StatusNone=>Need Info
      Release3.4.0=>dev
      Operating SystemMicrosoft Windows=>Any

    Back to the top


    Powered by Savane 3.1-cleanup1