L4T Multimedia API Reference

32.3.1 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Settings.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016-2019, 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_SETTINGS_H
37 #define _ARGUS_SETTINGS_H
38 
39 namespace Argus
40 {
41 
49 DEFINE_UUID(InterfaceID, IID_SOURCE_SETTINGS, eb7ae38c,3c62,4161,a92a,a6,4f,ba,c6,38,83);
50 class ISourceSettings : public Interface
51 {
52 public:
53  static const InterfaceID& id() { return IID_SOURCE_SETTINGS; }
54 
65  virtual Status setExposureTimeRange(const Range<uint64_t>& exposureTimeRange) = 0;
66 
70  virtual Range<uint64_t> getExposureTimeRange() const = 0;
71 
80  virtual Status setFocusPosition(int32_t position) = 0;
81 
85  virtual int32_t getFocusPosition() const = 0;
86 
95  virtual Status setApertureMotorStep(int32_t step) = 0;
96 
100  virtual int32_t getApertureMotorStep() const = 0;
101 
110  virtual Status setApertureMotorSpeed(float speed) = 0;
111 
115  virtual float getApertureMotorSpeed() const = 0;
116 
126  virtual Status setFrameDurationRange(const Range<uint64_t>& frameDurationRange) = 0;
127 
131  virtual Range<uint64_t> getFrameDurationRange() const = 0;
132 
142  virtual Status setGainRange(const Range<float>& gainRange) = 0;
143 
147  virtual Range<float> getGainRange() const = 0;
148 
158  virtual Status setSensorMode(SensorMode* mode) = 0;
159 
163  virtual SensorMode* getSensorMode() const = 0;
164 
173  virtual Status setOpticalBlack(const BayerTuple<float>& opticalBlackLevels) = 0;
174 
180  virtual BayerTuple<float> getOpticalBlack() const = 0;
181 
190  virtual Status setOpticalBlackEnable(bool enable) = 0;
191 
199  virtual bool getOpticalBlackEnable() const = 0;
200 
201 
202 protected:
204 };
205 
213 DEFINE_UUID(InterfaceID, IID_AUTO_CONTROL_SETTINGS, 1f2ad1c6,cb13,440b,bc95,3f,fd,0d,19,91,db);
215 {
216 public:
217  static const InterfaceID& id() { return IID_AUTO_CONTROL_SETTINGS; }
218 
225  virtual Status setAeAntibandingMode(const AeAntibandingMode& mode) = 0;
226 
230  virtual AeAntibandingMode getAeAntibandingMode() const = 0;
231 
238  virtual Status setAeLock(bool lock) = 0;
239 
243  virtual bool getAeLock() const = 0;
244 
253  virtual Status setAeRegions(const std::vector<AcRegion>& regions) = 0;
254 
261  virtual Status getAeRegions(std::vector<AcRegion>* regions) const = 0;
262 
269  virtual Status setAwbLock(bool lock) = 0;
270 
274  virtual bool getAwbLock() const = 0;
275 
282  virtual Status setAwbMode(const AwbMode& mode) = 0;
283 
287  virtual AwbMode getAwbMode() const = 0;
288 
297  virtual Status setAwbRegions(const std::vector<AcRegion>& regions) = 0;
298 
305  virtual Status getAwbRegions(std::vector<AcRegion>* regions) const = 0;
306 
313  virtual Status setWbGains(const BayerTuple<float>& gains) = 0;
314 
320  virtual BayerTuple<float> getWbGains() const = 0;
321 
326 
339  virtual Status setColorCorrectionMatrix(const std::vector<float>& matrix) = 0;
340 
347  virtual Status getColorCorrectionMatrix(std::vector<float>* matrix) const = 0;
348 
356  virtual Status setColorCorrectionMatrixEnable(bool enable) = 0;
357 
361  virtual bool getColorCorrectionMatrixEnable() const = 0;
362 
374  virtual Status setColorSaturation(float saturation) = 0;
375 
379  virtual float getColorSaturation() const = 0;
380 
388  virtual Status setColorSaturationEnable(bool enable) = 0;
389 
393  virtual bool getColorSaturationEnable() const = 0;
394 
409  virtual Status setColorSaturationBias(float bias) = 0;
410 
414  virtual float getColorSaturationBias() const = 0;
415 
423  virtual Status setExposureCompensation(float ev) = 0;
424 
428  virtual float getExposureCompensation() const = 0;
429 
434  virtual uint32_t getToneMapCurveSize(RGBChannel channel) const = 0;
435 
446  virtual Status setToneMapCurve(RGBChannel channel, const std::vector<float>& curve) = 0;
447 
456  virtual Status getToneMapCurve(RGBChannel channel, std::vector<float>* curve) const = 0;
457 
464  virtual Status setToneMapCurveEnable(bool enable) = 0;
465 
469  virtual bool getToneMapCurveEnable() const = 0;
470 
477  virtual Status setIspDigitalGainRange(const Range<float>& gain) = 0;
478 
484  virtual Range<float> getIspDigitalGainRange() const = 0;
485 
486 protected:
488 };
489 
497 DEFINE_UUID(InterfaceID, IID_STREAM_SETTINGS, c477aeaf,9cc8,4467,a834,c7,07,d7,b6,9f,a4);
499 {
500 public:
501  static const InterfaceID& id() { return IID_STREAM_SETTINGS; }
502 
511  virtual Status setSourceClipRect(const Rectangle<float>& clipRect) = 0;
512 
516  virtual Rectangle<float> getSourceClipRect() const = 0;
517 
527  virtual void setPostProcessingEnable(bool enable) = 0;
528 
532  virtual bool getPostProcessingEnable() const = 0;
533 
534 protected:
536 };
537 
545 DEFINE_UUID(InterfaceID, IID_DENOISE_SETTINGS, 7A461D20,6AE1,11E6,BDF4,08,00,20,0C,9A,66);
547 {
548 public:
549  static const InterfaceID& id() { return IID_DENOISE_SETTINGS; }
550 
561  virtual Status setDenoiseMode(const DenoiseMode& mode) = 0;
562 
566  virtual DenoiseMode getDenoiseMode() const = 0;
567 
577  virtual Status setDenoiseStrength(float strength) = 0;
578 
582  virtual float getDenoiseStrength() const = 0;
583 
584 protected:
586 };
587 
595 DEFINE_UUID(InterfaceID, IID_EDGE_ENHANCE_SETTINGS, 7A461D21,6AE1,11E6,BDF4,08,00,20,0C,9A,66);
597 {
598 public:
599  static const InterfaceID& id() { return IID_EDGE_ENHANCE_SETTINGS; }
600 
611  virtual Status setEdgeEnhanceMode(const EdgeEnhanceMode& mode) = 0;
612 
616  virtual EdgeEnhanceMode getEdgeEnhanceMode() const = 0;
617 
627  virtual Status setEdgeEnhanceStrength(float strength) = 0;
628 
632  virtual float getEdgeEnhanceStrength() const = 0;
633 
634 protected:
636 };
637 
638 } // namespace Argus
639 
640 #endif // _ARGUS_SETTINGS_H
virtual Status setSourceClipRect(const Rectangle< float > &clipRect)=0
Sets the clip rectangle for the stream.
virtual Status setToneMapCurve(RGBChannel channel, const std::vector< float > &curve)=0
Sets the user-specified tone map curve for a channel on the stream.
virtual Status setDenoiseStrength(float strength)=0
Sets the strength for the denoise operation.
virtual Status setAeRegions(const std::vector< AcRegion > &regions)=0
Sets the AE regions of interest.
virtual Status setIspDigitalGainRange(const Range< float > &gain)=0
Sets the user-specified Isp Digital gain range.
DEFINE_UUID(ExtensionName, EXT_BAYER_AVERAGE_MAP, 12c3de20, 64c5, 11e6, bdf4, 08, 00, 20, 0c, 9a, 66)
Interface to the auto control settings (provided by IRequest::getAutoControlSettings()).
Definition: Settings.h:214
Interface to the source settings (provided by IRequest::getSourceSettings()).
Definition: Settings.h:50
virtual Status getAeRegions(std::vector< AcRegion > *regions) const =0
Returns the AE regions of interest.
virtual Status setAeLock(bool lock)=0
Sets the AE lock.
virtual Status setColorSaturationEnable(bool enable)=0
Enables the user-specified absolute color saturation.
virtual AeAntibandingMode getAeAntibandingMode() const =0
Returns the AE antibanding mode.
Status
Status values returned by API function calls.
Definition: Types.h:93
virtual Status setAwbMode(const AwbMode &mode)=0
Sets the AWB mode.
virtual bool getPostProcessingEnable() const =0
Returns the post-processing enable for the stream.
static const InterfaceID & id()
Definition: Settings.h:217
Interface to denoise settings.
Definition: Settings.h:546
virtual Range< float > getGainRange() const =0
Returns the gain range.
static const InterfaceID & id()
Definition: Settings.h:53
The top-level interface class.
Definition: Types.h:290
virtual Status setFocusPosition(int32_t position)=0
Sets the focus position, in focuser units.
virtual Status setDenoiseMode(const DenoiseMode &mode)=0
Sets the denoise (noise reduction) mode for the request.
static const InterfaceID & id()
Definition: Settings.h:549
virtual Status setEdgeEnhanceStrength(float strength)=0
Sets the strength for the edge enhancement operation.
virtual uint32_t getToneMapCurveSize(RGBChannel channel) const =0
Returns the number of elements required for the tone map curve.
virtual Status setAeAntibandingMode(const AeAntibandingMode &mode)=0
Sets the AE antibanding mode.
virtual Status getColorCorrectionMatrix(std::vector< float > *matrix) const =0
Returns the user-specified color correction matrix.
virtual SensorMode * getSensorMode() const =0
Returns the sensor mode.
virtual Range< uint64_t > getFrameDurationRange() const =0
Returns the frame duration range, in nanoseconds.
virtual AwbMode getAwbMode() const =0
Returns the AWB mode.
virtual Status getAwbRegions(std::vector< AcRegion > *regions) const =0
Returns the AWB regions of interest.
virtual Status setExposureCompensation(float ev)=0
Sets the exposure compensation.
virtual float getExposureCompensation() const =0
Returns the exposure compensation.
virtual bool getAwbLock() const =0
Returns the AWB lock.
virtual Status setGainRange(const Range< float > &gainRange)=0
Sets the gain range for the sensor.
virtual Status setAwbLock(bool lock)=0
Sets the AWB lock.
virtual Status setFrameDurationRange(const Range< uint64_t > &frameDurationRange)=0
Sets the frame duration range, in nanoseconds.
Rectangle template class.
Definition: Types.h:667
virtual Status setColorSaturationBias(float bias)=0
Sets the color saturation bias.
virtual bool getOpticalBlackEnable() const =0
Returns whether user-specified optical black levels are enabled.
static const InterfaceID & id()
Definition: Settings.h:501
virtual Status setAwbRegions(const std::vector< AcRegion > &regions)=0
Sets the AWB regions of interest.
virtual float getColorSaturation() const =0
Returns the user-specified absolute color saturation (.
virtual Status setEdgeEnhanceMode(const EdgeEnhanceMode &mode)=0
Sets the edge enhancement mode for the request.
virtual Status getToneMapCurve(RGBChannel channel, std::vector< float > *curve) const =0
Returns the user-specified tone map curve for a channel on the stream.
virtual Status setApertureMotorStep(int32_t step)=0
Sets the aperture motor step position.
virtual Status setColorCorrectionMatrixEnable(bool enable)=0
Enables the user-specified color correction matrix.
virtual bool getColorSaturationEnable() const =0
Returns the enable for the user-specified color saturation.
virtual Status setSensorMode(SensorMode *mode)=0
Sets the sensor mode.
virtual Status setWbGains(const BayerTuple< float > &gains)=0
Sets the Manual White Balance gains.
virtual Size2D< uint32_t > getColorCorrectionMatrixSize() const =0
Returns the size of the color correction matrix.
Interface to per-stream settings (provided by IRequest::getStreamSettings()).
Definition: Settings.h:498
Interface to edge enhancement settings.
Definition: Settings.h:596
virtual float getColorSaturationBias() const =0
Returns the color saturation bias.
virtual EdgeEnhanceMode getEdgeEnhanceMode() const =0
Returns the edge enhancement mode for the request.
virtual bool getToneMapCurveEnable() const =0
Returns the enable for the user-specified tone map.
virtual Status setColorCorrectionMatrix(const std::vector< float > &matrix)=0
Sets the user-specified color correction matrix.
virtual bool getColorCorrectionMatrixEnable() const =0
Returns the enable for the user-specified color correction matrix.
BayerTuple template class.
Definition: Types.h:540
virtual Status setOpticalBlack(const BayerTuple< float > &opticalBlackLevels)=0
Sets the user-specified optical black levels.
virtual Range< float > getIspDigitalGainRange() const =0
Returns the user-specified Isp Digital gain range.
virtual float getDenoiseStrength() const =0
Returns the denoise strength.
Range template class.
Definition: Types.h:710
A unique identifier for a libargus Interface.
Definition: Types.h:300
virtual Rectangle< float > getSourceClipRect() const =0
Returns the clip rectangle for the stream.
virtual BayerTuple< float > getWbGains() const =0
Returns the Manual White Balance gains.
virtual int32_t getApertureMotorStep() const =0
Returns the aperture motor step position.
virtual void setPostProcessingEnable(bool enable)=0
Sets whether or not post-processing is enabled for this stream.
virtual Range< uint64_t > getExposureTimeRange() const =0
Returns the exposure time range of the source, in nanoseconds.
virtual Status setColorSaturation(float saturation)=0
Sets the user-specified absolute color saturation.
virtual Status setOpticalBlackEnable(bool enable)=0
Sets whether or not user-provided optical black levels are used.
virtual bool getAeLock() const =0
Returns the AE lock.
virtual DenoiseMode getDenoiseMode() const =0
Returns the denoise mode for the request.
static const InterfaceID & id()
Definition: Settings.h:599
virtual float getEdgeEnhanceStrength() const =0
Returns the edge enhancement strength.
virtual Status setExposureTimeRange(const Range< uint64_t > &exposureTimeRange)=0
Sets the exposure time range of the source, in nanoseconds.
virtual Status setToneMapCurveEnable(bool enable)=0
Enables the user-specified tone map.
virtual float getApertureMotorSpeed() const =0
Returns the aperture motor speed in motor steps/second.
virtual int32_t getFocusPosition() const =0
Returns the focus position, in focuser units.
virtual Status setApertureMotorSpeed(float speed)=0
Sets the aperture motor speed in motor steps/second.
virtual BayerTuple< float > getOpticalBlack() const =0
Returns user-specified opticalBlack level per bayer phase.
RGBChannel
Color channel constants for RGB data.
Definition: Types.h:158