Jetson Linux API Reference

32.7.5 Release
CaptureMetadata.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016-2023, 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 Rectangle<uint32_t> getBayerHistogramRegion() const = 0;
241 
245  virtual AeState getAeState() const = 0;
246 
250  virtual AeFlickerState getFlickerState() const = 0;
251 
255  virtual int32_t getAperturePosition() const = 0;
256 
260  virtual int32_t getFocuserPosition() const = 0;
261 
265  virtual uint32_t getAwbCct() const = 0;
266 
270  virtual BayerTuple<float> getAwbGains() const = 0;
271 
275  virtual AwbMode getAwbMode() const = 0;
276 
284  virtual Status getAwbRegions(std::vector<AcRegion>* regions) const = 0;
285 
289  virtual AfMode getAfMode() const = 0;
290 
298  virtual Status getAfRegions(std::vector<AcRegion>* regions) const = 0;
299 
307  virtual Status getSharpnessScore(std::vector<float>* values) const = 0;
308 
312  virtual AwbState getAwbState() const = 0;
313 
322  virtual Status getAwbWbEstimate(std::vector<float>* estimate) const = 0;
323 
327  virtual bool getColorCorrectionMatrixEnable() const = 0;
328 
338  virtual Status getColorCorrectionMatrix(std::vector<float>* ccMatrix) const = 0;
339 
343  virtual float getColorSaturation() const = 0;
344 
349  virtual uint64_t getFrameDuration() const = 0;
350 
354  virtual float getIspDigitalGain() const = 0;
355 
360  virtual uint64_t getFrameReadoutTime() const = 0;
361 
365  virtual float getSceneLux() const = 0;
366 
370  virtual float getSensorAnalogGain() const = 0;
371 
375  virtual uint64_t getSensorExposureTime() const = 0;
376 
380  virtual uint32_t getSensorSensitivity() const = 0;
381 
386  virtual uint64_t getSensorTimestamp() const = 0;
387 
391  virtual bool getToneMapCurveEnabled() const = 0;
392 
403  virtual Status getToneMapCurve(RGBChannel channel, std::vector<float>* curve) const = 0;
404 
405 protected:
407 };
408 
416 DEFINE_UUID(InterfaceID, IID_DENOISE_METADATA, 7A461D23,6AE1,11E6,BDF4,08,00,20,0C,9A,66);
418 {
419 public:
420  static const InterfaceID& id() { return IID_DENOISE_METADATA; }
421 
425  virtual DenoiseMode getDenoiseMode() const = 0;
426 
430  virtual float getDenoiseStrength() const = 0;
431 
432 protected:
434 };
435 
443 DEFINE_UUID(InterfaceID, IID_EDGE_ENHANCE_METADATA, 7A461D24,6AE1,11E6,BDF4,08,00,20,0C,9A,66);
445 {
446 public:
447  static const InterfaceID& id() { return IID_EDGE_ENHANCE_METADATA; }
448 
452  virtual EdgeEnhanceMode getEdgeEnhanceMode() const = 0;
453 
457  virtual float getEdgeEnhanceStrength() const = 0;
458 
459 protected:
461 };
462 
463 } // namespace Argus
464 
465 #endif // _ARGUS_CAPTURE_METADATA_H
Argus::ICaptureMetadata::getSensorExposureTime
virtual uint64_t getSensorExposureTime() const =0
Returns the sensor exposure time for this capture (in nanoseconds).
Argus::IStreamCaptureMetadata::id
static const InterfaceID & id()
Definition: CaptureMetadata.h:150
Argus::IRGBHistogram::getHistogram
virtual Status getHistogram(std::vector< RGBTuple< uint32_t > > *histogram) const =0
Returns the histogram data.
Argus::ICaptureMetadata::NUM_AWB_WB_ESTIMATE_ELEMENTS
static const uint32_t NUM_AWB_WB_ESTIMATE_ELEMENTS
Definition: CaptureMetadata.h:189
Argus::ICaptureMetadata::getStreamMetadata
virtual InterfaceProvider * getStreamMetadata(const OutputStream *stream) const =0
Returns the per-stream metadata provider for stream.
Argus::ICaptureMetadata::getColorCorrectionMatrix
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.
Argus::IDenoiseMetadata::id
static const InterfaceID & id()
Definition: CaptureMetadata.h:420
Argus::ICaptureMetadata::getToneMapCurveEnabled
virtual bool getToneMapCurveEnabled() const =0
Returns true if and only if a user-specified tone map curve was used for this capture.
Argus::OutputStream
Definition: Stream.h:59
Argus::IDenoiseMetadata
Definition: CaptureMetadata.h:417
Argus::DEFINE_UUID
DEFINE_UUID(ExtensionName, EXT_BAYER_AVERAGE_MAP, 12c3de20, 64c5, 11e6, bdf4, 08, 00, 20, 0c, 9a, 66)
Argus::IEdgeEnhanceMetadata::~IEdgeEnhanceMetadata
~IEdgeEnhanceMetadata()
Definition: CaptureMetadata.h:460
Argus::IBayerHistogram::getBinCount
virtual uint32_t getBinCount() const =0
Returns the number of bins in the histogram.
Argus::ICaptureMetadata::getSensorTimestamp
virtual uint64_t getSensorTimestamp() const =0
Returns the kernel (SOF) timestamp for the sensor (in nanoseconds).
Argus::ICaptureMetadata::getFrameDuration
virtual uint64_t getFrameDuration() const =0
Returns the time it took to integrate this capture (in nanoseconds).
Argus::IDenoiseMetadata::getDenoiseStrength
virtual float getDenoiseStrength() const =0
Returns the denoise strength used for the capture.
Argus::ICaptureMetadata::getAfMode
virtual AfMode getAfMode() const =0
Returns the AF mode used for this capture.
Argus::ICaptureMetadata::getAwbCct
virtual uint32_t getAwbCct() const =0
Returns the CCT calculated by AWB for this capture.
Argus::IRGBHistogram
Definition: CaptureMetadata.h:113
Argus::ICaptureMetadata::getColorSaturation
virtual float getColorSaturation() const =0
Returns the color saturation value used for this capture (including biasing).
Argus
Definition: BayerAverageMap.h:39
Argus::CaptureMetadata
Definition: CaptureMetadata.h:48
Argus::ICaptureMetadata::getFocuserPosition
virtual int32_t getFocuserPosition() const =0
Returns the focuser position used for this capture (in focuser steps).
Argus::ICaptureMetadata::id
static const InterfaceID & id()
Definition: CaptureMetadata.h:186
Argus::ICaptureMetadata::getSensorAnalogGain
virtual float getSensorAnalogGain() const =0
Returns the sensor analog gain used for this capture.
Argus::IEdgeEnhanceMetadata::id
static const InterfaceID & id()
Definition: CaptureMetadata.h:447
Argus::ICaptureMetadata::getSharpnessScore
virtual Status getSharpnessScore(std::vector< float > *values) const =0
Gets the sharpness score values calculated for corresponding AF regions.
Argus::IBayerHistogram::id
static const InterfaceID & id()
Definition: CaptureMetadata.h:81
Argus::Interface
The top-level interface class.
Definition: Types.h:344
Argus::ICaptureMetadata::getSceneLux
virtual float getSceneLux() const =0
Returns the estimated scene brightness for this capture (in lux).
Argus::ICaptureMetadata::getAwbWbEstimate
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.
Argus::IStreamCaptureMetadata
Definition: CaptureMetadata.h:146
Argus::ICaptureMetadata::getAwbState
virtual AwbState getAwbState() const =0
Argus::IBayerHistogram::~IBayerHistogram
~IBayerHistogram()
Definition: CaptureMetadata.h:99
Argus::IDenoiseMetadata::~IDenoiseMetadata
~IDenoiseMetadata()
Definition: CaptureMetadata.h:433
Argus::Rectangle
Rectangle template class.
Definition: Types.h:754
Argus::ICaptureMetadata::getSensorSensitivity
virtual uint32_t getSensorSensitivity() const =0
Returns the ISO value used for this capture.
Argus::ICaptureMetadata::getToneMapCurve
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 ...
Argus::IRGBHistogram::id
static const InterfaceID & id()
Definition: CaptureMetadata.h:117
Argus::ICaptureMetadata::getRGBHistogram
virtual const InterfaceProvider * getRGBHistogram() const =0
Returns the RGB histogram for this capture.
Argus::InterfaceID
A unique identifier for a libargus Interface.
Definition: Types.h:354
Argus::IBayerHistogram
Definition: CaptureMetadata.h:77
Argus::ICaptureMetadata::getCaptureId
virtual uint32_t getCaptureId() const =0
Returns the capture id (the value returned from ICaptureSession::capture()) of the capture that gener...
Argus::ICaptureMetadata::getFrameReadoutTime
virtual uint64_t getFrameReadoutTime() const =0
Returns the frame readout time for this capture (in nanoseconds) from the beginning of the first line...
Argus::ICaptureMetadata::getAeRegions
virtual Status getAeRegions(std::vector< AcRegion > *regions) const =0
Gets the AE regions of interest used for this capture.
Argus::InterfaceProvider
The base interface for a class that provides libargus Interfaces.
Definition: Types.h:375
Argus::ICaptureMetadata::getAeState
virtual AeState getAeState() const =0
Returns the state of AE when it ran for this capture.
Argus::IDenoiseMetadata::getDenoiseMode
virtual DenoiseMode getDenoiseMode() const =0
Returns the denoise mode used for the capture.
Argus::ICaptureMetadata::~ICaptureMetadata
~ICaptureMetadata()
Definition: CaptureMetadata.h:406
Argus::IEdgeEnhanceMetadata::getEdgeEnhanceStrength
virtual float getEdgeEnhanceStrength() const =0
Returns the edge enhancement strength used for the capture.
Argus::ICaptureMetadata::getColorCorrectionMatrixEnable
virtual bool getColorCorrectionMatrixEnable() const =0
Returns the enable state for the client-supplied Color Correction Matrix.
Argus::CaptureMetadata::~CaptureMetadata
~CaptureMetadata()
Definition: CaptureMetadata.h:51
Argus::IEdgeEnhanceMetadata::getEdgeEnhanceMode
virtual EdgeEnhanceMode getEdgeEnhanceMode() const =0
Returns the edge enhancement mode used for the capture.
Argus::BayerTuple
BayerTuple template class.
Definition: Types.h:594
Argus::IRGBHistogram::~IRGBHistogram
~IRGBHistogram()
Definition: CaptureMetadata.h:135
Argus::RGBChannel
RGBChannel
Color channel constants for RGB data.
Definition: Types.h:158
Argus::ICaptureMetadata::getClientData
virtual uint32_t getClientData() const =0
Returns the clientData value for the Request used in the capture that generated this metadata.
Argus::IStreamCaptureMetadata::~IStreamCaptureMetadata
~IStreamCaptureMetadata()
Definition: CaptureMetadata.h:159
Argus::ICaptureMetadata::getAeLocked
virtual bool getAeLocked() const =0
Returns true if and only if AE was locked for this capture.
Argus::ICaptureMetadata::getAwbMode
virtual AwbMode getAwbMode() const =0
Returns the AWB mode used for this capture.
Argus::ICaptureMetadata::NUM_COLOR_CORRECTION_ELEMENTS
static const uint32_t NUM_COLOR_CORRECTION_ELEMENTS
Definition: CaptureMetadata.h:188
Argus::IRGBHistogram::getBinCount
virtual uint32_t getBinCount() const =0
Returns the number of bins in the histogram.
Argus::ICaptureMetadata::getAperturePosition
virtual int32_t getAperturePosition() const =0
Returns the aperture position.
Argus::ICaptureMetadata::getBayerHistogram
virtual const InterfaceProvider * getBayerHistogram() const =0
Returns the Bayer histogram for this capture.
Argus::ICaptureMetadata::getFlickerState
virtual AeFlickerState getFlickerState() const =0
Returns the flicker state of this capture.
Argus::ICaptureMetadata::getBayerHistogramRegion
virtual Rectangle< uint32_t > getBayerHistogramRegion() const =0
Returns the rectangle of the bayer histogram region of interest.
Argus::RGBTuple
RGBTuple template class.
Definition: Types.h:629
Argus::Destructable
A top level object class for libargus objects that are created and owned by the client.
Definition: Types.h:412
Argus::CaptureMetadataContainer::~CaptureMetadataContainer
~CaptureMetadataContainer()
Definition: CaptureMetadata.h:63
Argus::ICaptureMetadata::getAwbGains
virtual BayerTuple< float > getAwbGains() const =0
Returns the AWB gains used for this capture.
Argus::IStreamCaptureMetadata::getSourceClipRect
virtual Rectangle< float > getSourceClipRect() const =0
Returns the clip rectangle used for this stream.
Argus::ICaptureMetadata::getAwbRegions
virtual Status getAwbRegions(std::vector< AcRegion > *regions) const =0
Gets the AWB regions of interest used for this capture.
Argus::IEdgeEnhanceMetadata
Definition: CaptureMetadata.h:444
Argus::Status
Status
Status values returned by API function calls.
Definition: Types.h:93
Argus::ICaptureMetadata::getAfRegions
virtual Status getAfRegions(std::vector< AcRegion > *regions) const =0
Gets the AF regions of interest used for this capture.
Argus::CaptureMetadataContainer
An object that holds a CaptureMetadata instance and is used to read the capture metadata from a consu...
Definition: CaptureMetadata.h:60
Argus::ICaptureMetadata::getIspDigitalGain
virtual float getIspDigitalGain() const =0
Returns the digital gain used for this capture.
Argus::ICaptureMetadata
Definition: CaptureMetadata.h:182
Argus::IBayerHistogram::getHistogram
virtual Status getHistogram(std::vector< BayerTuple< uint32_t > > *histogram) const =0
Returns the histogram data.