Re: Fit sphere to planar circles



trancemissionxxi@xxxxxxxxx wrote in message <c91073f0-2621-4779-b9a0-b2d3ad8083d2@xxxxxxxxxxxxxxxxxxxxxxxxxxx>...
On Apr 7, 1:24=A0pm, "Sven" <sven.holco...@xxxxxxxxxxxxxxxxxx> wrote:
Hi all,

I'm trying to find the center and radius of a mostly spherical body in a =
voxel volume (femoral head in a CT scan, to be precise).

My approach so far has been to use hough circle detection in the area of =
interest, looped over each slice. This detection works best around the hemi=
sphere (rather than pole) regions of the sphere, and I am using some logic =
to cull away any false positive circles detected by the hough transform.

My question is this: what is the best way to fit a sphere to a series of =
planar circles?

My data is currently in the form of:
circs =3D [...
=A0 240.5275 =A0145.0197 -564.5000 =A0 20.5078;
=A0 241.1135 =A0146.1915 -559.5000 =A0 22.8516;
=A0 241.1135 =A0146.1915 -554.5000 =A0 23.4375;
=A0 241.6994 =A0146.7775 -549.5000 =A0 23.4375;
=A0 241.1135 =A0146.7775 -544.5000 =A0 22.2656;]

The columns are the X, Y, and Z locations of 5 circle origins, and their =
radii.

I'm confident that the average of the X and Y columns represent the X and=
Y sphere centre, but I don't know the best way to get the Z location.

A simple average of Z locations is inaccurate because the detected circle=
s are not necessarily centrally detected along the Z-direction.

Any thoughts? Perhaps I could try to fit a curve to the radii values and =
find its peak, but I'm not sure how to fit anything robustly to so few data=
points.

Any help would be very welcome.
Thanks,
Sven.

Sven,

I have a similar problem and I abandoned the hough transform. I assume
you have grayscale images. What I do is replicate slices to bring z
resolution ~equal to xy resolution, then I do a fft convolution with a
spherical mask (there is an fspecial3 on file exchage, you need some
normalization though) at the radius of interest. If you don't know the
radius, you can iterate over multiple radii. Take the pixel
coordinates corresponding to the max of the convolution.

Any thoughts on/need of computing the entropy of the pixels within the
sphere without requiring a supercomputing center? I'm actively
researching this. Let me know if you want to chat more about this.

Thanks,
Trance.

Thanks for the input, Trance.
I can see how the 3d convolution would simplify the hough transform approach to essentially a single operation. I wasn't able to find an fspecial3 entry in the file exchange via any expected keywords... do you have a direct link?

I don't have any experience with computing pixel entropy, so I'm afraid I'm not going to be of much assistance there yet.

Without having yet implemented your spherical fft solution, I'm wondering how well it has worked for you. I'm not sure if you're doing the exact same thing (femoral head from CT), but if you are, perhaps you have encountered the problem of the acetabular surrounding the femoral head being basically spherical too, just with a slightly larger radius.

I'm thinking that it might even be a good idea to go once through with a slice by slice circle detection from hough transforms, then produce a new voxel volume with pixels on the boundaries of all detected circles turned on, and try your 3d fft on *that* volume, rather than the original grayscale volume.

Cheers,
Sven.
.



Relevant Pages

  • Re: Fitting a 3D circle to a lobsided set of points
    ... a circle, and I want to find the plane that they are on, as well as ... they are on a plane or on the sphere ... recover the radius ... Getting the actual circle ...
    (sci.math.num-analysis)
  • Re: Circle Detection using Hough Transform
    ... > Armin wrote: ... >> How to detect circles of radious minimum radius 25 to max ... using the Hough Transform" published by Springer Verlag. ... rating Matlab Hough based circle finding implementations in the File ...
    (comp.soft-sys.matlab)
  • Re: spheres in flatland
    ... In trying to puzzle out why a sphere passing through a plane in flat land would appear to go from a dot to a circle which would grow rapidly at first, and then slow down as it's size increased towards it's maximum at the great circle, I drew a circle radius 4cm on some graph paper and consrtructed slices each 1cm apart to represent the sphere passing through the plane at a constant rate. ...
    (sci.math)
  • Re: spheres in flatland
    ... In trying to puzzle out why a sphere passing through a plane in flat land would appear to go from a dot to a circle which would grow rapidly at first, and then slow down as it's size increased towards it's maximum at the great circle, I drew a circle radius 4cm on some graph paper and consrtructed slices each 1cm apart to represent the sphere passing through the plane at a constant rate. ...
    (sci.math)
  • Re: 4 spheres inside a tetrahedron
    ... >>The only condition I can think of is that the smallest sphere not fall ... > smallest radius r4 such that a sphere of radius r4 can be placed ... fit for the fourth sphere will be when its centre is in the same plane. ... a circle with the first three circles inside it. ...
    (sci.math)