Fawkes API Fawkes Development Version
|
#include <>>
Public Member Functions | |
Circle () | |
Constructor. More... | |
Circle (const center_in_roi_t &c, float r, int n=0) | |
Constructor. More... | |
void | printToStream (std::ostream &stream) |
Print info. More... | |
void | setMargin (unsigned int margin) |
Set margin around shape. More... | |
bool | isClose (unsigned int in_roi_x, unsigned int in_roi_y) |
Check if the given point is close to the shape. More... | |
void | fitCircle (std::vector< fawkes::upoint_t > &points) |
Fit circle. More... | |
![]() | |
virtual | ~Shape () |
Virtual empty destructor. More... | |
virtual void | setMargin (unsigned int margin)=0 |
Set margin around shape. More... | |
virtual bool | isClose (unsigned int in_roi_x, unsigned int in_roi_y)=0 |
Check if the given point is close to the shape. More... | |
Public Attributes | |
center_in_roi_t | center |
Center of object in ROI. More... | |
float | radius |
Radius of object. More... | |
int | count |
Number of pixels. More... | |
unsigned int | margin |
Margin around shape. More... | |
firevision::Circle::Circle | ( | ) |
Constructor.
Definition at line 39 of file circle.cpp.
References center, count, radius, firevision::center_in_roi_t::x, and firevision::center_in_roi_t::y.
firevision::Circle::Circle | ( | const center_in_roi_t & | c, |
float | r, | ||
int | n = 0 |
||
) |
void firevision::Circle::fitCircle | ( | std::vector< fawkes::upoint_t > & | points | ) |
Fit circle.
Fit a circle through the given points.
points | points to fit circle through. |
Definition at line 73 of file circle.cpp.
References center, count, radius, firevision::center_in_roi_t::x, fawkes::upoint_t::x, firevision::center_in_roi_t::y, and fawkes::upoint_t::y.
Referenced by firevision::RcdCircleModel::parseImage(), and firevision::RhtCircleModel::parseImage().
|
virtual |
Check if the given point is close to the shape.
in_roi_x | x coordinate of point in the same ROI as the shape |
in_roi_y | y coordinate of point in the same ROI as the shape |
Implements firevision::Shape.
Definition at line 125 of file circle.cpp.
References center, margin, radius, firevision::center_in_roi_t::x, and firevision::center_in_roi_t::y.
void firevision::Circle::printToStream | ( | std::ostream & | stream | ) |
Print info.
stream | stream to print to |
Definition at line 62 of file circle.cpp.
References center, count, radius, firevision::center_in_roi_t::x, and firevision::center_in_roi_t::y.
|
virtual |
Set margin around shape.
margin | margin |
Implements firevision::Shape.
Definition at line 119 of file circle.cpp.
References margin.
center_in_roi_t firevision::Circle::center |
Center of object in ROI.
Definition at line 57 of file circle.h.
Referenced by firevision::FittedCircle::addPoint(), Circle(), firevision::FittedCircle::distanceTo(), fitCircle(), firevision::FitAccum::getCircle(), isClose(), and printToStream().
int firevision::Circle::count |
Number of pixels.
Definition at line 61 of file circle.h.
Referenced by Circle(), fitCircle(), firevision::FitAccum::getCircle(), firevision::RcdCircleModel::parseImage(), firevision::RhtCircleModel::parseImage(), and printToStream().
unsigned int firevision::Circle::margin |
Margin around shape.
Definition at line 63 of file circle.h.
Referenced by isClose(), and setMargin().
float firevision::Circle::radius |
Radius of object.
Definition at line 59 of file circle.h.
Referenced by firevision::FittedCircle::addPoint(), Circle(), firevision::FittedCircle::distanceTo(), fitCircle(), firevision::FitAccum::getCircle(), isClose(), and printToStream().