bugGNU Octave - Bugs: bug #51705, [octave forge] (image) Major and...

 
 

bug #51705: [octave forge] (image) Major and Minor Axis Length in RegionProps

Submitter:  None
Submitted:  Wed 09 Aug 2017 04:46:34 PM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Thomas Herdtle Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 4.2.1
Operating System:  * Microsoft Windows Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Post a Comment

Add a New Comment Rich Markup
   

Discussion

Mon 14 Aug 2017 01:01:16 PM UTC, comment #2: 

Thanks.  Closing report as fixed.

John W. Eaton <jwe>
Group administrator
Mon 14 Aug 2017 12:15:52 PM UTC, comment #1: 

This bug has been reported and fixed. See bug #49613

Anonymous
Wed 09 Aug 2017 04:46:34 PM UTC, original submission:  

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.

Anonymous

 

Attached Files

This item currently has no attached files.

(Note: upload size limit is set to 4.0MiB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

Carbon-Copy List
  • -email is unavailable- added by jwe (Updated the item)
  • -email is unavailable- added by None (Submitted the item)
  •  

    Votes

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    History

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-08-14 jwe StatusNone Fixed
        Open/ClosedOpen Closed
    2017-08-12 jwe SummaryMajor and Minor Axis Length in RegionProps [octave forge] (image) Major and Minor Axis Length in RegionProps

    Back to the top

    Powered by Savane 3.16-ed84.
    Corresponding source code