L4T Multimedia API Reference

28.2 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-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 
36 #ifndef _ARGUS_CAPTURE_METADATA_H
37 #define _ARGUS_CAPTURE_METADATA_H
38 
39 namespace Argus
40 {
41 
49 {
50 protected:
52 };
53 
61 {
62 protected:
64 };
65 
76 DEFINE_UUID(InterfaceID, IID_BAYER_HISTOGRAM, 50bc4f1c,6424,beb7,baae,b0,90,c9,c3,25,9e);
77 class IBayerHistogram : public Interface
78 {
79 public:
80 
81  static const InterfaceID& id() { return IID_BAYER_HISTOGRAM; }
82 
86  virtual uint32_t getBinCount() const = 0;
87 
95  virtual Status getHistogram(std::vector< BayerTuple<uint32_t> >* histogram) const = 0;
96 
97 protected:
98 
100 };
101 
112 DEFINE_UUID(InterfaceID, IID_RGB_HISTOGRAM, 50bc4f1d,6424,beb7,baae,b0,90,c9,c3,25,9e);
113 class IRGBHistogram : public Interface
114 {
115 public:
116 
117  static const InterfaceID& id() { return IID_RGB_HISTOGRAM; }
118 
122  virtual uint32_t getBinCount() const = 0;
123 
131  virtual Status getHistogram(std::vector< RGBTuple<uint32_t> >* histogram) const = 0;
132 
133 protected:
134 
136 };
137 
145 DEFINE_UUID(InterfaceID, IID_STREAM_CAPTURE_METADATA, 61cbe0a8,0ee1,4c67,baae,02,02,1a,b8,d9,47);
147 {
148 public:
149 
150  static const InterfaceID& id() { return IID_STREAM_CAPTURE_METADATA; }
151 
155  virtual Rectangle<float> getSourceClipRect() const = 0;
156 
157 protected:
158 
160 };
161 
181 DEFINE_UUID(InterfaceID, IID_CAPTURE_METADATA, 5f6ac5d4,59e8,45d0,8bac,38,09,1f,f8,74,a9);
183 {
184 public:
185 
186  static const InterfaceID& id() { return IID_CAPTURE_METADATA; }
187 
188  static const uint32_t NUM_COLOR_CORRECTION_ELEMENTS = 9;
189  static const uint32_t NUM_AWB_WB_ESTIMATE_ELEMENTS = 4;
190 
195  virtual uint32_t getCaptureId() const = 0;
196 
203  virtual uint32_t getClientData() const = 0;
204 
209  virtual InterfaceProvider* getStreamMetadata(const OutputStream* stream) const = 0;
210 
215  virtual const InterfaceProvider* getBayerHistogram() const = 0;
216 
221  virtual const InterfaceProvider* getRGBHistogram() const = 0;
222 
226  virtual bool getAeLocked() const = 0;
227 
235  virtual Status getAeRegions(std::vector<AcRegion>* regions) const = 0;
236 
240  virtual AeState getAeState() const = 0;
241 
245  virtual int32_t getFocuserPosition() const = 0;
246 
250  virtual uint32_t getAwbCct() const = 0;
251 
255  virtual BayerTuple<float> getAwbGains() const = 0;
256 
260  virtual AwbMode getAwbMode() const = 0;
261 
269  virtual Status getAwbRegions(std::vector<AcRegion>* regions) const = 0;
270 
274  virtual AwbState getAwbState() const = 0;
275 
284  virtual Status getAwbWbEstimate(std::vector<float>* estimate) const = 0;
285 
289  virtual bool getColorCorrectionMatrixEnable() const = 0;
290 
300  virtual Status getColorCorrectionMatrix(std::vector<float>* ccMatrix) const = 0;
301 
305  virtual float getColorSaturation() const = 0;
306 
311  virtual uint64_t getFrameDuration() const = 0;
312 
316  virtual float getIspDigitalGain() const = 0;
317 
322  virtual uint64_t getFrameReadoutTime() const = 0;
323 
327  virtual float getSceneLux() const = 0;
328 
332  virtual float getSensorAnalogGain() const = 0;
333 
337  virtual uint64_t getSensorExposureTime() const = 0;
338 
342  virtual uint32_t getSensorSensitivity() const = 0;
343 
348  virtual uint64_t getSensorTimestamp() const = 0;
349 
353  virtual bool getToneMapCurveEnabled() const = 0;
354 
365  virtual Status getToneMapCurve(RGBChannel channel, std::vector<float>* curve) const = 0;
366 
367 protected:
369 };
370 
378 DEFINE_UUID(InterfaceID, IID_DENOISE_METADATA, 7A461D23,6AE1,11E6,BDF4,08,00,20,0C,9A,66);
380 {
381 public:
382  static const InterfaceID& id() { return IID_DENOISE_METADATA; }
383 
387  virtual DenoiseMode getDenoiseMode() const = 0;
388 
392  virtual float getDenoiseStrength() const = 0;
393 
394 protected:
396 };
397 
405 DEFINE_UUID(InterfaceID, IID_EDGE_ENHANCE_METADATA, 7A461D24,6AE1,11E6,BDF4,08,00,20,0C,9A,66);
407 {
408 public:
409  static const InterfaceID& id() { return IID_EDGE_ENHANCE_METADATA; }
410 
414  virtual EdgeEnhanceMode getEdgeEnhanceMode() const = 0;
415 
419  virtual float getEdgeEnhanceStrength() const = 0;
420 
421 protected:
423 };
424 
432 DEFINE_UUID(InterfaceID, IID_VIDEO_STABILIZATION_METADATA, 7A461D25,6AE1,11E6,BDF4,08,00,20,0C,9A,66);
434 {
435 public:
436  static const InterfaceID& id() { return IID_VIDEO_STABILIZATION_METADATA; }
437 
441  virtual VideoStabilizationMode getVideoStabilizationMode() const = 0;
442 
443 protected:
445 };
446 
447 } // namespace Argus
448 
449 #endif // _ARGUS_CAPTURE_METADATA_H
static const InterfaceID & id()
virtual uint32_t getBinCount() const =0
Returns the number of bins 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:351
Interface to RGB histogram metadata (provided by ICaptureMetadata::getRGBHistogram()).
static const InterfaceID & id()
DEFINE_UUID(ExtensionName, EXT_BAYER_AVERAGE_MAP, 12c3de20, 64c5, 11e6, bdf4, 08, 00, 20, 0c, 9a, 66)
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.
Status
Status values returned by API function calls.
Definition: Types.h:218
static const InterfaceID & id()
The top-level interface class.
Definition: Types.h:320
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.
Interface to video stabilization metadata.
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.
Interface to per-stream metadata (provided by ICaptureMetadata::getStreamMetadata()).
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:184
AwbState
Definition: Types.h:195
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:697
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()
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).
Interface to denoise metadata.
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:570
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.
Interface to the core capture metadata.
RGBTuple template class.
Definition: Types.h:605
A unique identifier for a libargus Interface.
Definition: Types.h:330
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:388
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:251
Interface to edge enhancement metadata.
Interface to Bayer histogram metadata (provided by ICaptureMetadata::getBayerHistogram()).