Hi <div><br></div><div>I would try to explain my problem</div><div><br></div><div>I would like to estimate a sphere from some points in a space.</div><div><br></div><div>To do that I have several ultrasound images of he surface of a sphere located into a 3D space</div>
<div>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</div><div><br></div><div><br></div><div>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)</div>
<div><br></div><div>So from this non-linear equation I would like to obtaine the corresponding values pf cx,cy,cz znd r.</div><div><br></div><div><br></div><div>I have implemented this on MatLab using a function call lsqnonlin that solves nonlinear least-squares curve fiting problems of the form</div>
<div><br></div><div><br></div><div> min||f(x)|| = min(f1(x)^2 + .... + fn(x)^2)</div><div><br></div><div>This is the documantation of this function for any reference <a href="http://www.mathworks.com/help/optim/ug/lsqnonlin.html">http://www.mathworks.com/help/optim/ug/lsqnonlin.html</a></div>
<div><br></div><div><br></div><div>Now I have to implement it on c++ usin itk and vtk.</div><div><br></div><div>I already have the surface points so now I´m trying to solve the equation system</div><div><br></div><div>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.</div>
<div><br></div><div>So my questions are. </div><div><br></div><div>Do i have to use vnl_levenberg_marquardt?</div><div>Is there any function similar to lsqnonlin implemented on itk, vnl or vtk?</div><div>I`m I doing something wrong?</div>
<div><br></div><div><br></div><div>Thanks for your time</div><div><div><br></div>-- <br>Fabián Torres Robles<br>Maestria en Ciencias en Ingeniería Electrónica<br>Ingeniería en Sistemas Electrónicos<br>tel. 58081280, 0445534661338<br>
e-mail <a href="mailto:fabian.trobles@gmail.com" target="_blank">fabian.trobles@gmail.com</a>, <a href="mailto:dae.wong@gmail.com" target="_blank">dae.wong@gmail.com</a> <div style="padding:0px;margin-left:0px;margin-top:0px;overflow:hidden;word-wrap:break-word;color:black;font-size:10px;text-align:left;line-height:130%">
</div><div style="padding:0px;margin-left:0px;margin-top:0px;overflow:hidden;word-wrap:break-word;color:black;font-size:10px;text-align:left;line-height:130%"></div><br>
</div>