Re: circle fit to array with error term
- From: Ann <AJMandell@xxxxxxxxxxx>
- Date: Wed, 23 Aug 2006 18:38:07 -0400
Chandan wrote:
interior
Ann wrote:
I have 1200X1200 arrays (images input with imread function)black
that represent a time series of a dynamic irregular circlular
blob on a white field. One "circle" at one time step per array.
I need to fit the largest possible radius circle to the
ofThanks. I like the pour it in a bucket and weigh it feeling of this.
the circular blob shape and have an output error of the fit.
Thanks for any help.
First sum the pixel values of each image to get a total intensity
value:
sum(sum(arrayElement1);
then you can use morphological filtering to highlight the edges of
your
image (see Image Processing Toolbox help for this one):
imcontour(arrayElement1);
Then you could draw circles of increasing radius until they
intesect
the edges of the contour plot. If the images are binary, then its
really easy, just recreate the circle, and subtract the sum of this
from the sum obtained above. If not, then you just sum the elements
of
the first image that fall inside the circle and subtract this value
from the above sum.
Hope this helps
-----------------------------------------------------------------
Chandan Das
MIT Department of Mechanical Engineering
I've been picking random triplets of points on the blob periphery
(black pixels with nearest neighbor white pixels) and computing the
center of the circle defined by these points. I get a cloud of
approximate centers (one for each triplet). I take the median x,y as
my first app of the actual center and build circles of larger and
larger radii until the circle hits the edge.
I also tried closed spline fit, but had some trouble with consistency
of outcome.
It is the error (non-circleness) I am interested in, and I never
would have thought to sum intensities. This is a huge help.
B.T.W. I don't have the image processing pkg.
Ann
.
- References:
- circle fit to array with error term
- From: Ann
- circle fit to array with error term
- Prev by Date: Re: Create surface from scattered 3D data
- Next by Date: Re: export figure
- Previous by thread: Re: circle fit to array with error term
- Next by thread: Fit error using fminsearch procedure
- Index(es):
Relevant Pages
|