Prev: Normality test Question
Next: reformatting a textfile
From: marlina on 9 Aug 2010 23:45 Hi everyone, Region centroid code: L = bwlabel(Iedge); ZB1 = regionprops(L, 'Centroid'); %acquire the center of mass center_x = ZB1.Centroid(1); %acquire X position of the center mass center_y = ZB1.Centroid(2); %acquire Y position of the center mass Let say the answer for center_x=211 center_y=296 So, how I am going to plot (* with red color) the coordinate of the centroid into the original image (Iedge)? Thank you Marlina
From: Walter Roberson on 10 Aug 2010 00:02 marlina wrote: > Region centroid code: > > L = bwlabel(Iedge); ZB1 = regionprops(L, 'Centroid'); %acquire the > center of mass > center_x = ZB1.Centroid(1); %acquire X position of the center mass > center_y = ZB1.Centroid(2); %acquire Y position of the center mass > > Let say the answer for center_x=211 > center_y=296 > > So, how I am going to plot (* with red color) the coordinate of the > centroid into the original image (Iedge)? line(center_x, center_y, 'Marker', '*', 'MarkerEdgeColor', 'r')
|
Pages: 1 Prev: Normality test Question Next: reformatting a textfile |