Fixed NetSend so it can be used in debug mode.
[qt/compvision.git] / OpenCVImage.h
1 #ifndef OPENCV_H
2 #define OPENCV_H\r
3 \r
4 #include "ImageSource.h"\r
5
6 // OpenCV libraries\r
7 #include <cxtypes.h>\r
8 #include <cvtypes.h>\r
9 #include <highgui.h>\r
10 \r
11 #include <QImage>\r
12 #include <QMutex>\r
13 \r
14 class OpenCVImage : public ImageSource\r
15 {\r
16         public:\r
17                 OpenCVImage(ImagePool *source, ImagePool *destination);\r
18                 void connect();\r
19                 void disconnect();\r
20                 bool isConnected();\r
21                 void process();\r
22         \r
23         private:\r
24                 CvCapture *camera;\r
25                 int width, height;\r
26                 bool connected;\r
27                 QMutex key; // prevent bad interactions when modifying the camera state\r
28 };\r
29
30 #endif