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

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

[Octave-bug-tracker] [bug #49613] image package - regionprops.m majoraxi


From: Hartmut
Subject: [Octave-bug-tracker] [bug #49613] image package - regionprops.m majoraxislength broken
Date: Thu, 17 Nov 2016 18:08:00 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0

Follow-up Comment #6, bug #49613 (project octave):

Sorry, the argumentation in my last post was wrong. A single pixel gets 1/12
in size, this leads to the guarantee that the majoraxislength and the
minoraxislength will never become zero, I think. But this doesn't prove yet
that the major_vec(1) will never be 0 in our code. Sorry.

The following image really gives me a value of major_vec(1) = 0, nevertheless
the current regionprops.m DOES return the right value for the orientation:


BW = logical([0 0 0 0; 0 1 1 0; 0 0 0 0]);
L = bwlabel(BW);
props = regionprops(L,'Orientation');
props.Orientation


This is due to the result of "atan(1/0)" which does give a warning (no
error!), but nevertheless returns the "correct" value of pi/2 (that results in
the correct orientation value of -90 degrees).

I have also tried the simple change of atan to atan2, and I do get a failing
test of the Orientation feature. So a quick substitute of atan into atan2 will
not do.

To conclude: I have no objection about switching from atan to atan2, but the
resulting orientation values SHOULD stay the same, please. (So this would mean
some additional adjustments to this code line, and double checking that the
orientation results stay the same.)

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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