Homepage | Demos | Overview | Downloads | Tutorials | Reference | Credits |
#include <BallDetectionGenerator.h>
Inheritance diagram for BallDetectionGenerator:
This expects its events to come from a BallDetectionGenerator (or its subclass)
Sends an event only for the largest ball found.
Definition at line 16 of file BallDetectionGenerator.h.
Public Member Functions | |
BallDetectionGenerator (EventBase::EventGeneratorID_t gid, unsigned int sid, unsigned int mysid, unsigned int colorIdx, unsigned int threshmapChan, unsigned int noiseFiltering, float confidence) | |
constructor | |
virtual void | processEvent (const EventBase &event) |
see class notes above for what data this can handle | |
Static Public Member Functions | |
std::string | getClassDescription () |
Gives a short description of what this class of behaviors does... you should override this (but don't have to). | |
Protected Types | |
typedef unsigned char | uchar |
shorthand | |
Protected Member Functions | |
void | testSendEvent (const FilterBankEvent &ev, float conf, int regcenX, int regcenY) |
decides wether to actually send the event based on confidence threshold. | |
void | createEvent (EventBase::EventTypeID_t etid, float centerX, float centerY) const |
does the actual event sending | |
Static Protected Member Functions | |
int | calcEdgeMask (int x1, int x2, int y1, int y2, int width, int height) |
returns a bit mask corresponding to edges touched by the coordinates passed | |
float | pct_from_mean (float a, float b) |
returns
| |
Protected Attributes | |
unsigned int | clrIdx |
the index of the color of the ball we're looking for | |
unsigned int | tmIdx |
the index of the theshold map (channel) of the FilterBankEvent | |
VObject | ball |
information about the best ball found | |
bool | present |
if true, we think we have a ball in front of us | |
unsigned int | count |
for each frame where we don't agree with present's value, this is incremented and compared against noiseFilter. | |
unsigned int | noiseThreshold |
the number of frames to wait to make sure an object has dissappeared/reappeared | |
float | confidenceThreshold |
how sure we should be it's a ball before declaring it as such. | |
Static Protected Attributes | |
const unsigned int | NUM_CHECK = 10 |
the number of regions to check (from largest to smallest) | |
Edge masks | |
const uchar | OFF_EDGE_LEFT = 1<<1 |
bitmask for calcEdgeMask results | |
const uchar | OFF_EDGE_RIGHT = 1<<2 |
bitmask for calcEdgeMask results | |
const uchar | OFF_EDGE_TOP = 1<<3 |
bitmask for calcEdgeMask results | |
const uchar | OFF_EDGE_BOTTOM = 1<<4 |
bitmask for calcEdgeMask results | |
Private Member Functions | |
BallDetectionGenerator (const BallDetectionGenerator &fbk) | |
don't call | |
const BallDetectionGenerator & | operator= (const BallDetectionGenerator &fbk) |
don't call |
|
shorthand
Definition at line 27 of file BallDetectionGenerator.h. |
|
constructor
Definition at line 14 of file BallDetectionGenerator.cc. |
|
don't call
|
|
returns a bit mask corresponding to edges touched by the coordinates passed
Definition at line 254 of file BallDetectionGenerator.cc. Referenced by processEvent(). |
|
does the actual event sending
Definition at line 249 of file BallDetectionGenerator.cc. Referenced by testSendEvent(). |
|
Gives a short description of what this class of behaviors does... you should override this (but don't have to).
Reimplemented from BehaviorBase. Definition at line 21 of file BallDetectionGenerator.h. |
|
don't call
|
|
returns
Definition at line 54 of file BallDetectionGenerator.h. Referenced by processEvent(). |
|
see class notes above for what data this can handle
Reimplemented from BehaviorBase. Definition at line 19 of file BallDetectionGenerator.cc. |
|
decides wether to actually send the event based on confidence threshold.
Definition at line 216 of file BallDetectionGenerator.cc. Referenced by processEvent(). |
|
information about the best ball found
Definition at line 61 of file BallDetectionGenerator.h. Referenced by processEvent(). |
|
the index of the color of the ball we're looking for
Definition at line 59 of file BallDetectionGenerator.h. Referenced by processEvent(). |
|
how sure we should be it's a ball before declaring it as such.
Definition at line 65 of file BallDetectionGenerator.h. Referenced by testSendEvent(). |
|
for each frame where we don't agree with present's value, this is incremented and compared against noiseFilter.
Definition at line 63 of file BallDetectionGenerator.h. Referenced by testSendEvent(). |
|
the number of frames to wait to make sure an object has dissappeared/reappeared
Definition at line 64 of file BallDetectionGenerator.h. Referenced by testSendEvent(). |
|
the number of regions to check (from largest to smallest)
Definition at line 36 of file BallDetectionGenerator.h. Referenced by processEvent(). |
|
bitmask for calcEdgeMask results
Definition at line 33 of file BallDetectionGenerator.h. Referenced by calcEdgeMask(). |
|
bitmask for calcEdgeMask results
Definition at line 30 of file BallDetectionGenerator.h. Referenced by calcEdgeMask(). |
|
bitmask for calcEdgeMask results
Definition at line 31 of file BallDetectionGenerator.h. Referenced by calcEdgeMask(). |
|
bitmask for calcEdgeMask results
Definition at line 32 of file BallDetectionGenerator.h. Referenced by calcEdgeMask(). |
|
if true, we think we have a ball in front of us
Definition at line 62 of file BallDetectionGenerator.h. Referenced by testSendEvent(). |
|
the index of the theshold map (channel) of the FilterBankEvent
Definition at line 60 of file BallDetectionGenerator.h. Referenced by processEvent(). |
Tekkotsu v2.0 |
Generated Wed Jan 21 03:23:02 2004 by Doxygen 1.3.4 |