[SciPy-user] circumference in raster image
Wed Jul 8 07:45:23 CDT 2009
Thank you Gary,
it's good to know the right keyword - my google searches were not
successful but now I get lots of results :-)
Gary Ruben wrote:
> I recently sat in on a lecture on how to do this. In summary, there is
> no best way to do it - it's an open research problem.
> Search for "Best Line Unbiased Estimators" to find out more.
> If you just walk around the discretised 8-connected circumference and
> try to compute pi from it, it will converge to 8(sqrt(2)-1), which is
> close to pi and comes from the sum of sides of an octagon enclosing the
> circle (this makes sense because all the traversals can be ordered to
> lie on this octagon), so you need to be smarter, unless that's an
> acceptable uncertainty for your problem.
> Zach's suggestion to use find_contours is probably a good one, depending
> on how the contouring is done - certainly sounds like a promising approach,
> Gary R.
> Robert Cimrman wrote:
>> Hoping that there are some raster image experts around: I need to
>> compute an approximation of circumference of an object (with smooth
>> boundary) represented as a filled area in a 2d array. Can scipy.ndimage
>> deal with that?
> SciPy-user mailing list
More information about the SciPy-user