2 #ifndef vgl_fit_sphere_3d_h_ 3 #define vgl_fit_sphere_3d_h_ 46 # include <vcl_msvc_warnings.h> 54 std::vector<vgl_homg_point_3d<T> >
points_;
72 void add_point(
const T x,
const T y,
const T z);
84 bool fit_linear(
const T error_marg, std::ostream* outstream=
nullptr);
88 T
fit(std::ostream* outstream=
nullptr,
bool verbose =
false);
91 bool fit(
const T error_marg, std::ostream* outstream=
nullptr,
bool verbose =
false);
95 std::vector<vgl_point_3d<T> >
get_points()
const;
102 #define VGL_FIT_SPHERE_3D_INSTANTIATE(T) extern "please include vgl/algo/vgl_fit_sphere_3d.hxx first" 104 #endif // vgl_fit_sphere_3d_h_ point in projective 3D space
vgl_sphere_3d< T > sphere_non_lin_
T fit_linear(std::ostream *outstream=nullptr)
fit a sphere to the stored points using a linear method.
vgl_sphere_3d< T > & get_sphere_linear_fit()
appropriate fit function should be called first to get the sphere corresponding to the points.
vgl_sphere_3d< T > sphere_lin_
std::vector< vgl_point_3d< T > > get_points() const
~vgl_fit_sphere_3d()=default
vgl_fit_sphere_3d()=default
void add_point(vgl_point_3d< T > const &p)
add a point to point set.
a point in 3D nonhomogeneous space
a sphere in 3D nonhomogeneous space
T fit(std::ostream *outstream=nullptr, bool verbose=false)
fits a sphere nonlinearly to the stored points using Levenberg Marquardt.
vgl_sphere_3d< T > & get_sphere_nonlinear_fit()
std::vector< vgl_homg_point_3d< T > > points_
void clear()
clear internal data.