Fawkes API  Fawkes Development Version
firevision::Circle Class Reference

Circle shape. More...

#include <>>

Inheritance diagram for firevision::Circle:

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...
 
- Public Member Functions inherited from firevision::Shape
virtual ~Shape ()
 Virtual empty destructor. 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...
 

Detailed Description

Circle shape.

Definition at line 45 of file circle.h.

Constructor & Destructor Documentation

◆ Circle() [1/2]

firevision::Circle::Circle ( )

Constructor.

Definition at line 41 of file circle.cpp.

◆ Circle() [2/2]

firevision::Circle::Circle ( const center_in_roi_t c,
float  r,
int  n = 0 
)

Constructor.

Parameters
ccenter
rradius
nnumber of pixels

Definition at line 53 of file circle.cpp.

Member Function Documentation

◆ fitCircle()

void firevision::Circle::fitCircle ( std::vector< fawkes::upoint_t > &  points)

Fit circle.

Fit a circle through the given points.

Parameters
pointspoints to fit circle through.

Definition at line 75 of file circle.cpp.

References fawkes::upoint_t::x, and fawkes::upoint_t::y.

Referenced by firevision::RhtCircleModel::parseImage(), and firevision::RcdCircleModel::parseImage().

◆ isClose()

bool firevision::Circle::isClose ( unsigned int  in_roi_x,
unsigned int  in_roi_y 
)
virtual

Check if the given point is close to the shape.

Parameters
in_roi_xx coordinate of point in the same ROI as the shape
in_roi_yy coordinate of point in the same ROI as the shape
Returns
true if point is close to shape, false otherwise

Implements firevision::Shape.

Definition at line 127 of file circle.cpp.

◆ printToStream()

void firevision::Circle::printToStream ( std::ostream &  stream)

Print info.

Parameters
streamstream to print to

Definition at line 64 of file circle.cpp.

References firevision::center_in_roi_t::x.

◆ setMargin()

void firevision::Circle::setMargin ( unsigned int  margin)
virtual

Set margin around shape.

Parameters
marginmargin

Implements firevision::Shape.

Definition at line 120 of file circle.cpp.

Member Data Documentation

◆ center

◆ count

◆ margin

unsigned int firevision::Circle::margin

Margin around shape.

Definition at line 66 of file circle.h.

◆ radius

float firevision::Circle::radius

The documentation for this class was generated from the following files: