Multimedia API Reference

November 16, 2016 | 24.2.1 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CaptureMetadata.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 
37 #ifndef _ARGUS_CAPTURE_METADATA_H
38 #define _ARGUS_CAPTURE_METADATA_H
39 
50 namespace Argus
51 {
52 
57 {
58 protected:
60 };
61 
69 {
70 protected:
72 };
73 
74 
82 DEFINE_UUID(InterfaceID, IID_BAYER_HISTOGRAM, 50bc4f1c,6424,beb7,baae,b0,90,c9,c3,25,9e);
83 
84 class IBayerHistogram : public Interface
85 {
86 public:
87 
88  static const InterfaceID& id() { return IID_BAYER_HISTOGRAM; }
89 
93  virtual uint32_t getBinCount() const = 0;
94 
100  virtual uint32_t getBinData(BayerChannel channel, uint32_t bin,
101  Status* status = NULL) const = 0;
102 
103 protected:
104 
106 };
107 
108 
116  DEFINE_UUID(InterfaceID, IID_RGB_HISTOGRAM, 50bc4f1d,6424,beb7,baae,b0,90,c9,c3,25,9e);
117 
118 class IRGBHistogram : public Interface
119 {
120 public:
121 
122  static const InterfaceID& id() { return IID_RGB_HISTOGRAM; }
123 
127  virtual uint32_t getBinCount() const = 0;
128 
134  virtual uint32_t getBinData(RGBColorChannel channel, uint32_t bin,
135  Status* status = NULL) const = 0;
136 
137 protected:
138 
140 };
141 
142 
148 DEFINE_UUID(InterfaceID, IID_STREAM_CAPTURE_METADATA, 61cbe0a8,0ee1,4c67,baae,02,02,1a,b8,d9,47);
149 
151 {
152 public:
153 
154  static const InterfaceID& id() { return IID_STREAM_CAPTURE_METADATA; }
155 
159  virtual DenoiseMode getDenoiseMode() const = 0;
160 
161 protected:
162 
164 };
165 
166 
172 DEFINE_UUID(InterfaceID, IID_CAPTURE_METADATA, 5f6ac5d4,59e8,45d0,8bac,38,09,1f,f8,74,a9);
173 
175 {
176 public:
177 
178  static const InterfaceID& id() { return IID_CAPTURE_METADATA; }
179 
180  static const uint32_t NUM_COLOR_CORRECTION_ELEMENTS = 9;
181  static const uint32_t NUM_AWB_WB_ESTIMATE_ELEMENTS = 4;
182 
187  virtual uint32_t getCaptureId() const = 0;
188 
195  virtual uint32_t getClientData() const = 0;
196 
201  virtual InterfaceProvider* getStreamMetadata(const OutputStream* stream) const = 0;
202 
207  virtual const InterfaceProvider* getBayerHistogram() const = 0;
208 
213  virtual const InterfaceProvider* getRGBHistogram() const = 0;
214 
218  virtual bool getAeLocked() const = 0;
219 
227  virtual Status getAeRegions(std::vector<AcRegion>* regions) const = 0;
228 
232  virtual AeState getAeState() const = 0;
233 
237  virtual int32_t getFocuserPosition() const = 0;
238 
242  virtual uint32_t getAwbCct() const = 0;
243 
247  virtual BayerGains getAwbGains() const = 0;
248 
252  virtual AwbMode getAwbMode() const = 0;
253 
261  virtual Status getAwbRegions(std::vector<AcRegion>* regions) const = 0;
262 
266  virtual AwbState getAwbState() const = 0;
267 
276  virtual Status getAwbWbEstimate(std::vector<float>* estimate) const = 0;
277 
281  virtual bool getColorCorrectionMatrixEnable() const = 0;
282 
292  virtual Status getColorCorrectionMatrix(std::vector<float>* ccMatrix) const = 0;
293 
298  virtual uint64_t getFrameDuration() const = 0;
299 
303  virtual float getIspDigitalGain() const = 0;
304 
309  virtual uint64_t getFrameReadoutTime() const = 0;
310 
314  virtual float getSceneLux() const = 0;
315 
319  virtual float getSensorAnalogGain() const = 0;
320 
324  virtual uint64_t getSensorExposureTime() const = 0;
325 
329  virtual uint32_t getSensorSensitivity() const = 0;
330 
335  virtual uint64_t getSensorTimestamp() const = 0;
336 
340  virtual bool getToneMapCurveEnabled() const = 0;
341 
352  virtual Status getToneMapCurve(RGBColorChannel channel, std::vector<float>* curve) const = 0;
353 
354 protected:
356 };
357 
358 } // namespace Argus
360 #endif // _ARGUS_CAPTURE_METADATA_H
A container for metadata from a single capture.
virtual DenoiseMode getDenoiseMode() const =0
static const InterfaceID & id()
virtual uint32_t getBinCount() const =0
Returns the number of bins (per channel) in the histogram.
The base interface for a class that provides libargus interfaces.
Definition: Types.h:343
An interface to a set of histograms created from RGB pixel data, one per RGB channel.
static const InterfaceID & id()
virtual float getIspDigitalGain() const =0
Returns the digital gain used for this capture.
An object that holds a CaptureMetadata instance and is used to read the capture metadata from a consu...
virtual uint32_t getAwbCct() const =0
Returns the CCT calculated by AWB for this capture.
virtual AeState getAeState() const =0
Returns the state of AE when it ran for this capture.
virtual float getSensorAnalogGain() const =0
Returns the sensor analog gain used for this capture.
Output streams are created and owned by CaptureSessions, and they maintain a connection with an EGLSt...
Definition: Stream.h:72
Status
Status values returned by API function calls.
Definition: Types.h:220
static const InterfaceID & id()
RGBColorChannel
Definition: Types.h:253
The top-level interface class.
Definition: Types.h:312
virtual uint32_t getBinData(RGBColorChannel channel, uint32_t bin, Status *status=NULL) const =0
Returns the value contained in a single bin.
virtual uint32_t getBinData(BayerChannel channel, uint32_t bin, Status *status=NULL) const =0
Returns the value contained in a single bin.
virtual bool getAeLocked() const =0
Returns true if and only if AE was locked for this capture.
virtual Status getToneMapCurve(RGBColorChannel channel, std::vector< float > *curve) const =0
Returns the specified color channel for the tone mapping table (as a vector of NUM_TONE_MAP_ELEMENTS ...
An interface that reports metadata for a single stream in a single capture.
virtual InterfaceProvider * getStreamMetadata(const OutputStream *stream) const =0
Returns the per-stream metadata provider for stream.
AeState
Definition: Types.h:186
AwbState
Definition: Types.h:197
virtual uint32_t getBinCount() const =0
Returns the number of bins (per channel) in the histogram.
virtual const InterfaceProvider * getRGBHistogram() const =0
Returns the RGB histogram for this capture.
virtual BayerGains getAwbGains() const =0
Returns the AWB gains used for this capture.
virtual uint32_t getClientData() const =0
Returns the clientData value for the Request used in the capture that generated this metadata...
virtual Status getAwbRegions(std::vector< AcRegion > *regions) const =0
Gets the AWB regions of interest used for this capture.
virtual Status getAeRegions(std::vector< AcRegion > *regions) const =0
Gets the AE regions of interest used for this capture.
DEFINE_UUID(ExtensionName, EXT_BAYER_SHARPNESS_MAP, 7d5e0470, 4ea6, 11e6, bdf4, 08, 00, 20, 0c, 9a, 66)
The Ext::BayerSharpnessMap extension adds internally-generated sharpness metrics to CaptureMetadata r...
virtual AwbMode getAwbMode() const =0
Returns the AWB mode used for this capture.
virtual uint64_t getSensorTimestamp() const =0
Returns the start timestamp for the sensor (in nanoseconds).
virtual uint64_t getFrameDuration() const =0
Returns the time it took to integrate this capture (in nanoseconds).
Defines gains used for each Bayer channel.
Definition: Types.h:564
virtual float getSceneLux() const =0
Returns the estimated scene brightness for this capture (in lux).
virtual bool getToneMapCurveEnabled() const =0
Returns true if and only if a user-specified tone map curve was used for this capture.
virtual int32_t getFocuserPosition() const =0
Returns the focuser position used for this capture (in focuser steps).
static const InterfaceID & id()
virtual const InterfaceProvider * getBayerHistogram() const =0
Returns the Bayer histogram for this capture.
virtual bool getColorCorrectionMatrixEnable() const =0
Returns the enable state for the client-supplied Color Correction Matrix.
An interface that reports metadata for a single capture.
A unique identifier for an libargus Interface.
Definition: Types.h:322
static const uint32_t NUM_AWB_WB_ESTIMATE_ELEMENTS
A top level object class for libargus objects that are created and owned by the client.
Definition: Types.h:380
virtual uint32_t getCaptureId() const =0
Returns the capture id (the value returned from ICaptureSession::capture()) of the capture that gener...
static const uint32_t NUM_COLOR_CORRECTION_ELEMENTS
virtual uint64_t getFrameReadoutTime() const =0
Returns the frame readout time for this capture (in nanoseconds) from the beginning of the first line...
BayerChannel
Definition: Types.h:207
virtual Status getColorCorrectionMatrix(std::vector< float > *ccMatrix) const =0
Gets the 3x3 client-supplied Color Correction Matrix as a flattened (row-major) vector of 9 values...
virtual Status getAwbWbEstimate(std::vector< float > *estimate) const =0
Gets the current AWB WB estimate as a vector of NUM_AWB_WB_ESTIMATE_ELEMENTS values.
virtual AwbState getAwbState() const =0
virtual uint32_t getSensorSensitivity() const =0
Returns the ISO value used for this capture.
virtual uint64_t getSensorExposureTime() const =0
Returns the sensor exposure time for this capture (in nanoseconds).
An interface to a set of histograms created from Bayer pixel data, one per Bayer channel.