bugGNU Octave - Bugs: bug #47516, image package: mat2gray incorrect...

 
 

bug #47516: image package: mat2gray incorrect when MIN is greater than input maximum

Submitted by:  None
Submitted on:  Thu 24 Mar 2016 02:58:41 AM UTC  
 
Category: Octave Forge PackageSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: FixedAssigned to: None
Originator Name: MatOriginator Email: -unavailable-
Open/Closed: ClosedRelease: other
Operating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Tue 12 Apr 2016 10:51:05 AM UTC, comment #3:

Thank Avinoam. I have pushed your fix and test http://hg.code.sf.net/p/octave/image/rev/2b2c240510a8

Carnë Draug <carandraug>
Project Member
Mon 11 Apr 2016 08:55:23 PM UTC, comment #2:

The Anonymous is right, the value in place of the original minimum is 1 instead of 0.

The problem is with the lines:

The value at the minimum is changed to 0, and since 0 is greater
than the original maximum, it changed again to 1. It will happen
in any negative matrix. The solution is:

and a simple test will check this situation:

before this fix the result is [1 0.5 1]

Avinoam Kalma <avinoam>
Project Member
Thu 24 Mar 2016 01:12:10 PM UTC, comment #1:

Minimum point is 0.0018597 on my system but yeah, it should be 0.

Carnë Draug <carandraug>
Project Member
Thu 24 Mar 2016 02:58:41 AM UTC, original submission:

In following matrix: matrixLocalMin,
when applying mat2gray, the minimum point results value 1 instead of 0.

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #36742:  matrixLocalMin added by None (174KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by avinoam (Posted a comment)
  • -unavailable- added by mtmiller (Updated the item)
  • -unavailable- added by None (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 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 12 Apr 2016 10:51:05 AM UTCcarandraugStatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
      Operating SystemGNU/Linux=>Any
      Summaryimage package: mat2gray rounding errorrs when rescaling=>image package: mat2gray incorrect when MIN is greater than input maximum
    Sat 26 Mar 2016 12:23:36 AM UTCmtmillerStatusNone=>Confirmed
    Thu 24 Mar 2016 01:13:02 PM UTCcarandraugRelease4.0.0=>other
      SummaryBug in mat2gray function=>image package: mat2gray rounding errorrs when rescaling
    Thu 24 Mar 2016 02:58:41 AM UTCNoneAttached File-=>Added matrixLocalMin, #36742

    Back to the top


    Powered by Savane 3.1-cleanup1