bugGNU Octave - Bugs: bug #37712, rgb2ind does not return a colormap

 
 

bug #37712: rgb2ind does not return a colormap

Submitted by:  Carnë Draug <carandraug>
Submitted on:  Sun 11 Nov 2012 04:54:25 AM UTC  
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  dev Operating System:  Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Wed 28 Nov 2012 07:17:26 PM UTC, comment #2:

Pulled and merged:

http://hg.savannah.gnu.org/hgweb/octave/graph/310db14aa605

Jordi Gutiérrez Hermoso <jordigh>
Project Administrator
Thu 15 Nov 2012 06:24:39 PM UTC, comment #1:

The previous changeset did fix the problem but there was a very very noticeable slow down of the code. The changeset 37a21f6 from https://bitbucket.org/carandraug/octave/ fix this. The code is much much faster and also much more readable (thanks Jordi).

Please pull changesets 89c8d8f and 37a21f6 from there.

Carnë Draug <carandraug>
Project Member
Sun 11 Nov 2012 04:54:25 AM UTC, original submission:

Hi

the colormap returned by rgb2ind is not an actual colormap as its values are the ones in the original image. But a colormap need to be rescale as it must be of class double and its values between [0 1].

When fixing this I noticed another problem. For each image point, a new entry on the colormap is created rather than finding the unique combination of values and indexing them. I have a patch that fixes both of this problems and also increases some matlab compatibility by checking the correct class.

Please see changeset 89c8d8f8f87b from https://bitbucket.org/carandraug/octave/

Pretty much only the documentation and input check is left from the original file.

Carnë

Carnë Draug <carandraug>
Project Member

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jordigh (Updated the item)
  • -email is unavailable- added by carandraug (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can 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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    Wed 28 Nov 2012 07:17:26 PM UTC jordigh StatusPatch Submitted => Fixed
        Open/ClosedOpen => Closed
    Mon 12 Nov 2012 03:33:19 PM UTC jordigh StatusNone => Patch Submitted

    Back to the top


    Powered by Savane 3.3