Libargus API
Libargus Camera API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
PwlWdrSensorMode.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016-2017, 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 /**
30  * @file
31  * <b>Libargus Extension: Piecewise Linear Compression for WDR Sensor Modes</b>
32  *
33  * @b Description: Adds extra functionalities for the
34  * Piecewise Linear (PWL) compressed Wide Dynamic Range (WDR) sensor mode type.
35  */
36 
37 #ifndef _ARGUS_EXT_PWL_WDR_SENSOR_MODE_H
38 #define _ARGUS_EXT_PWL_WDR_SENSOR_MODE_H
39 
40 namespace Argus
41 {
42 
43 /**
44  * Adds extra functionalities for the Piecewise Linear (PWL) Wide Dynamic
45  * Range (WDR) sensor mode type. It introduces one new interface:
46  * - IPwlWdrSensorMode; returns a list of normalized float coordinates (x,y) that define
47  * the PWL compression curve used in the PWL WDR mode. This PWL compression
48  * curve is used by the sensor to compress WDR pixel values before sending
49  * them over CSI. This is done to save bandwidth for data transmission over
50  * VI-CSI. The compression converts the WDR pixel values from InputBitDepth
51  * space to OutputBitDepth space.The coordinates of the PWL compression
52  * curve can be un-normalized by scaling x-axis and y-axis values
53  * by InputBitDepth and OutputBitDepth respectively. The Bit depths can be
54  * obtained by using the respective methods in the ISensorMode interface.
55  * @see ISensorMode
56  *
57  * @defgroup ArgusExtPwlWdrSensorMode Ext::PwlWdrSensorMode
58  * @ingroup ArgusExtensions
59  */
60 DEFINE_UUID(ExtensionName, EXT_PWL_WDR_SENSOR_MODE, 7f510b90,582b,11e6,bbb5,40,16,7e,ab,86,92);
61 
62 namespace Ext
63 {
64 
65 /**
66  * @class IPwlWdrSensorMode
67  *
68  * Interface to the properties of a PWL WDR device.
69  *
70  * Returns a list of normalized float coordinates (x,y) that define
71  * the Piecewise Linear (PWL) compression curve used in the PWL Wide Dynamic Range (WDR) mode.
72  * The coordinates are returned in a Point2D tuple. The coordinates
73  * can be un-normalized by scaling x-axis and y-axis values by InputBitDepth
74  * and OutputBitDepth respectively. The Bit depths can be obtained by using
75  * the respective methods in the ISensorMode interface.
76  * @see ISensorMode
77  *
78  * @ingroup ArgusSensorMode ArgusExtPwlWdrSensorMode
79  */
80 DEFINE_UUID(InterfaceID, IID_PWL_WDR_SENSOR_MODE, 7f5acea0,582b,11e6,9414,40,16,7e,ab,86,92);
82 {
83 public:
84  static const InterfaceID& id() { return IID_PWL_WDR_SENSOR_MODE; }
85 
86  /**
87  * Returns the number of control points coordinates in the Piecewise Linear compression
88  * curve.
89  */
90  virtual uint32_t getControlPointCount() const = 0;
91 
92  /**
93  * Returns the Piecewise Linear (PWL) compression curve coordinates.
94  *
95  * @param[out] points The output vector to store the PWL compression curve coordinates.
96  * Upon successful return, this vector will filled in with
97  * getControlPointCount() count values, each containing a coordinates of
98  * PWL compression curve within a Point2D tuple.
99  */
100  virtual Status getControlPoints(std::vector< Point2D<float> >* points) const = 0;
101 
102 protected:
104 };
105 
106 } // namespace Ext
107 
108 } // namespace Argus
109 
110 #endif // _ARGUS_EXT_PWL_WDR_SENSOR_MODE_H