neovision2cuda.H

00001 #ifndef _NEOVISION2CUDA_H_DEFINED_
00002 #define _NEOVISION2CUDA_H_DEFINED_
00003 
00004 #include "Raster/Raster.H"
00005 #include "Raster/GenericFrame.H"
00006 #include "Media/FrameSeries.H"
00007 #include "Raster/Raster.H"
00008 #include "Raster/PngWriter.H"
00009 #include "Image/Point2D.H"
00010 #include "NeovisionII/Nv2LabelReader.H"
00011 #include "GUI/PrefsWindow.H"
00012 #include "rutz/shared_ptr.h"
00013 #include <unistd.h>
00014 #include <vector>
00015 
00016 class neovision2cuda : public CudaImageDisplayGL
00017 {
00018 public:
00019   static inline neovision2cuda *createCudaDisplay(nub::ref<InputFrameSeries> ifs_in, nub::ref<OutputFrameSeries> ofs_in, nub::ref<CudaSaliency> csm_in, std::vector<rutz::shared_ptr<Nv2LabelReader> > readers_in)
00020   {
00021     instance = (CudaImageDisplayGL*)new neovision2cuda(ifs_in,ofs_in,csm_in,readers_in);
00022     return (neovision2cuda*)instance;
00023   }
00024   void idleFunction();
00025   void runDisplay(int w, int h, MemoryPolicy mp, int dev);
00026 protected:
00027   static inline void idleWrapper() { instance->idleFunction(); }
00028   static inline void displayWrapper() { instance->displayFunction(); }
00029   static inline void timerWrapper(int index) { instance->timerFunction(index); }
00030 private:
00031   neovision2cuda(nub::ref<InputFrameSeries> ifs_in, nub::ref<OutputFrameSeries> ofs_in, nub::ref<CudaSaliency> csm_in, std::vector<rutz::shared_ptr<Nv2LabelReader> > readers_in);
00032   nub::ref<InputFrameSeries> ifs;
00033   nub::ref<OutputFrameSeries> ofs;
00034   nub::ref<CudaSaliency> csm;
00035   std::vector<rutz::shared_ptr<Nv2LabelReader> > readers;
00036   std::deque<Timer> frameTimes;
00037   PrefsWindow *pwin;
00038   //Sets points
00039   Point2D<int> rawFramePoint;
00040   Point2D<int> saliencyFramePoint;
00041   Point2D<int> imapFramePoint;
00042   Point2D<int> cmapFramePoint;
00043   Point2D<int> omapFramePoint;
00044   Point2D<int> fmapFramePoint;
00045   Point2D<int> mmapFramePoint;
00046   Point2D<int> inhibitionMapFramePoint;
00047   //Values regarding various maps in the GUI
00048   int n_cm; //Number of conspicuity maps
00049   int w_cm; //Width of conspicuity maps
00050   int h_cm; //Height of conspicuity maps
00051   int w_sm; //width of secondary maps (saliency and inhibition)
00052   int h_sm; //Height of secondary maps (salieny and inhibition)
00053   int n_sm; //Number of secondary maps
00054   int w_in; //Width of scaled input
00055   int h_in; //Height of scaled input
00056   double aspect_ratio; 
00057    
00058 };
00059 
00060 #endif
Generated on Sun May 8 08:40:58 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3