bugGNU Octave - Bugs: bug #38465, IMAGE: regionprops Centriod order

 
 

bug #38465: IMAGE: regionprops Centriod order

Submitted by:  Juan Pablo Carbajal <juanpi>
Submitted on:  Mon 04 Mar 2013 06:57:48 PM UTC  
 
Category: Octave Forge PackageSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: FixedAssigned to: None
Originator Name: juanpiOpen/Closed: Closed
Release: 3.6.4Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 05 Mar 2013 02:53:26 PM UTC, comment #4:

I believe this fixes the issue:

http://sourceforge.net/p/octave/code/11698/

Jordi GutiƩrrez Hermoso <jordigh>
Project Administrator
Mon 04 Mar 2013 08:24:08 PM UTC, comment #3:

Too many errors in last post... Retyping

Mathowkrs gives a rather obscure explanation
http://www.mathworks.ch/ch/help/images/ref/regionprops.html#bqkf8ln
To understand the problem run the following code in Octave

You see that the Centroid is in the wrong place. I was informed that the same lines in Matlab would give the Centroid in the right place (please verify, if you can), therefore we need to make regionpros to return the Centroid with xy coordinates swapped, i.e

Does the right thing

Juan Pablo Carbajal <juanpi>
Project Member
Mon 04 Mar 2013 08:20:20 PM UTC, comment #2:

Mathowkrs gives a rather obscure explanation
http://www.mathworks.ch/ch/help/images/ref/regionprops.html#bqkf8ln

To understand the problem run the following code in Octave

You see that the Centroid is in the wrong place. I was informed that the same lines in Matlab would give the Centroid in the right place (please verify, if you can), therefore we need to make regionpros to return the Centroid with xy coordinates swapped, i.e

Does the right thing

Juan Pablo Carbajal <juanpi>
Project Member
Mon 04 Mar 2013 08:09:08 PM UTC, comment #1:

What is this order? Is there any hope for us to use the exact same order? Does the Matlab documentation specify what the order is? Is it easy to guess?

Jordi GutiƩrrez Hermoso <jordigh>
Project Administrator
Mon 04 Mar 2013 06:57:48 PM UTC, original submission:

Apparently the function regionprops from Matlab returns the Centroid of the blobs in a different order than the Octave version.

That is if

was calculated using Octave and

using Matlab then

Matlab_node(1,[2 1]) = Octave_node

Juan Pablo Carbajal <juanpi>
Project Member

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jordigh (Posted a comment)
  • -unavailable- added by juanpi (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 05 Mar 2013 02:53:26 PM UTCjordighStatusNeed Info=>Fixed
      Open/ClosedOpen=>Closed
    Mon 04 Mar 2013 08:09:18 PM UTCjordighStatusNone=>Need Info

    Back to the top


    Powered by Savane 3.1-cleanup1