Argus API
Argus Camera API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
CameraDevice.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_CAMERA_DEVICE_H
30 #define _ARGUS_CAMERA_DEVICE_H
31 
32 
33 namespace Argus
34 {
35 
36 /**
37  * An object representing a single camera device.
38  *
39  * CameraDevices are provided by a CameraProvider and are used to
40  * access the camera devices available within the system.
41  * Each device is based on a single sensor or a set of synchronized sensors.
42  *
43  * @see ICameraProvider::getCameraDevices()
44  */
46 {
47 protected:
49 };
50 
51 /**
52  * @class ICameraProperties
53  *
54  * An interface to retrieve the properties of a CameraDevice.
55  */
56 DEFINE_UUID(InterfaceID, IID_CAMERA_PROPERTIES, 436d2a73,c85b,4a29,bce5,15,60,6e,35,86,91);
57 
59 {
60 public:
61  static const InterfaceID& id() { return IID_CAMERA_PROPERTIES; }
62 
63  /**
64  * Returns the camera UUID.
65  * @todo DOC describe the camera UUID
66  */
67  virtual UUID getUUID() const = 0;
68 
69  /**
70  * Returns the maximum number of regions of interest supported by AE.
71  * A value of 0 means that the entire image is the only supported region of interest.
72  *
73  * @see IAutoControlSettings::setAeRegions()
74  */
75  virtual uint32_t getMaxAeRegions() const = 0;
76 
77  /**
78  * Returns the maximum number of regions of interest supported by AWB.
79  * A value of 0 means that the entire image is the only supported region of interest.
80  *
81  * @see IAutoControlSettings::setAwbRegions()
82  */
83  virtual uint32_t getMaxAwbRegions() const = 0;
84 
85  /**
86  * Returns only the basic available sensor modes that do not have an associated
87  * extension. Basic mode types include Depth, RGB, YUV and Bayer types.
88  *
89  * @param[out] modes, a vector that will be populated with the sensor modes.
90  *
91  * @returns success/status of the call.
92  */
93  virtual Status getBasicSensorModes(std::vector<SensorMode*>* modes) const = 0;
94 
95  /**
96  * Returns all the available sensor modes including the ones that have extensions.
97  * The extended modes support some form of Wide Dynamic Range (WDR) technology.
98  *
99  * All the returned modes will support the basic sensor mode interface.
100  * @see ISensorMode
101  *
102  * @param[out] modes, a vector that will be populated with the sensor modes.
103  *
104  * @returns success/status of the call.
105  */
106  virtual Status getAllSensorModes(std::vector<SensorMode*>* modes) const = 0;
107 
108  /**
109  * Returns the valid range of focuser positions.
110  * The units are focuser steps.
111  */
112  virtual Range<int32_t> getFocusPositionRange() const = 0;
113 
114  /**
115  * Returns the supported aperture range.
116  */
117  virtual Range<float> getLensApertureRange() const = 0;
118 
119  /**
120  * Returns the supported range of ISP digital gain.
121  */
122  virtual Range<float> getIspDigitalGainRange() const = 0;
123 
124 protected:
126 };
127 
128 /**
129  * An object representing the sensor mode of a CameraDevice.
130  *
131  * @see ICameraProperties::getAllSensorModes().
132  */
134 {
135 protected:
137 };
138 
139 /**
140  * @class ISensorMode
141  *
142  * An interface to retrieve the properties of a SensorMode.
143  */
144 DEFINE_UUID(InterfaceID, IID_SENSOR_MODE, e69015e0,db2a,11e5,a837,18,00,20,0c,9a,66);
145 
146 class ISensorMode : public Interface
147 {
148 public:
149  static const InterfaceID& id() { return IID_SENSOR_MODE; }
150 
151  /**
152  * Returns the image resolution, in pixels.
153  */
154  virtual Size2D<uint32_t> getResolution() const = 0;
155 
156  /**
157  * Returns the supported exposure time range (in nanoseconds).
158  */
159  virtual Range<uint64_t> getExposureTimeRange() const = 0;
160 
161  /**
162  * Returns the supported frame duration range (in nanoseconds).
163  */
164  virtual Range<uint64_t> getFrameDurationRange() const = 0;
165 
166  /**
167  * Returns the supported analog gain range.
168  */
169  virtual Range<float> getAnalogGainRange() const = 0;
170 
171  /**
172  * Returns the bit depth of the image captured by the image sensor in the
173  * current mode. For example, a wide dynamic range image sensor capturing
174  * 16 bits per pixel would have an input bit depth of 16.
175  */
176  virtual uint32_t getInputBitDepth() const = 0;
177 
178  /**
179  * Returns the bit depth of the image returned from the image sensor in the
180  * current mode. For example, a wide dynamic range image sensor capturing
181  * 16 bits per pixel might be connected through a Camera Serial Interface
182  * (CSI-3) which is limited to 12 bits per pixel. The sensor would have to
183  * compress the image internally and would have an output bit depth not
184  * exceeding 12.
185  */
186  virtual uint32_t getOutputBitDepth() const = 0;
187 
188  /**
189  * Describes the type of the sensor (Bayer, Yuv, etc.) and key modes of
190  * operation which are enabled in the sensor mode (Wide-dynamic range,
191  * Piecewise Linear Compressed output, etc.)
192  */
193  virtual SensorModeType getSensorModeType() const = 0;
194 
195 protected:
197 };
198 
199 } // namespace Argus
200 
201 #endif // _ARGUS_CAMERA_DEVICE_H