bugGNU Octave - Bugs: bug #46382, imread returns image of class...

 
 

bug #46382: imread returns image of class logical for too many rgb images

Submitted by:  Hartmut <hardy>
Submitted on:  Thu 05 Nov 2015 09:13:33 PM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: DuplicateAssigned to: None
Originator Name: Open/Closed: Closed
Release: 4.0.0Operating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Fri 06 Nov 2015 07:08:28 AM UTC, comment #3:

Yes, you are right.
In the development branch

Avinoam Kalma <avinoam>
Project Member
Thu 05 Nov 2015 11:28:33 PM UTC, comment #2:

I think this is a duplicate of bug #41584 which was fixed back in July:

http://hg.savannah.gnu.org/hgweb/octave/rev/a7770c66cb3d

Can you please check with the development version of Octave?

Carnë Draug <carandraug>
Project Member
Thu 05 Nov 2015 10:35:45 PM UTC, comment #1:

Maybe it is not GraphicsMagick, but the lines

in _magic_read_.cc?

Avinoam Kalma <avinoam>
Project Member
Thu 05 Nov 2015 09:13:33 PM UTC, original submission:

This happens with the current 4.0.0 release of Octave:

The resulting class of I is "logical". This results in a significant amount of data loss, because all the information in the G and B channel is thus mostly discarded by imread.

I think I have read elsewhere that imread needs to do some kind of "guessing" if the read image is ment to be of class logical or of an integer class, because Image Magick doesn't provide this information. And I assume that imread does its best for greyscale images. But for RGB images like in this example, I think we could do better:

I would suggest to only assign class logical to an image (inside of the imread function) if ALL the color channels only consist of 0 and intmax. Currenetly it seems to me that for this decision only the red R channel is used.

(PS: This seems to be an artificial example. But I had a real image with only orange hues in it, where this really happened...)

Hartmut <hardy>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by avinoam (Posted a comment)
  • -unavailable- added by hardy (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 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 06 Nov 2015 11:50:53 AM UTCcarandraugStatusNone=>Duplicate
      Open/ClosedOpen=>Closed
      Dependencies-=>Depends on bugs #41584

    Back to the top


    Powered by Savane 3.1-cleanup1