L4T Multimedia API Reference

27.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 
102  virtual Status getHistogram(std::vector< BayerTuple<uint32_t> >* histogram) const = 0;
103 
104 protected:
105 
107 };
108 
109 
117  DEFINE_UUID(InterfaceID, IID_RGB_HISTOGRAM, 50bc4f1d,6424,beb7,baae,b0,90,c9,c3,25,9e);
118 
119 class IRGBHistogram : public Interface
120 {
121 public:
122 
123  static const InterfaceID& id() { return IID_RGB_HISTOGRAM; }
124 
128  virtual uint32_t getBinCount() const = 0;
129 
137  virtual Status getHistogram(std::vector< RGBTuple<uint32_t> >* histogram) const = 0;
138 
139 protected:
140 
142 };
143 
144 
150 DEFINE_UUID(InterfaceID, IID_STREAM_CAPTURE_METADATA, 61cbe0a8,0ee1,4c67,baae,02,02,1a,b8,d9,47);
151 
153 {
154 public:
155 
156  static const InterfaceID& id() { return IID_STREAM_CAPTURE_METADATA; }
157 
161  virtual Rectangle<float> getSourceClipRect() const = 0;
162 
163 protected:
164 
166 };
167 
168 
174 DEFINE_UUID(InterfaceID, IID_CAPTURE_METADATA, 5f6ac5d4,59e8,45d0,8bac,38,09,1f,f8,74,a9);
175 
177 {
178 public:
179 
180  static const InterfaceID& id() { return IID_CAPTURE_METADATA; }
181 
182  static const uint32_t NUM_COLOR_CORRECTION_ELEMENTS = 9;
183  static const uint32_t NUM_AWB_WB_ESTIMATE_ELEMENTS = 4;
184 
189  virtual uint32_t getCaptureId() const = 0;
190 
197  virtual uint32_t getClientData() const = 0;
198 
203  virtual InterfaceProvider* getStreamMetadata(const OutputStream* stream) const = 0;
204 
209  virtual const InterfaceProvider* getBayerHistogram() const = 0;
210 
215  virtual const InterfaceProvider* getRGBHistogram() const = 0;
216 
220  virtual bool getAeLocked() const = 0;
221 
229  virtual Status getAeRegions(std::vector<AcRegion>* regions) const = 0;
230 
234  virtual AeState getAeState() const = 0;
235 
239  virtual int32_t getFocuserPosition() const = 0;
240 
244  virtual uint32_t getAwbCct() const = 0;
245 
249  virtual BayerTuple<float> getAwbGains() const = 0;
250 
254  virtual AwbMode getAwbMode() const = 0;
255 
263  virtual Status getAwbRegions(std::vector<AcRegion>* regions) const = 0;
264 
268  virtual AwbState getAwbState() const = 0;
269 
278  virtual Status getAwbWbEstimate(std::vector<float>* estimate) const = 0;
279 
283  virtual bool getColorCorrectionMatrixEnable() const = 0;
284 
294  virtual Status getColorCorrectionMatrix(std::vector<float>* ccMatrix) const = 0;
295 
299  virtual float getColorSaturation() const = 0;
300 
305  virtual uint64_t getFrameDuration() const = 0;
306 
310  virtual float getIspDigitalGain() const = 0;
311 
316  virtual uint64_t getFrameReadoutTime() const = 0;
317 
321  virtual float getSceneLux() const = 0;
322 
326  virtual float getSensorAnalogGain() const = 0;
327 
331  virtual uint64_t getSensorExposureTime() const = 0;
332 
336  virtual uint32_t getSensorSensitivity() const = 0;
337 
342  virtual uint64_t getSensorTimestamp() const = 0;
343 
347  virtual bool getToneMapCurveEnabled() const = 0;
348 
359  virtual Status getToneMapCurve(RGBChannel channel, std::vector<float>* curve) const = 0;
360 
361 protected:
363 };
364 
369 DEFINE_UUID(InterfaceID, IID_DENOISE_METADATA, 7A461D23,6AE1,11E6,BDF4,08,00,20,0C,9A,66);
370 
372 {
373 public:
374  static const InterfaceID& id() { return IID_DENOISE_METADATA; }
375 
379  virtual DenoiseMode getDenoiseMode() const = 0;
380 
384  virtual float getDenoiseStrength() const = 0;
385 
386 protected:
388 };
389 
394 DEFINE_UUID(InterfaceID, IID_EDGE_ENHANCE_METADATA, 7A461D24,6AE1,11E6,BDF4,08,00,20,0C,9A,66);
395 
397 {
398 public:
399  static const InterfaceID& id() { return IID_EDGE_ENHANCE_METADATA; }
400 
404  virtual EdgeEnhanceMode getEdgeEnhanceMode() const = 0;
405 
409  virtual float getEdgeEnhanceStrength() const = 0;
410 
411 protected:
413 };
414 
419 DEFINE_UUID(InterfaceID, IID_VIDEO_STABILIZATION_METADATA, 7A461D25,6AE1,11E6,BDF4,08,00,20,0C,9A,66);
420 
422 {
423 public:
424  static const InterfaceID& id() { return IID_VIDEO_STABILIZATION_METADATA; }
425 
429  virtual VideoStabilizationMode getVideoStabilizationMode() const = 0;
430 
431 protected:
433 };
434 
435 } // namespace Argus
437 #endif // _ARGUS_CAPTURE_METADATA_H
A container for metadata from a single capture.
static const InterfaceID & id()
virtual uint32_t getBinCount() const =0
Returns the number of bins (per channel) in the histogram.
virtual VideoStabilizationMode getVideoStabilizationMode() const =0
Returns the video stabilization mode used for the capture.
The base interface for a class that provides libargus Interfaces.
Definition: Types.h:361
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:228
static const InterfaceID & id()
The top-level interface class.
Definition: Types.h:330
virtual Status getHistogram(std::vector< BayerTuple< uint32_t > > *histogram) const =0
Returns the histogram data.
virtual DenoiseMode getDenoiseMode() const =0
Returns the denoise mode used for the capture.
virtual bool getAeLocked() const =0
Returns true if and only if AE was locked for this capture.
virtual float getDenoiseStrength() const =0
Returns the denoise strength used for the capture.
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.
virtual Status getHistogram(std::vector< RGBTuple< uint32_t > > *histogram) const =0
Returns the histogram data.
virtual BayerTuple< float > getAwbGains() const =0
Returns the AWB gains used for this capture.
AeState
Definition: Types.h:194
AwbState
Definition: Types.h:205
virtual float getColorSaturation() const =0
Returns the color saturation value used for this capture (including biasing).
virtual uint32_t getBinCount() const =0
Returns the number of bins in the histogram.
static const InterfaceID & id()
virtual const InterfaceProvider * getRGBHistogram() const =0
Returns the RGB histogram for this capture.
Rectangle template class.
Definition: Types.h:703
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.
static const InterfaceID & id()
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).
virtual EdgeEnhanceMode getEdgeEnhanceMode() const =0
Returns the edge enhancement mode used for the capture.
virtual float getSceneLux() const =0
Returns the estimated scene brightness for this capture (in lux).
BayerTuple template class.
Definition: Types.h:576
virtual Rectangle< float > getSourceClipRect() const =0
Returns the clip rectangle used for this stream.
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.
virtual float getEdgeEnhanceStrength() const =0
Returns the edge enhancement strength used for the capture.
An interface that reports metadata for a single capture.
RGBTuple template class.
Definition: Types.h:611
A unique identifier for an libargus Interface.
Definition: Types.h:340
virtual Status getToneMapCurve(RGBChannel 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 ...
static const InterfaceID & id()
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:398
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...
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).
RGBChannel
Definition: Types.h:261
An interface to a set of histograms created from Bayer pixel data, one per Bayer channel.