added cuda support for opencv plugin
[profile/ivi/automotive-message-broker.git] / plugins / opencvlux / README
1 OpenCV "lux" plugin
2
3 This plugin simulates the ExteriorBrigtness property using a traditional webcamera.  It works 
4 by taking the mean pixel intensity of the web camera image and estimating lux.  The particular
5 can be calibrated using the "pixelUpperBound" and "pixelLowerBound" variables.
6
7 To enable the OpenCV "lux" plugin, run cmake and enable the opencvlux_plugin option:
8
9 cmake -Dopencvlux_plugin=On ..
10
11 Currently, this plugin has been tested with OpenCV 2.4.4.
12
13 To use the OpenCV plugin, add the following to the "sources" array in /etc/ambd/config:
14
15 {
16         "name" : "OpenCV LUX",
17         "path" : "/usr/lib/automotive-message-broker/opencvluxplugin.so",
18         "threaded" : "true",
19         "pixelLowerBound" : "0",
20         "pixelUpperBound" : "255",
21         "fps" : "30",
22         "kinect" : "false",
23         "opencl" : "false",
24         "device" : "0"
25 }
26
27 Configuration Key Definitions:
28
29 "name"
30 name of plugin.  This key is not used by the plugin at this moment.
31
32 "path"
33 path to plugin on the filesystem.
34
35 "device"
36 Camera to use.  The string "0" corrisponds to /dev/video0, "1" to /dev/video1, etc.
37
38 Default: "0"
39
40 "threaded"
41 Compute pixel intensity in another thread.  Set to "true" or "false".  This feature has been disabled
42 for now.
43
44 Default: "false"
45
46 "fps"
47 How many times per second to poll image data from the camera.
48
49 Default: "30"
50
51 "kinect"
52 Set to "true" if you are using a kinect camera.
53
54 Default: "false"
55
56 "pixelLowerBound"
57 Lowest calibration value for a camera.  This is the average pixel intensity value the camera reports when 
58 it is completely covered.
59
60 Default: "0"
61
62 "pixelUpperBound"
63 The highest calibration value for camera.  This is the average pixel intensity value when a very bright 
64 light (like the sun) is being projected at the camera.
65
66 Default: "255"
67
68 "opencl" (experimental)
69 Use a specialized CPU/GPU device to calculate the mean pixel intensity.  This will only work if OpenCV
70 was compiled with OpenCL support.  This plugin looks for the OpenCV ocl headers and adds support at 
71 compile time.
72
73 NOTE: This option has not been tested because at implementation, OpenCL 1.2 was not available from devices
74 on-hand.
75
76 Default: "false"
77
78 "cuda"
79 Use nvidia cuda gpu processing to process image data.  This will only work if OpenCV was compiled with
80 cuda support.
81
82 NOTE: this does not appear to have a noticable impact on processing given the way we are using it.
83 this does however make memory usage explode.
84
85 Default: "false"