bugGNU Octave - Bugs: bug #45333, image package: grayhresh fails if...

 
 

bug #45333: image package: grayhresh fails if input doesn't have different values

Submitted by:  Carnë Draug <carandraug>
Submitted on:  Tue 16 Jun 2015 06:10:56 PM UTC  
 
Category: Octave Forge PackageSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Inaccurate Result
Status: In ProgressAssigned to: Carnë Draug <carandraug>
Originator Name: Open/Closed: Open
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.

 

(Jump to the original submission Jump to the original submission)

Tue 28 Nov 2017 08:20:20 PM UTC, comment #11:

Reopening this bug, because of comment #9 and comment #10 that should be fixed.

Avinoam Kalma <avinoam>
Project Member
Tue 06 Jun 2017 08:46:26 PM UTC, comment #10:

There is another problem with graythresh:
running the tests with Otsu in Matlab, the thresh is 114.5, and not 115, so the test should be:

To get Matlab results, the "ceil" in line 235 should be removed.

Avinoam Kalma <avinoam>
Project Member
Mon 05 Jun 2017 09:10:33 PM UTC, comment #9:

There is still a minor problem in a corner case:

In Matlab the answer is zero.
The problem is in the line:

thresh{1} = double (thresh{1}) / (numel (ihist) - 1);

since numel(ihist) is 1

Avinoam Kalma <avinoam>
Project Member
Sun 23 Apr 2017 08:34:40 PM UTC, comment #8:

Done http://hg.code.sf.net/p/octave/image/rev/37e9f3f3e1c8

Carnë Draug <carandraug>
Project MemberIn charge of this item.
Sun 23 Apr 2017 06:00:22 PM UTC, comment #7:

Another typo:

img_max = 65535 in line 171, but img_max is not used elsewhere.

Avinoam Kalma <avinoam>
Project Member
Wed 12 Apr 2017 04:41:25 PM UTC, comment #6:

> It seems that few semicolons have disappeared.


Ups. I put them back now

http://hg.code.sf.net/p/octave/image/rev/382986039e12

Carnë Draug <carandraug>
Project MemberIn charge of this item.
Wed 12 Apr 2017 02:13:55 PM UTC, comment #5:

@Carnë: Thanks for the fix.
It seems that few semicolons have disappeared.

Avinoam Kalma <avinoam>
Project Member
Wed 12 Apr 2017 01:27:33 PM UTC, comment #4:

I am not sure why you were using `!isfinite` when the problem is that `max (bcv)` returned NaN. I used isnan which is clearer. Also, I put the check earlier and avoided computing threshold and goodness in such case.

http://hg.code.sf.net/p/octave/image/rev/34c55ccd6dad

Carnë Draug <carandraug>
Project MemberIn charge of this item.
Thu 08 Dec 2016 05:36:22 PM UTC, comment #3:

@Carnë:

Please review the cs in comment #2

Avinoam Kalma <avinoam>
Project Member
Wed 19 Aug 2015 08:20:56 AM UTC, comment #2:

cs attached. Please review

(file #34676)

Avinoam Kalma <avinoam>
Project Member
Wed 17 Jun 2015 05:57:42 AM UTC, comment #1:

The correction should be something like

near the end of function otsu

Avinoam Kalma <avinoam>
Project Member
Tue 16 Jun 2015 06:10:56 PM UTC, original submission:

Example:

For Matlab compatibility, such corner case should return a value of zero.

Carnë Draug <carandraug>
Project MemberIn charge of this item.

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #34676:  bug45333.cs added by avinoam (703B - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 28 Nov 2017 08:20:20 PM UTCavinoamStatusFixed=>In Progress
      Open/ClosedClosed=>Open
    Wed 12 Apr 2017 01:27:33 PM UTCcarandraugStatusPatch Submitted=>Fixed
      Open/ClosedOpen=>Closed
    Mon 06 Mar 2017 05:11:57 AM UTCavinoamStatusNone=>Patch Submitted
    Thu 08 Dec 2016 05:36:22 PM UTCavinoamCarbon-Copy-=>Added -unavailable-
    Wed 19 Aug 2015 08:20:56 AM UTCavinoamAttached File-=>Added bug45333.cs, #34676

    Back to the top


    Powered by Savane 3.1-cleanup1