00001 /************************************************************************** 00002 ** Title: RGBClassifier 00003 ** $RCSfile: RGBClassifier.hh,v $ 00004 ** $Revision: 1.4 $$Name: $ 00005 ** $Date: 2005/05/02 11:25:37 $ 00006 ** Copyright: GPL $Author: fehr $ 00007 ** Description: 00008 ** 00009 ** 00010 ** 00011 **------------------------------------------------------------------------- 00012 ** 00013 ** $Log: RGBClassifier.hh,v $ 00014 ** 00015 ** 00016 **************************************************************************/ 00017 00018 #ifndef RGB_CLASSIFIER 00019 #define RGB_CLASSIFIER 00020 00021 #include "RGBColor.hh" 00022 #include "SimpleRGBImage.hh" 00023 #include "IntImage.hh" 00024 00025 /*======================================================================*/ 00032 /*======================================================================*/ 00033 class RGBClassifier 00034 { 00035 public: 00036 /*======================================================================*/ 00040 /*======================================================================*/ 00041 RGBClassifier(){}; 00042 00043 /*======================================================================*/ 00047 /*======================================================================*/ 00048 RGBClassifier(const RGBColor& color, int r, int g, int b); 00049 00050 /*======================================================================*/ 00054 /*======================================================================*/ 00055 ~RGBClassifier(){}; 00056 00057 /*======================================================================*/ 00064 /*======================================================================*/ 00065 void setTolerance(int r, int g, int b); 00066 00067 /*======================================================================*/ 00072 /*======================================================================*/ 00073 void setObjektColor(const RGBColor& color); 00074 00075 /*======================================================================*/ 00081 /*======================================================================*/ 00082 IntImage* classify(const SimpleRGBImage& in); 00083 00084 private: 00085 int tolerance_r; 00086 int tolerance_g; 00087 int tolerance_b; 00088 RGBColor ObjectColor; 00089 00090 }; 00091 00092 #endif