Homepage | Demos | Overview | Downloads | Tutorials | Reference | Credits |
00001 //-*-c++-*- 00002 /*========================================================================= 00003 CMPack'02 Source Code Release for OPEN-R SDK v1.0 00004 Copyright (C) 2002 Multirobot Lab [Project Head: Manuela Veloso] 00005 School of Computer Science, Carnegie Mellon University 00006 ------------------------------------------------------------------------- 00007 This software is distributed under the GNU General Public License, 00008 version 2. If you do not have a copy of this licence, visit 00009 www.gnu.org, or write: Free Software Foundation, 59 Temple Place, 00010 Suite 330 Boston, MA 02111-1307 USA. This program is distributed 00011 in the hope that it will be useful, but WITHOUT ANY WARRANTY, 00012 including MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00013 ------------------------------------------------------------------------- 00014 Additionally licensed to Sony Corporation under the following terms: 00015 00016 This software is provided by the copyright holders AS IS and any 00017 express or implied warranties, including, but not limited to, the 00018 implied warranties of merchantability and fitness for a particular 00019 purpose are disclaimed. In no event shall authors be liable for 00020 any direct, indirect, incidental, special, exemplary, or consequential 00021 damages (including, but not limited to, procurement of substitute 00022 goods or services; loss of use, data, or profits; or business 00023 interruption) however caused and on any theory of liability, whether 00024 in contract, strict liability, or tort (including negligence or 00025 otherwise) arising in any way out of the use of this software, even if 00026 advised of the possibility of such damage. 00027 ========================================================================= 00028 */ 00029 #ifndef __VISION_INTERFACE_H__ 00030 #define __VISION_INTERFACE_H__ 00031 00032 #include "Motion/Geometry.h" 00033 00034 class Vision; 00035 00036 namespace VisionInterface { 00037 00038 static const double HorzFOV = 58.0 * M_PI / 180.0; 00039 static const double VertFOV = 48.0 * M_PI / 180.0; 00040 00041 // Bitmasks for which edges of the image an object borders 00042 const uchar OFF_EDGE_LEFT = 1; 00043 const uchar OFF_EDGE_RIGHT = 2; 00044 const uchar OFF_EDGE_TOP = 4; 00045 const uchar OFF_EDGE_BOTTOM = 8; 00046 00047 // High level vision ouput structure for detected objects 00048 struct VObject{ 00049 double confidence; // [0,1] Estimate of certainty 00050 vector3d loc; // Relative to front of robot (on ground) 00051 double left,right; // Angle to left and right of object (egocentric) 00052 double distance; // Distance of object (on ground) 00053 uchar edge; // Is object on edge of image (bitmasks above) 00054 }; 00055 00056 // Colors: (G)reen (O)range (P)urple 00057 const int MARKER_GOG = 0; 00058 const int MARKER_GOP = 1; 00059 const int MARKER_GPG = 2; 00060 const int MARKER_GPO = 3; 00061 const int MARKER_OGO = 4; 00062 const int MARKER_OGP = 5; 00063 const int MARKER_OPG = 6; 00064 const int MARKER_OPO = 7; 00065 const int MARKER_PGO = 8; 00066 const int MARKER_PGP = 9; 00067 const int MARKER_POG = 10; 00068 const int MARKER_POP = 11; 00069 const int RBALL = 12; 00070 const int PBALL = 13; 00071 const int HAND = 14; 00072 const int THING = 15; 00073 00074 /* attention: if you change this constant, please also change 00075 * AFS_NUM_LANDMARKS in WorldMap2/FastSLAM/Configuration.h. This is a 00076 * sad way to do things, but it's necessary with our mix of C and C++ code. 00077 * Sorry about that. --tom */ 00078 const int NUM_MARKERS = 12; 00079 00080 const int NUM_VISION_OBJECTS = NUM_MARKERS + 4; 00081 00082 // All the objects we might detect 00083 struct ObjectInfo{ 00084 VObject marker[12]; 00085 VObject rball; 00086 VObject pball; 00087 VObject hand; 00088 VObject thing; 00089 }; 00090 00091 // returns the id of the old threshold or -1 on error 00092 int SetThreshold(Vision *vision,int threshold_id); 00093 00094 void SendRawImage(Vision *vision); // Forces the output of the current raw image to the log/spout/wl 00095 void SendRLEImage(Vision *vision); // Forces the output of the current RLE image to the log/spout/wl 00096 void WriteThresholdImage(Vision *vision, char *filename); 00097 00098 } // namespace vision 00099 00100 /*! @file 00101 * @brief Interfaces between CMVision and the Vision module 00102 * @author CMU RoboSoccer 2001-2002 (Creator) 00103 * @author alokl (ported) 00104 * 00105 * @verbinclude CMPack_license.txt 00106 * 00107 * $Author: tss $ 00108 * $Name: tekkotsu-1_4_1 $ 00109 * $Revision: 1.4 $ 00110 * $State: Exp $ 00111 * $Date: 2003/02/13 20:11:07 $ 00112 */ 00113 #endif 00114 // __VISION_INTERFACE_H__ 00115
Tekkotsu v1.4 |
Generated Sat Jul 19 00:06:32 2003 by Doxygen 1.3.2 |