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

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

[Octave-bug-tracker] [bug #51724] [octave forge] (image) imregionalmax m


From: Hartmut
Subject: [Octave-bug-tracker] [bug #51724] [octave forge] (image) imregionalmax misbehaves on float images
Date: Tue, 29 Aug 2017 15:27:05 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0

Follow-up Comment #12, bug #51724 (project octave):

Here is a new code suggestion:


    if (isfloat (img))
      delta = eps (max (img(:)));
      recon = imreconstruct (img, img + delta, conn);
    else
      recon = imreconstruct (img, img + 1, conn);
    end


Reasoning:
* In theory this could give worse results than using delta=eps(img).
** This "gold standard" might work better, because it uses a locally adapted
delta. Not a stupid "one size fits all" as in the above code.
** But the eps command on a matrix seems to calculate horribly long. This just
isn't worth it.

* If we take a constant delta, then it must be a big enough value for the
biggest peaks to be distinguishable from their neighborhoods (else we miss one
of the biggest peaks, not good).
** delta = eps(class(img)) just is not big enough
** even delta = 100*eps(min(img(:))) was not big enough in some cases with
high peaks.

* As a result of this propsed code with delta = eps(max(img(:))) , all peaks
to be found need to be higher than their neighborhood by this delta value,
which is derived from the highest peak. This approach might fail in some
cases, as discussed. Then we miss a small peak. But in those cases I would
argue that this loss of tiny peaks (orders of magnitude smaller than the big
peaks) is due to "machine precision". This would be an ill posed problem and
probably doesn't happen in relevant image data.

What do you think of this proposal?

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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