ColorSegmenter.H

00001 
00002 
00003 #ifndef COLOR_SEGMENTER_H
00004 #define COLOR_SEGMENTER_H
00005 
00006 //#include "BeoSub/HoughTransform.H"
00007 #include "Image/Image.H"
00008 #include "Image/Pixels.H"
00009 #include "Util/readConfig.H"
00010 
00011 
00012 //from BeoSubTaskDecoder
00013 
00014 #include "Component/ModelManager.H"
00015 #include "GUI/XWindow.H"
00016 #include "Raster/Raster.H"
00017 #include "rutz/shared_ptr.h"
00018 #include "Image/PixelsTypes.H"
00019 #include "Util/readConfig.H"
00020 
00021 #include "Image/ColorOps.H"
00022 #include "Image/Image.H"
00023 #include "Image/ImageSet.H"
00024 #include "Image/MathOps.H"
00025 #include "Image/DrawOps.H"
00026 #include "Image/FilterOps.H"
00027 #include "Image/Transforms.H"
00028 
00029 #include "VFAT/segmentImageTrackMC.H"
00030 #include <iostream>
00031 
00032 
00033 template <class FLOAT,
00034           class INT,
00035           unsigned int SIT_channels> class segmentImageTrackMC;
00036 
00037 //class is a combination of the functionality of the isolate color functions and the segmentcolor class
00038 class ColorSegmenter{
00039 
00040 public:
00041 
00042   ColorSegmenter();
00043   ~ColorSegmenter();
00044   void setupColorSegmenter(const char* inputColor, bool debug);
00045   //function for segmenting color
00046   float isolateOrange(Image< PixRGB<byte> > &inputImage,  Image<byte> &outputImage);
00047 
00048 private:
00049 
00050 
00051   void setupOrange();
00052   std::vector<bool> frameCounter;
00053   float fps;
00054   const char* candidate_color;
00055   float Hz;
00056   float res;
00057 
00058   std::vector<float> color;
00059   std::vector<float> norm;
00060   std::vector<float> std;
00061   std::vector<float> adapt;
00062   std::vector<float> upperBound;
00063   std::vector<float> lowerBound;
00064 
00065   readConfig colorConf;
00066 
00067   rutz::shared_ptr<XWindow> wini, wino;
00068 
00069   int width, height;
00070 
00071   Image< PixRGB<byte> > ima;
00072   Image< PixRGB<float> > fima;
00073   Image< PixRGB<byte> > display;
00074   Image< PixH2SV2<float> > H2SVimage;
00075 
00076   segmentImageTrackMC<float,unsigned int,4> *segmenter;
00077 
00078   ImageSet< PixRGB<byte> > imgList;
00079   bool debugmode;
00080   bool setup;
00081 
00082 };
00083 
00084 
00085 
00086 #endif
Generated on Sun May 8 08:40:20 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3