19 #ifndef OPENCVLUXPLUGIN_H
20 #define OPENCVLUXPLUGIN_H
22 #include <abstractsource.h>
23 #include <ambpluginimpl.h>
27 #include <opencv2/objdetect.hpp>
28 #include <opencv2/highgui/highgui.hpp>
44 Shared(): frameCount(0) { }
45 std::unique_ptr<cv::VideoCapture> m_capture;
46 std::unique_ptr<cv::VideoWriter> mWriter;
47 PropertyList mRequests;
65 const string uuid()
const;
69 void subscribeToPropertyChanges(VehicleProperty::Property
property);
70 void unsubscribeToPropertyChanges(VehicleProperty::Property
property);
74 void supportedChanged(
const PropertyList &);
76 void updateProperty(uint16_t lux);
78 void writeVideoFrame(cv::UMat frame);
80 void detectEyes(cv::UMat frame);
84 std::shared_ptr<AbstractPropertyType> videoLogging;
96 std::list<AsyncPropertyReply*> replyQueue;
98 std::shared_ptr<AbstractPropertyType> extBrightness;
100 std::unique_ptr<Shared> shared;
103 std::unique_ptr<cv::CascadeClassifier> faceCascade;
104 std::unique_ptr<cv::CascadeClassifier> eyeCascade;
106 std::shared_ptr<AbstractPropertyType> driverDrowsiness;
107 std::shared_ptr<AbstractPropertyType> openCl;
110 static int grabImage(
void *
data);
113 namespace TrafficLight
127 #endif // EXAMPLEPLUGIN_H