TarzaNN
TarzaNN neural network simulator
|
00001 #ifndef MOTIONFEATUREPLANE_H 00002 #define MOTIONFEATUREPLANE_H 00003 00004 #include "Array2D.h" 00005 #include "Network.h" 00006 #include "FeaturePlane.h" 00007 #include "Direction.h" 00008 #include "MotionFilterFactory.h" 00009 00010 #include <QMutex> 00011 #include <QRunnable> 00012 #include <QWaitCondition> 00013 00014 //#define MAX_X 256 00015 //#define MAX_Y 256 00016 #define MAX_X 200 00017 #define MAX_Y 200 00018 00019 class MotionFeaturePlane: public FeaturePlane{ 00020 friend class FeaturePlaneFactory; 00021 00022 public: 00023 ~MotionFeaturePlane(); 00024 preprocessed_t* preprocessed; 00025 00026 00027 float getAlphaDeg(); 00028 inline int getWindow(){return window;} 00029 inline Direction* getDirection(){return dir;} 00030 float* pixelSpeeds; 00031 00032 MotionVFFilter* getMotionVFPlane(int alpha, int speed); 00033 MotionVISub1Filter* getMotionVISub1Plane(int alpha, int speed); 00034 MotionVISub2Filter* getMotionVISub2Plane(int speed); 00035 00036 float getGainVF(){return gainVF;} 00037 float getGainVISub1(){return gainVISub1;} 00038 float getGainVISub2(){return gainVISub2;} 00039 00040 protected: 00041 MotionFeaturePlane( Network* net, int l, QString* name, int w, int h, int window, int angles, int speeds, int alpha, int speed, bool isWTA, bool visible, Neuron* neuron, NotifyStrategyAbstract* notify); 00042 void step(); 00043 void computeGatingUnits(); 00044 void applyGatingControl(); 00045 void feedForward(); 00046 00047 private: 00048 vfFilters_t* vfFilters; 00049 viSub1Filters_t* viSub1Filters; 00050 MotionVISub2Filter** viSub2Filters; 00051 int window; 00052 void initFilters(); 00053 Direction* dir; 00054 float gainVF, gainVI, gainVISub1, gainVISub2; 00055 static bool destructed; 00056 00057 void sync(); 00058 static int localProgressThreads; 00059 static QWaitCondition localProgressCond; 00060 static QMutex localProgressMutex; 00061 }; 00062 00063 #endif //MOTIONFEATUREPLANE_H