You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(59) |
Jun
(40) |
Jul
(59) |
Aug
(81) |
Sep
(14) |
Oct
(9) |
Nov
(22) |
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(25) |
Feb
(3) |
Mar
(27) |
Apr
(14) |
May
(15) |
Jun
(112) |
Jul
(44) |
Aug
(7) |
Sep
(18) |
Oct
(34) |
Nov
(17) |
Dec
(20) |
2006 |
Jan
(12) |
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
(3) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(11) |
Update of /cvsroot/robotflow/RobotFlow/Vision/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22316 Modified Files: ColorHistExtraction.cc MeanShiftTracker.cc VisualFeatureDesc.cc VisualHistogramDesc.cc VisualROI.cc VisualTarget.cc VisualTargetManager.cc Log Message: Added std namespace usage Index: VisualFeatureDesc.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/VisualFeatureDesc.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** VisualFeatureDesc.cc 12 Apr 2005 19:43:55 -0000 1.2 --- VisualFeatureDesc.cc 12 Apr 2005 19:58:10 -0000 1.3 *************** *** 23,26 **** --- 23,27 ---- using namespace FD; + using namespace std; namespace RobotFlow { Index: VisualTarget.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/VisualTarget.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** VisualTarget.cc 12 Apr 2005 19:43:55 -0000 1.3 --- VisualTarget.cc 12 Apr 2005 19:58:10 -0000 1.4 *************** *** 19,22 **** --- 19,23 ---- using namespace FD; + using namespace std; namespace RobotFlow { Index: VisualTargetManager.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/VisualTargetManager.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** VisualTargetManager.cc 12 Apr 2005 19:43:55 -0000 1.3 --- VisualTargetManager.cc 12 Apr 2005 19:58:10 -0000 1.4 *************** *** 18,21 **** --- 18,22 ---- using namespace FD; + using namespace std; namespace RobotFlow { Index: ColorHistExtraction.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/ColorHistExtraction.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ColorHistExtraction.cc 12 Apr 2005 19:43:55 -0000 1.3 --- ColorHistExtraction.cc 12 Apr 2005 19:58:10 -0000 1.4 *************** *** 18,21 **** --- 18,22 ---- using namespace FD; + using namespace std; namespace RobotFlow { Index: VisualROI.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/VisualROI.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** VisualROI.cc 12 Apr 2005 19:43:55 -0000 1.3 --- VisualROI.cc 12 Apr 2005 19:58:10 -0000 1.4 *************** *** 2,5 **** --- 2,6 ---- using namespace FD; + using namespace std; namespace RobotFlow { Index: MeanShiftTracker.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/MeanShiftTracker.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MeanShiftTracker.cc 12 Apr 2005 19:43:55 -0000 1.3 --- MeanShiftTracker.cc 12 Apr 2005 19:58:10 -0000 1.4 *************** *** 18,21 **** --- 18,22 ---- using namespace FD; + using namespace std; namespace RobotFlow { Index: VisualHistogramDesc.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/VisualHistogramDesc.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** VisualHistogramDesc.cc 12 Apr 2005 19:43:55 -0000 1.3 --- VisualHistogramDesc.cc 12 Apr 2005 19:58:10 -0000 1.4 *************** *** 19,22 **** --- 19,23 ---- using namespace FD; + using namespace std; namespace RobotFlow { |
Update of /cvsroot/robotflow/RobotFlow/Vision/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11493 Modified Files: ColorHistExtraction.cc MeanShiftTracker.cc VisualFeatureDesc.cc VisualHistogramDesc.cc VisualROI.cc VisualTarget.cc VisualTargetManager.cc Log Message: Added FD namespace usage Index: VisualFeatureDesc.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/VisualFeatureDesc.cc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** VisualFeatureDesc.cc 12 Apr 2005 19:34:03 -0000 1.1 --- VisualFeatureDesc.cc 12 Apr 2005 19:43:55 -0000 1.2 *************** *** 22,25 **** --- 22,29 ---- #include "Vector.h" + using namespace FD; + + namespace RobotFlow { + // // Declaring known types *************** *** 162,164 **** //REGISTER_VTABLE0(toVect, VisualFeatureDesc<double>, VisualFeatDesc2VectorConversion<VisualFeatureDesc<double>,Vector<VisualFeatureDesc<double> *> >, 6); ! --- 166,168 ---- //REGISTER_VTABLE0(toVect, VisualFeatureDesc<double>, VisualFeatDesc2VectorConversion<VisualFeatureDesc<double>,Vector<VisualFeatureDesc<double> *> >, 6); ! } Index: VisualTarget.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/VisualTarget.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** VisualTarget.cc 12 Apr 2005 19:38:59 -0000 1.2 --- VisualTarget.cc 12 Apr 2005 19:43:55 -0000 1.3 *************** *** 18,21 **** --- 18,23 ---- #include "VisualTarget.h" + using namespace FD; + namespace RobotFlow { Index: VisualTargetManager.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/VisualTargetManager.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** VisualTargetManager.cc 12 Apr 2005 19:38:59 -0000 1.2 --- VisualTargetManager.cc 12 Apr 2005 19:43:55 -0000 1.3 *************** *** 17,20 **** --- 17,21 ---- #include "VisualTargetManager.h" + using namespace FD; namespace RobotFlow { Index: ColorHistExtraction.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/ColorHistExtraction.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ColorHistExtraction.cc 12 Apr 2005 19:38:59 -0000 1.2 --- ColorHistExtraction.cc 12 Apr 2005 19:43:55 -0000 1.3 *************** *** 17,20 **** --- 17,22 ---- #include "ColorHistExtraction.h" + using namespace FD; + namespace RobotFlow { Index: VisualROI.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/VisualROI.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** VisualROI.cc 12 Apr 2005 19:38:59 -0000 1.2 --- VisualROI.cc 12 Apr 2005 19:43:55 -0000 1.3 *************** *** 1,4 **** --- 1,6 ---- #include "VisualROI.h" + using namespace FD; + namespace RobotFlow { Index: MeanShiftTracker.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/MeanShiftTracker.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MeanShiftTracker.cc 12 Apr 2005 19:38:59 -0000 1.2 --- MeanShiftTracker.cc 12 Apr 2005 19:43:55 -0000 1.3 *************** *** 17,20 **** --- 17,21 ---- #include "MeanShiftTracker.h" + using namespace FD; namespace RobotFlow { Index: VisualHistogramDesc.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/VisualHistogramDesc.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** VisualHistogramDesc.cc 12 Apr 2005 19:38:59 -0000 1.2 --- VisualHistogramDesc.cc 12 Apr 2005 19:43:55 -0000 1.3 *************** *** 18,21 **** --- 18,23 ---- #include "VisualHistogramDesc.h" + using namespace FD; + namespace RobotFlow { |
From: Dominic L. <ma...@us...> - 2005-04-12 19:39:10
|
Update of /cvsroot/robotflow/RobotFlow/Vision/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9131 Modified Files: ColorHistExtraction.cc MeanShiftTracker.cc VisualHistogramDesc.cc VisualROI.cc VisualTarget.cc VisualTargetManager.cc Log Message: adding namespace RobotFlow Index: VisualTarget.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/VisualTarget.cc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** VisualTarget.cc 12 Apr 2005 19:34:03 -0000 1.1 --- VisualTarget.cc 12 Apr 2005 19:38:59 -0000 1.2 *************** *** 18,22 **** #include "VisualTarget.h" ! DECLARE_TYPE(VisualTarget<double>) --- 18,24 ---- #include "VisualTarget.h" ! namespace RobotFlow { + DECLARE_TYPE(VisualTarget<double>) + }//namespace RobotFlow Index: VisualTargetManager.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/VisualTargetManager.cc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** VisualTargetManager.cc 12 Apr 2005 19:34:03 -0000 1.1 --- VisualTargetManager.cc 12 Apr 2005 19:38:59 -0000 1.2 *************** *** 17,20 **** --- 17,23 ---- #include "VisualTargetManager.h" + + namespace RobotFlow { + DECLARE_NODE(VisualTargetManager) DECLARE_TYPE(VisualTargetManager) *************** *** 445,446 **** --- 448,451 ---- } } + + }//namespace RobotFlow Index: ColorHistExtraction.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/ColorHistExtraction.cc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ColorHistExtraction.cc 12 Apr 2005 19:34:02 -0000 1.1 --- ColorHistExtraction.cc 12 Apr 2005 19:38:59 -0000 1.2 *************** *** 17,20 **** --- 17,22 ---- #include "ColorHistExtraction.h" + namespace RobotFlow { + DECLARE_NODE(ColorHistExtraction) DECLARE_TYPE(ColorHistExtraction) *************** *** 78,82 **** * END*/ ! // --- 80,84 ---- * END*/ ! // *************** *** 353,354 **** --- 355,358 ---- m_init = true; } + + }//namespace RobotFlow Index: VisualROI.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/VisualROI.cc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** VisualROI.cc 12 Apr 2005 19:34:03 -0000 1.1 --- VisualROI.cc 12 Apr 2005 19:38:59 -0000 1.2 *************** *** 1,4 **** --- 1,6 ---- #include "VisualROI.h" + namespace RobotFlow { + DECLARE_TYPE(VisualROI) *************** *** 471,472 **** --- 473,476 ---- return numPixels; } + + }//namespace RobotFlow Index: MeanShiftTracker.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/MeanShiftTracker.cc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MeanShiftTracker.cc 12 Apr 2005 19:34:02 -0000 1.1 --- MeanShiftTracker.cc 12 Apr 2005 19:38:59 -0000 1.2 *************** *** 17,20 **** --- 17,23 ---- #include "MeanShiftTracker.h" + + namespace RobotFlow { + DECLARE_NODE(MeanShiftTracker) DECLARE_TYPE(MeanShiftTracker) *************** *** 369,371 **** // end for ! --- 372,374 ---- // end for ! }//namespace RobotFlow Index: VisualHistogramDesc.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/VisualHistogramDesc.cc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** VisualHistogramDesc.cc 12 Apr 2005 19:34:03 -0000 1.1 --- VisualHistogramDesc.cc 12 Apr 2005 19:38:59 -0000 1.2 *************** *** 18,21 **** --- 18,23 ---- #include "VisualHistogramDesc.h" + namespace RobotFlow { + // // Declaring known types *************** *** 26,27 **** --- 28,30 ---- ("<VisualHistogramDesc<double,unsigned int>>", new ObjectFactory<VisualHistogramDesc<double, unsigned int> >("<VisualHistogramDesc<double,unsigned int>>")); + }//namespace RobotFlow |
From: Pierre M. <sid...@us...> - 2005-04-12 19:38:57
|
Update of /cvsroot/robotflow/RobotFlow/Vision/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9007 Modified Files: ColorHistExtraction.h MeanShiftTracker.h VisualFeatureDesc.h VisualFeaturesExtraction.h VisualHistogramDesc.h VisualROI.h VisualTarget.h VisualTargetManager.h VisualTracker.h Log Message: Added RobotFlow namespace Index: VisualFeaturesExtraction.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/include/VisualFeaturesExtraction.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** VisualFeaturesExtraction.h 12 Apr 2005 19:32:06 -0000 1.1 --- VisualFeaturesExtraction.h 12 Apr 2005 19:38:34 -0000 1.2 *************** *** 26,29 **** --- 26,31 ---- #include "VisualROI.h" + namespace RobotFlow { + template <class FeatBaseType> class VisualFeaturesExtraction : public BufferedNode *************** *** 61,63 **** --- 63,67 ---- }; + } + #endif Index: MeanShiftTracker.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/include/MeanShiftTracker.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MeanShiftTracker.h 12 Apr 2005 19:32:06 -0000 1.1 --- MeanShiftTracker.h 12 Apr 2005 19:38:34 -0000 1.2 *************** *** 21,24 **** --- 21,26 ---- #include "VisualTracker.h" + namespace RobotFlow { + class MeanShiftTracker : public VisualTracker { *************** *** 80,82 **** --- 82,86 ---- }; + } + #endif Index: VisualTarget.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/include/VisualTarget.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** VisualTarget.h 12 Apr 2005 19:32:06 -0000 1.1 --- VisualTarget.h 12 Apr 2005 19:38:34 -0000 1.2 *************** *** 27,30 **** --- 27,32 ---- #include "VisualROI.h" + namespace RobotFlow { + template <class FeatBaseType> class VisualTarget : public Object *************** *** 497,499 **** --- 499,503 ---- }; + } + #endif Index: VisualHistogramDesc.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/include/VisualHistogramDesc.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** VisualHistogramDesc.h 12 Apr 2005 19:32:06 -0000 1.1 --- VisualHistogramDesc.h 12 Apr 2005 19:38:34 -0000 1.2 *************** *** 26,29 **** --- 26,31 ---- #include "Vector.h" + namespace RobotFlow { + typedef enum { *************** *** 928,930 **** --- 930,934 ---- }; + } + #endif Index: VisualROI.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/include/VisualROI.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** VisualROI.h 12 Apr 2005 19:32:06 -0000 1.1 --- VisualROI.h 12 Apr 2005 19:38:34 -0000 1.2 *************** *** 24,27 **** --- 24,29 ---- #include "cv.h" + namespace RobotFlow { + typedef enum { *************** *** 125,127 **** --- 127,131 ---- }; + } + #endif Index: VisualFeatureDesc.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/include/VisualFeatureDesc.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** VisualFeatureDesc.h 12 Apr 2005 19:32:06 -0000 1.1 --- VisualFeatureDesc.h 12 Apr 2005 19:38:34 -0000 1.2 *************** *** 22,25 **** --- 22,27 ---- #include <iostream> + namespace RobotFlow { + typedef enum { *************** *** 159,161 **** --- 161,165 ---- }; + } + #endif Index: VisualTargetManager.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/include/VisualTargetManager.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** VisualTargetManager.h 12 Apr 2005 19:32:06 -0000 1.1 --- VisualTargetManager.h 12 Apr 2005 19:38:34 -0000 1.2 *************** *** 27,30 **** --- 27,32 ---- #include <sys/timeb.h> + namespace RobotFlow { + class VisualTargetManager : public BufferedNode { *************** *** 96,98 **** --- 98,102 ---- }; + } + #endif Index: VisualTracker.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/include/VisualTracker.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** VisualTracker.h 12 Apr 2005 19:32:06 -0000 1.1 --- VisualTracker.h 12 Apr 2005 19:38:34 -0000 1.2 *************** *** 27,30 **** --- 27,32 ---- #include "VisualTarget.h" + namespace RobotFlow { + class VisualTracker : public BufferedNode { *************** *** 57,59 **** --- 59,63 ---- }; + } + #endif Index: ColorHistExtraction.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/include/ColorHistExtraction.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ColorHistExtraction.h 12 Apr 2005 19:32:06 -0000 1.1 --- ColorHistExtraction.h 12 Apr 2005 19:38:34 -0000 1.2 *************** *** 24,27 **** --- 24,28 ---- #include <sys/timeb.h> + namespace RobotFlow { // // Color histogram Features Extraction for RobotFlow *************** *** 138,140 **** --- 139,143 ---- }; + } + #endif |
From: Pierre M. <sid...@us...> - 2005-04-12 19:34:14
|
Update of /cvsroot/robotflow/RobotFlow/Vision/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6253 Modified Files: Makefile.am Added Files: ColorHistExtraction.cc MeanShiftTracker.cc VisualFeatureDesc.cc VisualHistogramDesc.cc VisualROI.cc VisualTarget.cc VisualTargetManager.cc Log Message: Added OpenCV depend files --- NEW FILE: VisualFeatureDesc.cc --- /* Copyright (C) 2005 Pierre Moisan (Pie...@US...) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "VisualFeatureDesc.h" #include "operators.h" #include "conversion.h" #include "vmethod.h" #include "Vector.h" // // Declaring known types // DECLARE_TYPE(VisualFeatureDesc<double>) typedef VisualFeatureDesc<double> VisualDoubleFeatureDesc; typedef Vector<VisualFeatureDesc<double> *> VisualDoubleFeatureDescVec; // // Adding operators // // Concat operator using two VisualFeatureDesc inputs template <class X, class Y, class Z> ObjectRef concatVFDFunction(ObjectRef op1, ObjectRef op2) { RCPtr<X> op1Value = op1; RCPtr<Y> op2Value = op2; //creating output vector RCPtr<Z> resultValue = RCPtr<Z>(Z::alloc(2)); //concat 2 values into a vector (*resultValue)[0] = &(*op1Value); (*resultValue)[1] = &(*op2Value); return resultValue; } REGISTER_DOUBLE_VTABLE_TEMPLATE( concatVtable, concatVFDFunction, VisualFeatureDesc<double>, VisualFeatureDesc<double>, Vector<VisualFeatureDesc<double> *>, 0) // Concat operator using two Vector<VisualFeatureDesc *> inputs template <class X, class Y, class Z> ObjectRef concatVFDVecVecFunction(ObjectRef op1, ObjectRef op2) { RCPtr<X> op1Value = op1; RCPtr<Y> op2Value = op2; RCPtr<Z> resultValue(Z::alloc(op1Value->size() + op2Value->size())); //copy first part for (int i =0; i < op1Value->size(); i++) { (*resultValue)[i] = (*op1Value)[i]; } //copy last part for (int i =0; i < op2Value->size(); i++) { (*resultValue)[i + op1Value->size()] = (*op2Value)[i]; } return resultValue; } REGISTER_DOUBLE_VTABLE_TEMPLATE( concatVtable, concatVFDVecVecFunction, Vector<VisualFeatureDesc<double> *>, Vector<VisualFeatureDesc<double> *>, Vector<VisualFeatureDesc<double> *>, 0) // Concat operator using a Vector<VisualFeatureDesc *> input // followed by a VisualFeatureDesc input template<class X, class Y, class Z> ObjectRef concatVectorVFDFunction(ObjectRef op1, ObjectRef op2) { RCPtr<X> op1Value = op1; RCPtr<Y> op2Value = op2; //creating new vector RCPtr<Z> resultValue(Z::alloc(op1Value->size() + 1)); //copying values from vector for (int i = 0; i < resultValue->size(); i++) { (*resultValue)[i] = (*op1Value)[i]; } //adding last element (*resultValue)[resultValue->size() - 1] = &(*op2Value); return resultValue; } REGISTER_DOUBLE_VTABLE_TEMPLATE( concatVtable, concatVectorVFDFunction, Vector<VisualFeatureDesc<double> *>, VisualFeatureDesc<double>, Vector<VisualFeatureDesc<double> *>, 0) // Concat operator using a VisualFeatureDesc input // followed by a Vector<VisualFeatureDesc *> input template<class X, class Y, class Z> ObjectRef concatVFDVectorFunction(ObjectRef op1, ObjectRef op2) { RCPtr<X> op1Value = op1; RCPtr<Y> op2Value = op2; //creating new vector RCPtr<Z> resultValue(Z::alloc(op2Value->size() + 1)); //copying values from vector for (int i = 1; i < resultValue->size(); i++) { (*resultValue)[i] = (*op2Value)[i - 1]; } //adding first element (*resultValue)[0] = &(*op1Value); return resultValue; } REGISTER_DOUBLE_VTABLE_TEMPLATE( concatVtable, concatVFDVectorFunction, VisualFeatureDesc<double>, Vector<VisualFeatureDesc<double> *>, Vector<VisualFeatureDesc<double> *>, 0) // ToVect conversion template <class T, class U> ObjectRef VisualFeatDesc2VectorConversion (ObjectRef in) { RCPtr<T> FromVFD = in; RCPtr<U> ToVector(U::alloc(1)); (*ToVector)[0] = &(*FromVFD); return ToVector; } REGISTER_CONVERSION_TEMPLATE( VisualFeatureDesc<double>, Vector<VisualFeatureDesc<double> *>, VisualFeatDesc2VectorConversion); static int dummy_template_vtable_init_for_VFDdouble_to_vector_VFDdouble = \ vmethod()->registerFunct0(VisualFeatDesc2VectorConversion<VisualFeatureDesc<double>,Vector<VisualFeatureDesc<double> *> >,&typeid(VisualDoubleFeatureDesc),"toVect"); //REGISTER_VTABLE0(toVect, VisualFeatureDesc<double>, VisualFeatDesc2VectorConversion<VisualFeatureDesc<double>,Vector<VisualFeatureDesc<double> *> >, 6); --- NEW FILE: VisualTarget.cc --- /* Copyright (C) 2005 Pierre Moisan (Pie...@US...) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "VisualTarget.h" DECLARE_TYPE(VisualTarget<double>) --- NEW FILE: ColorHistExtraction.cc --- /* Copyright (C) 2005 Pierre Moisan (Pie...@US...) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "ColorHistExtraction.h" DECLARE_NODE(ColorHistExtraction) DECLARE_TYPE(ColorHistExtraction) /*Node * * @name ColorHistExtraction * @category RobotFlow:Vision:FeaturesExtraction * @description Color histogram features extraction. * * @parameter_name FRAME_WIDTH * @parameter_type int * @parameter_value 320 * @parameter_description Video frame width. * * @parameter_name FRAME_HEIGHT * @parameter_type int * @parameter_value 240 * @parameter_description Video frame height. * * @parameter_name NUM_CHANNELS * @parameter_type int * @parameter_value 3 * @parameter_description Number of channels in video frame. * * @input_name IN_IMAGE * @input_type Image * @input_description Current frame to process. * * @input_name NUM_BINS * @input_type Vector<int> * @input_description Number of bins for each dimension of the histogram. * * @input_name CURRENT_ROI * @input_type VisualROI * @input_description The current region of interest. * * @input_name CURRENT_TARGET * @input_type VisualTarget * @input_description The current target to estimate the mean shif location. * * @input_name TARGET_DESC_IDX * @input_type int * @input_description The corresponding descriptor index in the current target descriptors vector. * * @input_name PREPROCESS_FRAME * @input_type bool * @input_description Flag indicating to preprocess a new image. * * @output_name OUT_FEATURES * @output_type Vector<VisualFeatureDesc<double> *> * @output_description Output features descriptor. * * @output_name OUT_MS_LOCATION * @output_type Vector<double> * @output_description Mean shift vector of location. * * @output_name PREPROCESS_COMPLETED * @output_type int * @output_description Output to force preprocessing. * END*/ // // Default constructor for Object // ColorHistExtraction::ColorHistExtraction() : m_width(-1), m_height(-1), m_numChannels(-1), m_init(false), m_roi(NULL), m_colorHistogram(NULL) { } // // Constructor with complete intialisation // ColorHistExtraction::ColorHistExtraction(int i_width, int i_height, int i_numChannels, const Vector<int> *i_numBins) : m_width(i_width), m_height(i_height), m_numChannels(i_numChannels), m_init(false), m_roi(NULL), m_colorHistogram(NULL) { Initialize(i_numBins); } // // Copy constructor // ColorHistExtraction::ColorHistExtraction(const ColorHistExtraction& i_ref) { throw new GeneralException("Exception in ColorHistExtraction::ColorHistExtraction: copy constructor not yet implemented.",__FILE__,__LINE__); } // // BufferedNode constructor // ColorHistExtraction::ColorHistExtraction(string nodeName, ParameterSet params) : VisualFeaturesExtraction<double>(nodeName, params), m_init(false), m_roi(NULL), m_colorHistogram(NULL) { m_imageInID = addInput("IN_IMAGE"); m_numBinsInID = addInput("NUM_BINS"); m_roiInID = addInput("CURRENT_ROI"); m_targetInID = addInput("CURRENT_TARGET"); m_targetDescIdxInID = addInput("TARGET_DESC_IDX"); m_useNextImgInID = addInput("PREPROCESS_FRAME"); m_featuresOutID = addOutput("OUT_FEATURES"); m_msLocOutID = addOutput("OUT_MS_LOCATION"); m_ppCompletedOutID = addOutput("PREPROCESS_COMPLETED"); m_width = dereference_cast<int>(parameters.get("FRAME_WIDTH")); m_height = dereference_cast<int>(parameters.get("FRAME_HEIGHT")); m_numChannels = dereference_cast<int>(parameters.get("NUM_CHANNELS")); } ColorHistExtraction::~ColorHistExtraction() { delete m_roi; delete m_colorHistogram; cvReleaseImage(&m_curImage); } // Modified BufferedNode request method to support cyclic node connection void ColorHistExtraction::request(int output_id, const ParameterSet &req) { if (req.exist("LOOKAHEAD")) { outputs[output_id].lookAhead = max(outputs[output_id].lookAhead,dereference_cast<int> (req.get("LOOKAHEAD"))); } if (req.exist("LOOKBACK")) { outputs[output_id].lookBack = max(outputs[output_id].lookBack,dereference_cast<int> (req.get("LOOKBACK"))); } if (req.exist("INORDER")) { inOrder = true; } int outputLookAhead=0, outputLookBack=0; outputLookAhead=max(outputLookAhead, outputs[output_id].lookAhead); outputLookBack =max(outputLookBack, outputs[output_id].lookBack); // Every output usually requires these inputs ParameterSet nextImgReq, numBinsReq; nextImgReq.add("LOOKAHEAD", ObjectRef(Int::alloc(inputsCache[m_useNextImgInID].lookAhead+outputLookAhead))); nextImgReq.add("LOOKBACK", ObjectRef(Int::alloc(inputsCache[m_useNextImgInID].lookBack+outputLookBack))); inputs[m_useNextImgInID].node->request(inputs[m_useNextImgInID].outputID,nextImgReq); numBinsReq.add("LOOKAHEAD", ObjectRef(Int::alloc(inputsCache[m_numBinsInID].lookAhead+outputLookAhead))); numBinsReq.add("LOOKBACK", ObjectRef(Int::alloc(inputsCache[m_numBinsInID].lookBack+outputLookBack))); inputs[m_numBinsInID].node->request(inputs[m_numBinsInID].outputID,numBinsReq); if (output_id == m_featuresOutID) { ParameterSet myReq; myReq.add("LOOKAHEAD", ObjectRef(Int::alloc(inputsCache[m_roiInID].lookAhead+outputLookAhead))); myReq.add("LOOKBACK", ObjectRef(Int::alloc(inputsCache[m_roiInID].lookBack+outputLookBack))); inputs[m_roiInID].node->request(inputs[m_roiInID].outputID,myReq); } else if (output_id == m_msLocOutID) { ParameterSet myReq, myReq2; myReq.add("LOOKAHEAD", ObjectRef(Int::alloc(inputsCache[m_targetDescIdxInID].lookAhead+outputLookAhead))); myReq.add("LOOKBACK", ObjectRef(Int::alloc(inputsCache[m_targetDescIdxInID].lookBack+outputLookBack))); inputs[m_targetDescIdxInID].node->request(inputs[m_targetDescIdxInID].outputID,myReq); myReq2.add("LOOKAHEAD", ObjectRef(Int::alloc(inputsCache[m_targetInID].lookAhead+outputLookAhead))); myReq2.add("LOOKBACK", ObjectRef(Int::alloc(inputsCache[m_targetInID].lookBack+outputLookBack))); inputs[m_targetInID].node->request(inputs[m_targetInID].outputID,myReq2); } else if (output_id == m_ppCompletedOutID) { ParameterSet myReq; myReq.add("LOOKAHEAD", ObjectRef(Int::alloc(inputsCache[m_imageInID].lookAhead+outputLookAhead))); myReq.add("LOOKBACK", ObjectRef(Int::alloc(inputsCache[m_imageInID].lookBack+outputLookBack))); inputs[m_imageInID].node->request(inputs[m_imageInID].outputID, myReq); } else { throw new GeneralException ("ColorHistExtraction::request : unknown output ID.",__FILE__,__LINE__); } } void ColorHistExtraction::calculate(int output_id, int count, Buffer &out) { try { if (!m_init) { RCPtr<Vector<int> > numBinsRef = getInput(m_numBinsInID, count); Initialize(&(*numBinsRef)); } bool useNext = dereference_cast<bool>(getInput(m_useNextImgInID, count)); if (useNext) { RCPtr<Image> imageRef = getInput(m_imageInID, count); // Verify input image sanity if (imageRef->get_width() != m_width || imageRef->get_height() != m_height || imageRef->get_pixelsize() != m_numChannels) { throw new GeneralException ("ColorHistExtraction::calculate : image parameters do not correspond to given input.",__FILE__,__LINE__); } // Copy input image memcpy(m_curImage->imageData, imageRef->get_data(), m_numBytesInFrame); } if (output_id == m_featuresOutID) { ObjectRef roiRef = getInput(m_roiInID, count); if (!roiRef->isNil()) { ExtractFeatures(&(object_cast<VisualROI>(roiRef))); /* VisualHistogramDesc<double, unsigned char> *outFeatures = new VisualHistogramDesc<double, unsigned char>(*m_colorHistogram); */ Vector<VisualFeatureDesc<double> *> *outVec = Vector<VisualFeatureDesc<double> *>::alloc(1); (*outVec)[0] = new VisualHistogramDesc<double, unsigned char>(*m_colorHistogram); (*outputs[m_featuresOutID].buffer)[count] = ObjectRef(outVec); } else { (*outputs[m_featuresOutID].buffer)[count] = ObjectRef(nilObject); } } else if (output_id == m_msLocOutID) { // X,Y location Vector<double> *outMSLoc = new Vector<double>(2); ObjectRef targetRef = getInput(m_targetInID, count); if (!targetRef->isNil()) { // Get descriptor index to use int descIdx = dereference_cast<int>(getInput(m_targetDescIdxInID, count)); EstimateMSLocation(&(object_cast<VisualTarget<double> >(targetRef)), descIdx, outMSLoc); (*outputs[m_msLocOutID].buffer)[count] = ObjectRef(outMSLoc); } else { (*outputs[m_msLocOutID].buffer)[count] = ObjectRef(nilObject); } } else if (output_id == m_ppCompletedOutID) { // Preprocess image than output true RCPtr<Image> imageRef = getInput(m_imageInID, count); // Verify input image sanity if (imageRef->get_width() != m_width || imageRef->get_height() != m_height || imageRef->get_pixelsize() != m_numChannels) { throw new GeneralException ("ColorHistExtraction::calculate : image parameters do not correspond to given input.",__FILE__,__LINE__); } // Copy input image memcpy(m_curImage->imageData, imageRef->get_data(), m_numBytesInFrame); (*outputs[m_ppCompletedOutID].buffer)[count] = ObjectRef(Int::alloc(1)); } } catch (BaseException *e) { throw e->add(new GeneralException("Exception in ColorHistExtraction::calculate:",__FILE__,__LINE__)); } } void ColorHistExtraction::ExtractFeatures(VisualROI *i_roi) { try { m_colorHistogram->ComputeKernelWeightedHist((const unsigned char *)m_curImage->imageData, 255, 1.0, m_width, m_height, i_roi); } catch (BaseException *e) { throw e->add(new GeneralException("Exception in ColorHistExtraction::ExtractFeatures:",__FILE__,__LINE__)); } } void ColorHistExtraction::ExtractFeatures(IplImage *i_input, VisualROI *i_roi) { try { m_colorHistogram->ComputeKernelWeightedHist((const unsigned char *)i_input->imageData, 255, 1.0, m_width, m_height, i_roi); } catch (BaseException *e) { throw e->add(new GeneralException("Exception in ColorHistExtraction::ExtractFeatures:",__FILE__,__LINE__)); } } void ColorHistExtraction::EstimateMSLocation(const VisualTarget<double> *i_targetRef, int i_descIdx, Vector<double> *o_msLocVec) { try { const double *refModelBins = i_targetRef->GetCstDescriptor(i_descIdx)->GetCstFeatures(); const VisualROI *curROI = i_targetRef->GetCstROI(); double cueWeight = i_targetRef->GetCueWeight(i_descIdx); // Extract candidate features histogram m_colorHistogram->ComputeKernelWeightedHist((const unsigned char *)m_curImage->imageData, 255, 1.0, m_width, m_height, curROI); // Evaluate mean shift location m_colorHistogram->ComputeMSLocation((const unsigned char *)m_curImage->imageData, 255, 1.0, m_width, m_height, curROI, refModelBins, cueWeight, o_msLocVec); } catch (BaseException *e) { throw e->add(new GeneralException("Exception in ColorHistExtraction::EstimateMSLocation:",__FILE__,__LINE__)); } } // // Private mehtods // void ColorHistExtraction::Initialize(const Vector<int> *i_numBins) { m_numPixels = m_width*m_height; m_numBytesInFrame = m_numPixels*3; CvSize imgSize; imgSize.width = m_width; imgSize.height = m_height; m_curImage = cvCreateImage(imgSize, IPL_DEPTH_8U, m_numChannels); m_colorHistogram = new VisualHistogramDesc<double, unsigned char>(e_VISUALHIST_BhattacharyyaCoeff, true, m_numChannels, i_numBins); m_roi = new VisualROI(); m_init = true; } --- NEW FILE: VisualTargetManager.cc --- /* Copyright (C) 2005 Pierre Moisan (Pie...@US...) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "VisualTargetManager.h" DECLARE_NODE(VisualTargetManager) DECLARE_TYPE(VisualTargetManager) /*Node * * @name VisualTargetManager * @category RobotFlow:Vision:Tracking * @description Target manager to handle target initialization, adaptation and deletion. * * @parameter_name FRAME_WIDTH * @parameter_type int * @parameter_value 320 * @parameter_description Video frame width. * * @parameter_name FRAME_HEIGHT * @parameter_type int * @parameter_value 240 * @parameter_description Video frame height. * * @parameter_name NUM_CHANNELS * @parameter_type int * @parameter_value 3 * @parameter_description Number of channels in video frame. * * @parameter_name MAX_NUM_TARGET * @parameter_type int * @parameter_value 10 * @parameter_description Maximum number of target to keep track of. * * @parameter_name TARGET_MATCH_THRES * @parameter_type float * @parameter_value 0.6 * @parameter_description Minimum confidence to assume a target match. * * @parameter_name TARGET_ADAPT_THRES * @parameter_type float * @parameter_value 0.9 * @parameter_description Adaptation treshold for each target cue model. * * @parameter_name TARGET_ADAPT_RATE * @parameter_type float * @parameter_value 0.1 * @parameter_description Adaptation rate for each target cue model. * * @parameter_name CUE_ADAPT_RATE * @parameter_type float * @parameter_value 0.2 * @parameter_description Adaptation rate for each cue weight. * * @input_name IMAGE_IN * @input_type Image * @input_description Current video frame. * * @input_name PREPROCESS_COMPLETED * @input_type Vector<int> * @input_description Flags indicating the completion of the features extraction preprocessing stage. * * @input_name DETECTED_ROI * @input_type VisualROI * @input_description A region of interest detected as a potential target region. * * @input_name FEATURES_VECTOR * @input_type Vector<VisualFeatureDesc<double> *> * @input_description Features descriptors vector (probably requested to adapt or init a target) * * @input_name TRACKED_TARGET * @input_type VisualTarget<double> * @input_description An updated target by a tracking routine. * * @output_name IMAGE_OUT * @output_type Image * @output_description Current image with identified target. * * @output_name CURRENT_ROI * @output_type VisualROI * @output_description Current region of interest to extract features. * * @output_name CURRENT_TARGET * @output_type VisualTarget<double> * @output_description Current target to track. * * @output_name TARGET_PROB * @output_type double * @output_description Current target likelihood at current tracked position. * * @output_name TARGET_DELTA_X * @output_type float * @output_description Current target position relative to the image x center. * * @output_name TARGET_DELTA_Y * @output_type float * @output_description Current target position relative to the image y center. * * @output_name FRAME_NAME * @output_type string * @output_description Current frame name for saving purposes. * END*/ // // Default constructor for Object // VisualTargetManager::VisualTargetManager() : m_target(NULL) { } // // BufferedNode constructor // VisualTargetManager::VisualTargetManager(std::string nodeName, ParameterSet params) : BufferedNode(nodeName, params), m_target(NULL) { m_imageInID = addInput("IMAGE_IN"); m_ppCompletedInID = addInput("PREPROCESS_COMPLETED"); m_roiInID = addInput("DETECTED_ROI"); m_featVecInID = addInput("FEATURES_VECTOR"); m_targetInID = addInput("TRACKED_TARGET"); m_imageOutID = addOutput("IMAGE_OUT"); m_roiOutID = addOutput("CURRENT_ROI"); m_targetOutID = addOutput("CURRENT_TARGET"); m_targetProbOutID = addOutput("TARGET_PROB"); m_targetDXOutID = addOutput("TARGET_DELTA_X"); m_targetDYOutID = addOutput("TARGET_DELTA_Y"); m_nameOutID = addOutput("FRAME_NAME"); m_width = dereference_cast<int>(parameters.get("FRAME_WIDTH")); m_height = dereference_cast<int>(parameters.get("FRAME_HEIGHT")); m_numChannels = dereference_cast<int>(parameters.get("NUM_CHANNELS")); m_maxNumTargets = dereference_cast<int>(parameters.get("MAX_NUM_TARGET")); m_targetMatchThres = dereference_cast<float>(parameters.get("TARGET_MATCH_THRES")); m_targetAdaptThres = dereference_cast<float>(parameters.get("TARGET_ADAPT_THRES")); m_targetAdaptRate = dereference_cast<float>(parameters.get("TARGET_ADAPT_RATE")); m_cueAdaptRate = dereference_cast<float>(parameters.get("CUE_ADAPT_RATE")); m_numPixels = m_width*m_height; m_numBytesInFrame = m_numPixels*m_numChannels; m_imgXCen = (float)(m_width)*0.5f; m_imgYCen = (float)(m_height)*0.25f; CvSize imgSize; imgSize.width = m_width; imgSize.height = m_height; m_curImage = cvCreateImage(imgSize, IPL_DEPTH_8U, m_numChannels); m_target = new VisualTarget<double>(); m_refTarget = RCPtr<VisualTarget<double> >(m_target); m_roiColor[0] = 255; m_roiColor[1] = 0; m_roiColor[2] = 0; } VisualTargetManager::~VisualTargetManager() { delete m_target; cvReleaseImage(&m_curImage); } // Modified BufferedNode request method to support cyclic node connection void VisualTargetManager::request(int output_id, const ParameterSet &req) { if (req.exist("LOOKAHEAD")) { outputs[output_id].lookAhead = max(outputs[output_id].lookAhead,dereference_cast<int> (req.get("LOOKAHEAD"))); } if (req.exist("LOOKBACK")) { outputs[output_id].lookBack = max(outputs[output_id].lookBack,dereference_cast<int> (req.get("LOOKBACK"))); } if (req.exist("INORDER")) { inOrder = true; } int outputLookAhead=0, outputLookBack=0; outputLookAhead=max(outputLookAhead, outputs[output_id].lookAhead); outputLookBack =max(outputLookBack, outputs[output_id].lookBack); if (output_id == m_targetProbOutID) { ParameterSet myReq, myReq2, myReq3, myReq4; myReq.add("LOOKAHEAD", ObjectRef(Int::alloc(inputsCache[m_roiInID].lookAhead+outputLookAhead))); myReq.add("LOOKBACK", ObjectRef(Int::alloc(inputsCache[m_roiInID].lookBack+outputLookBack))); inputs[m_roiInID].node->request(inputs[m_roiInID].outputID,myReq); myReq2.add("LOOKAHEAD", ObjectRef(Int::alloc(inputsCache[m_ppCompletedInID].lookAhead+outputLookAhead))); myReq2.add("LOOKBACK", ObjectRef(Int::alloc(inputsCache[m_ppCompletedInID].lookBack+outputLookBack))); inputs[m_ppCompletedInID].node->request(inputs[m_ppCompletedInID].outputID,myReq2); myReq3.add("LOOKAHEAD", ObjectRef(Int::alloc(inputsCache[m_targetInID].lookAhead+outputLookAhead))); myReq3.add("LOOKBACK", ObjectRef(Int::alloc(inputsCache[m_targetInID].lookBack+outputLookBack))); inputs[m_targetInID].node->request(inputs[m_targetInID].outputID,myReq3); myReq4.add("LOOKAHEAD", ObjectRef(Int::alloc(inputsCache[m_featVecInID].lookAhead+outputLookAhead))); myReq4.add("LOOKBACK", ObjectRef(Int::alloc(inputsCache[m_featVecInID].lookBack+outputLookBack))); inputs[m_featVecInID].node->request(inputs[m_featVecInID].outputID,myReq4); } else if (output_id == m_targetOutID) { // CURRENT_TARGET output does not required any inputs return; } else if (output_id == m_roiOutID) { // CURRENT_ROI output does not required any inputs return; } else if (output_id == m_imageOutID) { ParameterSet myReq; myReq.add("LOOKAHEAD", ObjectRef(Int::alloc(inputsCache[m_imageInID].lookAhead+outputLookAhead))); myReq.add("LOOKBACK", ObjectRef(Int::alloc(inputsCache[m_imageInID].lookBack+outputLookBack))); inputs[m_imageInID].node->request(inputs[m_imageInID].outputID, myReq); } else if (output_id == m_targetDXOutID) { // TARGET_DELTA_X output does not required any inputs return; } else if (output_id == m_targetDYOutID) { // TARGET_DELTA_Y output does not required any inputs return; } else if (output_id == m_nameOutID) { // FRAME_NAME output does not required any inputs return; } else { throw new GeneralException ("VisualTargetManager::request : unknown output ID.",__FILE__,__LINE__); } } void VisualTargetManager::calculate(int output_id, int count, Buffer &out) { try { if (output_id == m_imageOutID) { fflush(stdout); // Get current image RCPtr<Image> imageRef = getInput(m_imageInID, count); // Verify input image sanity if (imageRef->get_width() != m_width || imageRef->get_height() != m_height || imageRef->get_pixelsize() != m_numChannels) { throw new GeneralException ("VisualTargetManager::calculate : image parameters do not correspond to given input.",__FILE__,__LINE__); } memcpy(m_curImage->imageData, imageRef->get_data(), m_numBytesInFrame); if (m_target->IsValid()) { // Draw current target's ROI in current image m_target->GetCstROI()->DrawROI(m_curImage, (const unsigned char *)m_roiColor); // Copy current image for output Image *outImage = Image::alloc(m_width, m_height, m_numChannels); unsigned char *p_src = (unsigned char *)m_curImage->imageData; unsigned char *p_dst = (unsigned char *)outImage->get_data(); for (int p=0; p<m_numPixels; p++) { p_dst[0] = p_src[2]; p_dst[1] = p_src[1]; p_dst[2] = p_src[0]; p_dst += 3; p_src += 3; } //memcpy(outImage->get_data(), m_curImage->imageData, m_numBytesInFrame); (*outputs[m_imageOutID].buffer)[count] = ObjectRef(outImage); } else { // If no current target, output unmodified image (*outputs[m_imageOutID].buffer)[count] = ObjectRef(imageRef); } } else if (output_id == m_roiOutID) { if (m_target->IsValid()) { // Output directly the reference since it should // only be used as a constant reference //VisualROI *outROI = new VisualROI(*(m_target->GetCstROI())); //(*outputs[m_roiOutID].buffer)[count] = ObjectRef(outROI); //(*outputs[m_roiOutID].buffer)[count] = ObjectRef(RCPtr<VisualROI>(m_target->GetROI())); static RCPtr<VisualROI> refROI = RCPtr<VisualROI>(m_target->GetROI()); (*outputs[m_roiOutID].buffer)[count] = refROI; } else { // No ROI initialized, so output nilObject (*outputs[m_roiOutID].buffer)[count] = ObjectRef(nilObject); } } else if (output_id == m_targetOutID) { if (m_target->IsValid()) { // Output directly the reference since it should // only be used as a constant reference //VisualTarget<double> *outTarget = new VisualTarget<double>(*m_target); //(*outputs[m_targetOutID].buffer)[count] = ObjectRef(outTarget); static RCPtr<VisualTarget<double> > refTarget = RCPtr<VisualTarget<double> >(m_target); (*outputs[m_targetOutID].buffer)[count] = m_refTarget; } else { // No ROI initialized, so output nilObject (*outputs[m_targetOutID].buffer)[count] = ObjectRef(nilObject); } } else if (output_id == m_targetProbOutID) { if (m_target->GetCurrentAge() < -10) { // Target is too old to track // Invalidate it m_target->SetValidity(false); } if (!m_target->IsValid()) { // Try to initialize a new target // Get detected ROI ObjectRef roiRef = getInput(m_roiInID, count); m_ppCompleted = false; if (!roiRef->isNil()) { // Initialize target at current ROI m_target->SetROI(&(object_cast<VisualROI>(roiRef))); m_target->SetValidity(true); if (!m_ppCompleted) { // Force features extraction preprocessing RCPtr<Vector<int> > preprocessRef = getInput(m_ppCompletedInID, count); m_ppCompleted = true; } // Get features for current ROI and use them // as the target feature model ObjectRef featVecRef = getInput(m_featVecInID, count); if (featVecRef->isNil()) { throw new GeneralException ("VisualTargetManager::calculate : cannot initialize target with null input FEATURES_VECTOR.",__FILE__,__LINE__); } m_target->SetDescriptorsVec(&(object_cast<Vector<VisualFeatureDesc<double> *> >(featVecRef))); m_target->InitCueWeights(); m_target->InitAges(); } } if (m_target->IsValid()) { double sim = 0.0; bool targetMatch = false; // Force features extraction preprocessing only once per frame if (!m_ppCompleted) { RCPtr<Vector<int> > preprocessRef = getInput(m_ppCompletedInID, count); m_ppCompleted = true; } // Start timer ftime(&m_t1); // Track current target ObjectRef targetRef = getInput(m_targetInID, count); if (!targetRef->isNil()) { *m_target = object_cast<VisualTarget<double> >(targetRef); // Get features to evalute the likelihood of the current // target at the given tracked position ObjectRef featVecRef = getInput(m_featVecInID, count); if (featVecRef->isNil()) { throw new GeneralException ("VisualTargetManager::calculate : cannot evaluate the target's likelihood with null input FEATURES_VECTOR.",__FILE__,__LINE__); } sim = m_target->SimilarityWCueAdapt( &(object_cast<Vector<VisualFeatureDesc<double> *> >(featVecRef)), m_cueAdaptRate); targetMatch = (sim >= m_targetMatchThres); m_target->AgeTarget(targetMatch); if (sim > m_targetAdaptThres) { m_target->Adapt(&(object_cast<Vector<VisualFeatureDesc<double> *> >(featVecRef)), m_targetAdaptRate); } } // End timer ftime(&m_t2); // Display time used double timeDiff=(m_t2.time-m_t1.time)+((m_t2.millitm-m_t1.millitm)/1000.0); cout << "Total run time (sec): " << timeDiff << endl; (*outputs[m_targetProbOutID].buffer)[count] = ObjectRef(Double::alloc(sim)); } else { // If no current target, output 0.0 (*outputs[m_targetProbOutID].buffer)[count] = ObjectRef(Double::alloc(0.0)); } } else if (output_id == m_targetDXOutID) { if (m_target->IsValid()) { float deltaX = (float)(m_target->GetCstROI()->GetXCen()) - m_imgXCen; (*outputs[m_targetDXOutID].buffer)[count] = ObjectRef(Float::alloc(deltaX)); } else { (*outputs[m_targetDXOutID].buffer)[count] = nilObject; } } else if (output_id == m_targetDYOutID) { if (m_target->IsValid()) { float deltaY = m_imgYCen - (float)(m_target->GetCstROI()->GetYCen()); (*outputs[m_targetDYOutID].buffer)[count] = ObjectRef(Float::alloc(deltaY)); } else { (*outputs[m_targetDYOutID].buffer)[count] = nilObject; } } else if (output_id == m_nameOutID) { String *outName = new String("/home/moip1501/images/FaceTracking"); char idx[12]; sprintf(idx, "%05d", count); (*outName) += idx; (*outName) += ".jpg"; (*outputs[m_nameOutID].buffer)[count] = ObjectRef(outName); } } catch (BaseException *e) { throw e->add(new GeneralException("Exception in VisualTargetManager::calculate:",__FILE__,__LINE__)); } } --- NEW FILE: VisualROI.cc --- #include "VisualROI.h" DECLARE_TYPE(VisualROI) VisualROI::VisualROI() : m_type(), m_xCen(0), m_yCen(0), m_hsX(0), m_hsY(0), m_angle(0), m_perim(NULL), m_normVects(NULL), m_mask(NULL) { } VisualROI::VisualROI(e_VISUALROI_type i_type, int i_xCen, int i_yCen, int i_hsX, int i_hsY, int i_angle) :m_type(i_type), m_xCen(i_xCen), m_yCen(i_yCen), m_hsX(i_hsX), m_hsY(i_hsY), m_angle(i_angle), m_perim(NULL), m_normVects(NULL), m_mask(NULL) { switch(m_type) { case e_VISUALROI_rectangular: MakeRectangularRegion(); break; case e_VISUALROI_elliptical: MakeEllipticalRegion(); break; case e_VISUALROI_unknown: default: throw new GeneralException ("VisualROI::VisualROI : unknown region geometric type",__FILE__,__LINE__); } } VisualROI::VisualROI(const VisualROI& i_ref) :m_perim(NULL), m_normVects(NULL), m_mask(NULL) { try { m_type = i_ref.m_type; m_xCen = i_ref.m_xCen; m_yCen = i_ref.m_yCen; m_hsX = i_ref.m_hsX; m_hsY = i_ref.m_hsY; m_angle = i_ref.m_angle; Reset(m_hsX, m_hsY, m_angle); } catch (BaseException *e) { throw e->add(new GeneralException("Exception caught in VisualROI::VisualROI:",__FILE__,__LINE__)); } } VisualROI::~VisualROI() { delete [] m_perim; delete [] m_normVects; delete [] m_mask; } VisualROI & VisualROI::operator =(const VisualROI &i_ref) { // Avoid self assignment if (&i_ref == this) { return *this; } try { m_type = i_ref.m_type; m_xCen = i_ref.m_xCen; m_yCen = i_ref.m_yCen; if (m_hsX == i_ref.m_hsX && m_hsY == i_ref.m_hsY && m_angle == i_ref.m_angle) { // Nothing else to do return *this; } m_hsX = i_ref.m_hsX; m_hsY = i_ref.m_hsY; m_angle = i_ref.m_angle; Reset(m_hsX, m_hsY, m_angle); return *this; } catch (BaseException *e) { throw e->add(new GeneralException("Exception caught in VisualROI::VisualROI:",__FILE__,__LINE__)); } } // Default routine to print a VisualROI object to an output stream void VisualROI::printOn(ostream &out) const { throw new GeneralException ("VisualROI::printOn : routine not implemented yet",__FILE__,__LINE__); } // Default routine to read a VisualROI object from an input stream void VisualROI::readFrom(istream &in) { throw new GeneralException ("VisualROI::readFrom : routine not implemented yet",__FILE__,__LINE__); } void VisualROI::DrawROI(IplImage *io_frame, const unsigned char *i_color) const { if (!io_frame) { throw new GeneralException ("VisualROI::DrawROI : invalid image reference.",__FILE__,__LINE__); } if (!i_color) { throw new GeneralException ("VisualROI::DrawROI : invalid color reference.",__FILE__,__LINE__); } if (!m_perim) { throw new GeneralException ("VisualROI::DrawROI : cannot draw ROI with uninitialized region data.",__FILE__,__LINE__); } unsigned char *p_pixels = (unsigned char *)io_frame->imageData; const short *p_perim = this->GetCstPerim(); int imgWidth = io_frame->width; int imgHeight = io_frame->height; int numChannels = io_frame->nChannels; int i, c, x, y; short deltaX, deltaY; bool broken = true; // Start at the top center of the region x = m_xCen; y = m_yCen; p_pixels += numChannels*(y*imgWidth + x); // Overlay region of interest for (i=m_perimLength; i>0; i--) { deltaX = *p_perim++; deltaY = *p_perim++; x += deltaX; y += deltaY; // Draw only if region is visible if (y>0 && y<imgHeight && x>0 && x<imgWidth) { if (!broken) { // Relative position p_pixels += numChannels*(deltaY*imgWidth + deltaX); } else { // Absolute position p_pixels = (unsigned char *)(io_frame->imageData + numChannels*(y*imgWidth + x)); broken = false; } for (c=0; c<numChannels; c++) { *p_pixels++ = i_color[c]; } p_pixels -= numChannels; } else { broken = true; } } } void VisualROI::Reset(int i_hsX, int i_hsY, int i_angle) { delete [] m_perim; delete [] m_normVects; delete [] m_mask; m_hsX = i_hsX; m_hsY = i_hsY; m_angle = i_angle; switch(m_type) { case e_VISUALROI_rectangular: MakeRectangularRegion(); break; case e_VISUALROI_elliptical: MakeEllipticalRegion(); break; case e_VISUALROI_unknown: default: throw new GeneralException ("VisualROI::VisualROI : unknown region geometric type",__FILE__,__LINE__); } } // // Public accessor methods // e_VISUALROI_type VisualROI::GetType() const { return m_type; } int VisualROI::GetPerimLength() const { return m_perimLength; } short *VisualROI::GetPerim() { return m_perim; } const short *VisualROI::GetCstPerim() const { return (const short *)m_perim; } float *VisualROI::GetNormVects() { return m_normVects; } const float *VisualROI::GetCstNormVects() const { return (const float *)m_normVects; } int VisualROI::GetXCen() const { return m_xCen; } int VisualROI::GetYCen() const { return m_yCen; } int VisualROI::GetHSX() const { return m_hsX; } int VisualROI::GetHSY() const { return m_hsY; } int VisualROI::GetAngle() const { return m_angle; } int VisualROI::GetArea() const { return m_area; } unsigned char *VisualROI::GetMask() { return m_mask; } const unsigned char *VisualROI::GetCstMask() const { return (const unsigned char *)m_mask; } void VisualROI::SetXCen(int i_xCen) { m_xCen = i_xCen; } void VisualROI::SetYCen(int i_yCen) { m_yCen = i_yCen; } void VisualROI::SetHSX(int i_hsX) { if (i_hsX == m_hsX) { // Nothing to do return; } try { m_hsX = i_hsX; Reset(m_hsX, m_hsY, m_angle); } catch (BaseException *e) { throw e->add(new GeneralException("Exception caught in VisualROI::SetHSX:",__FILE__,__LINE__)); } } void VisualROI::SetHSY(int i_hsY) { if (i_hsY == m_hsY) { // Nothing to do return; } try { m_hsY = i_hsY; Reset(m_hsX, m_hsY, m_angle); } catch (BaseException *e) { throw e->add(new GeneralException("Exception caught in VisualROI::SetHSY:",__FILE__,__LINE__)); } } void VisualROI::SetAngle(int i_angle) { if (i_angle == m_angle) { // Nothing to do return; } try { m_angle = i_angle; Reset(m_hsX, m_hsY, m_angle); } catch (BaseException *e) { throw e->add(new GeneralException("Exception caught in VisualROI::SetAngle:",__FILE__,__LINE__)); } } // // Private routines // void VisualROI::MakeEllipticalRegion() { short *ptr; float *ptrn; int xrad2 = m_hsX * m_hsX; int yrad2 = m_hsY * m_hsY; double ratio = ((double) xrad2) / ((double) yrad2); int hsXbkpt = (int) (xrad2 / sqrt((double) xrad2 + yrad2)); int hsYbkpt = (int) (yrad2 / sqrt((double) xrad2 + yrad2)); int x, y, xOff, yOff, xAbs, yAbs; int curX, curY; // Number of iterations in loops below m_perimLength = 4 * hsXbkpt + 4 * hsYbkpt + 4; m_perim = new short[2*m_perimLength]; m_normVects = new float[2*m_perimLength]; ptr = m_perim; ptrn = m_normVects; // Perimeter starts at top and proceeds clockwise *(ptr)++ = curX = 0; *(ptr)++ = curY = - m_hsY; *ptrn++ = 0.0f; *ptrn++ = -1.0f; // From 0 to 45 degrees, starting from top clockwise of an unoriented ellipse for (x = 1; x <= hsXbkpt ; x++) { y = (int) (-m_hsY * sqrt(1 - ((double) x / m_hsX)*((double) x / m_hsX))); *(ptr)++ = x - curX; *(ptr)++ = y - curY; *ptrn++ = (float) ( x / sqrt(x*x + ratio*y*y)); *ptrn++ = (float) ((ratio*y) / sqrt(x*x + ratio*y*y)); curX = x; curY = y; } // From 45 to 135 degrees (including right axis) for (y = - hsYbkpt ; y <= hsYbkpt ; y++) { x = (int) (m_hsX * sqrt(1 - ((double) y / m_hsY)*((double) y / m_hsY))); *(ptr)++ = x - curX; *(ptr)++ = y - curY; *ptrn++ = (float) ( x / sqrt(x*x + ratio*y*y)); *ptrn++ = (float) ((ratio*y) / sqrt(x*x + ratio*y*y)); curX = x; curY = y; } // From 135 to 225 degrees (including down axis) for (x = hsXbkpt ; x >= - hsXbkpt ; x--) { y = (int) (m_hsY * sqrt(1 - ((double) x / m_hsX)*((double) x / m_hsX))); *(ptr)++ = x - curX; *(ptr)++ = y - curY; *ptrn++ = (float) ( x / sqrt(x*x + ratio*y*y)); *ptrn++ = (float) ((ratio*y) / sqrt(x*x + ratio*y*y)); curX = x; curY = y; } // From 225 to 315 degrees (including left axis) for (y = hsYbkpt ; y >= - hsYbkpt ; y--) { x = (int) (-m_hsX * sqrt(1 - ((double) y / m_hsY)*((double) y / m_hsY))); *(ptr)++ = x - curX; *(ptr)++ = y - curY; *ptrn++ = (float) ( x / sqrt(x*x + ratio*y*y)); *ptrn++ = (float) ((ratio*y) / sqrt(x*x + ratio*y*y)); curX = x; curY = y; } // From 315 to 360 degrees for (x = - hsXbkpt ; x < 0 ; x++) { y = (int) (-m_hsY * sqrt(1 - ((double) x / m_hsX)*((double) x / m_hsX))); *(ptr)++ = x - curX; *(ptr)++ = y - curY; *ptrn++ = (float) ( x / sqrt(x*x + ratio*y*y)); *ptrn++ = (float) ((ratio*y) / sqrt(x*x + ratio*y*y)); curX = x; curY = y; } m_area = MakeRegionMask(); } void VisualROI::MakeRectangularRegion() { throw new GeneralException ("VisualROI::MakeRectangularRegion : method not yet implemented.",__FILE__,__LINE__); } int VisualROI::MakeRegionMask() { unsigned char *p_mask; short *p_perim; int *mins, *maxs; int *p_min, *p_max; int x, y; int i, j; int sizeX = 2*(m_hsX)+1; int sizeY = 2*(m_hsY)+1; int numPixels = 0; mins = new int[sizeY]; maxs = new int[sizeY]; m_mask = new unsigned char[sizeX*sizeY]; // Init mins and maxs p_min = mins; p_max = maxs; for (i = 0 ; i < sizeY ; i++) { *p_min++ = 999; *p_max++ = -999; } // Init mask memset(m_mask, 0, sizeX*sizeY); // Fill in max and min vectors p_perim = m_perim; x = m_hsX + *p_perim++; y = m_hsY + *p_perim++; p_max = maxs + y; p_min = mins + y; *p_max = x; *p_min = x; for (i=1; i<m_perimLength; ++i) { x += *p_perim++; p_max += *p_perim; p_min += *p_perim++; if (x > *p_max) { *p_max = x; } if (x < *p_min) { *p_min = x; } } // Use max and min vectors to fill in mask. // The interior of the object is filled in // and the perimeter is excluded. p_min = mins; p_max = maxs; for (i = 0 ; i < sizeY ; i++) { p_mask = (m_mask) + i * sizeX; if (*p_min < *p_max) { p_mask += *p_min + 1; for (j = *p_min + 1 ; j < *p_max ; j++) { *p_mask++ = 255; numPixels++; } } p_min++; p_max++; } // Clean memory delete [] mins; delete [] maxs; return numPixels; } Index: Makefile.am =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/Makefile.am,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** Makefile.am 12 Apr 2005 19:23:04 -0000 1.29 --- Makefile.am 12 Apr 2005 19:34:03 -0000 1.30 *************** *** 7,11 **** if WITH_OPENCV ! OPENCV_SOURCES = else OPENCV_SOURCES = --- 7,17 ---- if WITH_OPENCV ! OPENCV_SOURCES = ColorHistExtraction.cc \ ! MeanShiftTracker.cc \ ! VisualFeatureDesc.cc \ ! VisualHistogramDesc.cc \ ! VisualROI.cc \ ! VisualTarget.cc \ ! VisualTargetManager.cc else OPENCV_SOURCES = --- NEW FILE: MeanShiftTracker.cc --- /* Copyright (C) 2005 Pierre Moisan (Pie...@US...) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "MeanShiftTracker.h" DECLARE_NODE(MeanShiftTracker) DECLARE_TYPE(MeanShiftTracker) /*Node * * @name MeanShiftTracker * @category RobotFlow:Vision:Tracking * @description Mean shift region/object tracker. * * @parameter_name FRAME_WIDTH * @parameter_type int * @parameter_value 320 * @parameter_description Video frame width. * * @parameter_name FRAME_HEIGHT * @parameter_type int * @parameter_value 240 * @parameter_description Video frame height. * * @parameter_name NUM_CHANNELS * @parameter_type int * @parameter_value 3 * @parameter_description Number of channels in video frame. * * @parameter_name MAX_NUM_MS_ITER * @parameter_type int * @parameter_value 20 * @parameter_description Maximum number of mean shift iterations. * * @parameter_name MS_DIST_EPSILON * @parameter_type float * @parameter_value 2.0 * @parameter_description Minimal distance to consider that the mean shift has found a maximum. * * @input_name IMAGE_IN * @input_type Image * @input_description Current video frame. * * @input_name PREPROCESS_COMPLETED * @input_type Vector<int> * @input_description Flags indicating the completion of the features extraction preprocessing stage. * * @input_name CURRENT_TARGET * @input_type VisualTarget<double> * @input_description Current target to track. * * @input_name MS_LOCATION * @input_type Vector<double> * @input_description Mean shift vector of location. * * @output_name TRACKING_FINISHED * @output_type bool * @output_description Flag indicating that the tracking has completed. * * @output_name IMAGE_OUT * @output_type Image * @output_description Current image to process. * * @output_name CURRENT_TARGET * @output_type VisualTarget<double> * @output_description Current target being tracked (to compute mean shift location). * * @output_name TRACKED_TARGET * @output_type Image * @output_description Target updated according to the tracking algorithm. * END*/ // // Mean shift object/region tracker for RobotFlow // // Implementation is based on the following publication: // // D. Comaniciu, V. Ramesh, P. Meer. "Kernel-based object tracking", // IEEE Transactions on Pattern Analysis Machine Intelligence, vol 25, // pp. 564-577, 2003. // // // Default constructor for Object // MeanShiftTracker::MeanShiftTracker() : VisualTracker(), m_maxNumMSIter(0), m_minMSDistEpsilon(0.0), m_curTarget(NULL) { } MeanShiftTracker::MeanShiftTracker(int i_maxNumMSIter, double i_minMSDistEpsilon) : VisualTracker(), m_maxNumMSIter(i_maxNumMSIter), m_minMSDistEpsilon(i_minMSDistEpsilon), m_curTarget(NULL) { m_curTarget = new VisualTarget<double>(); } // // BufferedNode constructor // MeanShiftTracker::MeanShiftTracker(string nodeName, ParameterSet params) : VisualTracker(nodeName, params), m_curTarget(NULL) { m_imageInID = addInput("IMAGE_IN"); m_ppCompletedInID = addInput("PREPROCESS_COMPLETED"); m_targetInID = addInput("CURRENT_TARGET"); m_msLocVecInID = addInput("MS_LOCATION"); m_finishedOutID = addOutput("TRACKING_FINISHED"); m_imageOutID = addOutput("IMAGE_OUT"); m_curTargetOutID = addOutput("CURRENT_TARGET"); m_targetOutID = addOutput("TRACKED_TARGET"); m_width = dereference_cast<int>(parameters.get("FRAME_WIDTH")); m_height = dereference_cast<int>(parameters.get("FRAME_HEIGHT")); m_numChannels = dereference_cast<int>(parameters.get("NUM_CHANNELS")); m_maxNumMSIter = dereference_cast<int>(parameters.get("MAX_NUM_MS_ITER")); m_minMSDistEpsilon = dereference_cast<float>(parameters.get("MS_DIST_EPSILON")); m_numPixels = m_width*m_height; m_numBytesInFrame = m_numPixels*m_numChannels; CvSize imgSize; imgSize.width = m_width; imgSize.height = m_height; m_curImage = cvCreateImage(imgSize, IPL_DEPTH_8U, m_numChannels); m_curTarget = new VisualTarget<double>(); m_finished = false; m_initMS = false; } MeanShiftTracker::~MeanShiftTracker() { delete m_curTarget; cvReleaseImage(&m_curImage); } // Modified BufferedNode request method to support cyclic node connection void MeanShiftTracker::request(int output_id, const ParameterSet &req) { if (req.exist("LOOKAHEAD")) { outputs[output_id].lookAhead = max(outputs[output_id].lookAhead,dereference_cast<int> (req.get("LOOKAHEAD"))); } if (req.exist("LOOKBACK")) { outputs[output_id].lookBack = max(outputs[output_id].lookBack,dereference_cast<int> (req.get("LOOKBACK"))); } if (req.exist("INORDER")) { inOrder = true; } int outputLookAhead=0, outputLookBack=0; outputLookAhead=max(outputLookAhead, outputs[output_id].lookAhead); outputLookBack =max(outputLookBack, outputs[output_id].lookBack); if (output_id == m_finishedOutID) { // TRACKING_FINISHED output does not required any inputs return; } else if (output_id == m_imageOutID) { // IMAGE_OUT output does not required any inputs return; } else if (output_id == m_curTargetOutID) { // CURRENT_TARGET output does not required any inputs return; } else if (output_id == m_targetOutID) { ParameterSet myReq, myReq2, myReq3, myReq4; myReq.add("LOOKAHEAD", ObjectRef(Int::alloc(inputsCache[m_imageInID].lookAhead+outputLookAhead))); myReq.add("LOOKBACK", ObjectRef(Int::alloc(inputsCache[m_imageInID].lookBack+outputLookBack))); inputs[m_imageInID].node->request(inputs[m_imageInID].outputID,myReq); myReq2.add("LOOKAHEAD", ObjectRef(Int::alloc(inputsCache[m_ppCompletedInID].lookAhead+outputLookAhead))); myReq2.add("LOOKBACK", ObjectRef(Int::alloc(inputsCache[m_ppCompletedInID].lookBack+outputLookBack))); inputs[m_ppCompletedInID].node->request(inputs[m_ppCompletedInID].outputID,myReq2); myReq3.add("LOOKAHEAD", ObjectRef(Int::alloc(inputsCache[m_targetInID].lookAhead+outputLookAhead))); myReq3.add("LOOKBACK", ObjectRef(Int::alloc(inputsCache[m_targetInID].lookBack+outputLookBack))); inputs[m_targetInID].node->request(inputs[m_targetInID].outputID,myReq3); myReq4.add("LOOKAHEAD", ObjectRef(Int::alloc(inputsCache[m_msLocVecInID].lookAhead+outputLookAhead))); myReq4.add("LOOKBACK", ObjectRef(Int::alloc(inputsCache[m_msLocVecInID].lookBack+outputLookBack))); inputs[m_msLocVecInID].node->request(inputs[m_msLocVecInID].outputID,myReq4); } else { throw new GeneralException ("MeanShiftTracker::request : unknown output ID.",__FILE__,__LINE__); } } void MeanShiftTracker::calculate(int output_id, int count, Buffer &out) { try { if (output_id == m_finishedOutID) { (*outputs[m_finishedOutID].buffer)[count] = ObjectRef(Bool::alloc(!m_finished)); if (m_finished) { m_initMS = false; m_finished = false; } } else if (output_id == m_imageOutID) { // Copy current image for output Image *outImage = Image::alloc(m_width, m_height, m_numChannels); memcpy(outImage->get_data(), m_curImage->imageData, m_numBytesInFrame); (*outputs[m_imageOutID].buffer)[count] = ObjectRef(outImage); } else if (output_id == m_curTargetOutID) { // Output current target if (m_curTarget->GetCstROI()) { //VisualTarget<double> *outTarget = new VisualTarget<double>(*m_curTarget); static RCPtr<VisualTarget<double> > refTarget = RCPtr<VisualTarget<double> >(m_curTarget); (*outputs[m_curTargetOutID].buffer)[count] = ObjectRef(refTarget); } else { (*outputs[m_curTargetOutID].buffer)[count] = ObjectRef(nilObject); } } else if (output_id == m_targetOutID){ if (!m_initMS) { // First get current target to track ObjectRef targetRef = getInput(m_targetInID, count); if (targetRef->isNil()) { // Invalid target, output nilObject (*outputs[m_targetOutID].buffer)[count] = ObjectRef(nilObject); return; } // Set current target reference to tracker's target model *m_curTarget = object_cast<VisualTarget<double> >(targetRef); // Get current image RCPtr<Image> imageRef = getInput(m_imageInID, count); // Verify input image sanity if (imageRef->get_width() != m_width || imageRef->get_height() != m_height || imageRef->get_pixelsize() != m_numChannels) { throw new GeneralException ("MeanShiftTracker::calculate : image parameters do not correspond to given input.",__FILE__,__LINE__); } memcpy(m_curImage->imageData, imageRef->get_data(), m_numBytesInFrame); // Force features extraction preprocessing RCPtr<Vector<int> > preprocessRef = getInput(m_ppCompletedInID, count); m_numIter = 0; m_initMS = true; } // Apply mean shift tracking int numDesc = m_curTarget->GetNumDescriptors(); double distanceMoved = 0.0; int xLoc = m_curTarget->GetCstROI()->GetXCen(); int yLoc = m_curTarget->GetCstROI()->GetYCen(); double newXLoc = 0.0; double newYLoc = 0.0; // Get mean shift location RCPtr<Vector<double> > msLocVecRef = getInput(m_msLocVecInID, count); // For each visual cue for (int i=0; i<numDesc; i++) { // Location of target is a weighted sum of all the cues locations newXLoc += (*msLocVecRef)[2*i]; newYLoc += (*msLocVecRef)[2*i+1]; } // Compute distance moved during this iteration double deltaX = newXLoc - (double)xLoc; double deltaY = newYLoc - (double)yLoc; distanceMoved = sqrt(deltaX*deltaX + deltaY*deltaY); // Set new location xLoc = (int)(round(newXLoc)); yLoc = (int)(round(newYLoc)); m_curTarget->GetROI()->SetXCen(xLoc); m_curTarget->GetROI()->SetYCen(yLoc); m_numIter++; if ( (distanceMoved <= m_minMSDistEpsilon) || (m_numIter >= m_maxNumMSIter) ) { m_finished = true; } if (!m_finished) { (*outputs[m_targetOutID].buffer)[count] = ObjectRef(nilObject); } else { // Output current target with ROI position updated // A copy must be done since it will be probably be modified //VisualTarget<double> *outTarget = new VisualTarget<double>(*m_curTarget); static RCPtr<VisualTarget<double> > outTarget = RCPtr<VisualTarget<double> >(m_curTarget); (*outputs[m_targetOutID].buffer)[count] = ObjectRef(outTarget); } } } catch (BaseException *e) { throw e->add(new GeneralException("Exception in MeanShiftTracker::calculate:",__FILE__,__LINE__)); } } // Make a mean shift iteration // Make a weighted sum of the features and adapt the weights // rate*w_new = quality_mesurement - w_old // where quality_mesurement = normDist(prob(estimate), avg(prob(all pos for current cue))) // or // w_new = rateInv*quality_mesurement - (1-rateInv)*w_old // quality_mesurement = likelihood(estimate from last frame)/sum(likelihood(all pos for current cue from last frame)) // or quality_mesurement => {exp(-error)|current_cue}/sum(exp(-error)|for all cues) // // For mean shift: // For each cue: // For each pixel in ROI // probRef = m_curTarget.GetCstDescriptorsVec.getProb(pixel(x,y)) // probTmp = i_descVec.getProb(pixel(x,y)) // if (probTmp > 0) // wi=cueWeight*sqrt(probRef/probTmp); // float kern = derivateKernel(window.getCenter(),position,radius); // numerator.x += wi*kern*position.x; // numerator.y += wi*kern*position.y; // denominator += wi*kern; // end if // end for // end for // estimate new location // end for // end mean shift // // double sumLikelihhods = 0.0; // For each cue: // likelihood = EstimateTarget // sumLikelihhods += likelihood // end for // For each cue: // cueWeight = rateInv*likelihood/sumLikelihhods + (1-rateInv)*cueWeight; // end for --- NEW FILE: VisualHistogramDesc.cc --- /* Copyright (C) 2005 Pierre Moisan (Pie...@US...) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "VisualHistogramDesc.h" // // Declaring known types // static int VISUALHISTDESC_VAR_0 = Object::addObjectType<VisualHistogramDesc<double, unsigned char> > ("<VisualHistogramDesc<double,unsigned char>>", new ObjectFactory<VisualHistogramDesc<double, unsigned char> >("<VisualHistogramDesc<double,unsigned char>>")); static int VISUALHISTDESC_VAR_1 = Object::addObjectType<VisualHistogramDesc<double, unsigned int> > ("<VisualHistogramDesc<double,unsigned int>>", new ObjectFactory<VisualHistogramDesc<double, unsigned int> >("<VisualHistogramDesc<double,unsigned int>>")); |
From: Pierre M. <sid...@us...> - 2005-04-12 19:33:12
|
Update of /cvsroot/robotflow/RobotFlow/Vision/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5552 Modified Files: Makefile.am Log Message: Added OpenCV depend files Index: Makefile.am =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/include/Makefile.am,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Makefile.am 12 Apr 2005 19:23:03 -0000 1.8 --- Makefile.am 12 Apr 2005 19:32:46 -0000 1.9 *************** *** 3,7 **** if WITH_OPENCV ! OPENCV_FILES = else OPENCV_FILES = --- 3,15 ---- if WITH_OPENCV ! OPENCV_FILES = VisualFeaturesExtraction.h \ ! ColorHistExtraction.h \ ! VisualTracker.h \ ! MeanShiftTracker.h \ ! VisualFeatureDesc.h \ ! VisualHistogramDesc.h \ ! VisualROI.h \ ! VisualTarget.h \ ! VisualTargetManager.h else OPENCV_FILES = |
From: Pierre M. <sid...@us...> - 2005-04-12 19:32:16
|
Update of /cvsroot/robotflow/RobotFlow/Vision/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4966 Added Files: ColorHistExtraction.h MeanShiftTracker.h VisualFeatureDesc.h VisualFeaturesExtraction.h VisualHistogramDesc.h VisualROI.h VisualTarget.h VisualTargetManager.h VisualTracker.h Log Message: --- NEW FILE: VisualFeaturesExtraction.h --- /* Copyright (C) 2005 Pierre Moisan (Pie...@US...) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _VISUALFEATURESEXTRACTION_H_ #define _VISUALFEATURESEXTRACTION_H_ #include "BufferedNode.h" #include <iostream> #include "Image.h" #include "cv.h" #include "VisualFeatureDesc.h" #include "VisualROI.h" template <class FeatBaseType> class VisualFeaturesExtraction : public BufferedNode { public: VisualFeaturesExtraction() { } VisualFeaturesExtraction(string nodeName, ParameterSet params) : BufferedNode(nodeName, params) { } virtual ~VisualFeaturesExtraction() { } // Default routine to print a VisualFeaturesExtraction object to an output stream virtual void printOn(ostream &out) const = 0; // Default routine to read a VisualFeaturesExtraction object from an input stream virtual void readFrom(istream &in) = 0; virtual void calculate(int output_id, int count, Buffer &out) = 0; virtual void ExtractFeatures(IplImage *i_frame, VisualROI *i_roi) = 0; virtual VisualFeatureDesc<FeatBaseType> *GetDescriptor() = 0; virtual const VisualFeatureDesc<FeatBaseType> *GetCstDescriptor() const = 0; }; #endif --- NEW FILE: MeanShiftTracker.h --- /* Copyright (C) 2005 Pierre Moisan (Pie...@US...) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _MEANSHIFTTRACKER_H_ #define _MEANSHIFTTRACKER_H_ #include "VisualTracker.h" class MeanShiftTracker : public VisualTracker { public: MeanShiftTracker(); MeanShiftTracker(int i_maxNumMSIter, double i_minMSDistEpsilon); MeanShiftTracker(string nodeName, ParameterSet params); virtual ~MeanShiftTracker(); // Default routine to print a MeanShiftTracker object to an output stream void printOn(ostream &out) const { throw new GeneralException("Exception in MeanShiftTracker::printOn: method not yet implemented.",__FILE__,__LINE__); } // Default routine to read a MeanShiftTracker object from an input stream void readFrom(istream &in) { throw new GeneralException("Exception in MeanShiftTracker::printOn: method not yet implemented.",__FILE__,__LINE__); } virtual void request(int output_id, const ParameterSet &req); void calculate(int output_id, int count, Buffer &out); private: // Input IDs (for BufferedNode) int m_imageInID; int m_targetInID; int m_msLocVecInID; int m_ppCompletedInID; // Output IDs (for BufferedNode) int m_finishedOutID; int m_imageOutID; int m_curTargetOutID; int m_targetOutID; int m_width; int m_height; int m_numChannels; int m_numPixels; int m_numBytesInFrame; int m_numIter; int m_maxNumMSIter; double m_minMSDistEpsilon; bool m_finished; bool m_initMS; VisualTarget<double> *m_curTarget; // Temporary image copy IplImage *m_curImage; }; #endif --- NEW FILE: VisualTarget.h --- /* Copyright (C) 2005 Pierre Moisan (Pie...@US...) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _VISUALTARGET_H_ #define _VISUALTARGET_H_ #include "BufferedNode.h" #include <iostream> #include "Image.h" #include "cv.h" #include "Vector.h" #include "VisualFeatureDesc.h" #include "VisualROI.h" template <class FeatBaseType> class VisualTarget : public Object { public: VisualTarget() : m_valid(false), m_id(0), m_activeAge(0), m_passiveAge(0), m_curDescIdx(0), m_roi(NULL), m_numDesc(-1), m_targetDesc(NULL), m_cueWeights(NULL), m_tmpCueProb(NULL) { } VisualTarget(int i_id, VisualROI *i_roi, Vector<VisualFeatureDesc<FeatBaseType> *> *i_targetDesc) : m_valid(true), m_id(i_id), m_activeAge(0), m_passiveAge(0), m_curDescIdx(0), m_roi(NULL), m_targetDesc(NULL), m_cueWeights(NULL), m_tmpCueProb(NULL) { m_roi = new VisualROI(*i_roi); m_numDesc = i_targetDesc->size(); m_targetDesc = new Vector<VisualFeatureDesc<FeatBaseType> *>(m_numDesc); for (int i=0; i<m_numDesc; i++) { (*m_targetDesc)[i] = new VisualFeatureDesc<FeatBaseType>(*((*i_targetDesc)[i])); } m_cueWeights = new double[m_numDesc]; m_tmpCueProb = new double[m_numDesc]; } VisualTarget::VisualTarget(const VisualTarget& i_ref) :m_id(-1), m_activeAge(-1), m_passiveAge(-1), m_curDescIdx(0), m_numDesc(-1), m_roi(NULL), m_targetDesc(NULL), m_cueWeights(NULL), m_tmpCueProb(NULL) { try { m_valid = i_ref.m_valid; m_id = i_ref.m_id; m_activeAge = i_ref.m_activeAge; m_passiveAge = i_ref.m_passiveAge; m_curDescIdx = i_ref.m_curDescIdx; if (i_ref.m_roi) { if (this->m_roi) { *(this->m_roi) = *(i_ref.m_roi); } else { this->m_roi = new VisualROI(*(i_ref.m_roi)); } } else { this->m_roi = NULL; } if (i_ref.m_targetDesc) { SetDescriptorsVec(i_ref.m_targetDesc); } else { this->m_targetDesc = NULL; this->m_numDesc = 0; this->m_cueWeights = NULL; this->m_tmpCueProb = NULL; } for (int i=0; i<m_numDesc; i++) { m_cueWeights[i] = i_ref.m_cueWeights[i]; m_tmpCueProb[i] = i_ref.m_tmpCueProb[i]; } } catch (BaseException *e) { throw e->add(new GeneralException("Exception caught in VisualTarget::VisualTarget:",__FILE__,__LINE__)); } } virtual ~VisualTarget() { delete m_roi; for (int i=0; i<m_numDesc; i++) { delete (*m_targetDesc)[i]; } delete m_targetDesc; delete [] m_cueWeights; delete [] m_tmpCueProb; } VisualTarget<FeatBaseType> & operator =(const VisualTarget<FeatBaseType> &i_ref) { try { // Avoid self assignment if (&i_ref != this) { this->m_valid = i_ref.m_valid; this->m_id = i_ref.m_id; this->m_activeAge = i_ref.m_activeAge; this->m_passiveAge = i_ref.m_passiveAge; this->m_curDescIdx = i_ref.m_curDescIdx; if (i_ref.m_roi) { if (this->m_roi) { *(this->m_roi) = *(i_ref.m_roi); } else { this->m_roi = new VisualROI(*(i_ref.m_roi)); } } else { this->m_roi = NULL; } if (i_ref.m_targetDesc) { SetDescriptorsVec(i_ref.m_targetDesc); } else { this->m_targetDesc = NULL; this->m_cueWeights = NULL; this->m_tmpCueProb = NULL; this->m_numDesc = 0; } for (int i=0; i<m_numDesc; i++) { m_cueWeights[i] = i_ref.m_cueWeights[i]; m_tmpCueProb[i] = i_ref.m_tmpCueProb[i]; } } return *this; } catch (BaseException *e) { throw e->add(new GeneralException("Exception caught in VisualTarget::operator=:",__FILE__,__LINE__)); } } // Default routine to print a VisualTarget object to an output stream void printOn(ostream &out) const { throw new GeneralException("Exception in VisualTarget::printOn: method not yet implemented.",__FILE__,__LINE__); } // Default routine to read a VisualTarget object from an input stream void readFrom(istream &in) { throw new GeneralException("Exception in VisualTarget::readFrom: method not yet implemented.",__FILE__,__LINE__); } void Adapt(Vector<VisualFeatureDesc<FeatBaseType> *> *i_desc, double i_rate) { if (m_numDesc != i_desc->size()) { throw new GeneralException("Exception in VisualTarget::Adapt: input descriptor vector size differs from current object's vector.",__FILE__,__LINE__); } for (int i=0; i<m_numDesc; i++) { if ((*m_targetDesc)[i]->GetType() != (*i_desc)[i]->GetType()) { throw new GeneralException("Exception in VisualTarget::Adapt: features descriptor must have the same type.",__FILE__,__LINE__); } (*m_targetDesc)[i]->Adapt((*i_desc)[i]->GetCstFeatures(), (*i_desc)[i]->GetSize(), i_rate); } } void Adapt(Vector<VisualFeatureDesc<FeatBaseType> *> *i_desc, double *i_rate) { if (m_numDesc != i_desc->size()) { throw new GeneralException("Exception in VisualTarget::Adapt: input descriptor vector size differs from current object's vector.",__FILE__,__LINE__); } for (int i=0; i<m_numDesc; i++) { if ((*m_targetDesc)[i]->GetType() != (*i_desc)[i]->GetType()) { throw new GeneralException("Exception in VisualTarget::Adapt: features descriptor must have the same type.",__FILE__,__LINE__); } (*m_targetDesc)[i]->Adapt((*i_desc)[i]->GetCstFeatures(), (*i_desc)[i]->GetSize(), i_rate[i]); } } double Similarity(Vector<VisualFeatureDesc<FeatBaseType> *> *i_desc) { if (m_numDesc != i_desc->size()) { throw new GeneralException("Exception in VisualTarget::Similarity: input descriptor vector size differs from current object's vector.",__FILE__,__LINE__); } double sim = 1.0; for (int i=0; i<m_numDesc; i++) { if ((*m_targetDesc)[i]->GetType() != (*i_desc)[i]->GetType()) { throw new GeneralException("Exception in VisualTarget::Similarity: features descriptor must have the same type.",__FILE__,__LINE__); } sim *= m_cueWeights[i]*(*m_targetDesc)[i]->Similarity((*i_desc)[i]->GetCstFeatures(), (*i_desc)[i]->GetSize()); } return sim; } double SimilarityWCueAdapt(Vector<VisualFeatureDesc<FeatBaseType> *> *i_desc, double i_rate) { if (m_numDesc != i_desc->size()) { throw new GeneralException("Exception in VisualTarget::SimilarityWCueAdapt: input descriptor vector size differs from current object's vector.",__FILE__,__LINE__); } int i; double sim = 1.0, cueSim, sumCueSim = 0.0; for (i=0; i<m_numDesc; i++) { if ((*m_targetDesc)[i]->GetType() != (*i_desc)[i]->GetType()) { throw new GeneralException("Exception in VisualTarget::SimilarityWCueAdapt: features descriptor must have the same type.",__FILE__,__LINE__); } m_tmpCueProb[i] = (*m_targetDesc)[i]->Similarity((*i_desc)[i]->GetCstFeatures(), (*i_desc)[i]->GetSize()); sumCueSim += m_tmpCueProb[i]; sim *= m_cueWeights[i]*m_tmpCueProb[i]; } // Adapt cue weight double rateInv = 1.0 - i_rate; double sumCueSimInv = 1.0/sumCueSim; sumCueSim = 0.0; if (sumCueSimInv == 0.0) { sumCueSimInv = 0.0; } for (i=0; i<m_numDesc; i++) { m_cueWeights[i] = i_rate*m_tmpCueProb[i]*sumCueSim + rateInv*m_cueWeights[i]; sumCueSim += m_cueWeights[i]; } // Normalize weights sumCueSimInv = 1.0/sumCueSim; if (sumCueSimInv == 0.0) { throw new GeneralException("Exception in VisualTarget::SimilarityWCueAdapt: cannot have a target with all cue weights are zero.",__FILE__,__LINE__); } for (i=0; i<m_numDesc; i++) { m_cueWeights[i] *= sumCueSimInv; } return sim; } void AgeTarget(bool i_matched) { if (i_matched) { if (m_activeAge < 15) { m_activeAge++; } if (m_passiveAge > 0) { m_passiveAge--; } } else { if (m_activeAge < 15) { m_passiveAge++; } if (m_activeAge > 0) { m_activeAge--; } } } bool IsValid() const { return m_valid; } int GetID() const { return m_id; } int GetActiveAge() const { return m_activeAge; } int GetPassiveAge() const { return m_passiveAge; } int GetCurrentAge() const { return m_activeAge - m_passiveAge; } VisualROI *GetROI() { return m_roi; } const VisualROI *GetCstROI() const { return (const VisualROI *)m_roi; } int GetNumDescriptors() const { return m_numDesc; } int GetCurDescIdx() const { return m_curDescIdx; } Vector<VisualFeatureDesc<FeatBaseType> *> *GetDescriptorsVec() { return m_targetDesc; } const Vector<VisualFeatureDesc<FeatBaseType> *> *GetCstDescriptorsVec() const { return (const Vector<VisualFeatureDesc<FeatBaseType> *> *)m_targetDesc; } VisualFeatureDesc<FeatBaseType> *GetDescriptor(int i_idx) { if (i_idx >= m_numDesc) { throw new GeneralException("Exception in VisualTarget::GetDescriptor: descriptor index is greater than the actual number of descriptors in current vector.",__FILE__,__LINE__); } return (*m_targetDesc)[i_idx]; } const VisualFeatureDesc<FeatBaseType> *GetCstDescriptor(int i_idx) const { if (i_idx >= m_numDesc) { throw new GeneralException("Exception in VisualTarget::GetCstDescriptor: descriptor index is greater than the actual number of descriptors in current vector.",__FILE__,__LINE__); } return (const VisualFeatureDesc<FeatBaseType> *)((*m_targetDesc)[i_idx]); } double *GetCueWeights() { return m_cueWeights; } const double *GetCueWeights() const { return (const double *)m_cueWeights; } double GetCueWeight(int i_idx) const { if (i_idx >= m_numDesc) { throw new GeneralException("Exception in VisualTarget::GetCueWeight: index is greater than the actual number of descriptors in current vector.",__FILE__,__LINE__); } return m_cueWeights[i_idx]; } void SetValidity(bool i_valid) { m_valid = i_valid; } void SetID(int i_id) { m_id = i_id; } void InitAges() { m_activeAge = 0; m_passiveAge = 0; } void SetActiveAge(int i_age) { m_activeAge = i_age; } void SetPassiveAge(int i_age) { m_passiveAge = i_age; } void SetROI(VisualROI *i_roi) { if (m_roi) { *m_roi = *i_roi; } else { m_roi = new VisualROI(*i_roi); } } // Requires to set descriptors afterwards void SetNumDescriptors(int i_numDesc) { if (m_targetDesc) { // First deallocate memory for (int i=0; i<m_numDesc; i++) { delete (*m_targetDesc)[i]; } } if (m_numDesc != i_numDesc) { delete m_targetDesc; delete [] m_cueWeights; delete [] m_tmpCueProb; // Reset vector size m_numDesc = i_numDesc; m_targetDesc = new Vector<VisualFeatureDesc<FeatBaseType> *>(m_numDesc); m_cueWeights = new double[m_numDesc]; m_tmpCueProb = new double[m_numDesc]; } } void SetCurDescIdx(int i_idx) { if (i_idx >= m_numDesc) { throw new GeneralException("Exception in VisualTarget::SetCurDescIdx: descriptor index is greater than the actual number of descriptors in current vector.",__FILE__,__LINE__); } m_curDescIdx = i_idx; } void SetDescriptorsVec(Vector<VisualFeatureDesc<FeatBaseType> *> *i_descVec) { // Reset the number of descriptors SetNumDescriptors(i_descVec->size()); for (int i=0; i<m_numDesc; i++) { (*m_targetDesc)[i] = (*i_descVec)[i]->clone(); } } void SetDescriptor(VisualFeatureDesc<FeatBaseType> *i_desc, int i_idx) { if (i_idx >= m_numDesc) { throw new GeneralException("Exception in VisualTarget::SetDescriptor: descriptor index is greater than the actual number of descriptors in current vector.",__FILE__,__LINE__); } *((*m_targetDesc)[i_idx]) = *i_desc; } void InitCueWeights() { double initWeight = 1.0/(double)m_numDesc; for (int i=0; i<m_numDesc; i++) { m_cueWeights[i] = initWeight; } } void SetCueWeights(double *i_weight) { for (int i=0; i<m_numDesc; i++) { m_cueWeights[i] = i_weight[i]; } } void SetCueWeight(double i_weight, int i_idx) { if (i_idx >= m_numDesc) { throw new GeneralException("Exception in VisualTarget::SetCueWeight: index is greater than the actual number of descriptors in current vector.",__FILE__,__LINE__); } m_cueWeights[i_idx] = i_weight; } private: bool m_valid; int m_id; int m_activeAge; int m_passiveAge; VisualROI *m_roi; int m_numDesc; int m_curDescIdx; Vector<VisualFeatureDesc<FeatBaseType> *> *m_targetDesc; double *m_cueWeights; double *m_tmpCueProb; }; #endif --- NEW FILE: VisualHistogramDesc.h --- /* Copyright (C) 2005 Pierre Moisan (Pie...@US...) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _VISUALHISTOGRAMFEATURE_H_ #define _VISUALHISTOGRAMFEATURE_H_ #include "Object.h" #include <iostream> #include <math.h> #include "VisualFeatureDesc.h" #include "VisualROI.h" #include "Vector.h" typedef enum { e_VISUALHIST_BhattacharyyaCoeff = 0, e_VISUALHIST_BhattacharyyaDist, // TODO: add other similarity methods e_VISUALHIST_unknownSimilarity } e_VISUALHIST_similarityType; // // BinType will be used to save each bin value // and should only be basic c/c++ types // e.g. double, int, char, ... // // FeatType is the type used for the feature map // that will used to compute the histogram // e.g. unsigned char if the feature map is // an image // template <class BinType, class FeatType> class VisualHistogramDesc : public VisualFeatureDesc<BinType> { public: static const double k_VISUALHIST_2DIVPI = 2.0/3.14159265358979323846; VisualHistogramDesc() : VisualFeatureDesc<BinType>(e_VISUALDESCRIPTOR_histogram), m_simType(e_VISUALHIST_unknownSimilarity), m_normFlag(false), m_numDimensions(0), m_numBins(NULL), m_binsWidth(NULL), m_bins(NULL) { } VisualHistogramDesc(e_VISUALHIST_similarityType i_simType, bool i_normFlag, unsigned int i_numDimensions, const Vector<int> *i_numBins) : VisualFeatureDesc<BinType>(e_VISUALDESCRIPTOR_histogram), m_simType(i_simType), m_normFlag(i_normFlag), m_numDimensions(i_numDimensions), m_numBins(NULL), m_binsWidth(NULL), m_bins(NULL) { unsigned int totalBins = 1; m_numBins = new int[m_numDimensions]; for(int d=0; d<m_numDimensions; d++) { m_numBins[d] = (*i_numBins)[d]; totalBins *= m_numBins[d]; } m_totalBins = totalBins; m_bins = new BinType[m_totalBins]; m_binsWidth = new FeatType[m_numDimensions]; m_lastMaxVal = (FeatType)0; SetSimilarityFct(); SetAdaptFct(); } VisualHistogramDesc(const VisualHistogramDesc<BinType,FeatType> &i_ref) { this->SetType(i_ref.GetType()); m_simType = i_ref.m_simType; m_normFlag = i_ref.m_normFlag; SetSimilarityFct(); SetAdaptFct(); m_numDimensions = i_ref.m_numDimensions; m_numBins = new int[m_numDimensions]; m_totalBins = i_ref.m_totalBins; m_bins = new BinType[m_totalBins]; m_binsWidth = new FeatType[m_numDimensions]; m_lastMaxVal = i_ref.m_lastMaxVal; for (int i=0; i<m_numDimensions; ++i) { m_binsWidth[i] = i_ref.m_binsWidth[i]; } for(int d=0; d<m_numDimensions; d++) { m_numBins[d] = i_ref.m_numBins[d]; } for (int b=0; b<m_totalBins; b++) { m_bins[b] = i_ref.m_bins[b]; } } ~VisualHistogramDesc() { delete [] m_numBins; delete [] m_binsWidth; delete [] m_bins; } VisualHistogramDesc<BinType,FeatType> & operator =(const VisualHistogramDesc<BinType,FeatType> &i_ref) { // Avoid self assignment if (&i_ref == this) { return *this; } this->SetType(i_ref.GetType()); m_simType = i_ref.m_simType; m_normFlag = i_ref.m_normFlag; SetSimilarityFct(); SetAdaptFct(); // Reallocate memory only if required if (m_numDimensions != i_ref.m_numDimensions) { delete [] m_numBins; delete [] m_binsWidth; m_numDimensions = i_ref.m_numDimensions; m_numBins = new int[m_numDimensions]; m_binsWidth = new FeatType[m_numDimensions]; } if (m_totalBins != i_ref.m_totalBins) { delete [] m_bins; m_totalBins = i_ref.m_totalBins; m_bins = new BinType[m_totalBins]; } m_lastMaxVal = i_ref.m_lastMaxVal; for (int i=0; i<m_numDimensions; ++i) { m_binsWidth[i] = i_ref.m_binsWidth[i]; } for(int d=0; d<m_numDimensions; d++) { m_numBins[d] = i_ref.m_numBins[d]; } for (int b=0; b<m_totalBins; b++) { m_bins[b] = i_ref.m_bins[b]; } return *this; } VisualHistogramDesc<BinType,FeatType>* clone() const { return new VisualHistogramDesc<BinType,FeatType>(*this); } // Default routine to print a VisualHistogramDesc object to an output stream void printOn(std::ostream &out) const { int b, d; out << "<VisualHistogramDesc " << endl; out << "<NumDimensions " << m_numDimensions << " >" << endl; out << "<TotalBins " << m_totalBins << " >" << endl; out << "<SimilarityType " << (int)m_simType << " >" << endl; out << "<NormFlag " << (int)m_normFlag << " >" << endl; out << "<LastMaxVal " << m_lastMaxVal << " >" << endl; out << "<NumBins " << endl; for (d=0; d<m_numDimensions; d++) { out << m_numBins[d] << " "; } out << " >" << endl; out << "<BinsWidth " << endl; for (d=0; d<m_numDimensions; d++) { out << m_binsWidth[d] << " "; } out << " >" << endl; out << "<Bins " << endl; for (b=0; b<m_totalBins; ++b) { out << m_bins[b] << " "; } out << " >" << endl; out << " >" << endl; } // Default routine to read a VisualHistogramDesc object from an input stream void readFrom(std::istream &in) { std::string tag; while (1) { char ch; in >> ch; if (ch == '>') { break; } else if (ch != '<') { throw new GeneralException ("VisualHistogramDesc::readFrom : Parse error: '<' expected",__FILE__,__LINE__); } in >> tag; if (tag == "VisualHistogramDesc") { continue; } else if (tag == "NumDimensions") { in >> m_numDimensions; if (m_numDimensions < 1) { throw new GeneralException ("VisualHistogramDesc::readFrom : invalid number of dimensions",__FILE__,__LINE__); } } else if (tag == "TotalBins") { in >> m_totalBins; if (m_totalBins < 1) { throw new GeneralException ("VisualHistogramDesc::readFrom : invalid total number of bins",__FILE__,__LINE__); } } else if (tag == "SimilarityType") { int val; in >> val; m_simType = e_VISUALHIST_similarityType(val); SetSimilarityFct(); } else if (tag == "NormFlag") { int val; in >> val; m_normFlag = bool(val); SetAdaptFct(); } else if (tag == "LastMaxVal") { in >> m_lastMaxVal; } else if (tag == "NumBins") { // Allocate memory delete [] m_numBins; m_numBins = new int[m_numDimensions]; for (int d=0; d<m_numDimensions; d++) { in >> m_numBins[d]; } } else if (tag == "BinsWidth") { // Allocate memory delete [] m_binsWidth; m_binsWidth = new FeatType[m_numDimensions]; for (int d=0; d<m_numDimensions; d++) { in >> m_binsWidth[d]; } } else if (tag == "Bins") { // Allocate memory delete [] m_bins; m_bins = new BinType[m_totalBins]; for (int b=0; b<m_totalBins; b++) { in >> m_bins[b]; } } else { throw new GeneralException ("VisualHistogramDesc::readFrom : Unknown argument: " + tag,__FILE__,__LINE__); } if (!in) { throw new GeneralException ("VisualHistogramDesc::readFrom : Parse error trying to build " + tag,__FILE__,__LINE__); } in >> tag; if (tag != ">") { throw new GeneralException ("VisualHistogramDesc::readFrom : Parse error: '>' expected ",__FILE__,__LINE__); } } } double Similarity(const BinType *i_candidate, unsigned int i_size) const { try { if (m_totalBins != i_size ) { throw new GeneralException ("VisualHistogramDesc::Similarity : number of histogram bins differs from current descriptor",__FILE__,__LINE__); } // Use appropriate function return (this->*m_similarityFct)(i_candidate); } catch (BaseException *e) { throw e->add(new GeneralException("Exception caught in VisualHistogramDesc::Similarity:",__FILE__,__LINE__)); } } void Adapt(const BinType *i_candidate, unsigned int i_size, double i_rate) { try { if (m_totalBins != i_size ) { throw new GeneralException ("VisualHistogramDesc::Adapt : number of histogram bins differs from current descriptor",__FILE__,__LINE__); } if (i_rate < 0.0 || i_rate > 1.0) { throw new GeneralException ("VisualHistogramDesc::Adapt : adaptation rate must be in the interval [0.0,1.0]",__FILE__,__LINE__); } if (i_rate == 0.0) { // Nothing to do return; } if (i_rate == 1.0) { SetFeatures(i_candidate, i_size); return; } // Use appropriate function (this->*m_adaptFct)(i_candidate, i_rate); } catch (BaseException *e) { throw e->add(new GeneralException("Exception caught in VisualHistogramDesc::Adapt:",__FILE__,__LINE__)); } } void ComputeHistStd(const FeatType* i_featMap, FeatType i_maxValPlusOne, BinType i_binIncScale, int i_width, int i_height, const VisualROI *i_roi) { if (!m_bins) { throw new GeneralException ("VisualHistogramDesc::ComputeHistStd : histogram bins must be initialized.",__FILE__,__LINE__); } int hx=i_roi->GetHSX(), hy=i_roi->GetHSY(); int xCen = i_roi->GetXCen(); int yCen = i_roi->GetYCen(); const FeatType *p_features; const unsigned char *p_mask = i_roi->GetCstMask(); int val, fact, indx, maskLeftOffset, maskRightOffset; int x, y, i, j, numFeatures, xLeftOffset, xRightOffset, yTopOffset, yBottomOffset; BinType weightSum = (BinType)0; if (m_lastMaxVal != i_maxValPlusOne) { m_lastMaxVal = i_maxValPlusOne; for (i=0; i<m_numDimensions; ++i) { m_binsWidth[i] = (FeatType)((double)i_maxValPlusOne/(double)m_numBins[i] + 0.5); } } for (i=0; i<m_totalBins; ++i) { m_bins[i] = (BinType)(0); } // Adjust region offsets to fit in feature map only if (xCen-hx < 0) { xLeftOffset = 0; maskLeftOffset = hx-xCen; } else { xLeftOffset = xCen-hx; maskLeftOffset = 0; } if (xCen+hx > i_width-1) { xRightOffset = i_width-1; maskRightOffset = xCen+hx - i_width-1; } else { xRightOffset = xCen+hx; maskRightOffset = 0; } if (yCen-hy < 0) { yTopOffset = 0; p_mask += (hy-yCen)*(2*hx+1); } else { yTopOffset = yCen-hy; } if (yCen+hy > i_height-1) { yBottomOffset = i_height-1; } else { yBottomOffset = yCen+hy; } p_features = (const FeatType *)(i_featMap + m_numDimensions*(yTopOffset*i_width + xLeftOffset)); // For each pixels in the region of interest, compute the histogram bin index // then add "1" to this bin. for (y=yTopOffset; y<=yBottomOffset; y++) { numFeatures = 0; p_mask += maskLeftOffset; for (x=xLeftOffset; x<=xRightOffset; x++) { if (*p_mask++) { indx = 0; for (i=0; i<m_numDimensions; ++i) { fact = 1; val = (*p_features)/m_binsWidth[i]; p_features++; for (j=i; j>0; --j) { fact *= m_numBins[j-1]; } indx += val*fact; } if (indx < 0 || indx >= m_totalBins) { throw new GeneralException ("VisualHistogramDesc::ComputeHistStd : invalid histogram bin index",__FILE__,__LINE__); } m_bins[indx]++; weightSum++; } else { p_features += m_numDimensions; } numFeatures++; } p_features += m_numDimensions*(i_width-numFeatures); p_mask += maskRightOffset; } if (m_normFlag) { NormalizeBins(weightSum); } } void ComputeKernelWeightedHist(const FeatType* i_featMap, FeatType i_maxValPlusOne, BinType i_binIncScale, int i_width, int i_height, const VisualROI *i_roi) { if (!m_bins) { throw new GeneralException ("VisualHistogramDesc::ComputeKernelWeightedHist : histogram bins must be initialized.",__FILE__,__LINE__); } int hx=i_roi->GetHSX(), hy=i_roi->GetHSY(); int xCen = i_roi->GetXCen(); int yCen = i_roi->GetYCen(); const FeatType *p_features; const unsigned char *p_mask = i_roi->GetCstMask(); int val, fact, indx, maskLeftOffset, maskRightOffset; int x, y, i, j, numFeatures, xLeftOffset, xRightOffset, yTopOffset, yBottomOffset; double xnorm, ynorm, weight; BinType weightSum = (BinType)0; if (m_lastMaxVal != i_maxValPlusOne) { m_lastMaxVal = i_maxValPlusOne; for (i=0; i<m_numDimensions; ++i) { m_binsWidth[i] = (FeatType)round((double)i_maxValPlusOne/(double)m_numBins[i] + 0.5); } } for (i=0; i<m_totalBins; ++i) { m_bins[i] = (BinType)(0); } // Adjust region offsets to fit in feature map only if (xCen-hx < 0) { xLeftOffset = 0; maskLeftOffset = hx-xCen; } else { xLeftOffset = xCen-hx; maskLeftOffset = 0; } if (xCen+hx > i_width-1) { xRightOffset = i_width-1; maskRightOffset = xCen+hx - i_width-1; } else { xRightOffset = xCen+hx; maskRightOffset = 0; } if (yCen-hy < 0) { yTopOffset = 0; p_mask += (hy-yCen)*(2*hx+1); } else { yTopOffset = yCen-hy; } if (yCen+hy > i_height-1) { yBottomOffset = i_height-1; } else { yBottomOffset = yCen+hy; } p_features = (const FeatType *)(i_featMap + m_numDimensions*(yTopOffset*i_width + xLeftOffset)); // For each pixels in the region of interest, compute the histogram bin index // then compute this pixel weight base on its distance from the center of the // region using a kernel profile. This weight will be added in the appropriate // histogram bin. for (y=yTopOffset; y<=yBottomOffset; y++) { numFeatures = 0; p_mask += maskLeftOffset; for (x=xLeftOffset; x<=xRightOffset; x++) { if (*p_mask++) { indx = 0; for (i=0; i<m_numDimensions; ++i) { fact = 1; val = (*p_features)/m_binsWidth[i]; p_features++; for (j=i; j>0; --j) { fact *= m_numBins[j-1]; } indx += val*fact; } if (indx < 0 || indx >= m_totalBins) { throw new GeneralException ("VisualHistogramDesc::ComputeKernelWeightedHist : invalid histogram bin index",__FILE__,__LINE__); } // Compute normalized distance of the pixel from the center // assuming a unit circle region. xnorm = (double)(x-xCen)/(double)(hx); ynorm = (double)(y-yCen)/(double)(hy); // Using by default the Epanechnikov kernel // TODO: make kernel profiles enum to choose from weight = EpanechKernel(xnorm*xnorm + ynorm*ynorm); BinType histWeight = (BinType)(weight*(double)(i_binIncScale)); weightSum += histWeight; m_bins[indx] += histWeight; } else { p_features += m_numDimensions; } numFeatures++; } p_features += m_numDimensions*(i_width-numFeatures); p_mask += maskRightOffset; } if (m_normFlag && weightSum) { NormalizeBins(weightSum); } } void ComputeMSLocation(const FeatType* i_featMap, FeatType i_maxValPlusOne, BinType i_binIncScale, int i_width, int i_height, const VisualROI *i_roi, const BinType *i_refBins, double i_cueWeight, Vector<double> *o_msLoc) { if (!m_bins) { throw new GeneralException ("VisualHistogramDesc::ComputeMSLocation : histogram bins must be initialized.",__FILE__,__LINE__); } int hx=i_roi->GetHSX(), hy=i_roi->GetHSY(); int xCen = i_roi->GetXCen(); int yCen = i_roi->GetYCen(); const FeatType *p_features; const unsigned char *p_mask = i_roi->GetCstMask(); int val, fact, indx, maskLeftOffset, maskRightOffset; int x, y, i, j, numFeatures, xLeftOffset, xRightOffset, yTopOffset, yBottomOffset; double xnorm, ynorm; double tmpRef, tmpCand, posWeight, kernWeight; double numeratorX=0.0, numeratorY=0.0, denominator=0.0; // Adjust region offsets to fit in feature map only if (xCen-hx < 0) { xLeftOffset = 0; maskLeftOffset = hx-xCen; } else { xLeftOffset = xCen-hx; maskLeftOffset = 0; } if (xCen+hx > i_width-1) { xRightOffset = i_width-1; maskRightOffset = xCen+hx - i_width-1; } else { xRightOffset = xCen+hx; maskRightOffset = 0; } if (yCen-hy < 0) { yTopOffset = 0; p_mask += (hy-yCen)*(2*hx+1); } else { yTopOffset = yCen-hy; } if (yCen+hy > i_height-1) { yBottomOffset = i_height-1; } else { yBottomOffset = yCen+hy; } p_features = (const FeatType *)(i_featMap + m_numDimensions*(yTopOffset*i_width + xLeftOffset)); for (y=yTopOffset; y<=yBottomOffset; y++) { numFeatures = 0; p_mask += maskLeftOffset; for (x=xLeftOffset; x<=xRightOffset; x++) { if (*p_mask++) { indx = 0; for (i=0; i<m_numDimensions; ++i) { fact = 1; val = (*p_features)/m_binsWidth[i]; p_features++; for (j=i; j>0; --j) { fact *= m_numBins[j-1]; } indx += val*fact; } if (indx < 0 || indx >= m_totalBins) { throw new GeneralException ("VisualHistogramDesc::ComputeMSLocation : invalid histogram bin index",__FILE__,__LINE__); } // Compute normalized distance of the pixel from the center // assuming a unit circle region. xnorm = (double)(x-xCen)/(double)(hx); ynorm = (double)(y-yCen)/(double)(hy); tmpRef = (double)(i_refBins[indx]); tmpCand = (double)(m_bins[indx]); if (tmpCand > 0.0) { posWeight = sqrt(tmpRef/tmpCand); kernWeight = DerivedEpanechKernel(xnorm*xnorm + ynorm*ynorm); numeratorX += posWeight*kernWeight*x; numeratorY += posWeight*kernWeight*y; denominator += posWeight*kernWeight; } } else { p_features += m_numDimensions; } numFeatures++; } p_features += m_numDimensions*(i_width-numFeatures); p_mask += maskRightOffset; } if (denominator > 0.0) { // Mean shift x location (*o_msLoc)[0] = i_cueWeight*(numeratorX/denominator); // Mean shift y location (*o_msLoc)[1] = i_cueWeight*(numeratorY/denominator); } else { // Invalid mean shift estimation. // Output current ROI center location. // Mean shift x location (*o_msLoc)[0] = xCen; // Mean shift y location (*o_msLoc)[1] = yCen; } } unsigned int GetNumDimensions() const { return m_numDimensions; } unsigned int GetSize() const { return m_totalBins; } unsigned int *GetNumBinsPtr() { return (const unsigned int *)m_numBins; } const unsigned int *GetCstNumBinsPtr() const { return (const unsigned int *)m_numBins; } FeatType *GetBinsWidthPtr() { return m_binsWidth; } const FeatType *GetCstBinsWidthPtr() const { return (const FeatType *)m_binsWidth; } BinType *GetFeatures() { return m_bins; } const BinType *GetCstFeatures() const { return (const BinType *)m_bins; } // WARNING: this function modifies only the histogram bins void SetSize(unsigned int i_size) { delete [] m_bins; m_totalBins = i_size; m_bins = new BinType[m_totalBins]; } // A more complete Set function for the histogram bins void SetBins(unsigned int i_numDimensions, unsigned int *i_numBins) { m_numDimensions = i_numDimensions; unsigned int totalBins = 1; delete [] m_numBins; m_numBins = new unsigned int[m_numDimensions]; delete [] m_binsWidth; m_binsWidth = new FeatType[m_numDimensions]; m_lastMaxVal = (FeatType)0; for(int d=0; d<m_numDimensions; d++) { m_numBins[d] = i_numBins[d]; totalBins *= m_numBins[d]; } if (totalBins != m_totalBins) { SetSize(totalBins); } } // WARNING: assumes that i_ref has the same size as the current object void SetFeatures(const BinType *i_ref, unsigned int i_size) { if (m_totalBins != i_size ) { throw new GeneralException ("VisualHistogramDesc::SetFeatures : number of histogram bins differs from current descriptor",__FILE__,__LINE__); } for (int b=0; b<m_totalBins; b++) { m_bins[b] = i_ref[b]; } } private: void SetSimilarityFct() { if (m_simType == e_VISUALHIST_BhattacharyyaCoeff) { m_similarityFct = &VisualHistogramDesc::BhattacharyyaCoeff; } else if (m_simType == e_VISUALHIST_BhattacharyyaDist) { m_similarityFct = &VisualHistogramDesc::BhattacharyyaDist; } else { m_similarityFct = NULL; } } void SetAdaptFct() { if (m_normFlag) { m_adaptFct = &VisualHistogramDesc::AdaptNorm; } else { m_adaptFct = &VisualHistogramDesc::AdaptOnly; } } double BhattacharyyaDist(const BinType *i_candidateBins) const { try { return sqrt(1.0-BhattacharyyaCoeff(i_candidateBins)); } catch (BaseException *e) { throw e->add(new GeneralException("Exception caught in VisualHistogramDesc::BhattacharyyaDist:",__FILE__,__LINE__)); } } double BhattacharyyaCoeff(const BinType *i_candidateBins) const { int b; double coeff = 0.0; const BinType *p_curBins = (const BinType *)m_bins; const BinType *p_candidateBins = i_candidateBins; for (int b=0; b<m_totalBins; b++) { coeff += sqrt((*p_curBins) * (*p_candidateBins)); p_curBins++; p_candidateBins++; } //return coeff/sqrt((double)m_totalBins); return coeff; } void AdaptNorm(const BinType *i_candidateBins, double i_rate) { int b; const BinType *p_adaptBins = i_candidateBins; double compRate = 1.0 - i_rate; BinType sum = (BinType)0; for (b=0; b<m_totalBins; b++) { m_bins[b] = (BinType)(compRate*(double)(m_bins[b]) + i_rate*(double)(p_adaptBins[b])); sum += m_bins[b]; } if (sum != (BinType)0) { NormalizeBins(sum); } } void AdaptOnly(const BinType *i_candidateBins, double i_rate) { int b; const BinType *p_adaptBins = i_candidateBins; double compRate = 1.0 - i_rate; for (b=0; b<m_totalBins; b++) { m_bins[b] = (BinType)(compRate*(double)(m_bins[b]) + i_rate*(double)(p_adaptBins[b])); } } void NormalizeBins(BinType i_fact) { int b; double invFact = 1.0/(double)i_fact; for (b=0; b<m_totalBins; ++b) { m_bins[b] = (BinType)((double)(m_bins[b])*invFact); } } inline double EpanechKernel(double i_dist) const { return max( 0.0, k_VISUALHIST_2DIVPI * (1.0 - i_dist) ); } inline double DerivedEpanechKernel(double i_dist) const { if (i_dist <= 1.0) { return 1.0; } return 0.0; } private: // Similarity/Distance type to use e_VISUALHIST_similarityType m_simType; // Flag to normalize histogram bins bool m_normFlag; // Numer of dimensions of the histogram unsigned int m_numDimensions; // Total number of bins in the histogram unsigned int m_totalBins; // Number of bins for each dimension int *m_numBins; // Width (in terms of the feature type) of each bin FeatType *m_binsWidth; // Last maximum value used to compute the width of each bin FeatType m_lastMaxVal; // Histogram bin data BinType *m_bins; // Function pointer to the appropriate private similarity routine double (VisualHistogramDesc::*m_similarityFct)(const BinType *) const; // Function pointer to the appropriate private adaptation routine void (VisualHistogramDesc::*m_adaptFct)(const BinType *, double); }; #endif --- NEW FILE: VisualROI.h --- /* Copyright (C) 2005 Pierre Moisan (Pie...@US...) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _VISUALROI_H_ #define _VISUALROI_H_ #include "Object.h" #include <iostream> #include <math.h> #include "cv.h" typedef enum { e_VISUALROI_rectangular = 0, e_VISUALROI_elliptical, e_VISUALROI_unknown } e_VISUALROI_type; class VisualROI : public Object { public: VisualROI(); VisualROI(e_VISUALROI_type i_type, int i_xCen, int i_yCen, int i_hsX, int i_hsY, int i_angle); VisualROI(const VisualROI& i_ref); virtual ~VisualROI(); VisualROI & operator =(const VisualROI &i_ref); // Default routine to print a VisualROI object to an output stream void printOn(ostream &out) const; // Default routine to read a VisualROI object from an input stream void readFrom(istream &in); void DrawROI(IplImage *io_frame, const unsigned char *i_color) const; void Reset(int i_hsX, int i_hsY, int i_angle); e_VISUALROI_type GetType() const; int GetPerimLength() const; short *GetPerim(); const short *GetCstPerim() const; float *GetNormVects(); const float *GetCstNormVects() const; int GetXCen() const; int GetYCen() const; int GetHSX() const; int GetHSY() const; int GetAngle() const; int GetArea() const; unsigned char *GetMask(); const unsigned char *GetCstMask() const; void SetXCen(int i_xCen); void SetYCen(int i_yCen); void SetHSX(int i_hsX); void SetHSY(int i_hsY); void SetAngle(int i_angle); private: void MakeRectangularRegion(); void MakeEllipticalRegion(); int MakeRegionMask(); private: // Region geometric type e_VISUALROI_type m_type; // Number of pixels along perimeter int m_perimLength; // Perimeter pixels short *m_perim; // Contour normal vectors float *m_normVects; // X value for the region center position int m_xCen; // Y value for the region center position int m_yCen; // Halfsize for x axis int m_hsX; // Halfsize for y axis int m_hsY; // Orientation of the region in degrees int m_angle; // Number of pixels in mask int m_area; // (2*m_hsX+1) X (2*m_hsY+1) region unsigned char *m_mask; }; #endif --- NEW FILE: VisualFeatureDesc.h --- /* Copyright (C) 2005 Pierre Moisan (Pie...@US...) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _VISUALFEATUREDESC_H_ #define _VISUALFEATUREDESC_H_ #include "Object.h" #include <iostream> typedef enum { e_VISUALDESCRIPTOR_histogram = 0, e_VISUALDESCRIPTOR_statistics, e_VISUALDESCRIPTOR_point, e_VISUALDESCRIPTOR_unknown } e_VISUALDESCRIPTOR_type; // // This should be an abstract base class. Since many containers (like Vector) // do not allow abstract functions, each abstract function throws an exception // to avoid the direct use of the base class "abstract" routines. // template <class FeatBaseType> class VisualFeatureDesc : public Object { friend std::ostream &operator<<(std::ostream &o_out, const VisualFeatureDesc<FeatBaseType> &i_ref) { try { i_ref.printOn(o_out); // Enable cascading return o_out; } catch (BaseException *e) { throw e->add(new GeneralException("Exception in VisualFeatureDesc::operator<<:",__FILE__,__LINE__)); } } friend std::istream &operator>>(std::istream &i_in, VisualFeatureDesc<FeatBaseType> &o_ref) { try { o_ref.readFrom(i_in); // Enable cascading return i_in; } catch (BaseException *e) { throw e->add(new GeneralException("Exception in VisualFeatureDesc::operator>>:",__FILE__,__LINE__)); } } public: VisualFeatureDesc() : m_descType(e_VISUALDESCRIPTOR_unknown) { } VisualFeatureDesc(e_VISUALDESCRIPTOR_type i_descType) : m_descType(i_descType) { } VisualFeatureDesc(const VisualFeatureDesc<FeatBaseType> &i_ref) { cout << "Using VisualFeatureDesc::copy constructor" << endl; m_descType = i_ref.m_descType; } virtual ~VisualFeatureDesc() { } virtual VisualFeatureDesc<FeatBaseType> & operator =(const VisualFeatureDesc<FeatBaseType> &i_ref) { cout << "Using VisualFeatureDesc::operator=" << endl; // Avoid self assignment if (&i_ref != this) { this->m_descType = i_ref.m_descType; } return *this; } virtual VisualFeatureDesc<FeatBaseType>* clone() const { cout << "Using VisualFeatureDesc::clone" << endl; return new VisualFeatureDesc<FeatBaseType>(*this); } // Default routine to print a VisualFeatureDesc object to an output stream virtual void printOn(std::ostream &out) const { throw new GeneralException("Exception in VisualFeatureDesc::printOn: cannot use base class routine.",__FILE__,__LINE__); } // Default routine to read a VisualFeatureDesc object from an input stream virtual void readFrom(std::istream &in) { throw new GeneralException("Exception in VisualFeatureDesc::readFrom: cannot use base class routine.",__FILE__,__LINE__); } virtual double Similarity(const FeatBaseType *i_candidate, unsigned int i_size) const { throw new GeneralException("Exception in VisualFeatureDesc::Similarity: cannot use base class routine.",__FILE__,__LINE__); } virtual void Adapt(const FeatBaseType *i_candidate, unsigned int i_size, double i_rate) { throw new GeneralException("Exception in VisualFeatureDesc::Adapt: cannot use base class routine.",__FILE__,__LINE__); } virtual unsigned int GetSize() const { throw new GeneralException("Exception in VisualFeatureDesc::GetSize: cannot use base class routine.",__FILE__,__LINE__); } virtual FeatBaseType *GetFeatures() { throw new GeneralException("Exception in VisualFeatureDesc::GetFeatures: cannot use base class routine.",__FILE__,__LINE__); } virtual const FeatBaseType *GetCstFeatures() const { throw new GeneralException("Exception in VisualFeatureDesc::GetCstFeatures: cannot use base class routine.",__FILE__,__LINE__); } e_VISUALDESCRIPTOR_type GetType() const { return m_descType; } void SetType(e_VISUALDESCRIPTOR_type i_type) { m_descType = i_type; } virtual void SetSize(unsigned int i_size) { throw new GeneralException("Exception in VisualFeatureDesc::SetSize: cannot use base class routine.",__FILE__,__LINE__); } virtual void SetFeatures(const FeatBaseType *i_ref, unsigned int i_size) { throw new GeneralException("Exception in VisualFeatureDesc::SetFeatures: cannot use base class routine.",__FILE__,__LINE__); } private: e_VISUALDESCRIPTOR_type m_descType; }; #endif --- NEW FILE: VisualTargetManager.h --- /* Copyright (C) 2005 Pierre Moisan (Pie...@US...) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _VISUALTRACKER_H_ #define _VISUALTRACKER_H_ #include "BufferedNode.h" #include <iostream> #include "Image.h" #include "cv.h" #include "VisualTarget.h" #include <stdlib.h> #include <sys/timeb.h> class VisualTargetManager : public BufferedNode { friend class BufferedNode; public: VisualTargetManager(); VisualTargetManager(string nodeName, ParameterSet params); virtual ~VisualTargetManager(); // Default routine to print a VisualTargetManager object to an output stream void printOn(ostream &out) const { throw new GeneralException("Exception in VisualTargetManager::printOn: method not yet implemented.",__FILE__,__LINE__); } // Default routine to read a VisualTargetManager object from an input stream void readFrom(istream &in) { throw new GeneralException("Exception in VisualTargetManager::printOn: method not yet implemented.",__FILE__,__LINE__); } virtual void request(int output_id, const ParameterSet &req); void calculate(int output_id, int count, Buffer &out); private: // Input IDs (for BufferedNode) int m_imageInID; int m_roiInID; int m_featVecInID; int m_targetInID; int m_ppCompletedInID; // Output IDs (for BufferedNode) int m_imageOutID; int m_roiOutID; int m_targetOutID; int m_targetProbOutID; int m_targetDXOutID; int m_targetDYOutID; int m_nameOutID; int m_width; int m_height; int m_numChannels; int m_numPixels; int m_numBytesInFrame; float m_imgXCen; float m_imgYCen; unsigned char m_roiColor[3]; struct timeb m_t1, m_t2; int m_maxNumTargets; double m_targetMatchThres; double m_targetAdaptThres; double m_targetAdaptRate; double m_cueAdaptRate; bool m_ppCompleted; VisualTarget<double> *m_target; RCPtr<VisualTarget<double> > m_refTarget; //RCPtr<VisualROI> m_refROI; // Temporary image copy IplImage *m_curImage; }; #endif --- NEW FILE: VisualTracker.h --- /* Copyright (C) 2005 Pierre Moisan (Pie...@US...) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _VISUALTRACKER_H_ #define _VISUALTRACKER_H_ #include "BufferedNode.h" #include <iostream> #include "Image.h" #include "cv.h" #include "VisualFeatureDesc.h" #include "VisualROI.h" #include "VisualTarget.h" class VisualTracker : public BufferedNode { public: VisualTracker() { } VisualTracker(string nodeName, ParameterSet params) : BufferedNode(nodeName, params) { } virtual ~VisualTracker() { } // Default routine to print a VisualTracker object to an output stream virtual void printOn(ostream &out) const = 0; // Default routine to read a VisualTracker object from an input stream virtual void readFrom(istream &in) = 0; virtual void calculate(int output_id, int count, Buffer &out) = 0; //virtual void TrackTarget() = 0; }; #endif --- NEW FILE: ColorHistExtraction.h --- /* Copyright (C) 2005 Pierre Moisan (Pie...@US...) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _COLORHISTEXTRACTION_H_ #define _COLORHISTEXTRACTION_H_ #include "VisualFeaturesExtraction.h" #include "VisualHistogramDesc.h" #include "VisualTarget.h" #include <stdlib.h> #include <sys/timeb.h> // // Color histogram Features Extraction for RobotFlow // class ColorHistExtraction : public VisualFeaturesExtraction<double> { public: // // Default constructor for Object // ColorHistExtraction(); // // Constructor with complete intialisation // ColorHistExtraction(int i_width, int i_height, int i_numChannels, const Vector<int> *i_numBins); // // Copy constructor // ColorHistExtraction(const ColorHistExtraction& i_ref); // // BufferedNode constructor // ColorHistExtraction(string nodeName, ParameterSet params); // // Constructor using input stream // ColorHistExtraction(istream &in) { readFrom(in); } virtual ~ColorHistExtraction(); // Default routine to print a ColorHistExtraction object to an output stream void printOn(ostream &out) const { throw new GeneralException("Exception in ColorHistExtraction::printOn: method not yet implemented.",__FILE__,__LINE__); } // Default routine to read a ColorHistExtraction object from an input stream void readFrom(istream &in) { throw new GeneralException("Exception in ColorHistExtraction::readFrom: method not yet implemented.",__FILE__,__LINE__); } virtual void request(int output_id, const ParameterSet &req); void calculate(int output_id, int count, Buffer &out); void ExtractFeatures(VisualROI *i_roi); void ExtractFeatures(IplImage *i_input, VisualROI *i_roi); void EstimateMSLocation(const VisualTarget<double> *i_targetRef, int i_descIdx, Vector<double> *o_msLocVec); VisualFeatureDesc<double> *GetDescriptor() { return m_colorHistogram; } const VisualFeatureDesc<double> *GetCstDescriptor() const { return (const VisualHistogramDesc<double, unsigned char> *)m_colorHistogram; } private: void Initialize(const Vector<int> *i_numBins); private: // Input IDs (for BufferedNode) int m_imageInID; int m_numBinsInID; int m_roiInID; int m_targetInID; int m_targetDescIdxInID; int m_useNextImgInID; // Output IDs (for BufferedNode) int m_featuresOutID; int m_msLocOutID; int m_ppCompletedOutID; // Width of images int m_width; // Height of images int m_height; // Number of channels in an image int m_numChannels; // Number of pixels in an image int m_numPixels; // Number of bytes in an image int m_numBytesInFrame; // Initialization flag bool m_init; // Current region of interest VisualROI *m_roi; // Histogram descriptor for region of interest VisualHistogramDesc<double, unsigned char> *m_colorHistogram; // Function pointer to the appropriate private extraction routine void (ColorHistExtraction::*m_extractionFct)(unsigned char *); // Temporary image copy IplImage *m_curImage; }; #endif |
From: Dominic L. <ma...@us...> - 2005-04-12 19:24:01
|
Update of /cvsroot/robotflow/RobotFlow In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv376 Modified Files: configure.in Log Message: added detection of OpenCV Index: configure.in =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/configure.in,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** configure.in 2 Jan 2005 14:43:54 -0000 1.49 --- configure.in 12 Apr 2005 19:22:51 -0000 1.50 *************** *** 205,213 **** fi #AC_SUBST(ACE_LIBS) #AC_SUBST(ACE_INCLUDES) AC_SUBST(MARIE_LIBS) AC_SUBST(MARIE_INCLUDES) ! VERSION=$ROBOTFLOW_VERSION --- 205,228 ---- fi + + dnl detection of OpenCV image library + OPENCV_INCLUDES=`pkg-config --cflags opencv --silence-errors` + OPENCV_LIBS=`pkg-config --libs opencv --silence-errors` + OPENCV_FOUND="" + if test -n "$OPENCV_INCLUDES"; then + AC_MSG_RESULT([Using OpenCV lib : $OPENCV_LIBS]) + AM_CONDITIONAL(WITH_OPENCV,true) + OPENCV_FOUND="yes" + else + AC_MSG_RESULT([OpenCV not found, disabled]) + AM_CONDITIONAL(WITH_OPENCV,false) + fi + #AC_SUBST(ACE_LIBS) #AC_SUBST(ACE_INCLUDES) AC_SUBST(MARIE_LIBS) AC_SUBST(MARIE_INCLUDES) ! AC_SUBST(OPENCV_INCLUDES) ! AC_SUBST(OPENCV_LIBS) VERSION=$ROBOTFLOW_VERSION *************** *** 325,328 **** --- 340,349 ---- fi + if test "$OPENCV_FOUND" = "yes"; then + AC_MSG_RESULT([$PACKAGE will build OpenCV based blocks]) + else + AC_MSG_RESULT([$PACKAGE will NOT build OpenCV based blocks (forgot to modify PKG_CONFIG_PATH environment variable?)]) + fi + AC_MSG_RESULT([$PACKAGE will be installed in : $prefix]) |
From: Dominic L. <ma...@us...> - 2005-04-12 19:23:23
|
Update of /cvsroot/robotflow/RobotFlow/Vision/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv376/Vision/src Modified Files: Makefile.am Log Message: added detection of OpenCV Index: Makefile.am =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/Makefile.am,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** Makefile.am 6 Aug 2004 13:32:30 -0000 1.28 --- Makefile.am 12 Apr 2005 19:23:04 -0000 1.29 *************** *** 6,9 **** --- 6,15 ---- lib_LTLIBRARIES = libVision.la + if WITH_OPENCV + OPENCV_SOURCES = + else + OPENCV_SOURCES = + endif + # Sources for compilation in the library libVision_la_SOURCES = BMPLoad.cc \ *************** *** 61,72 **** Scale.cc \ ScalePrint.cc \ ! RGB242RGB15.cc ! libVision_la_LDFLAGS = -release $(LT_RELEASE) $(PIXBUF_LIBS) $(GNOME_LIB) $(JPEG_LIB) ! INCLUDES = -I../include $(OVERFLOW_INCLUDE) $(PIXBUF_INCLUDE) $(JPEG_INCLUDE) install-data-local: --- 67,78 ---- Scale.cc \ ScalePrint.cc \ ! RGB242RGB15.cc $(OPENCV_SOURCES) ! libVision_la_LDFLAGS = -release $(LT_RELEASE) $(PIXBUF_LIBS) $(GNOME_LIB) $(JPEG_LIB) $(OPENCV_LIBS) ! INCLUDES = -I../include $(OVERFLOW_INCLUDE) $(PIXBUF_INCLUDE) $(JPEG_INCLUDE) $(OPENCV_INCLUDES) install-data-local: |
From: Dominic L. <ma...@us...> - 2005-04-12 19:23:19
|
Update of /cvsroot/robotflow/RobotFlow/Vision/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv376/Vision/include Modified Files: Makefile.am Log Message: added detection of OpenCV Index: Makefile.am =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/include/Makefile.am,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Makefile.am 26 Jul 2004 14:32:57 -0000 1.7 --- Makefile.am 12 Apr 2005 19:23:03 -0000 1.8 *************** *** 1,4 **** --- 1,11 ---- AUTOMAKE_OPTIONS = no-dependencies + + if WITH_OPENCV + OPENCV_FILES = + else + OPENCV_FILES = + endif + include_HEADERS = Bt848.h \ ColorLookup.h \ *************** *** 15,19 **** lines.h \ CSymbol.h \ ! CTextLine.h ! --- 22,25 ---- lines.h \ CSymbol.h \ ! CTextLine.h $(OPENCV_FILES) |
From: Dominic L. <ma...@us...> - 2005-03-30 19:12:43
|
Update of /cvsroot/robotflow/RobotFlow/Devices/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12638/src Modified Files: Makefile.am SerialDriver.cc Added Files: SNCRZ30RS232.cc Log Message: added parameters for baudrate Index: SerialDriver.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Devices/src/SerialDriver.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SerialDriver.cc 29 Mar 2005 15:20:39 -0000 1.3 --- SerialDriver.cc 30 Mar 2005 19:11:02 -0000 1.4 *************** *** 35,39 **** /* Configuring the Serial Port */ /*********************************************/ ! int Port_initialisation(const char *serial_port) { struct termios term; int ptz_fd; --- 35,39 ---- /* Configuring the Serial Port */ /*********************************************/ ! int Port_initialisation(const char *serial_port, speed_t speed) { struct termios term; int ptz_fd; *************** *** 58,63 **** //set baud rate (9600 baud) ! cfsetispeed(&term, BAUDRATE); ! cfsetospeed(&term, BAUDRATE); //serial port parameters --- 58,63 ---- //set baud rate (9600 baud) ! cfsetispeed(&term, speed); ! cfsetospeed(&term, speed); //serial port parameters Index: Makefile.am =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Devices/src/Makefile.am,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Makefile.am 23 Jul 2004 18:13:32 -0000 1.11 --- Makefile.am 30 Mar 2005 19:10:59 -0000 1.12 *************** *** 13,17 **** V4L2Capture.cc \ CANON_VCC4.cc \ ! SNCRZ30.cc libDevices_la_LDFLAGS = -release $(LT_RELEASE) --- 13,18 ---- V4L2Capture.cc \ CANON_VCC4.cc \ ! SNCRZ30.cc \ ! SNCRZ30RS232.cc libDevices_la_LDFLAGS = -release $(LT_RELEASE) --- NEW FILE: SNCRZ30RS232.cc --- /* Copyright (C) 2005 Dominic Letourneau This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _SNCRZ30RS232_CC_ #define _SNCRZ30RS232_CC_ #include "BufferedNode.h" #include "SerialDriver.h" #include "BaseException.h" #include "misc.h" #include <fcntl.h> #include <stdio.h> #include <string.h> #include <sys/types.h> #include <unistd.h> #include <signal.h> #include <termios.h> #include <stdlib.h> #include <list> #include <pthread.h> #include <string> #include <sched.h> #include "pseudosem.h" #include "SocketStream.h" using namespace std; using namespace FD; namespace RobotFlow { class SNCRZ30RS232; DECLARE_NODE(SNCRZ30RS232) /*Node * @name SNCRZ30RS232 * @category RobotFlow:Devices * @description Sony SNZRZ30 RS-232 Pan-Tilt-Zoom driver. * * @input_name PAN_ABS_POS * @input_type int * @input_description Absolute Pan of the camera -1700 to +1700. (1/10 of degrees) * * @input_name TILT_ABS_POS * @input_type int * @input_description Absolute Tilt of the camera -725 to +425. (1/10 of degrees) * * @input_name PAN_REL_POS * @input_type int * @input_description Absolute Pan of the camera -1700 to +1700. (1/10 of degrees) * * @input_name TILT_REL_POS * @input_type int * @input_description Absolute Tilt of the camera -725 to +425. (1/10 of degrees) * * @parameter_name PAN_SPEED * @parameter_type int * @parameter_value 24 * @parameter_description Pan speed 0-24 * * @parameter_name TILT_SPEED * @parameter_type int * @parameter_value 20 * @parameter_description Tilt speed 0-20 * * @parameter_name SERIAL_PORT * @parameter_type string * @parameter_value /dev/ttyS1 * * @input_name ZOOM * @input_type int * @input_description Absolute Zoom of the camera 0 (1X) to 16384 (24X) * * @output_name PAN_POSITION * @output_type int * @output_description Returns the current pan position of the Camera * * @output_name TILT_POSITION * @output_type int * @output_description Returns the current tilt position of the Camera * * @output_name ZOOM_POSITION * @output_type int * @output_description Returns the current zoom position of the Camera * END*/ class SNCRZ30RS232 : public BufferedNode { friend void* sncrz30_receive_thread (void *myPtz); friend void* sncrz30_send_thread (void *myPtz); private: //inputs int panAbsolutePosition; int tiltAbsolutePosition; int zoomPosition; int panRelativePosition; int tiltRelativePosition; int m_panSpeed; int m_tiltSpeed; //Internal int fd; int m_killed; int m_pan_position; int m_tilt_position; int m_zoom_position; bool m_isInit; pthread_t Sending_thread; pthread_t Receiving_thread; pthread_mutex_t m_list_lock; // Used to block the access to the sending list pthread_mutex_t m_list_rec_lock; // Used to block the access to the reception list pthread_mutex_t m_ack_lock; // Used to confirm that camera has received the command sent pseudosem_t m_semaphore; // Used to tell the sending thread that it can try to send something pseudosem_t m_buffer_empty; // Used to tell the sending thread that at least one buffer of the cam is free list<string> m_sending; list<string> m_received; int inquiry_pan_tilt_rate; int inquiry_zoom_rate; //outputs int Pan_output; int Tilt_output; int Zoom_output; string m_serial_port; int destructor_loop_counter; //Functions void Send() { string to_send; //lock pthread_mutex_lock(&m_list_lock); if (!m_sending.empty()) { // Deleting first element to_send = m_sending.front(); m_sending.pop_front(); //unlock here to avoid blocking on write (long) pthread_mutex_unlock(&m_list_lock); // lock... wait for ack signal before sending... Unlock is done in receive() pthread_mutex_lock(&m_ack_lock); // Wait for a buffer to be freed up by the cam pseudosem_wait(&m_buffer_empty); if(write(fd, to_send.c_str(),to_send.size()) < 0) { perror("SNCRZ30RS232::Send():write():"); throw new GeneralException("SNCRZ30RS232::Send():write() error",__FILE__,__LINE__); } }//if !empty else { //unlock pthread_mutex_unlock(&m_list_lock); } } void Receive() { unsigned char PanReplyMessage[2]; string message; int newnumread; int completed = 0; int readTillNow = 0; do{ //Read one byte newnumread = read(fd,&(PanReplyMessage[readTillNow]), 1); //if you read something if(newnumread > 0){ message += PanReplyMessage[readTillNow]; //end byte for this message? if (PanReplyMessage[readTillNow] == 0xFF){ // lock pthread_mutex_lock(&m_list_rec_lock); // Push the message into the list m_received.push_back(message); // Unlock pthread_mutex_unlock(&m_list_rec_lock); //ready for a new message message=""; readTillNow = -1; // Analyse the message Analyse_received_message(); } //Prepare to store next byte readTillNow++; } else{ completed = 1; } }while(completed != 1 && !m_killed); } public: SNCRZ30RS232(string nodeName, ParameterSet params) : BufferedNode(nodeName, params) , m_killed(0), m_pan_position(0), m_tilt_position(0), m_zoom_position(0), m_isInit(false) { //inputs panAbsolutePosition= addInput("PAN_ABS_POS"); tiltAbsolutePosition = addInput("TILT_ABS_POS"); zoomPosition = addInput("ZOOM"); panRelativePosition = addInput("PAN_REL_POS"); tiltRelativePosition = addInput("TILT_REL_POS"); //outputs Pan_output = addOutput("PAN_POSITION"); Tilt_output = addOutput("TILT_POSITION"); Zoom_output = addOutput("ZOOM_POSITION"); //parameters m_serial_port = object_cast<String>(parameters.get("SERIAL_PORT")); m_panSpeed = dereference_cast<int>(parameters.get("PAN_SPEED")); m_tiltSpeed = dereference_cast<int>(parameters.get("TILT_SPEED")); } // NEW MODIFICATION START HERE ############################################################################ void Analyse_received_message(void) { string message; // lock pthread_mutex_lock(&m_list_rec_lock); //reading camera data while (!m_received.empty()) { //reading first message message = m_received.front(); //remove processed message m_received.pop_front(); //zoom message ? if (message.size() == 7) { m_zoom_position = 0; m_zoom_position = message[2]<<12 | message[3]<<8 | message[4]<<4 | message[5]; pthread_mutex_unlock(&m_ack_lock); pseudosem_post(&m_buffer_empty); } //pan tilt message ? if (message.size() == 11) { short convpan, convtilt; // next 4 are pan convpan = message[5]; convpan |= (message[4] << 4); convpan |= (message[3] << 8); convpan |= (message[2] << 12); m_pan_position = max(-1700,min(convpan,1700)); // next 4 are tilt convtilt = message[9]; convtilt |= (message[8] << 4); convtilt |= (message[7] << 8); convtilt |= (message[6] << 12); m_tilt_position= max(-725,min(convtilt,425)); pthread_mutex_unlock(&m_ack_lock); pseudosem_post(&m_buffer_empty); } // ack message buffer 1 and/or 2, see spec sheet page 4 if ((message.size() == 3) && (message[1] == 0x41 || message[1] == 0x42)) { pthread_mutex_unlock(&m_ack_lock); } // Completion job message buffer 1 and/or 2, see spec sheet page 4 if ((message.size() == 3) && (message[1] == 0x51 || message[1] == 0x52)) { pseudosem_post(&m_buffer_empty); } // Clear Interface answer... same command as it was for sending it if ((message.size() == 5) && (message[1] == 0x01 && message[2] == 0x00 && message[3] == 0x01)) { pseudosem_post(&m_buffer_empty); pthread_mutex_unlock(&m_ack_lock); } if ((message.size() == 4) && (message[2] == 0x02)) { cerr << "Erreur de syntax" << endl; pthread_mutex_unlock(&m_ack_lock); pseudosem_post(&m_buffer_empty); } if ((message.size() == 4) && (message[2] == 0x03)) { cerr << "Command buffer full" << endl; pthread_mutex_unlock(&m_ack_lock); pseudosem_post(&m_buffer_empty); } if ((message.size() == 4) && (message[2] == 0x04)) { cerr << "Command cancel" << endl; pthread_mutex_unlock(&m_ack_lock); pseudosem_post(&m_buffer_empty); } if ((message.size() == 4) && (message[2] == 0x05)) { cerr << "No socket" << endl; pthread_mutex_unlock(&m_ack_lock); pseudosem_post(&m_buffer_empty); } if ((message.size() == 4) && (message[2] == 0x41)) { cerr << "Command not executable" << endl; pthread_mutex_unlock(&m_ack_lock); pseudosem_post(&m_buffer_empty); } } // Unlock pthread_mutex_unlock(&m_list_rec_lock); } void Add_message_to_send(string msg_to_send) { bool duplicate_item_found = false; list<string>::iterator i; //wait for the mutex pthread_mutex_lock(&m_list_lock); //Look in the actual list to see if there is already an Abs command //If so replace it by the new one for(i=m_sending.begin();i != m_sending.end(); i++){ // If this is an ABS command replace it by the new one if(((*i)[1] == msg_to_send[1]) && ((*i)[2] == msg_to_send[2]) && ((*i)[3] == msg_to_send[3])){ // Replace the actual stuff with the new one. (*i) = msg_to_send; // Dont post any semaphore... duplicate_item_found = true; // Get out of here as soon as you can break; } } // If the item was not found in its search add it to the list if(!(duplicate_item_found)){ // add the new item into the list m_sending.push_back(msg_to_send); // Unlock the mutex pthread_mutex_unlock(&m_list_lock); // Something new is in the list pseudosem_post(&m_semaphore); } else { // Unlock the mutex pthread_mutex_unlock(&m_list_lock); } } void init_wb(void) { string message; message += 0x81; message += 0x01; message += 0x04; message += 0x35; message += 0x01; message += 0xFF; Add_message_to_send(message); } void init_pan_tilt(void) { string message; message += 0x81; message += 0x01; message += 0x06; message += 0x05; message += 0xFF; Add_message_to_send(message); } void init_clear_if(void) { string message; message += 0x88; message += 0x01; message += (char)0x00; message += 0x01; message += 0xFF; Add_message_to_send(message); } //New MODIFICATION STOP HERE ############################################################################# void Absolute_movement(int pan_speed, int tilt_speed, int pan_position, int tilt_position) { string message; string last; int Sep1 = 0x000F; int Sep2 = 0x00F0; int Sep3 = 0x0F00; int Sep4 = 0xF000; message += 0x81; message += 0x01; message += 0x06; message += 0x02; message += max(0,min(pan_speed,24)); message += max(0,min(tilt_speed,20)); pan_position = max(min(pan_position,1700), -1700); tilt_position = max(min(tilt_position,425), -725); message += (Sep4 & pan_position)>>12; message += (Sep3 & pan_position)>>8; message += (Sep2 & pan_position)>>4; message += (Sep1 & pan_position); message += (Sep4 & tilt_position)>>12; message += (Sep3 & tilt_position)>>8; message += (Sep2 & tilt_position)>>4; message += (Sep1 & tilt_position); message += 0xFF; // add it to the list dont worry be happy ! Add_message_to_send(message); } void Relative_movement(int pan_speed, int tilt_speed, int pan_position, int tilt_position) { //Absolute_movement(pan_speed,tilt_speed,m_pan_position + pan_position, m_tilt_position + tilt_position); string message; int Sep1 = 0x000F; int Sep2 = 0x00F0; int Sep3 = 0x0F00; int Sep4 = 0xF000; message += 0x81; message += 0x01; message += 0x06; message += 0x03; message += max(0,min(pan_speed,24)); message += max(0,min(tilt_speed,20)); pan_position = max(min(pan_position,1700), -1700); tilt_position = max(min(tilt_position,425), -725); //pan message += (Sep4 & pan_position)>>12; message += (Sep3 & pan_position)>>8; message += (Sep2 & pan_position)>>4; message += (Sep1 & pan_position); //tilt message += (Sep4 & tilt_position)>>12; message += (Sep3 & tilt_position)>>8; message += (Sep2 & tilt_position)>>4; message += (Sep1 & tilt_position); message += 0xFF; // add it to the list dont worry be happy ! Add_message_to_send(message); } void Zoom(int data) { string message; string last; int Sep1 = 0x000F; int Sep2 = 0x00F0; int Sep3 = 0x0F00; int Sep4 = 0xF000; message += 0x81; message += 0x01; message += 0x04; message += 0x47; data = max(0,min(data,0x4000)); message += (Sep4 & data)>>12; message += (Sep3 & data)>>8; message += (Sep2 & data)>>4; message += (Sep1 & data); message += 0xFF; Add_message_to_send(message); } void inquiry_pan_tilt() { //pan + tilt request string PanTiltMessage; PanTiltMessage += 0x81; PanTiltMessage += 0x09; PanTiltMessage += 0x06; PanTiltMessage += 0x12; PanTiltMessage += 0xFF; Add_message_to_send(PanTiltMessage); } void inquiry_zoom(){ //zoom request string ZoomMessage; ZoomMessage += 0x81; ZoomMessage += 0x09; ZoomMessage += 0x04; ZoomMessage += 0x47; ZoomMessage += 0xFF; Add_message_to_send(ZoomMessage); } void calculate(int output_id, int count, Buffer &out) { // Initialize camera, thread and serial port the first time if(!m_isInit) { //open serial port fd = Port_initialisation(m_serial_port.c_str(),BAUDRATE_38400); cerr << "SNCRZ30RS232 : serial port opened " << m_serial_port << endl; //message list list mutex pthread_mutex_init(&m_list_lock,NULL); //message list list mutex pthread_mutex_init(&m_list_rec_lock ,NULL); //message list list mutex pthread_mutex_init(&m_ack_lock ,NULL); //semaphore to wake up send thread when something is ready. pseudosem_init(&m_semaphore,0,0); //semaphore to indicate that buffer are free pseudosem_init(&m_buffer_empty,0,0); //At the beginning both buffer are supposed to be free pseudosem_post(&m_buffer_empty); pseudosem_post(&m_buffer_empty); //creating recv & send threads pthread_create(&Sending_thread, NULL, sncrz30_send_thread, this); pthread_create(&Receiving_thread, NULL, sncrz30_receive_thread, this); //init the rate at which inquiry_pan_tilt() will be call (in term of "count") inquiry_pan_tilt_rate = 1; //init the rate at which inquiry_zoom() will be call (in term of "count") inquiry_zoom_rate = 20; //init camera initialize_camera(); // init destructor loop watch dog destructor_loop_counter = 0; m_isInit = true; } // input values ObjectRef panAbsolutePositionValue = getInput(panAbsolutePosition,count); ObjectRef tiltAbsolutePositionValue = getInput(tiltAbsolutePosition,count); ObjectRef panRelativePositionValue = getInput(panRelativePosition,count); ObjectRef tiltRelativePositionValue = getInput(tiltRelativePosition,count); ObjectRef zoomPositionValue = getInput(zoomPosition,count); if ((!panAbsolutePositionValue->isNil()) && (!tiltAbsolutePositionValue->isNil())) { //pan & tilt (absolute) int panAbsPos = dereference_cast<int>(panAbsolutePositionValue); int tiltAbsPos = dereference_cast<int>(tiltAbsolutePositionValue); Absolute_movement(m_panSpeed,m_tiltSpeed, panAbsPos, tiltAbsPos); } else if ((panAbsolutePositionValue->isNil()) && (!tiltAbsolutePositionValue->isNil())) { //tilt only (absolute) int tiltAbsPos = dereference_cast<int>(tiltAbsolutePositionValue); Absolute_movement(m_panSpeed,m_tiltSpeed,m_pan_position,tiltAbsPos); } else if ((!panAbsolutePositionValue->isNil()) && (tiltAbsolutePositionValue->isNil())) { //pan only (absolute) int panAbsPos = dereference_cast<int>(panAbsolutePositionValue); Absolute_movement(m_panSpeed,m_tiltSpeed,panAbsPos,m_tilt_position); } if ((!panRelativePositionValue->isNil()) && (!tiltRelativePositionValue->isNil())) { //pan & tilt (relative) int panRelPos = dereference_cast<int>(panRelativePositionValue); int tiltRelPos = dereference_cast<int>(tiltRelativePositionValue); if (panRelPos != 0 || tiltRelPos != 0) { Relative_movement(m_panSpeed,m_tiltSpeed, panRelPos, tiltRelPos); } } else if ((panRelativePositionValue->isNil()) && (!tiltRelativePositionValue->isNil())) { //tilt only (relative) int tiltRelPos = dereference_cast<int>(tiltRelativePositionValue); if (tiltRelPos != 0) { Relative_movement(m_panSpeed,m_tiltSpeed,0,tiltRelPos); } } else if ((!panRelativePositionValue->isNil()) && (tiltRelativePositionValue->isNil())) { //pan only (relative) int panRelPos = dereference_cast<int>(panRelativePositionValue); if (panRelPos != 0) { Relative_movement(m_panSpeed,m_tiltSpeed,panRelPos,0); } } if (!zoomPositionValue->isNil()) { //zoom int zoomPos = dereference_cast<int>(zoomPositionValue); Zoom(zoomPos); } inquiry_pan_tilt(); inquiry_zoom(); //output position (*outputs[Pan_output].buffer)[count] = ObjectRef(Int::alloc(m_pan_position)); (*outputs[Tilt_output].buffer)[count] = ObjectRef(Int::alloc(m_tilt_position)); (*outputs[Zoom_output].buffer)[count] = ObjectRef(Int::alloc(m_zoom_position)); } // end of calculate ~SNCRZ30RS232() { int status =1; if(m_isInit) { cerr << "SNCRZ30RS232 : destructor" << endl; cerr << "SNCRZ30RS232 : restoring default camera values" << endl; Absolute_movement(24,20, 0, 0); // put the camera at the neutral position //Zoom(0); //sleep? cerr << "SNCRZ30RS232 : waiting for default values to be reach" << endl; do{ // Concead cpu power to other threads sched_yield(); // Make it work a little bit with a branch condition if(m_sending.size() == 0){ status = 0; } // After x count try to unlock things (giving a chance...) if(destructor_loop_counter > 20){ pthread_mutex_unlock(&m_ack_lock); pseudosem_post(&m_buffer_empty); cerr << "SNCRZ30RS232 : Giving a chance to quit" << endl; } //After y count, as y > x, get out of the loop (watchdog) if(destructor_loop_counter > 25){ status = 0; cerr << "SNCRZ30RS232 : Force to quit" << endl; } destructor_loop_counter++; }while (status == 1); cerr << "SNCRZ30RS232 : waiting for send & receive threads" << endl; pthread_mutex_unlock(&m_list_lock); // unlock all pthread_mutex_unlock(&m_ack_lock); pseudosem_post(&m_buffer_empty); // killing the threads m_killed = 1; pseudosem_post(&m_semaphore); pthread_join(Sending_thread,NULL); cerr << "SNCRZ30RS232 : Sending_thread killed (joined)" << endl; pthread_join(Receiving_thread,NULL); cerr << "SNCRZ30RS232 : Receiving_thread killed (joined)" << endl; pseudosem_destroy(&m_semaphore); pseudosem_destroy(&m_buffer_empty); pthread_mutex_destroy(&m_list_lock); pthread_mutex_destroy(&m_list_rec_lock); pthread_mutex_destroy(&m_ack_lock); cerr << "SNCRZ30RS232 (done!)" << endl; } } void auto_pan_tilt_speed_off() { //pan + tilt request string AutoOFF; AutoOFF += 0x81; AutoOFF += 0x01; AutoOFF += 0x06; AutoOFF += 0x24; AutoOFF += 0x03; AutoOFF += 0xFF; // add it to the list dont worry be happy ! Add_message_to_send(AutoOFF); } void initialize_camera() { // Clear the interface of camera init_clear_if(); // Initialize white balance init_wb(); auto_pan_tilt_speed_off(); //position camera pan = 0, tilt = 0 Absolute_movement(24,18,0,0); //position zoom = 0 Zoom(0); } }; // end of SNCRZ30RS232 class void *sncrz30_send_thread (void *sPTZ) { cerr<<"SNCRZ30RS232 : Send thread starting."<<endl; SNCRZ30RS232 *myPtz = (SNCRZ30RS232*) sPTZ ; try { while(!myPtz->m_killed) { //cerr << "Size list " << myPtz->m_sending.size() << endl; pseudosem_wait(&myPtz->m_semaphore); myPtz->Send(); } } catch (BaseException *e) { e->print(cerr); delete e; } cerr<<"SNCRZ30RS232 : Send thread done."<<endl; return NULL; } void *sncrz30_receive_thread (void *sPTZ) { cerr<<"SNCRZ30RS232 : Receive thread starting."<<endl; SNCRZ30RS232 *myPtz =(SNCRZ30RS232*) sPTZ; try { while (!myPtz->m_killed) { myPtz->Receive(); } } catch (BaseException *e) { e->print(cerr); delete e; } cerr<<"SNCRZ30RS232 : Receive thread done."<<endl; return NULL; } }//namespace RobotFlow #endif |
From: Dominic L. <ma...@us...> - 2005-03-30 19:12:02
|
Update of /cvsroot/robotflow/RobotFlow/Devices/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12638/include Modified Files: SerialDriver.h Log Message: added parameters for baudrate Index: SerialDriver.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Devices/include/SerialDriver.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SerialDriver.h 29 Mar 2005 15:20:38 -0000 1.2 --- SerialDriver.h 30 Mar 2005 19:10:44 -0000 1.3 *************** *** 2,11 **** /* Header Serial Driver */ /*************************************/ ! ! #define BAUDRATE B38400 namespace RobotFlow { ! int Port_initialisation(const char *serial_port); void End_session(int fd); --- 2,15 ---- /* Header Serial Driver */ /*************************************/ ! #include <termios.h> namespace RobotFlow { ! #define BAUDRATE_57600 B57600 ! #define BAUDRATE_38400 B38400 ! #define BAUDRATE_19200 B19200 ! #define BAUDRATE_9600 B9600 ! ! int Port_initialisation(const char *serial_port, speed_t speed = BAUDRATE_9600); void End_session(int fd); |
From: MagellanPro <mag...@us...> - 2005-03-30 15:30:02
|
Update of /cvsroot/robotflow/RobotFlow/MARIE/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19386 Modified Files: Makefile.am Log Message: change lib path order Index: Makefile.am =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/Makefile.am,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** Makefile.am 1 Nov 2004 13:20:05 -0000 1.23 --- Makefile.am 30 Mar 2005 15:29:20 -0000 1.24 *************** *** 3,8 **** #AUTOMAKE_OPTIONS = no-dependencies ! INCLUDES = $(OVERFLOW_INCLUDE) $(MARIE_INCLUDES) $(XML2_INCLUDE) \ ! -I../include -I../../Behaviors/include lib_LTLIBRARIES = libRFMarie.la --- 3,9 ---- #AUTOMAKE_OPTIONS = no-dependencies ! INCLUDES = -I../include -I../../Behaviors/include \ ! $(OVERFLOW_INCLUDE) $(MARIE_INCLUDES) $(XML2_INCLUDE) ! lib_LTLIBRARIES = libRFMarie.la |
Update of /cvsroot/robotflow/RobotFlow/MARIE/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10496/MARIE/src Modified Files: MarieCommandBehavior.cpp MarieCommandCamera.cpp MarieCommandJoystick.cpp MarieCommandMotor.cpp MarieDataBumper.cpp MarieDataCamera.cpp MarieDataIR.cpp MarieDataLaser.cpp MarieDataMap.cpp MarieDataNull.cpp MarieDataOdometry.cpp MarieDataRaw.cpp MarieDataSonar.cpp MarieLoad.cpp MariePeek.cpp MariePull.cpp MariePush.cpp MarieRequestSystem.cpp MarieSave.cpp extractMarieCommandBehavior.cpp extractMarieCommandCamera.cpp extractMarieCommandJoystick.cpp extractMarieCommandMotor.cpp extractMarieDataBumper.cpp extractMarieDataCamera.cpp extractMarieDataIR.cpp extractMarieDataLaser.cpp extractMarieDataMap.cpp extractMarieDataOdometry.cpp extractMarieDataRaw.cpp extractMarieDataSonar.cpp extractMarieRequestSystem.cpp isMarieDataNull.cpp newMarieCommandBehavior.cpp newMarieCommandCamera.cpp newMarieCommandJoystick.cpp newMarieCommandMotor.cpp newMarieDataBumper.cpp newMarieDataCamera.cpp newMarieDataIR.cpp newMarieDataLaser.cpp newMarieDataMap.cpp newMarieDataOdometry.cpp newMarieDataRaw.cpp newMarieDataSonar.cpp newMarieRequestSystem.cpp Log Message: Now using the RobotFlow namespace and the FD namespace Index: newMarieDataMap.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/newMarieDataMap.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** newMarieDataMap.cpp 5 Jan 2005 00:45:30 -0000 1.3 --- newMarieDataMap.cpp 29 Mar 2005 15:20:43 -0000 1.4 *************** *** 25,28 **** --- 25,29 ---- using namespace std; + using namespace FD; namespace marie Index: extractMarieDataIR.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/extractMarieDataIR.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** extractMarieDataIR.cpp 2 Jan 2005 14:43:57 -0000 1.3 --- extractMarieDataIR.cpp 29 Mar 2005 15:20:43 -0000 1.4 *************** *** 29,32 **** --- 29,33 ---- using namespace std; + using namespace FD; namespace marie Index: extractMarieRequestSystem.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/extractMarieRequestSystem.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** extractMarieRequestSystem.cpp 2 Jan 2005 14:43:58 -0000 1.2 --- extractMarieRequestSystem.cpp 29 Mar 2005 15:20:43 -0000 1.3 *************** *** 24,27 **** --- 24,28 ---- using namespace std; + using namespace FD; namespace marie Index: MarieDataBumper.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/MarieDataBumper.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MarieDataBumper.cpp 2 Jan 2005 14:43:57 -0000 1.3 --- MarieDataBumper.cpp 29 Mar 2005 15:20:42 -0000 1.4 *************** *** 26,29 **** --- 26,30 ---- using namespace std; + using namespace FD; namespace marie Index: MarieDataSonar.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/MarieDataSonar.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** MarieDataSonar.cpp 2 Jan 2005 14:43:57 -0000 1.5 --- MarieDataSonar.cpp 29 Mar 2005 15:20:42 -0000 1.6 *************** *** 27,30 **** --- 27,31 ---- using namespace std; + using namespace FD; namespace marie Index: extractMarieCommandJoystick.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/extractMarieCommandJoystick.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** extractMarieCommandJoystick.cpp 2 Jan 2005 14:43:57 -0000 1.2 --- extractMarieCommandJoystick.cpp 29 Mar 2005 15:20:43 -0000 1.3 *************** *** 29,32 **** --- 29,33 ---- using namespace std; + using namespace FD; namespace marie Index: MarieDataOdometry.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/MarieDataOdometry.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** MarieDataOdometry.cpp 2 Jan 2005 14:43:57 -0000 1.5 --- MarieDataOdometry.cpp 29 Mar 2005 15:20:42 -0000 1.6 *************** *** 26,29 **** --- 26,30 ---- using namespace std; + using namespace FD; namespace marie Index: MarieDataCamera.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/MarieDataCamera.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** MarieDataCamera.cpp 2 Jan 2005 14:43:57 -0000 1.5 --- MarieDataCamera.cpp 29 Mar 2005 15:20:42 -0000 1.6 *************** *** 26,29 **** --- 26,30 ---- using namespace std; + using namespace FD; namespace marie Index: MarieCommandJoystick.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/MarieCommandJoystick.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** MarieCommandJoystick.cpp 2 Jan 2005 14:43:57 -0000 1.4 --- MarieCommandJoystick.cpp 29 Mar 2005 15:20:42 -0000 1.5 *************** *** 26,29 **** --- 26,30 ---- using namespace std; + using namespace FD; namespace marie Index: extractMarieDataOdometry.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/extractMarieDataOdometry.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** extractMarieDataOdometry.cpp 2 Jan 2005 14:43:58 -0000 1.2 --- extractMarieDataOdometry.cpp 29 Mar 2005 15:20:43 -0000 1.3 *************** *** 29,32 **** --- 29,33 ---- using namespace std; + using namespace FD; namespace marie Index: extractMarieDataCamera.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/extractMarieDataCamera.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** extractMarieDataCamera.cpp 2 Jan 2005 14:43:57 -0000 1.2 --- extractMarieDataCamera.cpp 29 Mar 2005 15:20:43 -0000 1.3 *************** *** 29,32 **** --- 29,33 ---- using namespace std; + using namespace FD; namespace marie Index: newMarieDataBumper.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/newMarieDataBumper.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** newMarieDataBumper.cpp 2 Jan 2005 14:43:58 -0000 1.2 --- newMarieDataBumper.cpp 29 Mar 2005 15:20:43 -0000 1.3 *************** *** 29,32 **** --- 29,33 ---- using namespace std; + using namespace FD; namespace marie Index: MariePush.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/MariePush.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MariePush.cpp 2 Jan 2005 14:43:57 -0000 1.2 --- MariePush.cpp 29 Mar 2005 15:20:42 -0000 1.3 *************** *** 28,31 **** --- 28,32 ---- using namespace std; + using namespace FD; namespace marie Index: MariePeek.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/MariePeek.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** MariePeek.cpp 2 Jan 2005 14:43:57 -0000 1.5 --- MariePeek.cpp 29 Mar 2005 15:20:42 -0000 1.6 *************** *** 28,31 **** --- 28,32 ---- using namespace std; + using namespace FD; namespace marie Index: extractMarieDataMap.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/extractMarieDataMap.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** extractMarieDataMap.cpp 2 Jan 2005 14:43:58 -0000 1.3 --- extractMarieDataMap.cpp 29 Mar 2005 15:20:43 -0000 1.4 *************** *** 30,33 **** --- 30,34 ---- using namespace std; + using namespace FD; namespace marie Index: newMarieDataIR.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/newMarieDataIR.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** newMarieDataIR.cpp 2 Jan 2005 14:43:58 -0000 1.2 --- newMarieDataIR.cpp 29 Mar 2005 15:20:43 -0000 1.3 *************** *** 29,32 **** --- 29,33 ---- using namespace std; + using namespace FD; namespace marie Index: extractMarieCommandMotor.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/extractMarieCommandMotor.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** extractMarieCommandMotor.cpp 2 Jan 2005 14:43:57 -0000 1.2 --- extractMarieCommandMotor.cpp 29 Mar 2005 15:20:43 -0000 1.3 *************** *** 29,32 **** --- 29,33 ---- using namespace std; + using namespace FD; namespace marie Index: MarieDataNull.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/MarieDataNull.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MarieDataNull.cpp 2 Jan 2005 14:43:57 -0000 1.3 --- MarieDataNull.cpp 29 Mar 2005 15:20:42 -0000 1.4 *************** *** 26,29 **** --- 26,30 ---- using namespace std; + using namespace FD; namespace marie Index: extractMarieDataRaw.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/extractMarieDataRaw.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** extractMarieDataRaw.cpp 2 Jan 2005 14:43:58 -0000 1.2 --- extractMarieDataRaw.cpp 29 Mar 2005 15:20:43 -0000 1.3 *************** *** 29,32 **** --- 29,33 ---- using namespace std; + using namespace FD; namespace marie Index: newMarieCommandMotor.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/newMarieCommandMotor.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** newMarieCommandMotor.cpp 2 Jan 2005 14:43:58 -0000 1.2 --- newMarieCommandMotor.cpp 29 Mar 2005 15:20:43 -0000 1.3 *************** *** 29,32 **** --- 29,33 ---- using namespace std; + using namespace FD; namespace marie Index: MarieCommandMotor.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/MarieCommandMotor.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** MarieCommandMotor.cpp 2 Jan 2005 14:43:57 -0000 1.6 --- MarieCommandMotor.cpp 29 Mar 2005 15:20:42 -0000 1.7 *************** *** 26,29 **** --- 26,30 ---- using namespace std; + using namespace FD; namespace marie Index: MarieDataMap.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/MarieDataMap.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** MarieDataMap.cpp 10 Mar 2005 20:59:35 -0000 1.4 --- MarieDataMap.cpp 29 Mar 2005 15:20:42 -0000 1.5 *************** *** 27,30 **** --- 27,31 ---- using namespace std; + using namespace FD; namespace marie Index: extractMarieDataSonar.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/extractMarieDataSonar.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** extractMarieDataSonar.cpp 2 Jan 2005 14:43:58 -0000 1.3 --- extractMarieDataSonar.cpp 29 Mar 2005 15:20:43 -0000 1.4 *************** *** 29,32 **** --- 29,33 ---- using namespace std; + using namespace FD; namespace marie Index: extractMarieCommandCamera.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/extractMarieCommandCamera.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** extractMarieCommandCamera.cpp 2 Jan 2005 14:43:57 -0000 1.2 --- extractMarieCommandCamera.cpp 29 Mar 2005 15:20:42 -0000 1.3 *************** *** 29,32 **** --- 29,33 ---- using namespace std; + using namespace FD; namespace marie Index: newMarieCommandBehavior.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/newMarieCommandBehavior.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** newMarieCommandBehavior.cpp 11 Mar 2005 18:54:49 -0000 1.5 --- newMarieCommandBehavior.cpp 29 Mar 2005 15:20:43 -0000 1.6 *************** *** 30,33 **** --- 30,34 ---- using namespace std; + using namespace FD; namespace marie Index: extractMarieDataBumper.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/extractMarieDataBumper.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** extractMarieDataBumper.cpp 2 Jan 2005 14:43:57 -0000 1.2 --- extractMarieDataBumper.cpp 29 Mar 2005 15:20:43 -0000 1.3 *************** *** 29,32 **** --- 29,33 ---- using namespace std; + using namespace FD; namespace marie Index: extractMarieCommandBehavior.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/extractMarieCommandBehavior.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** extractMarieCommandBehavior.cpp 10 Mar 2005 20:59:34 -0000 1.5 --- extractMarieCommandBehavior.cpp 29 Mar 2005 15:20:42 -0000 1.6 *************** *** 31,34 **** --- 31,35 ---- using namespace std; + using namespace FD; namespace marie Index: MarieDataIR.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/MarieDataIR.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MarieDataIR.cpp 2 Jan 2005 14:43:57 -0000 1.3 --- MarieDataIR.cpp 29 Mar 2005 15:20:42 -0000 1.4 *************** *** 27,30 **** --- 27,31 ---- using namespace std; + using namespace FD; namespace marie Index: extractMarieDataLaser.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/extractMarieDataLaser.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** extractMarieDataLaser.cpp 2 Jan 2005 14:43:57 -0000 1.3 --- extractMarieDataLaser.cpp 29 Mar 2005 15:20:43 -0000 1.4 *************** *** 29,32 **** --- 29,33 ---- using namespace std; + using namespace FD; namespace marie Index: newMarieCommandJoystick.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/newMarieCommandJoystick.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** newMarieCommandJoystick.cpp 2 Jan 2005 14:43:58 -0000 1.2 --- newMarieCommandJoystick.cpp 29 Mar 2005 15:20:43 -0000 1.3 *************** *** 29,32 **** --- 29,33 ---- using namespace std; + using namespace FD; namespace marie Index: MarieLoad.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/MarieLoad.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** MarieLoad.cpp 2 Jan 2005 14:43:57 -0000 1.6 --- MarieLoad.cpp 29 Mar 2005 15:20:42 -0000 1.7 *************** *** 28,31 **** --- 28,32 ---- using namespace std; + using namespace FD; namespace marie Index: newMarieDataSonar.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/newMarieDataSonar.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** newMarieDataSonar.cpp 2 Jan 2005 14:43:58 -0000 1.2 --- newMarieDataSonar.cpp 29 Mar 2005 15:20:43 -0000 1.3 *************** *** 29,32 **** --- 29,33 ---- using namespace std; + using namespace FD; namespace marie Index: isMarieDataNull.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/isMarieDataNull.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** isMarieDataNull.cpp 2 Jan 2005 14:43:58 -0000 1.2 --- isMarieDataNull.cpp 29 Mar 2005 15:20:43 -0000 1.3 *************** *** 4,7 **** --- 4,8 ---- using namespace std; + using namespace FD; namespace marie { Index: newMarieDataLaser.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/newMarieDataLaser.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** newMarieDataLaser.cpp 2 Jan 2005 14:43:58 -0000 1.2 --- newMarieDataLaser.cpp 29 Mar 2005 15:20:43 -0000 1.3 *************** *** 29,32 **** --- 29,33 ---- using namespace std; + using namespace FD; namespace marie Index: newMarieDataOdometry.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/newMarieDataOdometry.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** newMarieDataOdometry.cpp 2 Jan 2005 14:43:58 -0000 1.2 --- newMarieDataOdometry.cpp 29 Mar 2005 15:20:43 -0000 1.3 *************** *** 29,32 **** --- 29,33 ---- using namespace std; + using namespace FD; namespace marie Index: newMarieDataCamera.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/newMarieDataCamera.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** newMarieDataCamera.cpp 2 Jan 2005 14:43:58 -0000 1.3 --- newMarieDataCamera.cpp 29 Mar 2005 15:20:43 -0000 1.4 *************** *** 29,32 **** --- 29,33 ---- using namespace std; + using namespace FD; namespace marie Index: newMarieCommandCamera.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/newMarieCommandCamera.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** newMarieCommandCamera.cpp 2 Jan 2005 14:43:58 -0000 1.3 --- newMarieCommandCamera.cpp 29 Mar 2005 15:20:43 -0000 1.4 *************** *** 25,28 **** --- 25,29 ---- using namespace std; + using namespace FD; namespace marie Index: newMarieDataRaw.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/newMarieDataRaw.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** newMarieDataRaw.cpp 2 Jan 2005 14:43:58 -0000 1.2 --- newMarieDataRaw.cpp 29 Mar 2005 15:20:43 -0000 1.3 *************** *** 29,32 **** --- 29,33 ---- using namespace std; + using namespace FD; namespace marie Index: MarieCommandCamera.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/MarieCommandCamera.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** MarieCommandCamera.cpp 2 Jan 2005 14:43:57 -0000 1.8 --- MarieCommandCamera.cpp 29 Mar 2005 15:20:42 -0000 1.9 *************** *** 27,30 **** --- 27,31 ---- using namespace std; + using namespace FD; namespace marie Index: MarieCommandBehavior.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/MarieCommandBehavior.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** MarieCommandBehavior.cpp 10 Mar 2005 20:59:34 -0000 1.5 --- MarieCommandBehavior.cpp 29 Mar 2005 15:20:42 -0000 1.6 *************** *** 28,31 **** --- 28,33 ---- using namespace std; + using namespace FD; + using namespace RobotFlow; namespace marie Index: newMarieRequestSystem.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/newMarieRequestSystem.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** newMarieRequestSystem.cpp 2 Jan 2005 14:43:58 -0000 1.5 --- newMarieRequestSystem.cpp 29 Mar 2005 15:20:43 -0000 1.6 *************** *** 24,27 **** --- 24,28 ---- using namespace std; + using namespace FD; namespace marie Index: MariePull.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/MariePull.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** MariePull.cpp 2 Jan 2005 14:43:57 -0000 1.5 --- MariePull.cpp 29 Mar 2005 15:20:42 -0000 1.6 *************** *** 28,31 **** --- 28,32 ---- using namespace std; + using namespace FD; namespace marie Index: MarieDataLaser.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/MarieDataLaser.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** MarieDataLaser.cpp 2 Jan 2005 14:43:57 -0000 1.6 --- MarieDataLaser.cpp 29 Mar 2005 15:20:42 -0000 1.7 *************** *** 27,30 **** --- 27,31 ---- using namespace std; + using namespace FD; namespace marie Index: MarieSave.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/MarieSave.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** MarieSave.cpp 2 Jan 2005 14:43:57 -0000 1.4 --- MarieSave.cpp 29 Mar 2005 15:20:42 -0000 1.5 *************** *** 28,31 **** --- 28,32 ---- using namespace std; + using namespace FD; namespace marie Index: MarieDataRaw.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/MarieDataRaw.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** MarieDataRaw.cpp 2 Jan 2005 14:43:57 -0000 1.5 --- MarieDataRaw.cpp 29 Mar 2005 15:20:42 -0000 1.6 *************** *** 27,30 **** --- 27,31 ---- using namespace std; + using namespace FD; namespace marie Index: MarieRequestSystem.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/MarieRequestSystem.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MarieRequestSystem.cpp 2 Jan 2005 14:43:57 -0000 1.3 --- MarieRequestSystem.cpp 29 Mar 2005 15:20:42 -0000 1.4 *************** *** 26,29 **** --- 26,30 ---- using namespace std; + using namespace FD; namespace marie |
Update of /cvsroot/robotflow/RobotFlow/Generic/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10496/Generic/src Modified Files: DictionaryLookup.cc KDNode.cc KDPQueue.cc KDPoint.cc KDTree.cc Random.cc TimeStamp.cc Timer.cc USleep.cc operators.cc Log Message: Now using the RobotFlow namespace and the FD namespace Index: Timer.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Generic/src/Timer.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Timer.cc 2 Jan 2005 14:43:56 -0000 1.2 --- Timer.cc 29 Mar 2005 15:20:41 -0000 1.3 *************** *** 5,8 **** --- 5,11 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { //(ER) for debugging *************** *** 219,220 **** --- 222,225 ---- } + + }//namespace RobotFlow Index: Random.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Generic/src/Random.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Random.cc 2 Jan 2005 14:43:56 -0000 1.2 --- Random.cc 29 Mar 2005 15:20:41 -0000 1.3 *************** *** 7,11 **** --- 7,14 ---- using namespace std; + using namespace FD; + namespace RobotFlow { + class Random; *************** *** 63,67 **** }; ! #endif --- 66,70 ---- }; ! }//namespace RobotFlow #endif Index: KDPQueue.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Generic/src/KDPQueue.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** KDPQueue.cc 2 Jan 2005 14:43:56 -0000 1.2 --- KDPQueue.cc 29 Mar 2005 15:20:41 -0000 1.3 *************** *** 21,25 **** --- 21,28 ---- using namespace std; + using namespace FD; + namespace RobotFlow { + static int KDPQUEUE_VAR_0 = Object::addObjectType<KDPQueue< double, KDPoint<unsigned char> > > ("KDPQueue<double,KDPoint<unsigned char>>", new ObjectFactory<KDPQueue< double, KDPoint<unsigned char> > > ("KDPQueue<double,KDPoint<unsigned char>>")); *************** *** 50,51 **** --- 53,56 ---- static int KDPQUEUE_VAR_10 = Object::addObjectType<KDPQueue< double, int > > ("KDPQueue<double,int>", new ObjectFactory<KDPQueue< double, int > > ("KDPQueue<double, int>")); + + }//namespace RobotFlow Index: TimeStamp.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Generic/src/TimeStamp.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TimeStamp.cc 2 Jan 2005 14:43:56 -0000 1.2 --- TimeStamp.cc 29 Mar 2005 15:20:41 -0000 1.3 *************** *** 6,10 **** --- 6,13 ---- using namespace std; + using namespace FD; + namespace RobotFlow { + class TimeStamp; *************** *** 71,73 **** --- 74,78 ---- + + }//namespace RobotFlow #endif Index: DictionaryLookup.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Generic/src/DictionaryLookup.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DictionaryLookup.cc 2 Jan 2005 14:43:56 -0000 1.3 --- DictionaryLookup.cc 29 Mar 2005 15:20:41 -0000 1.4 *************** *** 24,27 **** --- 24,30 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class DictionaryLookup; *************** *** 269,271 **** --- 272,277 ---- return selectedWord; } + + }//namespace RobotFLow + #endif Index: KDTree.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Generic/src/KDTree.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** KDTree.cc 2 Jan 2005 14:43:56 -0000 1.2 --- KDTree.cc 29 Mar 2005 15:20:41 -0000 1.3 *************** *** 20,24 **** --- 20,27 ---- using namespace std; + using namespace FD; + namespace RobotFlow { + DECLARE_TYPE(KDPoint<unsigned char>) DECLARE_TYPE(KDPoint<char>) *************** *** 32,33 **** --- 35,37 ---- DECLARE_TYPE(KDPoint<double>) + }//namespace RobotFlow Index: KDPoint.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Generic/src/KDPoint.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** KDPoint.cc 2 Jan 2005 14:43:56 -0000 1.2 --- KDPoint.cc 29 Mar 2005 15:20:41 -0000 1.3 *************** *** 20,23 **** --- 20,26 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { DECLARE_TYPE(KDPoint<unsigned char>) *************** *** 31,32 **** --- 34,37 ---- DECLARE_TYPE(KDPoint<float>) DECLARE_TYPE(KDPoint<double>) + + }//namespace RobotFlow Index: KDNode.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Generic/src/KDNode.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** KDNode.cc 2 Jan 2005 14:43:56 -0000 1.2 --- KDNode.cc 29 Mar 2005 15:20:41 -0000 1.3 *************** *** 20,24 **** --- 20,27 ---- using namespace std; + using namespace FD; + namespace RobotFlow { + DECLARE_TYPE(KDNode<unsigned char>) DECLARE_TYPE(KDNode<char>) *************** *** 31,32 **** --- 34,37 ---- DECLARE_TYPE(KDNode<float>) DECLARE_TYPE(KDNode<double>) + + }//namespace RobotFlow Index: operators.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Generic/src/operators.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** operators.cc 26 Jul 2004 16:57:01 -0000 1.3 --- operators.cc 29 Mar 2005 15:20:41 -0000 1.4 *************** *** 11,14 **** --- 11,17 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { ObjectRef concatStringInt(ObjectRef op1, ObjectRef op2) { *************** *** 22,23 **** --- 25,28 ---- } REGISTER_DOUBLE_VTABLE(concatVtable,concatStringInt,String,Int); + + }//namespace RobotFlow Index: USleep.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Generic/src/USleep.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** USleep.cc 2 Jan 2005 14:43:56 -0000 1.2 --- USleep.cc 29 Mar 2005 15:20:41 -0000 1.3 *************** *** 9,13 **** --- 9,16 ---- using namespace std; + using namespace FD; + namespace RobotFlow { + class USleep; *************** *** 97,100 **** --- 100,104 ---- + }//namespace RobotFlow #endif |
From: Dominic L. <ma...@us...> - 2005-03-29 15:21:38
|
Update of /cvsroot/robotflow/RobotFlow/Probes/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10496/Probes/include Modified Files: LaserProbe.h MapDef.h PTZControl.h SymbolKeypad.h VirtualJoystick.h Log Message: Now using the RobotFlow namespace and the FD namespace Index: SymbolKeypad.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Probes/include/SymbolKeypad.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SymbolKeypad.h 2 Jan 2005 14:43:59 -0000 1.2 --- SymbolKeypad.h 29 Mar 2005 15:20:46 -0000 1.3 *************** *** 7,12 **** #include <map> ! class SymbolKeypad : public Node { //callbacks --- 7,13 ---- #include <map> + namespace RobotFlow { ! class SymbolKeypad : public FD::Node { //callbacks *************** *** 86,90 **** public: ! SymbolKeypad(std::string nodeName, ParameterSet params); virtual ~SymbolKeypad(); --- 87,91 ---- public: ! SymbolKeypad(std::string nodeName, FD::ParameterSet params); virtual ~SymbolKeypad(); *************** *** 101,105 **** and for the 'count' iteration */ ! virtual ObjectRef getOutput(int output_id, int count); static const int pad_0_number; --- 102,106 ---- and for the 'count' iteration */ ! virtual FD::ObjectRef getOutput(int output_id, int count); static const int pad_0_number; *************** *** 141,144 **** }; ! #endif --- 142,145 ---- }; ! }//namespace RobotFlow #endif Index: MapDef.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Probes/include/MapDef.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MapDef.h 6 Jun 2002 12:09:23 -0000 1.1 --- MapDef.h 29 Mar 2005 15:20:46 -0000 1.2 *************** *** 4,7 **** --- 4,9 ---- #define _MAPDEF_H_ + namespace RobotFlow { + #define MAP_MAX_ROW 500 #define MAP_MAX_COLUMN 500 *************** *** 46,48 **** --- 48,52 ---- }; + }//namespace RobotFlow + #endif // _MAPDEF_H_ Index: LaserProbe.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Probes/include/LaserProbe.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** LaserProbe.h 2 Jan 2005 14:43:59 -0000 1.2 --- LaserProbe.h 29 Mar 2005 15:20:46 -0000 1.3 *************** *** 8,12 **** #include "MapDef.h" ! class LaserProbe : public Probe { protected: --- 8,14 ---- #include "MapDef.h" ! namespace RobotFlow { ! ! class LaserProbe : public FD::Probe { protected: *************** *** 22,26 **** public: ! LaserProbe(std::string nodeName, ParameterSet params); virtual ~LaserProbe(); --- 24,28 ---- public: ! LaserProbe(std::string nodeName, FD::ParameterSet params); virtual ~LaserProbe(); *************** *** 49,52 **** }; ! #endif --- 51,54 ---- }; ! }//namespace RobotFlow #endif Index: VirtualJoystick.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Probes/include/VirtualJoystick.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** VirtualJoystick.h 2 Jan 2005 14:43:59 -0000 1.5 --- VirtualJoystick.h 29 Mar 2005 15:20:46 -0000 1.6 *************** *** 8,16 **** #include <gnome.h> /** Virtual Joystick is a visual probe that shows a joystick with 2 standard buttons and 2 toggle buttons. \author Dominic Letourneau */ ! class VirtualJoystick : public BufferedNode { protected: --- 8,18 ---- #include <gnome.h> + namespace RobotFlow { + /** Virtual Joystick is a visual probe that shows a joystick with 2 standard buttons and 2 toggle buttons. \author Dominic Letourneau */ ! class VirtualJoystick : public FD::BufferedNode { protected: *************** *** 50,54 **** \param params The parameters passed at construction */ ! VirtualJoystick(std::string nodeName, ParameterSet params); ///Destructor --- 52,56 ---- \param params The parameters passed at construction */ ! VirtualJoystick(std::string nodeName, FD::ParameterSet params); ///Destructor *************** *** 67,71 **** \param out the buffer where to write the result */ ! virtual void calculate(int output_id, int count, Buffer &out); /** --- 69,73 ---- \param out the buffer where to write the result */ ! virtual void calculate(int output_id, int count, FD::Buffer &out); /** *************** *** 83,86 **** }; ! #endif --- 85,88 ---- }; ! }//namespace RobotFlow #endif Index: PTZControl.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Probes/include/PTZControl.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** PTZControl.h 2 Jan 2005 14:43:59 -0000 1.6 --- PTZControl.h 29 Mar 2005 15:20:46 -0000 1.7 *************** *** 7,12 **** #include <list> ! class PTZControl : public BufferedNode { protected: --- 7,13 ---- #include <list> + namespace RobotFlow { ! class PTZControl : public FD::BufferedNode { protected: *************** *** 37,41 **** public: ! PTZControl(std::string nodeName, ParameterSet params); virtual ~PTZControl(); --- 38,42 ---- public: ! PTZControl(std::string nodeName, FD::ParameterSet params); virtual ~PTZControl(); *************** *** 45,49 **** virtual void initialize(); ! virtual void calculate(int output_id, int count, Buffer &out); void addAbsPanCommand(int command); --- 46,50 ---- virtual void initialize(); ! virtual void calculate(int output_id, int count, FD::Buffer &out); void addAbsPanCommand(int command); *************** *** 55,59 **** }; ! #endif --- 56,60 ---- }; ! }//namespace RobotFlow #endif |
From: Dominic L. <ma...@us...> - 2005-03-29 15:21:38
|
Update of /cvsroot/robotflow/RobotFlow/Player/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10496/Player/include Modified Files: PlayerConnect.h Log Message: Now using the RobotFlow namespace and the FD namespace Index: PlayerConnect.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Player/include/PlayerConnect.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** PlayerConnect.h 2 Jan 2005 14:43:58 -0000 1.8 --- PlayerConnect.h 29 Mar 2005 15:20:45 -0000 1.9 *************** *** 22,26 **** #include "BufferedNode.h" ! class PlayerClientWrap : public Object { private: --- 22,28 ---- #include "BufferedNode.h" ! namespace RobotFlow { ! ! class PlayerClientWrap : public FD::Object { private: *************** *** 196,202 **** ! class PlayerConnect : public BufferedNode { ! ObjectRef m_client; bool m_isInit; --- 198,204 ---- ! class PlayerConnect : public FD::BufferedNode { ! FD::ObjectRef m_client; bool m_isInit; *************** *** 218,229 **** public: ! PlayerConnect(std::string nodeName, ParameterSet params); virtual ~PlayerConnect(); ! void calculate(int output_id, int count, Buffer &out); }; ! #endif --- 220,231 ---- public: ! PlayerConnect(std::string nodeName, FD::ParameterSet params); virtual ~PlayerConnect(); ! void calculate(int output_id, int count, FD::Buffer &out); }; ! }//namespace RobotFlow #endif |
From: Dominic L. <ma...@us...> - 2005-03-29 15:21:38
|
Update of /cvsroot/robotflow/RobotFlow/FSM/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10496/FSM/src Modified Files: FSMGenerator.cc Log Message: Now using the RobotFlow namespace and the FD namespace Index: FSMGenerator.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/FSM/src/FSMGenerator.cc,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** FSMGenerator.cc 23 Jan 2005 21:05:16 -0000 1.6 --- FSMGenerator.cc 29 Mar 2005 15:20:40 -0000 1.7 *************** *** 12,15 **** --- 12,18 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class FSMGenerator; *************** *** 950,952 **** --- 953,956 ---- }; + }//namespace RobotFLow #endif |
From: Dominic L. <ma...@us...> - 2005-03-29 15:21:38
|
Update of /cvsroot/robotflow/RobotFlow/Pioneer2/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10496/Pioneer2/include Modified Files: PSOSPacket.h Pioneer2Connect.h Pioneer2GripperState.h Pioneer2PacketManager.h Log Message: Now using the RobotFlow namespace and the FD namespace Index: Pioneer2GripperState.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Pioneer2/include/Pioneer2GripperState.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Pioneer2GripperState.h 2 Jan 2005 14:43:58 -0000 1.3 --- Pioneer2GripperState.h 29 Mar 2005 15:20:44 -0000 1.4 *************** *** 20,25 **** #include "Object.h" ! ! class TP2GripperState : public Object { public: --- 20,26 ---- #include "Object.h" ! namespace RobotFlow { ! ! class TP2GripperState : public FD::Object { public: *************** *** 54,56 **** --- 55,58 ---- }; + }//namespace RobotFlow #endif Index: Pioneer2Connect.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Pioneer2/include/Pioneer2Connect.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Pioneer2Connect.h 2 Jan 2005 14:43:58 -0000 1.7 --- Pioneer2Connect.h 29 Mar 2005 15:20:44 -0000 1.8 *************** *** 20,32 **** #include "BufferedNode.h" ! ! class Pioneer2Connect : public BufferedNode{ public: ! Pioneer2Connect(std::string nodeName, ParameterSet params); ! void calculate(int output_id, int count, Buffer &out); virtual ~Pioneer2Connect(); --- 20,32 ---- #include "BufferedNode.h" + namespace RobotFlow { ! class Pioneer2Connect : public FD::BufferedNode{ public: ! Pioneer2Connect(std::string nodeName, FD::ParameterSet params); ! void calculate(int output_id, int count, FD::Buffer &out); virtual ~Pioneer2Connect(); *************** *** 48,50 **** --- 48,52 ---- }; + + }//namespace RobotFlow #endif Index: Pioneer2PacketManager.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Pioneer2/include/Pioneer2PacketManager.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Pioneer2PacketManager.h 2 Jan 2005 14:43:58 -0000 1.6 --- Pioneer2PacketManager.h 29 Mar 2005 15:20:44 -0000 1.7 *************** *** 25,28 **** --- 25,30 ---- #include "pseudosem.h" + namespace RobotFlow { + // data for all the robots #define P2OS_CYCLETIME_USEC 50000 *************** *** 50,54 **** ! class Pioneer2Data : public Object { public: --- 52,56 ---- ! class Pioneer2Data : public FD::Object { public: *************** *** 285,289 **** ! #endif --- 287,291 ---- ! }//namespace RobotFlow #endif Index: PSOSPacket.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Pioneer2/include/PSOSPacket.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PSOSPacket.h 2 Jan 2005 14:43:58 -0000 1.3 --- PSOSPacket.h 29 Mar 2005 15:20:43 -0000 1.4 *************** *** 20,23 **** --- 20,25 ---- #include <iostream> + namespace RobotFlow { + class PSOSPacket { *************** *** 45,47 **** --- 47,50 ---- }; + }//namespace RobotFlow #endif |
From: Dominic L. <ma...@us...> - 2005-03-29 15:21:38
|
Update of /cvsroot/robotflow/RobotFlow/Player/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10496/Player/src Modified Files: Makefile.am PlayerConnect.cc PlayerGPS.cc PlayerGripper.cc PlayerHeading.cc PlayerLaser.cc PlayerPTZ.cc PlayerPositionRel.cc PlayerSonars.cc PlayerVelocity.cc PlayerVision.cc Log Message: Now using the RobotFlow namespace and the FD namespace Index: PlayerLaser.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Player/src/PlayerLaser.cc,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** PlayerLaser.cc 2 Jan 2005 14:43:59 -0000 1.10 --- PlayerLaser.cc 29 Mar 2005 15:20:45 -0000 1.11 *************** *** 24,27 **** --- 24,30 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class PlayerLaser; *************** *** 121,123 **** --- 124,127 ---- }; + }//namespace RobotFlow #endif Index: PlayerHeading.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Player/src/PlayerHeading.cc,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** PlayerHeading.cc 2 Jan 2005 14:43:59 -0000 1.9 --- PlayerHeading.cc 29 Mar 2005 15:20:45 -0000 1.10 *************** *** 23,26 **** --- 23,29 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class PlayerHeading; *************** *** 115,117 **** --- 118,122 ---- }; + + }//namespace RobotFlow #endif Index: PlayerPositionRel.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Player/src/PlayerPositionRel.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PlayerPositionRel.cc 2 Jan 2005 14:43:59 -0000 1.2 --- PlayerPositionRel.cc 29 Mar 2005 15:20:45 -0000 1.3 *************** *** 23,26 **** --- 23,29 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class PlayerPositionRel; *************** *** 101,103 **** --- 104,107 ---- }; + }//namespace RobotFlow #endif // _PLAYER_POSITION_REL_CC_ Index: PlayerVision.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Player/src/PlayerVision.cc,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** PlayerVision.cc 23 Jan 2005 21:09:42 -0000 1.8 --- PlayerVision.cc 29 Mar 2005 15:20:45 -0000 1.9 *************** *** 25,28 **** --- 25,31 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class PlayerVision; *************** *** 182,187 **** } - - }; #endif --- 185,190 ---- } }; + + }//namespace RobotFlow #endif Index: PlayerConnect.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Player/src/PlayerConnect.cc,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** PlayerConnect.cc 2 Jan 2005 14:43:59 -0000 1.17 --- PlayerConnect.cc 29 Mar 2005 15:20:45 -0000 1.18 *************** *** 22,25 **** --- 22,28 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { DECLARE_TYPE(PlayerClientWrap); *************** *** 175,177 **** --- 178,182 ---- } + + }//namespace RobotFlow #endif Index: PlayerGPS.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Player/src/PlayerGPS.cc,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** PlayerGPS.cc 2 Jan 2005 14:43:59 -0000 1.7 --- PlayerGPS.cc 29 Mar 2005 15:20:45 -0000 1.8 *************** *** 23,26 **** --- 23,29 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class PlayerGPS; *************** *** 118,120 **** --- 121,125 ---- }; + + }//namespace RobotFlow #endif Index: PlayerPTZ.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Player/src/PlayerPTZ.cc,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** PlayerPTZ.cc 2 Jan 2005 14:43:59 -0000 1.12 --- PlayerPTZ.cc 29 Mar 2005 15:20:45 -0000 1.13 *************** *** 23,26 **** --- 23,29 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class PlayerPTZ; *************** *** 247,249 **** --- 250,254 ---- }; + + } #endif Index: PlayerVelocity.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Player/src/PlayerVelocity.cc,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** PlayerVelocity.cc 2 Jan 2005 14:43:59 -0000 1.12 --- PlayerVelocity.cc 29 Mar 2005 15:20:45 -0000 1.13 *************** *** 23,26 **** --- 23,29 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class PlayerVelocity; *************** *** 160,162 **** --- 163,167 ---- }; + + }//namespace RobotFlow #endif Index: PlayerSonars.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Player/src/PlayerSonars.cc,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** PlayerSonars.cc 2 Jan 2005 14:43:59 -0000 1.9 --- PlayerSonars.cc 29 Mar 2005 15:20:45 -0000 1.10 *************** *** 24,27 **** --- 24,30 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class PlayerSonars; *************** *** 172,174 **** --- 175,179 ---- }; + + }//namespace RobotFlow #endif Index: PlayerGripper.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Player/src/PlayerGripper.cc,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** PlayerGripper.cc 2 Jan 2005 14:43:59 -0000 1.7 --- PlayerGripper.cc 29 Mar 2005 15:20:45 -0000 1.8 *************** *** 23,26 **** --- 23,29 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class PlayerGripper; *************** *** 139,141 **** --- 142,146 ---- }; + + }//namespace RobotFlow #endif Index: Makefile.am =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Player/src/Makefile.am,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Makefile.am 2 Jan 2005 14:43:59 -0000 1.9 --- Makefile.am 29 Mar 2005 15:20:45 -0000 1.10 *************** *** 14,19 **** PlayerLaser.cc \ PlayerHeading.cc \ ! PlayerGripper.cc ! #PlayerVision.cc libPlayerDevices_la_LDFLAGS = -release $(LT_RELEASE) $(PLAYER_LIBS) $(OVERFLOW_LIB) --- 14,19 ---- PlayerLaser.cc \ PlayerHeading.cc \ ! PlayerGripper.cc \ ! PlayerVision.cc libPlayerDevices_la_LDFLAGS = -release $(LT_RELEASE) $(PLAYER_LIBS) $(OVERFLOW_LIB) |
Update of /cvsroot/robotflow/RobotFlow/Vision/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10496/Vision/src Modified Files: BMPLoad.cc BMPSave.cc Binarize.cc Bt848.cc CPoint.cc CRect.cc CSymbol.cc CTextLine.cc Cell.cc ColorLookup.cc ColorTracker.cc Components.cc ComponentsData.cc ComponentsDraw.cc ComponentsViewer.cc ExtractSentence.cc ExtractSentence_v2.cc FakeImage.cc GaussianBlur.cc HoughTransform.cc Image.cc ImageAnd.cc ImageCorrellation.cc ImageOr.cc InverseHough.cc JPEGLoadMemory.cc JPEGSave.cc LoadImage.cc Magn2EdgeMap.cc Magnitude.cc MovementDetector.cc MultiColorTracker.cc NewSymbolIdentify.cc PPMImage.cc Posterize.cc PrintLines.cc RGB152GREY.cc RGB242RGB15.cc RGBMerge.cc RGBSplit.cc RectAnalyser.cc RectBoundaries.cc Scale.cc ScalePrint.cc SplitImage.cc StatIntensityAnalyser.cc SubImage.cc Surround.cc SymbolCounter.cc SymbolExtractor.cc SymbolLoad.cc SymbolSegmenter.cc SymbolTracker.cc lines.cc types.cc Log Message: Now using the RobotFlow namespace and the FD namespace Index: SplitImage.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/SplitImage.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SplitImage.cc 2 Jan 2005 14:44:00 -0000 1.2 --- SplitImage.cc 29 Mar 2005 15:20:48 -0000 1.3 *************** *** 25,28 **** --- 25,31 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class SplitImage; *************** *** 114,118 **** }; ! #endif --- 117,121 ---- }; ! }//namespace RobotFlow #endif Index: JPEGLoadMemory.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/JPEGLoadMemory.cc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** JPEGLoadMemory.cc 2 Jan 2005 14:44:00 -0000 1.4 --- JPEGLoadMemory.cc 29 Mar 2005 15:20:48 -0000 1.5 *************** *** 25,28 **** --- 25,31 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { //forward declaration *************** *** 108,112 **** }; ! #endif --- 111,115 ---- }; ! }//namespace RobotFlow #endif Index: SymbolExtractor.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/SymbolExtractor.cc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SymbolExtractor.cc 2 Jan 2005 14:44:00 -0000 1.4 --- SymbolExtractor.cc 29 Mar 2005 15:20:48 -0000 1.5 *************** *** 25,28 **** --- 25,31 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class SymbolExtractor; *************** *** 162,164 **** --- 165,169 ---- }; + + }//namespace RobotFlow #endif Index: ImageAnd.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/ImageAnd.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ImageAnd.cc 2 Jan 2005 14:44:00 -0000 1.2 --- ImageAnd.cc 29 Mar 2005 15:20:47 -0000 1.3 *************** *** 31,34 **** --- 31,37 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class ImageAnd; *************** *** 96,98 **** --- 99,104 ---- } }; + + }//namespace RobotFlow + #endif Index: StatIntensityAnalyser.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/StatIntensityAnalyser.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** StatIntensityAnalyser.cc 2 Jan 2005 14:44:00 -0000 1.3 --- StatIntensityAnalyser.cc 29 Mar 2005 15:20:48 -0000 1.4 *************** *** 27,31 **** --- 27,33 ---- using namespace std; + using namespace FD; + namespace RobotFlow { class StatIntensityAnalyser; *************** *** 163,166 **** --- 165,171 ---- }//calculate_behavior }; + + }//namespace RobotFlow + #endif Index: Surround.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/Surround.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Surround.cc 2 Jan 2005 14:44:00 -0000 1.3 --- Surround.cc 29 Mar 2005 15:20:48 -0000 1.4 *************** *** 23,26 **** --- 23,29 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class Surround; *************** *** 110,113 **** --- 113,119 ---- }//calculate_behavior }; + + }//namespace RobotFlow + #endif Index: MovementDetector.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/MovementDetector.cc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MovementDetector.cc 19 Jun 2003 19:53:14 -0000 1.1 --- MovementDetector.cc 29 Mar 2005 15:20:48 -0000 1.2 *************** *** 24,27 **** --- 24,30 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class MovementDetector; *************** *** 186,189 **** ! #endif --- 189,192 ---- ! }//namespace RobotFlow #endif Index: FakeImage.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/FakeImage.cc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** FakeImage.cc 2 Jan 2005 14:44:00 -0000 1.4 --- FakeImage.cc 29 Mar 2005 15:20:47 -0000 1.5 *************** *** 22,25 **** --- 22,28 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class FakeImage; *************** *** 107,109 **** --- 110,114 ---- }; + + }//namespace RobotFlow #endif Index: ColorLookup.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/ColorLookup.cc,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ColorLookup.cc 2 Jan 2005 14:44:00 -0000 1.7 --- ColorLookup.cc 29 Mar 2005 15:20:47 -0000 1.8 *************** *** 19,22 **** --- 19,25 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { DECLARE_TYPE(ColorLookup); *************** *** 94,95 **** --- 97,100 ---- } + + }//namespace RobotFlow Index: MultiColorTracker.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/MultiColorTracker.cc,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** MultiColorTracker.cc 2 Jan 2005 14:44:00 -0000 1.8 --- MultiColorTracker.cc 29 Mar 2005 15:20:48 -0000 1.9 *************** *** 25,28 **** --- 25,31 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class MultiColorTracker; *************** *** 199,203 **** }; ! #endif --- 202,206 ---- }; ! }//namespace RobotFlow #endif Index: RectBoundaries.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/RectBoundaries.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** RectBoundaries.cc 2 Jan 2005 14:44:00 -0000 1.3 --- RectBoundaries.cc 29 Mar 2005 15:20:48 -0000 1.4 *************** *** 27,30 **** --- 27,33 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class RectBoundaries; *************** *** 93,97 **** }; ! #endif --- 96,100 ---- }; ! }//namespace RobotFlow #endif Index: Binarize.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/Binarize.cc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Binarize.cc 2 Jan 2005 14:44:00 -0000 1.4 --- Binarize.cc 29 Mar 2005 15:20:47 -0000 1.5 *************** *** 24,27 **** --- 24,30 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class Binarize; *************** *** 176,179 **** --- 179,185 ---- }//calculate_behavior }; + + }//namespace RobotFlow + #endif Index: BMPLoad.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/BMPLoad.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BMPLoad.cc 2 Jan 2005 14:44:00 -0000 1.2 --- BMPLoad.cc 29 Mar 2005 15:20:47 -0000 1.3 *************** *** 29,32 **** --- 29,35 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class BMPLoad; *************** *** 174,176 **** --- 177,182 ---- } }; + + }//namespace RobotFlow + #endif Index: RectAnalyser.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/RectAnalyser.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** RectAnalyser.cc 2 Jan 2005 14:44:00 -0000 1.3 --- RectAnalyser.cc 29 Mar 2005 15:20:48 -0000 1.4 *************** *** 27,30 **** --- 27,33 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class RectAnalyser; *************** *** 116,120 **** }; ! #endif --- 119,123 ---- }; ! }//namespace RobotFlow #endif Index: RGB152GREY.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/RGB152GREY.cc,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** RGB152GREY.cc 2 Jan 2005 14:44:00 -0000 1.5 --- RGB152GREY.cc 29 Mar 2005 15:20:48 -0000 1.6 *************** *** 26,29 **** --- 26,32 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class RGB152GREY; *************** *** 110,114 **** }; ! #endif --- 113,117 ---- }; ! }//namespace RobotFlow #endif Index: Magnitude.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/Magnitude.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Magnitude.cc 2 Jan 2005 14:44:00 -0000 1.3 --- Magnitude.cc 29 Mar 2005 15:20:48 -0000 1.4 *************** *** 33,36 **** --- 33,39 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class Magnitude; *************** *** 107,111 **** }; ! #endif --- 110,114 ---- }; ! }//namespace RobotFlow #endif Index: SymbolSegmenter.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/SymbolSegmenter.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SymbolSegmenter.cc 27 Jul 2004 20:32:34 -0000 1.2 --- SymbolSegmenter.cc 29 Mar 2005 15:20:48 -0000 1.3 *************** *** 30,33 **** --- 30,36 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class SymbolSegmenter; *************** *** 302,304 **** --- 305,309 ---- }; + + }//namespace RobotFlow #endif Index: Scale.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/Scale.cc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Scale.cc 2 Jan 2005 14:44:00 -0000 1.4 --- Scale.cc 29 Mar 2005 15:20:48 -0000 1.5 *************** *** 27,30 **** --- 27,33 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class Scale; *************** *** 160,164 **** }; ! #endif --- 163,167 ---- }; ! }//namespace RobotFlow #endif Index: RGBMerge.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/RGBMerge.cc,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** RGBMerge.cc 2 Jan 2005 14:44:00 -0000 1.6 --- RGBMerge.cc 29 Mar 2005 15:20:48 -0000 1.7 *************** *** 26,29 **** --- 26,32 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class RGBMerge; *************** *** 137,141 **** }; ! #endif --- 140,144 ---- }; ! }//namespace RobotFlow #endif Index: Image.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/Image.cc,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** Image.cc 2 Jan 2005 14:44:00 -0000 1.16 --- Image.cc 29 Mar 2005 15:20:47 -0000 1.17 *************** *** 29,32 **** --- 29,35 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { DECLARE_TYPE(Image); *************** *** 621,622 **** --- 624,627 ---- } + + }//namespace RobotFlow Index: Components.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/Components.cc,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Components.cc 2 Jan 2005 14:44:00 -0000 1.10 --- Components.cc 29 Mar 2005 15:20:47 -0000 1.11 *************** *** 23,26 **** --- 23,29 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { /*Node *************** *** 500,501 **** --- 503,506 ---- } } + + }//namespace RobotFlow Index: Posterize.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/Posterize.cc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Posterize.cc 2 Jan 2005 14:44:00 -0000 1.4 --- Posterize.cc 29 Mar 2005 15:20:48 -0000 1.5 *************** *** 23,26 **** --- 23,29 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class Posterize; *************** *** 151,154 **** --- 154,160 ---- }//calculate_behavior }; + + }//namespace RobotFlow + #endif Index: RGB242RGB15.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/RGB242RGB15.cc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** RGB242RGB15.cc 2 Jan 2005 14:44:00 -0000 1.4 --- RGB242RGB15.cc 29 Mar 2005 15:20:48 -0000 1.5 *************** *** 26,29 **** --- 26,32 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class RGB242RGB15; *************** *** 102,106 **** }; ! #endif --- 105,109 ---- }; ! }//namespace RobotFlow #endif Index: ExtractSentence.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/ExtractSentence.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ExtractSentence.cc 2 Jan 2005 14:44:00 -0000 1.3 --- ExtractSentence.cc 29 Mar 2005 15:20:47 -0000 1.4 *************** *** 26,29 **** --- 26,32 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class ExtractSentence; *************** *** 198,202 **** } ! #endif --- 201,205 ---- } ! }//namespace RobotFlow #endif Index: HoughTransform.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/HoughTransform.cc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** HoughTransform.cc 13 Aug 2004 16:26:41 -0000 1.4 --- HoughTransform.cc 29 Mar 2005 15:20:47 -0000 1.5 *************** *** 40,46 **** #include "lines.h" - class HoughTransform; - using namespace std; DECLARE_NODE(HoughTransform) --- 40,49 ---- #include "lines.h" using namespace std; + using namespace FD; + + namespace RobotFlow { + + class HoughTransform; DECLARE_NODE(HoughTransform) *************** *** 174,176 **** --- 177,181 ---- }; + + }//namespace RobotFlow #endif Index: GaussianBlur.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/GaussianBlur.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** GaussianBlur.cc 2 Jan 2005 14:44:00 -0000 1.3 --- GaussianBlur.cc 29 Mar 2005 15:20:47 -0000 1.4 *************** *** 34,37 **** --- 34,40 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class GrayGaussianBlur; *************** *** 164,167 **** ! #endif --- 167,170 ---- ! }//namespace RobotFlow #endif Index: ColorTracker.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/ColorTracker.cc,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ColorTracker.cc 2 Jan 2005 14:44:00 -0000 1.8 --- ColorTracker.cc 29 Mar 2005 15:20:47 -0000 1.9 *************** *** 23,26 **** --- 23,29 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class ColorTracker; *************** *** 187,191 **** }; ! #endif --- 190,194 ---- }; ! }//namespace RobotFlow #endif Index: ImageCorrellation.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/ImageCorrellation.cc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ImageCorrellation.cc 2 Jan 2005 14:44:00 -0000 1.4 --- ImageCorrellation.cc 29 Mar 2005 15:20:48 -0000 1.5 *************** *** 22,25 **** --- 22,28 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class ImageCorrellation; *************** *** 245,247 **** --- 248,253 ---- }; + + }//namespace RobotFlow + #endif Index: ComponentsViewer.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/ComponentsViewer.cc,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ComponentsViewer.cc 2 Jan 2005 14:44:00 -0000 1.5 --- ComponentsViewer.cc 29 Mar 2005 15:20:47 -0000 1.6 *************** *** 24,27 **** --- 24,30 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class ComponentsViewer; *************** *** 189,196 **** } ! } - - }; #endif --- 192,199 ---- } ! } ! }; + }//namespace RobotFlow #endif Index: CSymbol.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/CSymbol.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CSymbol.cc 2 Jan 2005 14:44:00 -0000 1.3 --- CSymbol.cc 29 Mar 2005 15:20:47 -0000 1.4 *************** *** 20,23 **** --- 20,26 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { DECLARE_TYPE(CSymbol); *************** *** 163,164 **** --- 166,169 ---- out<<" >\n"; } + + }//namespace RobotFlow Index: CPoint.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/CPoint.cc,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** CPoint.cc 2 Jan 2005 14:44:00 -0000 1.7 --- CPoint.cc 29 Mar 2005 15:20:47 -0000 1.8 *************** *** 19,22 **** --- 19,26 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { + DECLARE_TYPE(CPoint); *************** *** 86,87 **** --- 90,92 ---- + }//namespace RobotFlow Index: SymbolLoad.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/SymbolLoad.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SymbolLoad.cc 2 Jan 2005 14:44:00 -0000 1.3 --- SymbolLoad.cc 29 Mar 2005 15:20:48 -0000 1.4 *************** *** 26,29 **** --- 26,32 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class SymbolLoad; *************** *** 106,110 **** }; ! #endif --- 109,113 ---- }; ! }//namespace RobotFlow #endif Index: Cell.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/Cell.cc,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Cell.cc 2 Jan 2005 14:44:00 -0000 1.6 --- Cell.cc 29 Mar 2005 15:20:47 -0000 1.7 *************** *** 19,22 **** --- 19,25 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { DECLARE_TYPE(ImageCell); *************** *** 148,149 **** --- 151,153 ---- } + }//namespace RobotFlow Index: InverseHough.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/InverseHough.cc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** InverseHough.cc 2 Jan 2005 14:44:00 -0000 1.4 --- InverseHough.cc 29 Mar 2005 15:20:48 -0000 1.5 *************** *** 36,39 **** --- 36,42 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class InverseHough; *************** *** 151,153 **** --- 154,158 ---- }; + + }//namespace RobotFlow #endif Index: PPMImage.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/PPMImage.cc,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** PPMImage.cc 2 Jan 2005 14:44:00 -0000 1.5 --- PPMImage.cc 29 Mar 2005 15:20:48 -0000 1.6 *************** *** 23,26 **** --- 23,29 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class PPMImage; *************** *** 152,162 **** __FILE__,__LINE__); } - - - } - }; #endif --- 155,163 ---- __FILE__,__LINE__); } } + }; + }//namespace RobotFlow #endif Index: PrintLines.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/PrintLines.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PrintLines.cc 2 Jan 2005 14:44:00 -0000 1.2 --- PrintLines.cc 29 Mar 2005 15:20:48 -0000 1.3 *************** *** 33,36 **** --- 33,39 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class PrintLines; *************** *** 167,169 **** --- 170,175 ---- } }; + + }//namespace RobotFlow + #endif Index: JPEGSave.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/JPEGSave.cc,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** JPEGSave.cc 2 Jan 2005 14:44:00 -0000 1.9 --- JPEGSave.cc 29 Mar 2005 15:20:48 -0000 1.10 *************** *** 30,33 **** --- 30,36 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { //forward declaration *************** *** 146,150 **** }; ! #endif --- 149,153 ---- }; ! }//namespace RobotFlow #endif Index: LoadImage.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/LoadImage.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** LoadImage.cc 2 Jan 2005 14:44:00 -0000 1.2 --- LoadImage.cc 29 Mar 2005 15:20:48 -0000 1.3 *************** *** 26,29 **** --- 26,32 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class LoadImage; *************** *** 138,140 **** --- 141,146 ---- } }; + + }//namespace RobotFlow + #endif Index: BMPSave.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/BMPSave.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** BMPSave.cc 2 Jan 2005 14:44:00 -0000 1.3 --- BMPSave.cc 29 Mar 2005 15:20:47 -0000 1.4 *************** *** 30,33 **** --- 30,36 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class BMPSave; *************** *** 242,244 **** --- 245,249 ---- }; + + }//namespace RobotFlow #endif Index: CRect.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/CRect.cc,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** CRect.cc 2 Jan 2005 14:44:00 -0000 1.8 --- CRect.cc 29 Mar 2005 15:20:47 -0000 1.9 *************** *** 19,22 **** --- 19,25 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { DECLARE_TYPE(CRect); *************** *** 521,522 **** --- 524,527 ---- ((m_center_y - y) * (m_center_y - y))); } + + }//namespace RobotFlow Index: SubImage.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/SubImage.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SubImage.cc 2 Jan 2005 14:44:00 -0000 1.3 --- SubImage.cc 29 Mar 2005 15:20:48 -0000 1.4 *************** *** 22,25 **** --- 22,28 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class SubImage; *************** *** 117,119 **** --- 120,125 ---- }; + + }//namespace RobotFlow + #endif Index: SymbolTracker.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/SymbolTracker.cc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SymbolTracker.cc 2 Jan 2005 14:44:00 -0000 1.4 --- SymbolTracker.cc 29 Mar 2005 15:20:48 -0000 1.5 *************** *** 23,26 **** --- 23,29 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class SymbolTracker; *************** *** 201,205 **** }; ! #endif --- 204,208 ---- }; ! } //namespace RobotFlow #endif Index: NewSymbolIdentify.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/NewSymbolIdentify.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** NewSymbolIdentify.cc 2 Jan 2005 14:44:00 -0000 1.3 --- NewSymbolIdentify.cc 29 Mar 2005 15:20:48 -0000 1.4 *************** *** 23,30 **** using namespace std; class NewSymbolIdentify; ! using namespace std; DECLARE_NODE(NewSymbolIdentify) --- 23,33 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class NewSymbolIdentify; ! DECLARE_NODE(NewSymbolIdentify) *************** *** 112,115 **** const int NewSymbolIdentify::SYMBOL_NONE = -1; ! #endif --- 115,118 ---- const int NewSymbolIdentify::SYMBOL_NONE = -1; ! }//namespace RobotFlow #endif Index: ComponentsDraw.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/ComponentsDraw.cc,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ComponentsDraw.cc 2 Jan 2005 14:44:00 -0000 1.5 --- ComponentsDraw.cc 29 Mar 2005 15:20:47 -0000 1.6 *************** *** 24,27 **** --- 24,30 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class ComponentsDraw; *************** *** 160,162 **** --- 163,168 ---- } }; + + }//namespace RobotFlow + #endif Index: ExtractSentence_v2.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/ExtractSentence_v2.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ExtractSentence_v2.cc 2 Jan 2005 14:44:00 -0000 1.2 --- ExtractSentence_v2.cc 29 Mar 2005 15:20:47 -0000 1.3 *************** *** 9,12 **** --- 9,15 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class ExtractSentence_v2; *************** *** 324,327 **** */ ! #endif --- 327,330 ---- */ ! }//namespace RobotFlow #endif Index: RGBSplit.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/RGBSplit.cc,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** RGBSplit.cc 2 Jan 2005 14:44:00 -0000 1.5 --- RGBSplit.cc 29 Mar 2005 15:20:48 -0000 1.6 *************** *** 26,29 **** --- 26,32 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class RGBSplit; *************** *** 136,139 **** ! #endif --- 139,142 ---- ! }//namespace RobotFlow #endif Index: CTextLine.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/CTextLine.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CTextLine.cc 2 Jan 2005 14:44:00 -0000 1.3 --- CTextLine.cc 29 Mar 2005 15:20:47 -0000 1.4 *************** *** 21,24 **** --- 21,27 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { DECLARE_TYPE(CTextLine); *************** *** 262,263 **** --- 265,267 ---- } + }//namespace RobotFlow Index: ComponentsData.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/ComponentsData.cc,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ComponentsData.cc 2 Jan 2005 14:44:00 -0000 1.8 --- ComponentsData.cc 29 Mar 2005 15:20:47 -0000 1.9 *************** *** 19,22 **** --- 19,25 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { DECLARE_TYPE(ComponentsData); *************** *** 182,183 **** --- 185,188 ---- return m_components[pos]; } + + }//namespace RobotFlow Index: SymbolCounter.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/SymbolCounter.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SymbolCounter.cc 2 Jan 2005 14:44:00 -0000 1.3 --- SymbolCounter.cc 29 Mar 2005 15:20:48 -0000 1.4 *************** *** 25,28 **** --- 25,31 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class SymbolCounter; *************** *** 116,118 **** --- 119,123 ---- }; + + }//namespace RobotFlow #endif Index: types.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/types.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** types.cc 2 Jan 2005 14:44:00 -0000 1.2 --- types.cc 29 Mar 2005 15:20:48 -0000 1.3 *************** *** 19,25 **** #define _TYPES_CC_ using namespace std; ! #include "types.h" // rgb24 (RGB 24 bits standard) -> rgb15 (RGB 15 bits Overflow) --- 19,27 ---- #define _TYPES_CC_ + #include "types.h" + using namespace std; ! namespace RobotFlow { // rgb24 (RGB 24 bits standard) -> rgb15 (RGB 15 bits Overflow) *************** *** 45,47 **** --- 47,51 ---- } + }//namespace RobotFlow + #endif Index: ImageOr.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/ImageOr.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ImageOr.cc 2 Jan 2005 14:44:00 -0000 1.2 --- ImageOr.cc 29 Mar 2005 15:20:48 -0000 1.3 *************** *** 32,35 **** --- 32,38 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class ImageOr; *************** *** 97,100 **** } }; ! #endif --- 100,103 ---- } }; ! }//namespace RobotFLow #endif Index: ScalePrint.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/ScalePrint.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ScalePrint.cc 2 Jan 2005 14:44:00 -0000 1.3 --- ScalePrint.cc 29 Mar 2005 15:20:48 -0000 1.4 *************** *** 26,29 **** --- 26,32 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class ScalePrint; *************** *** 108,112 **** }; ! #endif --- 111,115 ---- }; ! }//namespace RobotFlow #endif Index: Bt848.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/Bt848.cc,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Bt848.cc 2 Jan 2005 14:44:00 -0000 1.6 --- Bt848.cc 29 Mar 2005 15:20:47 -0000 1.7 *************** *** 35,38 **** --- 35,41 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { DECLARE_NODE(Bt848) *************** *** 405,408 **** } ! #endif --- 408,411 ---- } ! }//namespace RobotFlow #endif Index: lines.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/lines.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** lines.cc 2 Jan 2005 14:44:00 -0000 1.2 --- lines.cc 29 Mar 2005 15:20:48 -0000 1.3 *************** *** 31,34 **** --- 31,37 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { // Constructeur *************** *** 130,132 **** --- 133,137 ---- return NULL; } + + }//namespace RobotFlow #endif Index: Magn2EdgeMap.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/Magn2EdgeMap.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Magn2EdgeMap.cc 2 Jan 2005 14:44:00 -0000 1.2 --- Magn2EdgeMap.cc 29 Mar 2005 15:20:48 -0000 1.3 *************** *** 33,36 **** --- 33,39 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class Magn2EdgeMap; *************** *** 111,115 **** }; ! #endif --- 114,118 ---- }; ! }//namespace RobotFlow #endif |
From: Dominic L. <ma...@us...> - 2005-03-29 15:21:38
|
Update of /cvsroot/robotflow/RobotFlow/FSM/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10496/FSM/include Modified Files: FSMSyntax.h Log Message: Now using the RobotFlow namespace and the FD namespace Index: FSMSyntax.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/FSM/include/FSMSyntax.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FSMSyntax.h 28 Jul 2003 01:58:37 -0000 1.1 --- FSMSyntax.h 29 Mar 2005 15:20:39 -0000 1.2 *************** *** 20,23 **** --- 20,25 ---- #define _FSMSyntax_H_ + namespace RobotFlow { + static const char k_FSMRoot[] = "FSM"; static const char k_FSMRoot_name[] = "name"; *************** *** 62,65 **** static const char k_FSMCondition_type[] = "type"; ! #endif --- 64,67 ---- static const char k_FSMCondition_type[] = "type"; ! }//namespace RobotFlow #endif |
From: Dominic L. <ma...@us...> - 2005-03-29 15:21:37
|
Update of /cvsroot/robotflow/RobotFlow/Pioneer2/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10496/Pioneer2/src Modified Files: PSOSPacket.cc Pioneer2Connect.cc Pioneer2Gripper.cc Pioneer2GripperState.cc Pioneer2PacketManager.cc Pioneer2RotationIn.cc Pioneer2SIP.cc Pioneer2SIPExtract.cc Pioneer2Sonars.cc Pioneer2VelocityIn.cc Pioneer2VelocityOut.cc Pioneer2Voltage.cc Pioneer2xyPos.cc Log Message: Now using the RobotFlow namespace and the FD namespace Index: Pioneer2Voltage.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Pioneer2/src/Pioneer2Voltage.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Pioneer2Voltage.cc 2 Jan 2005 14:43:58 -0000 1.3 --- Pioneer2Voltage.cc 29 Mar 2005 15:20:44 -0000 1.4 *************** *** 24,27 **** --- 24,30 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class Pioneer2Voltage; *************** *** 171,174 **** --- 174,178 ---- }; + }//namespace RobotFlow #endif Index: Pioneer2Connect.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Pioneer2/src/Pioneer2Connect.cc,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Pioneer2Connect.cc 2 Jan 2005 14:43:58 -0000 1.9 --- Pioneer2Connect.cc 29 Mar 2005 15:20:44 -0000 1.10 *************** *** 33,36 **** --- 33,39 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { DECLARE_NODE(Pioneer2Connect) *************** *** 143,144 **** --- 146,149 ---- } + + }//namespace RobotFlow Index: Pioneer2GripperState.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Pioneer2/src/Pioneer2GripperState.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Pioneer2GripperState.cc 1 May 2002 19:22:40 -0000 1.2 --- Pioneer2GripperState.cc 29 Mar 2005 15:20:44 -0000 1.3 *************** *** 17,29 **** #include "BufferedNode.h" - #include "Pioneer2GripperState.h" - DECLARE_TYPE(TP2GripperState); - using namespace std; ! class Pioneer2GripperState; DECLARE_NODE(Pioneer2GripperState) --- 17,30 ---- #include "BufferedNode.h" #include "Pioneer2GripperState.h" using namespace std; + using namespace FD; ! namespace RobotFlow { + class Pioneer2GripperState; + + DECLARE_TYPE(TP2GripperState); DECLARE_NODE(Pioneer2GripperState) *************** *** 200,201 **** --- 201,204 ---- const unsigned char Pioneer2GripperState::LIFT_MOVING = 64; const unsigned char Pioneer2GripperState::GRIPPER_MOVING = 128; + + }//namespace RobotFlow Index: Pioneer2SIP.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Pioneer2/src/Pioneer2SIP.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Pioneer2SIP.cc 18 Apr 2002 20:18:50 -0000 1.2 --- Pioneer2SIP.cc 29 Mar 2005 15:20:44 -0000 1.3 *************** *** 23,26 **** --- 23,29 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class Pioneer2SIP; *************** *** 103,106 **** --- 106,110 ---- }; + }//namespace RobotFlow #endif Index: Pioneer2Gripper.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Pioneer2/src/Pioneer2Gripper.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Pioneer2Gripper.cc 18 Apr 2002 20:18:50 -0000 1.2 --- Pioneer2Gripper.cc 29 Mar 2005 15:20:44 -0000 1.3 *************** *** 23,26 **** --- 23,29 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class Pioneer2Gripper; *************** *** 106,109 **** }; ! #endif --- 109,112 ---- }; ! }//namespace RobotFlow #endif Index: PSOSPacket.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Pioneer2/src/PSOSPacket.cc,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** PSOSPacket.cc 2 Jan 2005 14:43:58 -0000 1.6 --- PSOSPacket.cc 29 Mar 2005 15:20:44 -0000 1.7 *************** *** 26,29 **** --- 26,32 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { PSOSPacket::PSOSPacket() *************** *** 225,226 **** --- 228,231 ---- return m_packet[pos]; } + + }//namespace RobotFlow Index: Pioneer2PacketManager.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Pioneer2/src/Pioneer2PacketManager.cc,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Pioneer2PacketManager.cc 2 Jan 2005 14:43:58 -0000 1.18 --- Pioneer2PacketManager.cc 29 Mar 2005 15:20:44 -0000 1.19 *************** *** 33,36 **** --- 33,39 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { Pioneer2PacketManager* Pioneer2PacketManager::m_instance = NULL; *************** *** 1261,1262 **** --- 1264,1267 ---- } } + + }//namespace RobotFlow Index: Pioneer2VelocityOut.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Pioneer2/src/Pioneer2VelocityOut.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Pioneer2VelocityOut.cc 2 Jan 2005 14:43:58 -0000 1.3 --- Pioneer2VelocityOut.cc 29 Mar 2005 15:20:44 -0000 1.4 *************** *** 24,27 **** --- 24,30 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class Pioneer2VelocityOut; *************** *** 107,111 **** }; ! #endif --- 110,114 ---- }; ! }//namespace RobotFlow #endif Index: Pioneer2RotationIn.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Pioneer2/src/Pioneer2RotationIn.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Pioneer2RotationIn.cc 2 Jan 2005 14:43:58 -0000 1.3 --- Pioneer2RotationIn.cc 29 Mar 2005 15:20:44 -0000 1.4 *************** *** 23,26 **** --- 23,29 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class Pioneer2RotationIn; *************** *** 147,149 **** --- 150,155 ---- }; + + }//namespace RobotFlow + #endif Index: Pioneer2xyPos.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Pioneer2/src/Pioneer2xyPos.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Pioneer2xyPos.cc 2 Jan 2005 14:43:58 -0000 1.3 --- Pioneer2xyPos.cc 29 Mar 2005 15:20:44 -0000 1.4 *************** *** 23,26 **** --- 23,29 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class Pioneer2xyPos; *************** *** 159,161 **** --- 162,166 ---- }; + + }//namespace RobotFlow #endif Index: Pioneer2SIPExtract.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Pioneer2/src/Pioneer2SIPExtract.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Pioneer2SIPExtract.cc 22 Apr 2003 20:56:14 -0000 1.3 --- Pioneer2SIPExtract.cc 29 Mar 2005 15:20:44 -0000 1.4 *************** *** 24,27 **** --- 24,30 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class Pioneer2SIPExtract; *************** *** 254,257 **** --- 257,262 ---- }; + }//namespace RobotFlow + #endif Index: Pioneer2VelocityIn.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Pioneer2/src/Pioneer2VelocityIn.cc,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Pioneer2VelocityIn.cc 2 Jan 2005 14:43:58 -0000 1.5 --- Pioneer2VelocityIn.cc 29 Mar 2005 15:20:44 -0000 1.6 *************** *** 22,25 **** --- 22,28 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class Pioneer2VelocityIn; *************** *** 110,114 **** ! #endif --- 113,117 ---- ! }//namespace RobotFlow #endif Index: Pioneer2Sonars.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Pioneer2/src/Pioneer2Sonars.cc,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Pioneer2Sonars.cc 2 Jan 2005 14:43:58 -0000 1.7 --- Pioneer2Sonars.cc 29 Mar 2005 15:20:44 -0000 1.8 *************** *** 23,26 **** --- 23,29 ---- using namespace std; + using namespace FD; + + namespace RobotFlow { class Pioneer2Sonars; *************** *** 147,149 **** --- 150,154 ---- }; + + }//namespace RobotFlow #endif |
Update of /cvsroot/robotflow/RobotFlow/MARIE/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10496/MARIE/include Modified Files: MarieCommandBehavior.h MarieCommandCamera.h MarieCommandJoystick.h MarieCommandMotor.h MarieDataBumper.h MarieDataCamera.h MarieDataIR.h MarieDataLaser.h MarieDataMap.h MarieDataNull.h MarieDataOdometry.h MarieDataRaw.h MarieDataSonar.h MarieLoad.h MarieObject.h MariePeek.h MariePull.h MariePush.h MarieRequestSystem.h MarieSave.h Log Message: Now using the RobotFlow namespace and the FD namespace Index: MarieDataBumper.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/include/MarieDataBumper.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MarieDataBumper.h 2 Jan 2005 14:43:57 -0000 1.2 --- MarieDataBumper.h 29 Mar 2005 15:20:41 -0000 1.3 *************** *** 41,46 **** //from BufferedNode ! MarieDataBumper(std::string nodeName, ParameterSet params); ! virtual void calculate(int output_id, int count, Buffer &out); virtual void printOn(std::ostream &out) const; virtual void readFrom(std::istream &in=std::cin); --- 41,46 ---- //from BufferedNode ! MarieDataBumper(std::string nodeName, FD::ParameterSet params); ! virtual void calculate(int output_id, int count, FD::Buffer &out); virtual void printOn(std::ostream &out) const; virtual void readFrom(std::istream &in=std::cin); Index: MarieCommandMotor.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/include/MarieCommandMotor.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MarieCommandMotor.h 2 Jan 2005 14:43:57 -0000 1.2 --- MarieCommandMotor.h 29 Mar 2005 15:20:41 -0000 1.3 *************** *** 42,47 **** //from BufferedNode ! MarieCommandMotor(std::string nodeName, ParameterSet params); ! virtual void calculate(int output_id, int count, Buffer &out); virtual void printOn(std::ostream &out) const; virtual void readFrom(std::istream &in=std::cin); --- 42,47 ---- //from BufferedNode ! MarieCommandMotor(std::string nodeName, FD::ParameterSet params); ! virtual void calculate(int output_id, int count, FD::Buffer &out); virtual void printOn(std::ostream &out) const; virtual void readFrom(std::istream &in=std::cin); Index: MariePeek.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/include/MariePeek.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MariePeek.h 2 Jan 2005 14:43:57 -0000 1.2 --- MariePeek.h 29 Mar 2005 15:20:41 -0000 1.3 *************** *** 28,32 **** namespace marie { ! class MariePeek : public BufferedNode { private: --- 28,32 ---- namespace marie { ! class MariePeek : public FD::BufferedNode { private: *************** *** 39,44 **** public: ! MariePeek(std::string nodeName, ParameterSet params); ! void calculate(int output_id, int count, Buffer &out); }; } --- 39,44 ---- public: ! MariePeek(std::string nodeName, FD::ParameterSet params); ! void calculate(int output_id, int count, FD::Buffer &out); }; } Index: MarieCommandJoystick.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/include/MarieCommandJoystick.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MarieCommandJoystick.h 2 Jan 2005 14:43:57 -0000 1.2 --- MarieCommandJoystick.h 29 Mar 2005 15:20:41 -0000 1.3 *************** *** 41,46 **** //from BufferedNode ! MarieCommandJoystick(std::string nodeName, ParameterSet params); ! virtual void calculate(int output_id, int count, Buffer &out); virtual void printOn(std::ostream &out) const; virtual void readFrom(std::istream &in=std::cin); --- 41,46 ---- //from BufferedNode ! MarieCommandJoystick(std::string nodeName, FD::ParameterSet params); ! virtual void calculate(int output_id, int count, FD::Buffer &out); virtual void printOn(std::ostream &out) const; virtual void readFrom(std::istream &in=std::cin); Index: MarieLoad.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/include/MarieLoad.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MarieLoad.h 2 Jan 2005 14:43:57 -0000 1.2 --- MarieLoad.h 29 Mar 2005 15:20:41 -0000 1.3 *************** *** 28,32 **** namespace marie { ! class MarieLoad : public BufferedNode { private: --- 28,32 ---- namespace marie { ! class MarieLoad : public FD::BufferedNode { private: *************** *** 39,44 **** public: ! MarieLoad(std::string nodeName, ParameterSet params); ! void calculate(int output_id, int count, Buffer &out); }; } --- 39,44 ---- public: ! MarieLoad(std::string nodeName, FD::ParameterSet params); ! void calculate(int output_id, int count, FD::Buffer &out); }; } Index: MarieObject.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/include/MarieObject.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MarieObject.h 2 Jan 2005 14:43:57 -0000 1.2 --- MarieObject.h 29 Mar 2005 15:20:41 -0000 1.3 *************** *** 49,57 **** namespace marie { ! class MarieObject : public BufferedNode { public: ! MarieObject(std::string nodeName, ParameterSet params) : BufferedNode(nodeName,params) {} virtual void copyDataAbstract(DataAbstract *data) = 0; --- 49,57 ---- namespace marie { ! class MarieObject : public FD::BufferedNode { public: ! MarieObject(std::string nodeName, FD::ParameterSet params) : FD::BufferedNode(nodeName,params) {} virtual void copyDataAbstract(DataAbstract *data) = 0; Index: MarieDataSonar.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/include/MarieDataSonar.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MarieDataSonar.h 2 Jan 2005 14:43:57 -0000 1.2 --- MarieDataSonar.h 29 Mar 2005 15:20:41 -0000 1.3 *************** *** 40,45 **** //from BufferedNode ! MarieDataSonar(std::string nodeName, ParameterSet params); ! virtual void calculate(int output_id, int count, Buffer &out); virtual void printOn(std::ostream &out) const; virtual void readFrom(std::istream &in=std::cin); --- 40,45 ---- //from BufferedNode ! MarieDataSonar(std::string nodeName, FD::ParameterSet params); ! virtual void calculate(int output_id, int count, FD::Buffer &out); virtual void printOn(std::ostream &out) const; virtual void readFrom(std::istream &in=std::cin); Index: MarieCommandCamera.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/include/MarieCommandCamera.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MarieCommandCamera.h 2 Jan 2005 14:43:57 -0000 1.3 --- MarieCommandCamera.h 29 Mar 2005 15:20:41 -0000 1.4 *************** *** 41,46 **** //from BufferedNode ! MarieCommandCamera(std::string nodeName, ParameterSet params); ! virtual void calculate(int output_id, int count, Buffer &out); virtual void printOn(std::ostream &out) const; virtual void readFrom(std::istream &in=std::cin); --- 41,46 ---- //from BufferedNode ! MarieCommandCamera(std::string nodeName, FD::ParameterSet params); ! virtual void calculate(int output_id, int count, FD::Buffer &out); virtual void printOn(std::ostream &out) const; virtual void readFrom(std::istream &in=std::cin); Index: MarieDataIR.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/include/MarieDataIR.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MarieDataIR.h 2 Jan 2005 14:43:57 -0000 1.2 --- MarieDataIR.h 29 Mar 2005 15:20:41 -0000 1.3 *************** *** 41,46 **** //from BufferedNode ! MarieDataIR(std::string nodeName, ParameterSet params); ! virtual void calculate(int output_id, int count, Buffer &out); virtual void printOn(std::ostream &out) const; virtual void readFrom(std::istream &in=std::cin); --- 41,46 ---- //from BufferedNode ! MarieDataIR(std::string nodeName, FD::ParameterSet params); ! virtual void calculate(int output_id, int count, FD::Buffer &out); virtual void printOn(std::ostream &out) const; virtual void readFrom(std::istream &in=std::cin); Index: MarieDataCamera.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/include/MarieDataCamera.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MarieDataCamera.h 2 Jan 2005 14:43:57 -0000 1.2 --- MarieDataCamera.h 29 Mar 2005 15:20:41 -0000 1.3 *************** *** 41,46 **** //from BufferedNode ! MarieDataCamera(std::string nodeName, ParameterSet params); ! virtual void calculate(int output_id, int count, Buffer &out); virtual void printOn(std::ostream &out) const; virtual void readFrom(std::istream &in=std::cin); --- 41,46 ---- //from BufferedNode ! MarieDataCamera(std::string nodeName, FD::ParameterSet params); ! virtual void calculate(int output_id, int count, FD::Buffer &out); virtual void printOn(std::ostream &out) const; virtual void readFrom(std::istream &in=std::cin); Index: MarieDataLaser.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/include/MarieDataLaser.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MarieDataLaser.h 2 Jan 2005 14:43:57 -0000 1.2 --- MarieDataLaser.h 29 Mar 2005 15:20:41 -0000 1.3 *************** *** 41,46 **** //from BufferedNode ! MarieDataLaser(std::string nodeName, ParameterSet params); ! virtual void calculate(int output_id, int count, Buffer &out); virtual void printOn(std::ostream &out) const; virtual void readFrom(std::istream &in=std::cin); --- 41,46 ---- //from BufferedNode ! MarieDataLaser(std::string nodeName, FD::ParameterSet params); ! virtual void calculate(int output_id, int count, FD::Buffer &out); virtual void printOn(std::ostream &out) const; virtual void readFrom(std::istream &in=std::cin); Index: MarieDataOdometry.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/include/MarieDataOdometry.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MarieDataOdometry.h 2 Jan 2005 14:43:57 -0000 1.2 --- MarieDataOdometry.h 29 Mar 2005 15:20:41 -0000 1.3 *************** *** 40,45 **** //from BufferedNode ! MarieDataOdometry(std::string nodeName, ParameterSet params); ! virtual void calculate(int output_id, int count, Buffer &out); virtual void printOn(std::ostream &out) const; virtual void readFrom(std::istream &in=std::cin); --- 40,45 ---- //from BufferedNode ! MarieDataOdometry(std::string nodeName, FD::ParameterSet params); ! virtual void calculate(int output_id, int count, FD::Buffer &out); virtual void printOn(std::ostream &out) const; virtual void readFrom(std::istream &in=std::cin); Index: MarieDataRaw.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/include/MarieDataRaw.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MarieDataRaw.h 2 Jan 2005 14:43:57 -0000 1.2 --- MarieDataRaw.h 29 Mar 2005 15:20:41 -0000 1.3 *************** *** 41,46 **** //from BufferedNode ! MarieDataRaw(std::string nodeName, ParameterSet params); ! virtual void calculate(int output_id, int count, Buffer &out); virtual void printOn(std::ostream &out) const; virtual void readFrom(std::istream &in=std::cin); --- 41,46 ---- //from BufferedNode ! MarieDataRaw(std::string nodeName, FD::ParameterSet params); ! virtual void calculate(int output_id, int count, FD::Buffer &out); virtual void printOn(std::ostream &out) const; virtual void readFrom(std::istream &in=std::cin); Index: MarieRequestSystem.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/include/MarieRequestSystem.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MarieRequestSystem.h 2 Jan 2005 14:43:57 -0000 1.2 --- MarieRequestSystem.h 29 Mar 2005 15:20:41 -0000 1.3 *************** *** 41,46 **** //from BufferedNode ! MarieRequestSystem(std::string nodeName, ParameterSet params); ! virtual void calculate(int output_id, int count, Buffer &out); virtual void printOn(std::ostream &out) const; virtual void readFrom(std::istream &in=std::cin); --- 41,46 ---- //from BufferedNode ! MarieRequestSystem(std::string nodeName, FD::ParameterSet params); ! virtual void calculate(int output_id, int count, FD::Buffer &out); virtual void printOn(std::ostream &out) const; virtual void readFrom(std::istream &in=std::cin); Index: MariePull.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/include/MariePull.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MariePull.h 2 Jan 2005 14:43:57 -0000 1.2 --- MariePull.h 29 Mar 2005 15:20:41 -0000 1.3 *************** *** 28,32 **** namespace marie { ! class MariePull : public BufferedNode { private: --- 28,32 ---- namespace marie { ! class MariePull : public FD::BufferedNode { private: *************** *** 39,44 **** public: ! MariePull(std::string nodeName, ParameterSet params); ! void calculate(int output_id, int count, Buffer &out); }; } --- 39,44 ---- public: ! MariePull(std::string nodeName, FD::ParameterSet params); ! void calculate(int output_id, int count, FD::Buffer &out); }; } Index: MarieSave.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/include/MarieSave.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MarieSave.h 2 Jan 2005 14:43:57 -0000 1.2 --- MarieSave.h 29 Mar 2005 15:20:41 -0000 1.3 *************** *** 27,31 **** namespace marie { ! class MarieSave : public BufferedNode { int m_inputID; --- 27,31 ---- namespace marie { ! class MarieSave : public FD::BufferedNode { int m_inputID; *************** *** 35,41 **** public: ! MarieSave(std::string nodeName, ParameterSet params); ! void calculate(int output_id, int count, Buffer &out); }; --- 35,41 ---- public: ! MarieSave(std::string nodeName, FD::ParameterSet params); ! void calculate(int output_id, int count, FD::Buffer &out); }; Index: MarieDataNull.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/include/MarieDataNull.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MarieDataNull.h 2 Jan 2005 14:43:57 -0000 1.2 --- MarieDataNull.h 29 Mar 2005 15:20:41 -0000 1.3 *************** *** 41,46 **** //from BufferedNode ! MarieDataNull(std::string nodeName, ParameterSet params); ! virtual void calculate(int output_id, int count, Buffer &out); virtual void printOn(std::ostream &out) const; virtual void readFrom(std::istream &in=std::cin); --- 41,46 ---- //from BufferedNode ! MarieDataNull(std::string nodeName, FD::ParameterSet params); ! virtual void calculate(int output_id, int count, FD::Buffer &out); virtual void printOn(std::ostream &out) const; virtual void readFrom(std::istream &in=std::cin); *************** *** 58,62 **** //same dataNull object ! ObjectRef m_dataNullObject; }; --- 58,62 ---- //same dataNull object ! FD::ObjectRef m_dataNullObject; }; Index: MarieCommandBehavior.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/include/MarieCommandBehavior.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MarieCommandBehavior.h 10 Mar 2005 20:59:00 -0000 1.3 --- MarieCommandBehavior.h 29 Mar 2005 15:20:41 -0000 1.4 *************** *** 40,45 **** //from BufferedNode ! MarieCommandBehavior(std::string nodeName, ParameterSet params); ! virtual void calculate(int output_id, int count, Buffer &out); virtual void printOn(std::ostream &out) const; virtual void readFrom(std::istream &in=std::cin); --- 40,45 ---- //from BufferedNode ! MarieCommandBehavior(std::string nodeName, FD::ParameterSet params); ! virtual void calculate(int output_id, int count, FD::Buffer &out); virtual void printOn(std::ostream &out) const; virtual void readFrom(std::istream &in=std::cin); Index: MarieDataMap.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/include/MarieDataMap.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MarieDataMap.h 10 Mar 2005 20:59:00 -0000 1.3 --- MarieDataMap.h 29 Mar 2005 15:20:41 -0000 1.4 *************** *** 40,45 **** //from BufferedNode ! MarieDataMap(std::string nodeName, ParameterSet params); ! virtual void calculate(int output_id, int count, Buffer &out); virtual void printOn(std::ostream &out) const; virtual void readFrom(std::istream &in=std::cin); --- 40,45 ---- //from BufferedNode ! MarieDataMap(std::string nodeName, FD::ParameterSet params); ! virtual void calculate(int output_id, int count, FD::Buffer &out); virtual void printOn(std::ostream &out) const; virtual void readFrom(std::istream &in=std::cin); Index: MariePush.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/include/MariePush.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MariePush.h 2 Jan 2005 14:43:57 -0000 1.2 --- MariePush.h 29 Mar 2005 15:20:41 -0000 1.3 *************** *** 27,31 **** namespace marie { ! class MariePush : public BufferedNode { int m_inputID; --- 27,31 ---- namespace marie { ! class MariePush : public FD::BufferedNode { int m_inputID; *************** *** 35,41 **** public: ! MariePush(std::string nodeName, ParameterSet params); ! void calculate(int output_id, int count, Buffer &out); }; --- 35,41 ---- public: ! MariePush(std::string nodeName, FD::ParameterSet params); ! void calculate(int output_id, int count, FD::Buffer &out); }; |
From: Dominic L. <ma...@us...> - 2005-03-29 15:21:36
|
Update of /cvsroot/robotflow/RobotFlow/Devices/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10496/Devices/include Modified Files: LaserDevice.h SICKLMS200.h SNCRZ30.h SerialDriver.h Log Message: Now using the RobotFlow namespace and the FD namespace Index: SNCRZ30.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Devices/include/SNCRZ30.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** SNCRZ30.h 2 Jan 2005 14:43:55 -0000 1.10 --- SNCRZ30.h 29 Mar 2005 15:20:38 -0000 1.11 *************** *** 27,36 **** //(C) Dominic Letourneau 2004 ! class SNCRZ30 : public BufferedNode{ public: ! SNCRZ30(std::string nodeName, ParameterSet params); ~SNCRZ30(); --- 27,37 ---- //(C) Dominic Letourneau 2004 + namespace RobotFlow { ! class SNCRZ30 : public FD::BufferedNode{ public: ! SNCRZ30(std::string nodeName, FD::ParameterSet params); ~SNCRZ30(); *************** *** 38,42 **** SNCRZ30(const std::string &host, int port = 80); ! virtual void calculate(int output_id, int count, Buffer &out); int connect(const std::string &host); --- 39,43 ---- SNCRZ30(const std::string &host, int port = 80); ! virtual void calculate(int output_id, int count, FD::Buffer &out); int connect(const std::string &host); *************** *** 106,109 **** --- 107,111 ---- }; + }//namespace RobotFlow #endif Index: LaserDevice.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Devices/include/LaserDevice.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** LaserDevice.h 2 Jan 2005 14:43:55 -0000 1.2 --- LaserDevice.h 29 Mar 2005 15:20:37 -0000 1.3 *************** *** 5,8 **** --- 5,9 ---- #define LASERDEVICE_H + namespace RobotFlow { enum eMeasurementMode { *************** *** 90,93 **** }; ! #endif --- 91,94 ---- }; ! }//namespace RobotFlow #endif Index: SerialDriver.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Devices/include/SerialDriver.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SerialDriver.h 24 Apr 2002 00:23:52 -0000 1.1 --- SerialDriver.h 29 Mar 2005 15:20:38 -0000 1.2 *************** *** 3,8 **** /*************************************/ ! #define BAUDRATE B9600 int Port_initialisation(const char *serial_port); void End_session(int fd); --- 3,12 ---- /*************************************/ ! #define BAUDRATE B38400 ! ! namespace RobotFlow { int Port_initialisation(const char *serial_port); void End_session(int fd); + + }//namespace RobotFlow Index: SICKLMS200.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Devices/include/SICKLMS200.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SICKLMS200.h 2 Jan 2005 14:43:55 -0000 1.2 --- SICKLMS200.h 29 Mar 2005 15:20:38 -0000 1.3 *************** *** 6,18 **** #include "BufferedNode.h" class LaserDevice; ! class SICKLMS200 : public BufferedNode { public: ! SICKLMS200(std::string nodeName, ParameterSet params); ~SICKLMS200(); ! virtual void calculate(int output_id, int count, Buffer &out); private: --- 6,20 ---- #include "BufferedNode.h" + namespace RobotFlow { + class LaserDevice; ! class SICKLMS200 : public FD::BufferedNode { public: ! SICKLMS200(std::string nodeName, FD::ParameterSet params); ~SICKLMS200(); ! virtual void calculate(int output_id, int count, FD::Buffer &out); private: *************** *** 35,38 **** }; ! #endif --- 37,40 ---- }; ! }//namespace RobotFlow #endif |