octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #45333] image package: grayhresh fails if inpu


From: Avinoam Kalma
Subject: [Octave-bug-tracker] [bug #45333] image package: grayhresh fails if input doesn't have different values
Date: Mon, 5 Jun 2017 17:10:33 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36

Follow-up Comment #9, bug #45333 (project octave):

There is still a minor problem in a corner case:


>> H(1) = 100;
>> graythresh(H)
warning: division by zero
warning: called from
    graythresh>otsu at line 217 column 13
    graythresh at line 186 column 35
warning: division by zero
warning: called from
    graythresh at line 192 column 12
ans = NaN


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




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?45333>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]