Path: news.mathworks.com!not-for-mail
From: "Sven" <sven.holcombe@gmail.deleteme.com>
Newsgroups: comp.soft-sys.matlab
Subject: Fit sphere to planar circles
Date: Tue, 7 Apr 2009 20:24:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 27
Message-ID: <grgcp1$nkr$1@fred.mathworks.com>
Reply-To: "Sven" <sven.holcombe@gmail.deleteme.com>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1239135841 24219 172.30.248.38 (7 Apr 2009 20:24:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 7 Apr 2009 20:24:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1326470
Xref: news.mathworks.com comp.soft-sys.matlab:531177


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 hemisphere (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 = [...
  240.5275  145.0197 -564.5000   20.5078;
  241.1135  146.1915 -559.5000   22.8516;
  241.1135  146.1915 -554.5000   23.4375;
  241.6994  146.7775 -549.5000   23.4375;
  241.1135  146.7775 -544.5000   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 circles 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.