updated opencv docs
[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 NOTE: some features require the qtmainloop to be running.  see the main README for details.
28
29 Configuration Key Definitions:
30
31 "name"
32 name of plugin.  This key is not used by the plugin at this moment.
33
34 "path"
35 path to plugin on the filesystem.
36
37 "device"
38 Camera to use.  The string "0" corrisponds to /dev/video0, "1" to /dev/video1, etc.
39
40 Default: "0"
41
42 "threaded"
43 Compute pixel intensity in another thread.  Set to "true" or "false".  You need to use the qtmainloop in
44 order for this feature to function.
45
46 Default: "false"
47
48 "fps"
49 How many times per second to poll image data from the camera.
50
51 Default: "30"
52
53 "kinect"
54 Set to "true" if you are using a kinect camera.
55
56 Default: "false"
57
58 "pixelLowerBound"
59 Lowest calibration value for a camera.  This is the average pixel intensity value the camera reports when 
60 it is completely covered.
61
62 Default: "0"
63
64 "pixelUpperBound"
65 The highest calibration value for camera.  This is the average pixel intensity value when a very bright 
66 light (like the sun) is being projected at the camera.
67
68 Default: "255"
69
70 "opencl" (experimental)
71 Use a specialized CPU/GPU device to calculate the mean pixel intensity.  This will only work if OpenCV
72 was compiled with OpenCL support.  This plugin looks for the OpenCV ocl headers and adds support at 
73 compile time.
74
75 NOTE: This option has not been tested because at implementation, OpenCL 1.2 was not available from devices
76 on-hand.
77
78 Default: "false"
79
80 "cuda"
81 Use nvidia cuda gpu processing to process image data.  This will only work if OpenCV was compiled with
82 cuda support.
83
84 NOTE: this does not appear to have a noticable impact on processing given the way we are using it.
85 this does however make memory usage explode.
86
87 Default: "false"