#ifndef __CAMERA_EWCLIB2_H__ #define __CAMERA_EWCLIB2_H__ //DirectShow #include #include #include //OpenCV 1.0 //#pragma comment(lib,"cv.lib") //#pragma comment(lib,"cxcore.lib") //#pragma comment(lib,"cvaux.lib") //#pragma comment(lib,"highgui.lib") //OpenCV 2.1 #ifdef _DEBUG #pragma comment(lib,"cv210d.lib") #pragma comment(lib,"cxcore210d.lib") #pragma comment(lib,"cvaux210d.lib") #pragma comment(lib,"highgui210d.lib") #else #pragma comment(lib,"cv210.lib") #pragma comment(lib,"cxcore210.lib") #pragma comment(lib,"cvaux210.lib") #pragma comment(lib,"highgui210.lib") #endif //original class for EWCLIB 1.x //website: http://wikiwiki.jp/masayashi/ //article: http://wikiwiki.jp/masayashi/?OpenCV%2FDirectShow%A4%C7%A5%AD%A5%E3%A5%D7%A5%C1%A5%E3%A4%B7%A4%BF%B2%E8%C1%FC%A4%F2%C9%BD%BC%A8%A4%B9%A4%EB class CameraEwclib2 { public: //Getter int index() { return _index; }; int width() { return _width; }; int height() { return _height; }; double fps() { return _fps; }; char *buffer() { return _buffer; }; IplImage *image() { return _image; }; //Constructor CameraEwclib2(int index = 0, int width = 640, int height = 480, double fps = 30, int device = -1, GUID mstype = MEDIASUBTYPE_RGB24); //Destructor ~CameraEwclib2(void); //Method IplImage* capture(bool mirror = false); private: int _index; int _width; int _height; double _fps; char *_buffer; IplImage *_image; }; #endif //__CAMERA_EWCLIB2_H__