bugGNU Octave - Bugs: bug #49941, image package: rgb2gray of a...

 
 

bug #49941: image package: rgb2gray of a single image produces a double image

Submitted by:  Avinoam Kalma <avinoam>
Submitted on:  Tue 27 Dec 2016 08:45:36 PM UTC  
 
Category: Octave Forge PackageSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: FixedAssigned to: Carnë Draug <carandraug>
Originator Name: AvinoamOpen/Closed: Closed
Release: otherOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Sun 29 Jan 2017 04:08:57 PM UTC, comment #3:

Not a duplicate of bug #50152, only very similar (sorry, I was reading incorrectly because I was in a rush). Fixed now with http://hg.code.sf.net/p/octave/image/rev/ec1a16084bfc

Carnë Draug <carandraug>
Project MemberIn charge of this item.
Sun 29 Jan 2017 04:00:11 PM UTC, comment #2:

I believe anonymous is right about the skipping the conversion to double completely on the case of images of class single. I have fixed like that for the bug #50152 (a duplicate of this).

To Avinoam:

you don't need to

because assert takes an observed and expected arguments. Instead, use:

Carnë Draug <carandraug>
Project MemberIn charge of this item.
Thu 26 Jan 2017 10:05:57 AM UTC, comment #1:

Actually, it might be an idea to handle the line

gray = im2double (rgb)...

differently and convert to double only in the case of uint8/uint16. This way if the input is single, the calculation is also done at single precision (saves a lot for very large images).

Also see bug #50152

Anonymous
Tue 27 Dec 2016 08:45:36 PM UTC, original submission:

rgb2gray of a single image produces a double image, while in
MATLAB the result is single.

The fix is very simple: instead of

There should be:

A BIST:

Avinoam Kalma <avinoam>
Project Member

 

(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 (Submitted the item)
  • -unavailable- added by avinoam
  •  

    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 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 29 Jan 2017 04:00:35 PM UTCcarandraugStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Sun 29 Jan 2017 04:00:11 PM UTCcarandraugDependencies-=>Depends on bugs #50152
    Tue 27 Dec 2016 08:45:36 PM UTCavinoamCarbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1