bugGNU Octave - Bugs: bug #45333, [octave forge] (image) graythresh...

 
 

bug #45333: [octave forge] (image) graythresh 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 Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Inaccurate Result
Status:  Patch Submitted Assigned to:  Carnë Draug <carandraug>
Originator Name:  Open/Closed:  Open
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.

 

( Jump to the original submission)

Tue 16 Oct 2018 07:38:18 PM UTC, comment #12:

Please review the attached cs which handles comment #9 & comment #10

(file #45212)

Avinoam Kalma <avinoam>
Project Member
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 Files:
   
   
Comment:
   

Attached Files
file #45212:  graythresh.cs added by avinoam (3KiB - text/plain)
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
  • -email is unavailable- added by mtmiller (Updated the item)
  • -email is unavailable- added by avinoam
  • -email is unavailable- added by avinoam (Posted a comment)
  • -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.

     

     

     

    Follow 11 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-10-16 avinoam Attached File- => Added graythresh.cs, #45212
        StatusIn Progress => Patch Submitted
    2018-03-20 mtmiller Summary[octave forge] (image) grayhresh fails if input doesn't have different values => [octave forge] (image) graythresh fails if input doesn't have different values
    2018-03-20 mtmiller Summaryimage package: grayhresh fails if input doesn't have different values => [octave forge] (image) grayhresh fails if input doesn't have different values
    2017-11-28 avinoam StatusFixed => In Progress
        Open/ClosedClosed => Open
    2017-04-12 carandraug StatusPatch Submitted => Fixed
        Open/ClosedOpen => Closed
    2017-03-06 avinoam StatusNone => Patch Submitted
    2016-12-08 avinoam Carbon-Copy- => Added -email is unavailable-
    2015-08-19 avinoam Attached File- => Added bug45333.cs, #34676

    Back to the top


    Powered by Savane 3.3