Argus API Argus Camera API

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List
- File Members

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 */
45 class CameraDevice : public InterfaceProvider
46 {
47 protected:
48 ~CameraDevice() {}
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
58 class ICameraProperties : public Interface
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 the available sensor modes
87 * @param[out] modes, a vector that will be populated with the sensor modes.
88 *
89 * @returns success/status of the call.
90 */
91 virtual Status getSensorModes(std::vector<SensorMode*>* modes) const = 0;
92
93 /**
94 * Returns the valid range of focuser positions.
95 * The units are focuser steps.
96 */
97 virtual Range<int32_t> getFocusPositionRange() const = 0;
98
99 /**
100 * Returns the supported aperture range.
101 */
102 virtual Range<float> getLensApertureRange() const = 0;
103
104 protected:
105 ~ICameraProperties() {}
106 };
107
108 /**
109 * An object representing the sensor mode of a CameraDevice.
110 *
111 * @see ICameraProperties::getSensorModes().
112 */
113 class SensorMode : public InterfaceProvider
114 {
115 protected:
116 ~SensorMode() {}
117 };
118
119 /**
120 * @class ISensorMode
121 *
122 * An interface to retrieve the properties of a SensorMode.
123 */
124 DEFINE_UUID(InterfaceID, IID_SENSOR_MODE, e69015e0,db2a,11e5,a837,18,00,20,0c,9a,66);
125
126 class ISensorMode : public Interface
127 {
128 public:
129 static const InterfaceID& id() { return IID_SENSOR_MODE; }
130
131 /**
132 * Returns the image resolution, in pixels.
133 */
134 virtual Size getResolution() const = 0;
135
136 /**
137 * Returns the supported exposure time range (in nanoseconds).
138 */
139 virtual Range<uint64_t> getExposureTimeRange() const = 0;
140
141 /**
142 * Returns the supported frame duration range (in nanoseconds).
143 */
144 virtual Range<uint64_t> getFrameDurationRange() const = 0;
145
146 /**
147 * Returns the supported analog gain range.
148 */
149 virtual Range<float> getAnalogGainRange() const = 0;
150
151 /**
152 * Returns the bit depth of the image captured by the image sensor in the
153 * current mode. For example, a wide dynamic range image sensor capturing
154 * 16 bits per pixel would have an input bit depth of 16.
155 */
156 virtual uint32_t getInputBitDepth() const = 0;
157
158 /**
159 * Returns the bit depth of the image returned from the image sensor in the
160 * current mode. For example, a wide dynamic range image sensor capturing
161 * 16 bits per pixel might be connected through a Camera Serial Interface
162 * (CSI-3) which is limited to 12 bits per pixel. The sensor would have to
163 * compress the image internally and would have an output bit depth not
164 * exceeding 12.
165 */
166 virtual uint32_t getOutputBitDepth() const = 0;
167
168 /**
169 * Describes the type of the sensor (Bayer, Yuv, etc.) and key modes of
170 * operation which are enabled in the sensor mode (Wide-dynamic range,
171 * Piecewise Linear Compressed output, etc.) (Not all sensor mode types are
172 * supported in the current release
173 */
174 virtual SensorModeType getSensorModeType() const = 0;
175
176
177
178 protected:
179 ~ISensorMode() {}
180 };
181
182 } // namespace Argus
183
184 #endif // _ARGUS_CAMERA_DEVICE_H