From: Dominic L. <ma...@us...> - 2005-01-02 14:44:14
|
Update of /cvsroot/robotflow/RobotFlow/Vision/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19423/Vision/include Modified Files: Bt848.h CPoint.h CRect.h CSymbol.h CTextLine.h Cell.h ColorLookup.h Components.h ComponentsData.h Image.h ImagePool.h lines.h Log Message: removing all "using namespace std;" in headers. Bumped version to 0.2.6. Preparing for the RobotFlow namespace. Index: CTextLine.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/include/CTextLine.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CTextLine.h 27 Jul 2004 20:39:52 -0000 1.2 --- CTextLine.h 2 Jan 2005 14:44:00 -0000 1.3 *************** *** 23,27 **** #include "CSymbol.h" - using namespace std; bool IsBefore(void*, void*); --- 23,26 ---- *************** *** 56,72 **** bool Contains(CSymbol &); ! // Get the string corresponding to the sorted line ! void GetString(string & resultString); // Get the string corresponding to the sorted line ! void GetString_v2(string & resultString, list<vector<vector<float> > >&vect_list); // Print Object ! void printOn(ostream &out = cout) const; // Get the line vertical position (centerY of first character) int GetVerticalPosition() { return (mMinY + mMaxY)/2; } ! list<CSymbol*>& getSymbols(){return mLetterList;} private: --- 55,71 ---- bool Contains(CSymbol &); ! // Get the std::string corresponding to the sorted line ! void GetString(std::string & resultString); // Get the string corresponding to the sorted line ! void GetString_v2(std::string & resultString, std::list<std::vector<std::vector<float> > >&vect_list); // Print Object ! void printOn(std::ostream &out = std::cout) const; // Get the line vertical position (centerY of first character) int GetVerticalPosition() { return (mMinY + mMaxY)/2; } ! std::list<CSymbol*>& getSymbols(){return mLetterList;} private: *************** *** 96,100 **** ///The list of cells ! list<CSymbol*> mLetterList; }; --- 95,99 ---- ///The list of cells ! std::list<CSymbol*> mLetterList; }; Index: Image.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/include/Image.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Image.h 27 Jul 2004 20:39:52 -0000 1.7 --- Image.h 2 Jan 2005 14:44:00 -0000 1.8 *************** *** 36,46 **** virtual ~Image(); ! virtual void printOn(ostream &out = cout) const; ! virtual void readFrom(istream &in=cin); ! virtual void serialize(ostream &out) const; ! virtual void unserialize(istream &in); int get_size() {return m_size;} --- 36,46 ---- virtual ~Image(); ! virtual void printOn(std::ostream &out = std::cout) const; ! virtual void readFrom(std::istream &in=std::cin); ! virtual void serialize(std::ostream &out) const; ! virtual void unserialize(std::istream &in); int get_size() {return m_size;} Index: CPoint.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/include/CPoint.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CPoint.h 27 Jul 2004 20:39:52 -0000 1.3 --- CPoint.h 2 Jan 2005 14:44:00 -0000 1.4 *************** *** 25,29 **** #include "Object.h" - using namespace std; /** CPoint. --- 25,28 ---- *************** *** 72,78 **** double dist (const CPoint &pt); ! virtual void printOn(ostream &out = cout) const; ! virtual void readFrom(istream &in); public: --- 71,77 ---- double dist (const CPoint &pt); ! virtual void printOn(std::ostream &out = std::cout) const; ! virtual void readFrom(std::istream &in); public: Index: CSymbol.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/include/CSymbol.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CSymbol.h 27 Jul 2004 20:39:52 -0000 1.2 --- CSymbol.h 2 Jan 2005 14:44:00 -0000 1.3 *************** *** 23,27 **** #include <vector> - using namespace std; /** CSymbol. --- 23,26 ---- *************** *** 38,49 **** CSymbol(); CSymbol(int symbolDescriptor, int centerX, int centerY, int width, int height); ! CSymbol(int symbolDescriptor, int centerX, int centerY, int width, int height, vector<float> &nnet_output); CSymbol(const CSymbol & initSymbol); virtual ~CSymbol(); void SetSymbol(int symbolDescriptor, int centerX, int centerY, int width, int height); ! void GetSymbolName(string & resultString) const; ! void printOn(ostream &out = cout) const; // Inline get functions --- 37,48 ---- CSymbol(); CSymbol(int symbolDescriptor, int centerX, int centerY, int width, int height); ! CSymbol(int symbolDescriptor, int centerX, int centerY, int width, int height, std::vector<float> &nnet_output); CSymbol(const CSymbol & initSymbol); virtual ~CSymbol(); void SetSymbol(int symbolDescriptor, int centerX, int centerY, int width, int height); ! void GetSymbolName(std::string & resultString) const; ! void printOn(std::ostream &out = std::cout) const; // Inline get functions *************** *** 53,57 **** int GetWidth() const {return mWidth;} int GetSymbol() const {return mSymbolDescriptor;} ! vector<float> GetNetVector() const {return mNetOutput;} private: --- 52,56 ---- int GetWidth() const {return mWidth;} int GetSymbol() const {return mSymbolDescriptor;} ! std::vector<float> GetNetVector() const {return mNetOutput;} private: *************** *** 67,71 **** int mWidth; ! vector<float> mNetOutput; }; --- 66,70 ---- int mWidth; ! std::vector<float> mNetOutput; }; Index: Components.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/include/Components.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Components.h 27 Jul 2004 20:39:52 -0000 1.3 --- Components.h 2 Jan 2005 14:44:00 -0000 1.4 *************** *** 28,32 **** #include "Image.h" - using namespace std; #define MAX_COLOR 32 //THIS ALGORITHM CANNOT ALLOW MORE THAN 32 COLORS (CAUSE 32bits for unsigned int) --- 28,31 ---- *************** *** 47,51 **** Components(); ! Components(string nodeName, ParameterSet params); ~Components(); --- 46,50 ---- Components(); ! Components(std::string nodeName, ParameterSet params); ~Components(); *************** *** 59,63 **** int get_component_count(){return m_rect_count;} ! list<CRect*> & get_color_components(int color); void draw_rectangles(int color, unsigned short *image_16bits, unsigned short value); --- 58,62 ---- int get_component_count(){return m_rect_count;} ! std::list<CRect*> & get_color_components(int color); void draw_rectangles(int color, unsigned short *image_16bits, unsigned short value); *************** *** 75,79 **** void sort(int color); ! vector<list<ImageCell *> > m_cell_list[MAX_COLOR]; //list<CRect*> m_rect_list[MAX_COLOR]; --- 74,78 ---- void sort(int color); ! std::vector<std::list<ImageCell *> > m_cell_list[MAX_COLOR]; //list<CRect*> m_rect_list[MAX_COLOR]; Index: ImagePool.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/include/ImagePool.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ImagePool.h 27 Jul 2004 20:39:52 -0000 1.3 --- ImagePool.h 2 Jan 2005 14:44:00 -0000 1.4 *************** *** 27,31 **** #include "Image.h" - using namespace std; class ImagePool { --- 27,30 ---- *************** *** 34,38 **** size_t m_max_stored; ! map<int,list<Image*> > m_image_map; public: --- 33,37 ---- size_t m_max_stored; ! std::map<int,std::list<Image*> > m_image_map; public: *************** *** 48,52 **** int size = width * height * pixelsize; ! map<int, list<Image*> >::iterator iter = m_image_map.find(size); if (iter != m_image_map.end()) { --- 47,51 ---- int size = width * height * pixelsize; ! std::map<int, std::list<Image*> >::iterator iter = m_image_map.find(size); if (iter != m_image_map.end()) { *************** *** 77,81 **** int size = image->get_size(); ! map<int, list<Image*> >::iterator iter = m_image_map.find(size); if (iter != m_image_map.end()) { --- 76,80 ---- int size = image->get_size(); ! std::map<int, std::list<Image*> >::iterator iter = m_image_map.find(size); if (iter != m_image_map.end()) { *************** *** 88,92 **** } else { ! m_image_map.insert(make_pair(size,list<Image*>(1,image))); } } --- 87,91 ---- } else { ! m_image_map.insert(std::make_pair(size,std::list<Image*>(1,image))); } } *************** *** 94,98 **** ~ImagePool() { ! for (map<int, list<Image*> >::iterator iter = m_image_map.begin(); iter != m_image_map.end(); iter++) { --- 93,97 ---- ~ImagePool() { ! for (std::map<int, std::list<Image*> >::iterator iter = m_image_map.begin(); iter != m_image_map.end(); iter++) { Index: ComponentsData.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/include/ComponentsData.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ComponentsData.h 13 Aug 2004 15:52:44 -0000 1.4 --- ComponentsData.h 2 Jan 2005 14:44:00 -0000 1.5 *************** *** 35,49 **** virtual ~ComponentsData(); ! void printOn(ostream &out = cout) const; void reset(); ! void readFrom(istream &in); int get_component_count(); ! list<CRect*> & get_color_components(int color); ! list<CRect*> & operator[] (int pos); int getWidth(){return m_imageWidth;} --- 35,49 ---- virtual ~ComponentsData(); ! void printOn(std::ostream &out = std::cout) const; void reset(); ! void readFrom(std::istream &in); int get_component_count(); ! std::list<CRect*> & get_color_components(int color); ! std::list<CRect*> & operator[] (int pos); int getWidth(){return m_imageWidth;} *************** *** 57,61 **** private: ! list<CRect*> m_components[MAX_COLOR]; bool m_initialized; --- 57,61 ---- private: ! std::list<CRect*> m_components[MAX_COLOR]; bool m_initialized; Index: lines.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/include/lines.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** lines.h 13 Aug 2004 16:26:41 -0000 1.2 --- lines.h 2 Jan 2005 14:44:00 -0000 1.3 *************** *** 44,48 **** virtual ~LineArray(); ! virtual void printOn(ostream &out = cout) const; int get_count() const; --- 44,48 ---- virtual ~LineArray(); ! virtual void printOn(std::ostream &out = std::cout) const; int get_count() const; Index: ColorLookup.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/include/ColorLookup.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ColorLookup.h 27 Jul 2004 20:39:52 -0000 1.3 --- ColorLookup.h 2 Jan 2005 14:44:00 -0000 1.4 *************** *** 34,40 **** ColorLookup& operator= (const ColorLookup &cpy); ! void printOn(ostream &out = cout) const; ! void readFrom(istream &in); unsigned *get_lookup() {return &m_color_lookup[0];} --- 34,40 ---- ColorLookup& operator= (const ColorLookup &cpy); ! void printOn(std::ostream &out = std::cout) const; ! void readFrom(std::istream &in); unsigned *get_lookup() {return &m_color_lookup[0];} Index: Bt848.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/include/Bt848.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Bt848.h 27 Jul 2004 20:39:52 -0000 1.3 --- Bt848.h 2 Jan 2005 14:44:00 -0000 1.4 *************** *** 25,29 **** #include <sys/signal.h> - using namespace std; class Bt848 : public BufferedNode { --- 25,28 ---- *************** *** 36,40 **** void newframe(int sig); ! Bt848(string nodeName, ParameterSet params); virtual ~Bt848(); --- 35,39 ---- void newframe(int sig); ! Bt848(std::string nodeName, ParameterSet params); virtual ~Bt848(); *************** *** 65,69 **** bool m_ready; ! string m_device_name; unsigned char *m_grab_data; pthread_mutex_t m_mutex; --- 64,68 ---- bool m_ready; ! std::string m_device_name; unsigned char *m_grab_data; pthread_mutex_t m_mutex; Index: Cell.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/include/Cell.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Cell.h 27 Jul 2004 20:39:52 -0000 1.3 --- Cell.h 2 Jan 2005 14:44:00 -0000 1.4 *************** *** 26,30 **** #include "CPoint.h" - using namespace std; /** ImageCell. --- 26,29 ---- *************** *** 121,127 **** void set_color(int color); ! void printOn(ostream &out = cout) const; ! void readFrom(istream &in); ///The upper left corner --- 120,126 ---- void set_color(int color); ! void printOn(std::ostream &out = std::cout) const; ! void readFrom(std::istream &in); ///The upper left corner Index: CRect.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/include/CRect.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** CRect.h 27 Jul 2004 20:39:52 -0000 1.5 --- CRect.h 2 Jan 2005 14:44:00 -0000 1.6 *************** *** 27,31 **** #include "Cell.h" - using namespace std; /** CRect. --- 27,30 ---- *************** *** 192,196 **** @return list<ImageCell*>& The list of cells */ ! list<ImageCell*>& get_cell_list(); /** --- 191,195 ---- @return list<ImageCell*>& The list of cells */ ! std::list<ImageCell*>& get_cell_list(); /** *************** *** 231,237 **** void get_center_of_gravity(double ¢er_x, double ¢er_y); ! void printOn(ostream &out = cout) const; ! void readFrom(istream &in); /** --- 230,236 ---- void get_center_of_gravity(double ¢er_x, double ¢er_y); ! void printOn(std::ostream &out = std::cout) const; ! void readFrom(std::istream &in); /** *************** *** 273,280 **** ///The list of cells ! list<ImageCell*> m_cell_list; ///The temp serialized cells list ! list<ImageCell*> m_serialized_list; }; --- 272,279 ---- ///The list of cells ! std::list<ImageCell*> m_cell_list; ///The temp serialized cells list ! std::list<ImageCell*> m_serialized_list; }; |