00001 /*!@file RCBot/FindLandmark.H find a landmark using SceneRec */ 00002 // //////////////////////////////////////////////////////////////////// // 00003 // The iLab Neuromorphic Vision C++ Toolkit - Copyright (C) 2001 by the // 00004 // University of Southern California (USC) and the iLab at USC. // 00005 // See http://iLab.usc.edu for information about this project. // 00006 // //////////////////////////////////////////////////////////////////// // 00007 // Major portions of the iLab Neuromorphic Vision Toolkit are protected // 00008 // under the U.S. patent ``Computation of Intrinsic Perceptual Saliency // 00009 // in Visual Environments, and Applications'' by Christof Koch and // 00010 // Laurent Itti, California Institute of Technology, 2001 (patent // 00011 // pending; application number 09/912,225 filed July 23, 2001; see // 00012 // http://pair.uspto.gov/cgi-bin/final/home.pl for current status). // 00013 // //////////////////////////////////////////////////////////////////// // 00014 // This file is part of the iLab Neuromorphic Vision C++ Toolkit. // 00015 // // 00016 // The iLab Neuromorphic Vision C++ Toolkit is free software; you can // 00017 // redistribute it and/or modify it under the terms of the GNU General // 00018 // Public License as published by the Free Software Foundation; either // 00019 // version 2 of the License, or (at your option) any later version. // 00020 // // 00021 // The iLab Neuromorphic Vision C++ Toolkit is distributed in the hope // 00022 // that it will be useful, but WITHOUT ANY WARRANTY; without even the // 00023 // implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR // 00024 // PURPOSE. See the GNU General Public License for more details. // 00025 // // 00026 // You should have received a copy of the GNU General Public License // 00027 // along with the iLab Neuromorphic Vision C++ Toolkit; if not, write // 00028 // to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, // 00029 // Boston, MA 02111-1307 USA. // 00030 // //////////////////////////////////////////////////////////////////// // 00031 // 00032 // Primary maintainer for this file: Lior Elazary <lelazary@yahoo.com> 00033 // $HeadURL: svn://isvn.usc.edu/software/invt/trunk/saliency/src/RCBot/FindLandmark.H $ 00034 // $Id: FindLandmark.H 9412 2008-03-10 23:10:15Z farhan $ 00035 // 00036 00037 #include "Image/Image.H" 00038 #include "Image/Pixels.H" 00039 #include "Component/ModelManager.H" 00040 #include "Image/CutPaste.H" // for inplacePaste() 00041 00042 #include "Corba/Objects/SceneRecServerSK.hh" 00043 #include "Corba/ImageOrbUtil.H" 00044 #include "Corba/CorbaUtil.H" 00045 00046 #ifndef FIND_LANDMARK_H 00047 #define FIND_LANDMARK_H 00048 00049 static omni_mutex thLandmarkInfoMutex; 00050 static omni_mutex landmarkImgMutex; 00051 static omni_mutex findLandmarkMutex; 00052 static omni_condition findLandmarkCond(&findLandmarkMutex); 00053 00054 // ###################################################################### 00055 class FindLandmark : public omni_thread 00056 { 00057 public: 00058 FindLandmark(SceneRecServer_var inSceneRec); 00059 ~FindLandmark(); 00060 void run(void *ptr); 00061 int getLandmark(Point2D<int> &landmarkLoc); 00062 void setImg(Image<PixRGB<byte> > &inImg); 00063 00064 private: 00065 SceneRecServer_var sceneRec; 00066 Point2D<int> thLandmarkLoc; 00067 int currentLeg; 00068 Image<PixRGB<byte> > img; 00069 }; 00070 #endif 00071 00072 // ###################################################################### 00073 /* So things look consistent in everyone's emacs... */ 00074 /* Local Variables: */ 00075 /* indent-tabs-mode: nil */ 00076 /* End: */