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

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

[Octave-bug-tracker] [bug #51705] Major and Minor Axis Length in RegionP


From: anonymous
Subject: [Octave-bug-tracker] [bug #51705] Major and Minor Axis Length in RegionProps
Date: Wed, 9 Aug 2017 12:46:36 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36

URL:
  <http://savannah.gnu.org/bugs/?51705>

                 Summary: Major and Minor Axis Length in RegionProps
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Wed 09 Aug 2017 04:46:34 PM UTC
                Category: Octave Forge Package
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: Thomas Herdtle
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.2.1
        Operating System: Microsoft Windows

    _______________________________________________________

Details:

regionprops is broken for some multi-region images, even though it works fine
for single regions, including the individual images returned in the structure.
 I'm using the image package v2.6.1 which came with Octave v4.2.1.  Here is an
example where the 2 diagonals are OK, but the 2 squares are wrong:


a = ones(4)>0
s = regionprops (a, "MajorAxisLength", "MinorAxisLength")

b = [eye(4), zeros(4), ones(4); zeros(4), zeros(4), zeros(4); ones(4),
zeros(4), eye(4)]
t = regionprops (b, "MajorAxisLength", "MinorAxisLength", "Image")  %  Not
broken apart!
t = regionprops (b>0, "MajorAxisLength", "MinorAxisLength", "Image")
t.MinorAxisLength  %  Wrong values for 2nd and 3rd!
t.MajorAxisLength  %  Wrong values for 2nd and 3rd!

t(2).Image
regionprops(t(2).Image, "Majoraxislength", "MinorAxisLength")  %  Correct
values


If you flip the "eye" and "ones", the diagonal cases will have wrong values. 
Also if all 4 patterns are equal (either eye or ones), then the right answers
result.  Somehow different patterns interfere with each other.

Also, if the matrix is not logical, i.e. without the ">0", then the 4 sections
aren't even broken apart.




    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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