Argus API
Argus Camera API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
PwlWdrSensorMode.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  * * Redistributions of source code must retain the above copyright
8  * notice, this list of conditions and the following disclaimer.
9  * * Redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution.
12  * * Neither the name of NVIDIA CORPORATION nor the names of its
13  * contributors may be used to endorse or promote products derived
14  * from this software without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
17  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
20  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
23  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
24  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27  */
28 
29 #ifndef _ARGUS_EXT_PWL_WDR_SENSOR_MODE_H
30 #define _ARGUS_EXT_PWL_WDR_SENSOR_MODE_H
31 
32 namespace Argus
33 {
34 
35 /**
36  * The Ext::PwlWdrSensorMode extension adds extra functionalities for the
37  * Piecewise Linear (PWL) compressed Wide Dynamic Range (WDR) sensor mode type to
38  * the Argus Driver. It introduces one new interface:
39  * - IPwlWdrSensorMode; returns a list of normalized float coordinates (x,y) that define
40  * the PWL compression curve used in the PWL WDR mode. This PWL compression
41  * curve is used by the sensor to compress WDR pixel values before sending
42  * them over CSI. This is done to save bandwidth for data transmission over
43  * VI-CSI. The compression converts the WDR pixel values from InputBitDepth
44  * space to OutputBitDepth space.The coordinates of the PWL compression
45  * curve can be un-normalized by scaling x-axis and y-axis values
46  * by InputBitDepth and OutputBitDepth respectively. The Bit depths can be
47  * obtained by using the respective methods in the ISensorMode interface.
48  * @see ISensorMode
49  *
50  */
51 DEFINE_UUID(ExtensionName, EXT_PWL_WDR_SENSOR_MODE, 7f510b90,582b,11e6,bbb5,40,16,7e,ab,86,92);
52 
53 namespace Ext
54 {
55 
56 /**
57  * @class IPwlWdrSensorMode
58  *
59  * Returns a list of normalized float coordinates (x,y) that define
60  * the Piecewise Linear (PWL) compression curve used in the PWL Wide Dynamic Range (WDR) mode.
61  * The coordinates are returned in a Point2D tuple. The coordinates
62  * can be un-normalized by scaling x-axis and y-axis values by InputBitDepth
63  * and OutputBitDepth respectively. The Bit depths can be obtained by using
64  * the respective methods in the ISensorMode interface.
65  * @see ISensorMode
66  */
67 DEFINE_UUID(InterfaceID, IID_PWL_WDR_SENSOR_MODE, 7f5acea0,582b,11e6,9414,40,16,7e,ab,86,92);
69 {
70 public:
71  static const InterfaceID& id() { return IID_PWL_WDR_SENSOR_MODE; }
72 
73  /**
74  * Returns the number of control points coordinates in the Piecewise Linear compression
75  * curve.
76  */
77  virtual uint32_t getControlPointCount() const = 0;
78 
79  /**
80  * Returns the Piecewise Linear (PWL) compression curve coordinates.
81  *
82  * @param[out] points The output vector to store the PWL compression curve coordinates.
83  * Upon successful return, this vector will filled in with
84  * getControlPointCount() count values, each containing a coordinates of
85  * PWL compression curve within a Point2D tuple.
86  */
87  virtual Status getControlPoints(std::vector< Point2D<float> >* points) const = 0;
88 
89 protected:
91 };
92 
93 } // namespace Ext
94 
95 } // namespace Argus
96 
97 #endif // _ARGUS_EXT_PWL_WDR_SENSOR_MODE_H