From: Alex on
Thanks for the hint ImageAnalyst.
I have another question:

persume such a case : I knew the diameter and center coordination of a circle, I want to draw a circle with this data, I prefer the results demonstrate in the previous figure that I got with imshow command :

R = blobAxislength/2; % radius
Center = [blobCentroid(1,1),blobCentroid(1,2)];
t=0:.1:2*pi;
figure,imshow(filledImage);
plot(R*sin(t),R*cos(t));
hold on
plot(Center(1),Center(2),'g.')
hold off

but the results is not satisfactory. I'd appreciate further helps.
From: ImageAnalyst on
I don'tunderstand. That draws a circle with a dot at the center. It
won't perfectly overlap if you have an ellipse - is that the problem?
Why don't you just find the actual boundary using bwboundaries(), or
find the axes of the ellipse using the major and minor axis lengths
that regionprops finds?