7 #ifndef TUW_ELLIPSE_REFINEMENT_H 8 #define TUW_ELLIPSE_REFINEMENT_H 11 #include <opencv2/core/core.hpp> 27 : border(_border), min_gradient(_min_gradient) {}
35 double a2, b2, a4,
b4;
64 void setEllipse(
const double &_x,
const double &_y,
const double &_a,
const double &_b,
const double &_phi);
70 void setEllipse(
const cv::RotatedRect& rect);
76 void get(cv::RotatedRect &r);
83 double ellipseCircumference(
double a,
double b);
88 bool insideEllipse(
double _a,
double _b,
double _x0,
double _y0,
double _phi,
double _x,
double _y)
const;
90 unsigned ellipseSupport(
const std::vector<cv::Point2f> &points,
double inl_dist, std::vector<bool> &inl_idx);
92 bool computeAndSetGeomFromConic(
double A,
double B,
double C,
double D,
double E,
double F);
111 bool refine(
const cv::Mat_<short> &im_dx,
const cv::Mat_<short> &im_dy,
const std::vector<cv::Point2f> &points,
Ellipse &ellipse);
116 #endif //TUW_ELLIPSE_REFINEMENT_H
EllipseRefinement(const Parameter &_param=Parameter())
Parameter(int _border=3, double _min_gradient=30)
bool refine(const cv::Mat_< short > &im_dx, const cv::Mat_< short > &im_dy, const std::vector< cv::Point2f > &points, Ellipse &ellipse)
TFSIMD_FORCE_INLINE const tfScalar & x() const
std::vector< cv::Point2d > pointsToUse