X-Git-Url: http://git.euphorik.ch/?a=blobdiff_plain;f=WCudaMSE%2FBilatTools_OpenCV%2Fsrc%2Fcore%2Fcapture%2Fheader%2FCapture_A.h;fp=WCudaMSE%2FBilatTools_OpenCV%2Fsrc%2Fcore%2Fcapture%2Fheader%2FCapture_A.h;h=f9022120fb1e5301180e29bfa1e75c0313b95c0b;hb=8d08c12b29c2a14684f35c023ee39e694bb80d25;hp=0000000000000000000000000000000000000000;hpb=226de81f7e1f1fbf4ac79d0d089e8a05ec7159a0;p=GPU.git diff --git a/WCudaMSE/BilatTools_OpenCV/src/core/capture/header/Capture_A.h b/WCudaMSE/BilatTools_OpenCV/src/core/capture/header/Capture_A.h new file mode 100755 index 0000000..f902212 --- /dev/null +++ b/WCudaMSE/BilatTools_OpenCV/src/core/capture/header/Capture_A.h @@ -0,0 +1,105 @@ +#ifndef CAPTURE_A_H_ +#define CAPTURE_A_H_ + +#include + +#include +#include + +#include "Chronos.h" +#include "cudaType.h" + +using namespace cv; + +/*----------------------------------------------------------------------*\ + |* Declaration *| + \*---------------------------------------------------------------------*/ + +/*--------------------------------------*\ + |* Public *| + \*-------------------------------------*/ + +/** + * http://opencv.willowgarage.com/wiki/VideoCodecs + */ +class Capture_A + { + /*--------------------------------------*\ + |* Constructor *| + \*-------------------------------------*/ + + public: + + Capture_A(VideoCapture* ptrCaptureStream,const string& title, uchar4* ptrHostMemory=NULL); + virtual ~Capture_A(void); + + /*--------------------------------------*\ + |* Methodes *| + \*-------------------------------------*/ + + public: + + VideoCapture* getVideoCapture(void); + int getW(void); + int getH(void); + string getTitle(void); + Chronos getChronos(void); + int fpsCapture(void); + + bool isOpened(void); + int nbOctetImage(void); + long nbCapture(void); + + virtual void printInfo(void); + + /** + * Temps a attendre entre 2 captures pour respecter fps original + */ + virtual int dtOriginalMS(void); + + /** + * To be call periodicly to obtain image + * Type pas RVBA, mais BVRA + */ + Mat capturer(void); + + // Tools + static uchar4* castToUChar4(uchar* ptrTab); + static uchar4* castToUChar4(Mat* ptrMap); + + protected: + + virtual void readStream(VideoCapture* ptrCaptureStream, Mat* ptrMatCaptureSrc)=0; + + private: + + + /*--------------------------------------*\ + |* Attributs *| + \*-------------------------------------*/ + + private: + + // Inputs + string title; + + + // Tools + Mat matCaptureSrc; + + // Outputs + float w; + int h; + Mat matCaptureDest; + long compteurCapture; + Chronos chrono; + + protected: + VideoCapture* ptrCaptureStream; + }; + +#endif + +/*----------------------------------------------------------------------*\ + |* End *| + \*---------------------------------------------------------------------*/