#include <ellipse_refinement.h>
Public Member Functions | |
bool | computeAndSetGeomFromConic (double A, double B, double C, double D, double E, double F) |
Ellipse () | |
Ellipse (const Ellipse &e) | |
double | ellipseCircumference (double a, double b) |
unsigned | ellipseSupport (const std::vector< cv::Point2f > &points, double inl_dist, std::vector< bool > &inl_idx) |
void | get (cv::RotatedRect &r) |
bool | insideEllipse (double _a, double _b, double _x0, double _y0, double _phi, double _x, double _y) const |
void | setEllipse (const double &_x, const double &_y, const double &_a, const double &_b, const double &_phi) |
void | setEllipse (const cv::RotatedRect &rect) |
Public Attributes | |
double | a |
double | b |
double | fit_error |
int | id |
double | phi |
double | support |
double | x |
double | y |
Private Attributes | |
double | a2 |
double | a4 |
double | b2 |
double | b4 |
double | x2 |
double | y2 |
Definition at line 31 of file ellipse_refinement.h.
tuw::EllipseRefinement::Ellipse::Ellipse | ( | const Ellipse & | e | ) |
Ellipse constructor
Definition at line 310 of file ellipse_refinement.cpp.
bool tuw::EllipseRefinement::Ellipse::computeAndSetGeomFromConic | ( | double | Ac, |
double | Bc, | ||
double | Cc, | ||
double | Dc, | ||
double | Ec, | ||
double | Fc | ||
) |
Calculate ellipse parameters x/y/A/B/phi from conic equation Ax^2+Bxy+Cy^2....+F=0
Definition at line 418 of file ellipse_refinement.cpp.
double tuw::EllipseRefinement::Ellipse::ellipseCircumference | ( | double | a, |
double | b | ||
) |
Approximation to ellipse circumference. (from Bartsch: Mathematische Formeln, Buch- und Zeit-Verlagsgesellschaft Koeln, 1988, p. 221)
Approximation to ellipse circumference. (from Bartsch: Mathematische Formeln, Buch- und Zeit-Verlagsgesellschaft Koeln, 1988, p. 221)
Definition at line 479 of file ellipse_refinement.cpp.
unsigned tuw::EllipseRefinement::Ellipse::ellipseSupport | ( | const std::vector< cv::Point2f > & | points, |
double | inl_dist, | ||
std::vector< bool > & | inl_idx | ||
) |
Compute support
Definition at line 347 of file ellipse_refinement.cpp.
void tuw::EllipseRefinement::Ellipse::get | ( | cv::RotatedRect & | r | ) |
returns an opencv rotated rect des of the type transform
Definition at line 408 of file ellipse_refinement.cpp.
bool tuw::EllipseRefinement::Ellipse::insideEllipse | ( | double | _a, |
double | _b, | ||
double | _x0, | ||
double | _y0, | ||
double | _phi, | ||
double | _x, | ||
double | _y | ||
) | const |
Returns true if the position x/y is inside the given ellipse using the ellipse equation
Definition at line 488 of file ellipse_refinement.cpp.
void tuw::EllipseRefinement::Ellipse::setEllipse | ( | const double & | _x, |
const double & | _y, | ||
const double & | _a, | ||
const double & | _b, | ||
const double & | _phi | ||
) |
Ellipse constructor
_x | ellipse center point x [px] |
_y | ellipse center point y [px] |
_a | ellipse major semiaxes [px] |
_a | ellipse minor semiaxes [px] |
_phi | ellipse rotation [rad] |
Definition at line 314 of file ellipse_refinement.cpp.
void tuw::EllipseRefinement::Ellipse::setEllipse | ( | const cv::RotatedRect & | rect | ) |
Sets the ellipse parameter to get ready for detection based on an opencv rectancle opencv rotated rect
Sets the ellipse parameter to get ready for detection based on an opencv rectancle
Definition at line 327 of file ellipse_refinement.cpp.
Definition at line 42 of file ellipse_refinement.h.
double tuw::EllipseRefinement::Ellipse::a2 [private] |
Definition at line 35 of file ellipse_refinement.h.
double tuw::EllipseRefinement::Ellipse::a4 [private] |
Definition at line 35 of file ellipse_refinement.h.
Definition at line 42 of file ellipse_refinement.h.
double tuw::EllipseRefinement::Ellipse::b2 [private] |
Definition at line 35 of file ellipse_refinement.h.
double tuw::EllipseRefinement::Ellipse::b4 [private] |
Definition at line 35 of file ellipse_refinement.h.
Definition at line 46 of file ellipse_refinement.h.
Definition at line 38 of file ellipse_refinement.h.
Definition at line 44 of file ellipse_refinement.h.
Definition at line 48 of file ellipse_refinement.h.
Definition at line 40 of file ellipse_refinement.h.
double tuw::EllipseRefinement::Ellipse::x2 [private] |
Definition at line 36 of file ellipse_refinement.h.
Definition at line 40 of file ellipse_refinement.h.
double tuw::EllipseRefinement::Ellipse::y2 [private] |
Definition at line 36 of file ellipse_refinement.h.