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 (unsigned int sid=0, EventTypeID_t tid=EventBase::deactivateETID) |
| Constructor, pass a source id and type id -- mainly useful for deactivate events since all object parameters are going to be set to 0.
|
| VisionObjectEvent (unsigned int sid, EventTypeID_t tid, float x1, float x2, float y1, float y2, float objarea, float rx, float ry) |
| Constructor, pass the type id, source id, left, right, top, bottom, x range, and y range.
|
| VisionObjectEvent (unsigned int sid, EventTypeID_t tid, float x1, float x2, float y1, float y2, float objarea, float rx, float ry, unsigned int frame) |
| Constructor, pass the type id, source id, left, right, top, bottom, x range, y range, and frame_number.
|
virtual | ~VisionObjectEvent () |
| destructor
|
virtual EventBase * | clone () const |
| allows a copy to be made of an event, supporting polymorphism
|
virtual unsigned int | getClassTypeID () const |
| All subclasses should override this and return a unique ID for their class.
|
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 |
| values to pass to setSaveFormat()
|
virtual unsigned int | LoadBinaryBuffer (const char buf[], unsigned int len) |
| values to pass to setSaveFormat()
|
virtual unsigned int | SaveBinaryBuffer (char buf[], unsigned int len) const |
| values to pass to setSaveFormat()
|
virtual void | LoadXML (xmlNode *node) |
| values to pass to setSaveFormat()
|
virtual void | SaveXML (xmlNode *node) const |
| values to pass to setSaveFormat()
|
|
float | getLeft () const |
| returns the initial x (_x1) coordinate of the Bounding Box (inclusive value)
|
VisionObjectEvent & | setLeft (float x1) |
| sets the initial x (_x1) coordinate of the Bounding Box
|
float | getRight () const |
| returns the final x (_x2) coordinate of the Bounding Box (inclusive value)
|
VisionObjectEvent & | setRight (float x2) |
| sets the final x (_x2) coordinate of the Bounding Box
|
float | getTop () const |
| returns the initial y (_y1) coordinate of the Bounding Box (inclusive value)
|
VisionObjectEvent & | setTop (float y1) |
| sets the initial y (_y1) coordinate of the Bounding Box
|
float | getBottom () const |
| returns the final y (_y2) coordinate of the Bounding Box (inclusive value)
|
VisionObjectEvent & | setBottom (float y2) |
| sets the final y (_y2) coordinate of the Bounding Box
|
float | getObjectArea () const |
| returns the object's _area within the camera, in squared generalized coordinates (multiply by the major camera resolution to get pixel area)
|
VisionObjectEvent & | setObjectArea (float objarea) |
| returns the object's _area within the camera, in squared generalized coordinates (multiply by the major camera resolution to get pixel area)
|
|
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 | getBoundaryArea () const |
| returns the area of the bounding box, just multiplication of width*height, (multiply by the major camera resolution to get pixel area)
|
float | getXrange () const |
| returns the maximum x value
|
float | getYrange () const |
| returns the maximum y value
|
unsigned int | getFrame () const |
| returns number of frame when the event was generated
|
|
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 left edge to 1 if it's on the right edge
|
float | _y1 |
| top boundary, in range of ) for ERS-7; actual values vary depending on aspect ratio to keep square coordinates
|
float | _y2 |
| bottom boundary, in approximately for ERS-7; actual values vary depending on aspect ratio to keep square coordinates
|
float | _area |
| area of the actual object within bounding box as set by generator, in same units as getBoundaryArea() (squared generalized coordinates -- multiply by the major camera resolution to get pixel area)
|
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
|
float | _xRange |
| Max range of X dimension.
|
float | _yRange |
| Max range of Y dimension.
|
unsigned int | _frame |
| Number of frame when the event was generated.
|
Constructor & Destructor Documentation
VisionObjectEvent::VisionObjectEvent |
( |
unsigned int |
sid = 0 , |
|
|
EventTypeID_t |
tid = EventBase::deactivateETID |
|
) |
[inline, explicit] |
|
|
Constructor, pass a source id and type id -- mainly useful for deactivate events since all object parameters are going to be set to 0.
- Parameters:
-
| sid | The source ID for the object being detected -- you can define your own values, some are already set in ProjectInterface, but can be reassigned during your project's startup |
| tid | The type ID for the event |
Definition at line 14 of file VisionObjectEvent.h.
Referenced by clone(). |
VisionObjectEvent::VisionObjectEvent |
( |
unsigned int |
sid, |
|
|
EventTypeID_t |
tid, |
|
|
float |
x1, |
|
|
float |
x2, |
|
|
float |
y1, |
|
|
float |
y2, |
|
|
float |
objarea, |
|
|
float |
rx, |
|
|
float |
ry |
|
) |
[inline] |
|
|
Constructor, pass the type id, source id, left, right, top, bottom, x range, and y range.
- Parameters:
-
| sid | The source ID for the object being detected -- you can define your own values, some are already set in ProjectInterface, but can be reassigned during your project's startup |
| tid | The type ID for the event |
| x1 | The leftmost extent of the object, in generalized coordinates (see _x1) |
| x2 | The rightmost extent of the object in generalized coordinates (see _x2) |
| y1 | The topmost extent of the object, in generalized coordinates (see _y1) |
| y2 | The bottommost extent of the object, in generalized coordinates (see _y2) |
| objarea | The area of the object being detected, in squared generalized coordinates (see _area) |
| rx | The plus/minus range of the x coordinates (generally xres/xres for cameras which are wider than they are high) |
| ry | The plus/minus range of the y coordinates (camera yres/xres for cameras which are wider than they are high) |
Definition at line 32 of file VisionObjectEvent.h. |
VisionObjectEvent::VisionObjectEvent |
( |
unsigned int |
sid, |
|
|
EventTypeID_t |
tid, |
|
|
float |
x1, |
|
|
float |
x2, |
|
|
float |
y1, |
|
|
float |
y2, |
|
|
float |
objarea, |
|
|
float |
rx, |
|
|
float |
ry, |
|
|
unsigned int |
frame |
|
) |
[inline] |
|
|
Constructor, pass the type id, source id, left, right, top, bottom, x range, y range, and frame_number.
- Parameters:
-
| sid | The source ID for the object being detected -- you can define your own values, some are already set in ProjectInterface, but can be reassigned during your project's startup |
| tid | The type ID for the event |
| x1 | The leftmost extent of the object, in generalized coordinates (see _x1) |
| x2 | The rightmost extent of the object in generalized coordinates (see _x2) |
| y1 | The topmost extent of the object, in generalized coordinates (see _y1) |
| y2 | The bottommost extent of the object, in generalized coordinates (see _y2) |
| objarea | The area of the object being detected, in squared generalized coordinates (see _area) |
| rx | The plus/minus range of the x coordinates (generally xres/xres for cameras which are wider than they are high) |
| ry | The plus/minus range of the y coordinates (camera yres/xres for cameras which are wider than they are high) |
| frame | The camera frame number the object was detected in (see _frame) |
Definition at line 51 of file VisionObjectEvent.h. |
virtual VisionObjectEvent::~VisionObjectEvent |
( |
|
) |
[inline, virtual] |
|
Member Function Documentation
virtual EventBase* VisionObjectEvent::clone |
( |
|
) |
const [inline, virtual] |
|
|
allows a copy to be made of an event, supporting polymorphism
Must be overridden by all subclasses to allow this to happen
I would like to switch this over to the cloneable interface once the compiler gets updated out of the 3.3 branch... see Cloneable::clone() for a discussion of the issue and implementation notes.
Reimplemented from EventBase.
Definition at line 61 of file VisionObjectEvent.h. |
unsigned int VisionObjectEvent::getBinSize |
( |
|
) |
const [virtual] |
|
float VisionObjectEvent::getBottom |
( |
|
) |
const [inline] |
|
|
returns the final y (_y2) coordinate of the Bounding Box (inclusive value)
Definition at line 75 of file VisionObjectEvent.h. |
float VisionObjectEvent::getBoundaryArea |
( |
|
) |
const [inline] |
|
|
returns the area of the bounding box, just multiplication of width*height, (multiply by the major camera resolution to get pixel area)
Definition at line 87 of file VisionObjectEvent.h. |
float VisionObjectEvent::getCenterX |
( |
|
) |
const [inline] |
|
float VisionObjectEvent::getCenterY |
( |
|
) |
const [inline] |
|
virtual unsigned int VisionObjectEvent::getClassTypeID |
( |
|
) |
const [inline, virtual] |
|
|
All subclasses should override this and return a unique ID for their class.
All IDs corresponding to all-capital letters are reserved for future framework expansion. (Thus, user subclasses should contain at least one lower-case letter.) This code can be used when serializing to allow quick identification of the class type by the receiver.
Reimplemented from EventBase.
Definition at line 63 of file VisionObjectEvent.h. |
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 8 of file VisionObjectEvent.cc. |
unsigned int VisionObjectEvent::getFrame |
( |
|
) |
const [inline] |
|
float VisionObjectEvent::getHeight |
( |
|
) |
const [inline] |
|
float VisionObjectEvent::getLeft |
( |
|
) |
const [inline] |
|
float VisionObjectEvent::getObjectArea |
( |
|
) |
const [inline] |
|
|
returns the object's _area within the camera, in squared generalized coordinates (multiply by the major camera resolution to get pixel area)
Definition at line 78 of file VisionObjectEvent.h. |
float VisionObjectEvent::getRight |
( |
|
) |
const [inline] |
|
|
returns the final x (_x2) coordinate of the Bounding Box (inclusive value)
Definition at line 69 of file VisionObjectEvent.h. |
float VisionObjectEvent::getTop |
( |
|
) |
const [inline] |
|
float VisionObjectEvent::getWidth |
( |
|
) |
const [inline] |
|
float VisionObjectEvent::getXrange |
( |
|
) |
const [inline] |
|
float VisionObjectEvent::getYrange |
( |
|
) |
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::LoadBinaryBuffer |
( |
const char |
buf[], |
|
|
unsigned int |
len |
|
) |
[virtual] |
|
void VisionObjectEvent::LoadXML |
( |
xmlNode * |
node |
) |
[virtual] |
|
unsigned int VisionObjectEvent::SaveBinaryBuffer |
( |
char |
buf[], |
|
|
unsigned int |
len |
|
) |
const [virtual] |
|
void VisionObjectEvent::SaveXML |
( |
xmlNode * |
node |
) |
const [virtual] |
|
void VisionObjectEvent::setClipping |
( |
bool |
left, |
|
|
bool |
right, |
|
|
bool |
top, |
|
|
bool |
bottom |
|
) |
[inline] |
|
|
returns the object's _area within the camera, in squared generalized coordinates (multiply by the major camera resolution to get pixel area)
Definition at line 79 of file VisionObjectEvent.h. |
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 110 of file VisionObjectEvent.h.
Referenced by getBinSize(), getBoundaryArea(), getCenterX(), getDescription(), getLeft(), getWidth(), LoadBinaryBuffer(), LoadXML(), SaveBinaryBuffer(), SaveXML(), and setLeft(). |
|
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 111 of file VisionObjectEvent.h.
Referenced by getBinSize(), getBoundaryArea(), getCenterX(), getDescription(), getRight(), getWidth(), LoadBinaryBuffer(), LoadXML(), SaveBinaryBuffer(), SaveXML(), and setRight(). |
|
top boundary, in range of ) for ERS-7; actual values vary depending on aspect ratio to keep square coordinates
Definition at line 112 of file VisionObjectEvent.h.
Referenced by getBinSize(), getBoundaryArea(), getCenterY(), getDescription(), getHeight(), getTop(), LoadBinaryBuffer(), LoadXML(), SaveBinaryBuffer(), SaveXML(), and setTop(). |
|
bottom boundary, in approximately for ERS-7; actual values vary depending on aspect ratio to keep square coordinates
Definition at line 113 of file VisionObjectEvent.h.
Referenced by getBinSize(), getBottom(), getBoundaryArea(), getCenterY(), getDescription(), getHeight(), LoadBinaryBuffer(), LoadXML(), SaveBinaryBuffer(), SaveXML(), and setBottom(). |
The documentation for this class was generated from the following files:
|