[SciPy-user] circumference in raster image
Robert Cimrman
cimrman3 at ntc.zcu.cz
Wed Jul 8 08:45:23 EDT 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 :-)
cheers,
r.
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:
>> Hi!
>>
>> 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?
>>
>> thanks,
>> r.
>
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
>
More information about the SciPy-User
mailing list