VisionObjectEvent Class Reference#include <VisionObjectEvent.h>
Inheritance diagram for VisionObjectEvent:
[legend]List of all members.
Detailed Description
Extends EventBase to also include location in the visual field and distance (though distance is not implimented yet).
Definition at line 8 of file VisionObjectEvent.h.
|
Public Member Functions |
| | VisionObjectEvent () |
| | Constructor.
|
| | VisionObjectEvent (EventTypeID_t tid, unsigned int sid) |
| | Constructor, pass a type id and source id.
|
| | VisionObjectEvent (EventTypeID_t tid, unsigned int sid, float x1, float x2, float y1, float y2, float rx, float ry) |
| | Constructor, pass the type id, source id, left, right, top, bottom, x range, and y range.
|
| virtual | ~VisionObjectEvent () |
| | destructor
|
| virtual std::string | getDescription (bool showTypeSpecific=true, unsigned int verbosity=0) const |
| | generates a description of the event with variable verbosity
|
| virtual unsigned int | getBinSize () const |
| | calculates space needed to save - if you can't precisely add up the size, overestimate and things will still work.
|
| virtual unsigned int | LoadBuffer (const char buf[], unsigned int len) |
| | Load from a saved buffer.
|
| virtual unsigned int | SaveBuffer (char buf[], unsigned int len) const |
| | Save to a given buffer.
|
|
| float | getLeft () const |
| | returns the initial x coordinate of the Bounding Box
|
| VisionObjectEvent & | setLeft (float x1) |
| | sets the initial x coordinate of the Bounding Box
|
| float | getRight () const |
| | returns the final x coordinate of the Bounding Box
|
| VisionObjectEvent & | setRight (float x2) |
| | sets the final x coordinate of the Bounding Box
|
| float | getTop () const |
| | returns the initial y coordinate of the Bounding Box
|
| VisionObjectEvent & | setTop (float y1) |
| | sets the initial y coordinate of the Bounding Box
|
| float | getBottom () const |
| | returns the final y coordinate of the Bounding Box
|
| VisionObjectEvent & | setBottom (float y2) |
| | sets the final y coordinate of the Bounding Box
|
|
| float | getCenterX () const |
| | returns the center along x
|
| float | getCenterY () const |
| | returns the center along y
|
| float | getWidth () const |
| | return width along x
|
| float | getHeight () const |
| | return height along y
|
| float | getArea () const |
| | returns the final x coordinate of the Bounding Box
|
|
| bool | isClippedLeft () const |
| | returns _clipLeft
|
| bool | isClippedRight () const |
| | returns _clipRight
|
| bool | isClippedTop () const |
| | returns _clipTop
|
| bool | isClippedBottom () const |
| | returns _clipBottom
|
| void | setClipping (bool left, bool right, bool top, bool bottom) |
| | sets clipping boundaries
|
Protected Attributes |
| float | _x1 |
| | a value representing location in visual field - from -1 if on the left edge to 1 if it's on the right edge
|
| float | _x2 |
| | a value representing location in visual field - from -1 if on the bottom edge to 1 if it's on the top edge
|
| float | _y1 |
| | top boundary, in approximate range (+/- 160/208) for ERS-7; actual values vary depending on aspect ratio to keep square coordinates
|
| float | _y2 |
| | top boundary, in approximate range (+/- 160/208) for ERS-7; actual values vary depending on aspect ratio to keep square coordinates
|
| bool | _clipLeft |
| | flag to indicate left boundary is on or beyond the camera image's boundary
|
| bool | _clipRight |
| | flag to indicate right boundary is on or beyond the camera image's boundary
|
| bool | _clipTop |
| | flag to indicate top boundary is on or beyond the camera image's boundary
|
| bool | _clipBottom |
| | flag to indicate bottom boundary is on or beyond the camera image's boundary
|
Constructor & Destructor Documentation
| VisionObjectEvent::VisionObjectEvent |
( |
|
) |
[inline] |
|
| VisionObjectEvent::VisionObjectEvent |
( |
EventTypeID_t |
tid, |
|
|
unsigned int |
sid |
|
) |
[inline] |
|
| VisionObjectEvent::VisionObjectEvent |
( |
EventTypeID_t |
tid, |
|
|
unsigned int |
sid, |
|
|
float |
x1, |
|
|
float |
x2, |
|
|
float |
y1, |
|
|
float |
y2, |
|
|
float |
rx, |
|
|
float |
ry |
|
) |
[inline] |
|
|
|
Constructor, pass the type id, source id, left, right, top, bottom, x range, and y range.
Definition at line 23 of file VisionObjectEvent.h. |
Member Function Documentation
| float VisionObjectEvent::getArea |
( |
|
) |
const [inline] |
|
| unsigned int VisionObjectEvent::getBinSize |
( |
|
) |
const [virtual] |
|
|
|
calculates space needed to save - if you can't precisely add up the size, overestimate and things will still work.
- Returns:
- number of bytes read/written, 0 if error (or empty)
Reimplemented from EventBase.
Definition at line 16 of file VisionObjectEvent.cc. |
| float VisionObjectEvent::getBottom |
( |
|
) |
const [inline] |
|
| float VisionObjectEvent::getCenterX |
( |
|
) |
const [inline] |
|
| float VisionObjectEvent::getCenterY |
( |
|
) |
const [inline] |
|
| std::string VisionObjectEvent::getDescription |
( |
bool |
showTypeSpecific = true, |
|
|
unsigned int |
verbosity = 0 |
|
) |
const [virtual] |
|
|
|
generates a description of the event with variable verbosity
- Parameters:
-
| showTypeSpecific | should be read by subclasses to add additional information |
| verbosity | can be one of the following values:
- 0 - Basic: event_name \t generator_id \t source_id \t type_id
- 1 - Numerics: event_name \t generator_id \t source_id \t type_id
- 2 - Timing: event_name \t generator_id \t source_id \t type_id \t duration \t timestamp
- 3 and above - Full: event_name \t generator_id \t source_id \t type_id \t duration \t timestamp \t magnitude if showTypeSpecific, additional fields will be added after the common fields listed above.
|
Reimplemented from EventBase.
Definition at line 7 of file VisionObjectEvent.cc. |
| float VisionObjectEvent::getHeight |
( |
|
) |
const [inline] |
|
| float VisionObjectEvent::getLeft |
( |
|
) |
const [inline] |
|
| float VisionObjectEvent::getRight |
( |
|
) |
const [inline] |
|
| float VisionObjectEvent::getTop |
( |
|
) |
const [inline] |
|
| float VisionObjectEvent::getWidth |
( |
|
) |
const [inline] |
|
| bool VisionObjectEvent::isClippedBottom |
( |
|
) |
const [inline] |
|
| bool VisionObjectEvent::isClippedLeft |
( |
|
) |
const [inline] |
|
| bool VisionObjectEvent::isClippedRight |
( |
|
) |
const [inline] |
|
| bool VisionObjectEvent::isClippedTop |
( |
|
) |
const [inline] |
|
| unsigned int VisionObjectEvent::LoadBuffer |
( |
const char |
buf[], |
|
|
unsigned int |
len |
|
) |
[virtual] |
|
|
|
Load from a saved buffer.
- Parameters:
-
| buf | pointer to the memory where you should begin loading |
| len | length of buf available (this isn't all yours, might be more stuff saved after yours) |
- Returns:
- the number of bytes actually used
Reimplemented from EventBase.
Definition at line 27 of file VisionObjectEvent.cc. |
| unsigned int VisionObjectEvent::SaveBuffer |
( |
char |
buf[], |
|
|
unsigned int |
len |
|
) |
const [virtual] |
|
|
|
Save to a given buffer.
- Parameters:
-
| buf | pointer to the memory where you should begin writing |
| len | length of buf available. (this isn't all yours, constrain yourself to what you returned in getBinSize() ) |
- Returns:
- the number of bytes actually used
Reimplemented from EventBase.
Definition at line 46 of file VisionObjectEvent.cc. |
| void VisionObjectEvent::setClipping |
( |
bool |
left, |
|
|
bool |
right, |
|
|
bool |
top, |
|
|
bool |
bottom |
|
) |
[inline] |
|
Member Data Documentation
|
|
a value representing location in visual field - from -1 if on the left edge to 1 if it's on the right edge
Definition at line 68 of file VisionObjectEvent.h.
Referenced by getArea(), getBinSize(), getCenterX(), getDescription(), getHeight(), getLeft(), getWidth(), LoadBuffer(), SaveBuffer(), setLeft(), and VisionObjectEvent(). |
|
|
a value representing location in visual field - from -1 if on the bottom edge to 1 if it's on the top edge
Definition at line 69 of file VisionObjectEvent.h.
Referenced by getArea(), getBinSize(), getCenterX(), getDescription(), getHeight(), getRight(), getWidth(), LoadBuffer(), SaveBuffer(), setRight(), and VisionObjectEvent(). |
The documentation for this class was generated from the following files:
|