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

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

[Octave-bug-tracker] [bug #38465] IMAGE: regionprops Centriod order


From: Juan Pablo Carbajal
Subject: [Octave-bug-tracker] [bug #38465] IMAGE: regionprops Centriod order
Date: Mon, 04 Mar 2013 20:24:08 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22

Follow-up Comment #3, bug #38465 (project octave):

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 

m = false(10); m(4:5,6:7) = true;
nodes = regionprops (bwlabel(m,4),"Centroid").Centroid;
imshow(m); hold on; plot(nodes(1),nodes(2),'.m'); hold off


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 


imshow(m); hold on; plot(nodes(2),nodes(1),'.m'); hold off


Does the right thing 

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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