2 Copyright (C) 2012 Intel Corporation
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public
15 License along with this library; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 #ifndef OPENCVLUXPLUGIN_H
20 #define OPENCVLUXPLUGIN_H
22 #include <abstractsource.h>
25 #include <opencv/cv.h>
26 #include <opencv/highgui.h>
30 class OpenCvLuxPlugin: public AbstractSource
37 cv::VideoCapture *m_capture;
38 PropertyList mRequests;
39 OpenCvLuxPlugin* parent;
50 OpenCvLuxPlugin(AbstractRoutingEngine* re, map<string, string> config);
53 void getPropertyAsync(AsyncPropertyReply *reply);
54 void getRangePropertyAsync(AsyncRangePropertyReply *reply);
55 AsyncPropertyReply * setProperty(AsyncSetPropertyRequest request);
56 void subscribeToPropertyChanges(VehicleProperty::Property property);
57 void unsubscribeToPropertyChanges(VehicleProperty::Property property);
58 PropertyList supported();
60 int supportedOperations();
62 void supportedChanged(PropertyList) {}
64 void updateProperty(uint lux);
75 std::list<AsyncPropertyReply*> replyQueue;
80 static int grabImage(void *data);
81 static uint evalImage(cv::Mat qImg, OpenCvLuxPlugin::Shared *shared);
84 #endif // EXAMPLEPLUGIN_H