Homepage | Demos | Overview | Downloads | Tutorials | Reference | Credits |
VisionObjectEvent.hGo to the documentation of this file.00001 //-*-c++-*- 00002 #ifndef INCLUDED_VisionObjectEvent_h 00003 #define INCLUDED_VisionObjectEvent_h 00004 00005 #include "EventBase.h" 00006 00007 //! Extends EventBase to also include location in the visual field and distance (though distance is not implimented yet) 00008 class VisionObjectEvent : public EventBase { 00009 public: 00010 //! Constructor 00011 VisionObjectEvent() : EventBase(EventBase::visObjEGID,(unsigned int)-1,EventBase::statusETID,0),_cenX(0),_cenY(0)/*,_distance(),_property(-1)*/ {} 00012 //! Constructor, pass a type id and source id 00013 VisionObjectEvent(EventTypeID_t tid, unsigned int sid) : EventBase(EventBase::visObjEGID,sid,tid,0),_cenX(0),_cenY(0)/*_distance(),_property(-1)*/ {} 00014 //! Constructor, pass the type id, source id, center X and center Y 00015 VisionObjectEvent(EventTypeID_t tid, unsigned int sid, float cenX, float cenY) : EventBase(EventBase::visObjEGID,sid,tid,0),_cenX(cenX),_cenY(cenY)/*,_distance(),_property(-1)*/ {} 00016 //! destructor 00017 virtual ~VisionObjectEvent() {} 00018 00019 float getCenterX() const { return _cenX;} //!< returns the x coordinate 00020 VisionObjectEvent& setCenterX(float cenX) { _cenX=cenX; return *this;} //!< sets the x coordinate 00021 00022 float getCenterY() const { return _cenY;} //!< returns the y coordinate 00023 VisionObjectEvent& setCenterY(float cenY) { _cenY=cenY; return *this;} //!< sets the y coordinate 00024 00025 //float getDistance() const { return _distance;} //!< returns the distance (not implemented) 00026 //VisionObjectEvent& setDistance(float dist) { _distance=dist; return *this;} //!< sets the distance 00027 00028 //int getProperty() const { return _property;} //!< returns the property (for future use) 00029 //VisionObjectEvent& setProperty(int property) { _property=property; return *this;} //!< sets the property 00030 00031 virtual std::string getDescription(bool showTypeSpecific=true, unsigned int verbosity=0) const; 00032 00033 virtual unsigned int getBinSize() const; 00034 virtual unsigned int LoadBuffer(const char buf[], unsigned int len); 00035 virtual unsigned int SaveBuffer(char buf[], unsigned int len) const; 00036 00037 protected: 00038 float _cenX; //!< a value representing location in visual field - from -1 if on the left edge to 1 if it's on the right edge 00039 float _cenY; //!< a value representing location in visual field - from -1 if on the bottom edge to 1 if it's on the top edge 00040 //float _distance; //!< distance from snout to object in millimeters. (not implemented) 00041 //int _property; //!< some property, depending on the SID (for future use) 00042 }; 00043 00044 /*! @file 00045 * @brief Provides information about objects recognized in the camera image 00046 * @author alokl (Creator) 00047 * 00048 * $Author: ejt $ 00049 * $Name: tekkotsu-2_2_1 $ 00050 * $Revision: 1.3 $ 00051 * $State: Exp $ 00052 * $Date: 2004/09/01 21:30:57 $ 00053 */ 00054 00055 #endif |
Tekkotsu v2.2.1 |
Generated Tue Nov 23 16:36:40 2004 by Doxygen 1.3.9.1 |