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

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

[Octave-bug-tracker] [bug #52933] [octave-forge] (image) regionprops Per


From: Hartmut
Subject: [Octave-bug-tracker] [bug #52933] [octave-forge] (image) regionprops Perimeter returns Matlab incompatible results
Date: Sat, 27 Jan 2018 14:29:56 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:58.0) Gecko/20100101 Firefox/58.0

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

Oh, I thought your code was already ment to be Matlab compatible. What a
pity.

But if they are really calculating the perimeter now as some funny linear
combination of the three numbers "even", "odd" and "corners" it should be easy
to figure out what coefficients they use.

If you have access to a recent enough Matlab, then please do the following
calculations:


format long
M = [1 0 0 2 0 3;
     1 0 2 0 0 3;
     0 0 0 0 0 3;
     0 0 0 0 3 3]
props = regionprops(M, 'perimeter');
props.Perimeter


The Even, Odd and Corners of those three regions should be (please double
check):
* (E, O, C) = (2 0 2) in region 1,
*           = (0 2 2) in region 2, and
*           = (6 1 4) in region 3

Since the above three vectors are linearly independent (I think so) you should
then be able to calculate the three unknown coefficients (currently taken as
+0.980, +1.406, -0.091) from those results.

Let me know if this doesn't work out.

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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