RcdCircleModel Class Reference

RCD circle model from the following literature An Efficient Randomized Algorithm for Detecting Circles. More...

#include <models/shape/rcd_circle.h>

Inheritance diagram for RcdCircleModel:

List of all members.


Public Member Functions

 RcdCircleModel (unsigned int max_failures=300, unsigned int min_pixels=20, unsigned int min_interpix_dist=10, unsigned int max_dist_p4=2, unsigned int max_dist_a=10, float hw_ratio=0.6, float hollow_rate=0.f, float max_time=0.01)
 Create a new circle model which uses RCD to detect circles.
virtual ~RcdCircleModel (void)
 Destrcutor.
std::string getName (void) const
 Get name of shape model.
int parseImage (unsigned char *buffer, ROI *roi)
 Parse image for given ROI.
int getShapeCount (void) const
 Get number of shapes.
CirclegetShape (int id) const
 Get specific shape.
CirclegetMostLikelyShape (void) const
 Get best candidate.

Detailed Description

RCD circle model from the following literature An Efficient Randomized Algorithm for Detecting Circles.

Definition at line 38 of file rcd_circle.h.


Constructor & Destructor Documentation

RcdCircleModel::RcdCircleModel ( unsigned int  max_failures = 300,
unsigned int  min_pixels = 20,
unsigned int  min_interpix_dist = 10,
unsigned int  max_dist_p4 = 2,
unsigned int  max_dist_a = 10,
float  hw_ratio = 0.6,
float  hollow_rate = 0.f,
float  max_time = 0.01 
)

Create a new circle model which uses RCD to detect circles.

Parameters:
max_failures Max. number of failures
min_pixels Min number of available edge pixels
min_interpix_dist Min distance between chosen pixels
max_dist_p4 Max. distance of fourth pixel to circle
max_dist_a Max. distance for all other pixels to circle
hw_ratio Ratio height/width
hollow_rate size of the hollow window in the ROI.
max_time Maximum runtime per loop

Definition at line 60 of file rcd_circle.cpp.

RcdCircleModel::~RcdCircleModel ( void   )  [virtual]

Destrcutor.

Definition at line 83 of file rcd_circle.cpp.


Member Function Documentation

Circle * RcdCircleModel::getMostLikelyShape ( void   )  const [virtual]

Get best candidate.

Returns:
best candidate shape, do not free.

Implements ShapeModel.

Definition at line 324 of file rcd_circle.cpp.

std::string RcdCircleModel::getName ( void   )  const [inline, virtual]

Get name of shape model.

Returns:
name of shape model.

Implements ShapeModel.

Definition at line 55 of file rcd_circle.h.

Circle * RcdCircleModel::getShape ( int  id  )  const [virtual]

Get specific shape.

Parameters:
id shape ID
Returns:
shape, do NOT free!

Implements ShapeModel.

Definition at line 312 of file rcd_circle.cpp.

int RcdCircleModel::getShapeCount ( void   )  const [virtual]

Get number of shapes.

Returns:
number of shapes.

Implements ShapeModel.

Definition at line 307 of file rcd_circle.cpp.

int RcdCircleModel::parseImage ( unsigned char *  buffer,
ROI roi 
) [virtual]

Parse image for given ROI.

Parameters:
buffer image buffer
roi ROI
Returns:
number of shapes found

Implements ShapeModel.

Definition at line 88 of file rcd_circle.cpp.

References Circle::count, Circle::fitCircle(), ROI::get_roi_buffer_start(), ROI::height, ROI::line_step, ROI::width, center_in_roi_t::x, and center_in_roi_t::y.


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