[Insight-users] Estimate a sphere
Fabian Torres
fabian.trobles at gmail.com
Thu Oct 18 15:04:12 EDT 2012
Hi
I would try to explain my problem
I would like to estimate a sphere from some points in a space.
To do that I have several ultrasound images of he surface of a sphere
located into a 3D space
I manually select some points of the surface in each image and create a non
linear equation system using this pons and the general equation of the
sphere
0 = (x - cx)^2 + (y-cy)^2 + (z-cz)^2 -r^2 (general equation of a sphere
where x,y,z are the surface points; cx,cy,cz is the center of the sphere
and r is the radius of the sphere)
So from this non-linear equation I would like to obtaine the corresponding
values pf cx,cy,cz znd r.
I have implemented this on MatLab using a function call lsqnonlin that
solves nonlinear least-squares curve fiting problems of the form
min||f(x)|| = min(f1(x)^2 + .... + fn(x)^2)
This is the documantation of this function for any reference
http://www.mathworks.com/help/optim/ug/lsqnonlin.html
Now I have to implement it on c++ usin itk and vtk.
I already have the surface points so now I´m trying to solve the equation
system
I try using the vnl_levenberg_marquardt algorithm for this. But I do not
get the expected results. since I know the exact position of the sphere and
its dimentions I do know that the estimated parameters using this method do
not correspond to the real valueas, also my MatLab implementation gives me
realy accurate results.
So my questions are.
Do i have to use vnl_levenberg_marquardt?
Is there any function similar to lsqnonlin implemented on itk, vnl or vtk?
I`m I doing something wrong?
Thanks for your time
--
Fabián Torres Robles
Maestria en Ciencias en Ingeniería Electrónica
Ingeniería en Sistemas Electrónicos
tel. 58081280, 0445534661338
e-mail fabian.trobles at gmail.com, dae.wong at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20121018/a53c67d2/attachment.htm>
More information about the Insight-users
mailing list