Jetson Linux Multimedia API Reference

32.4.2 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-2020, 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 setAperturePosition(int32_t position) = 0;
96 
100  virtual int32_t getAperturePosition() const = 0;
101 
110  virtual Status setApertureMotorSpeed(float speed) = 0;
111 
115  virtual float getApertureMotorSpeed() const = 0;
116 
124  virtual Status setApertureFNumber(float fnumber) = 0;
125 
129  virtual float getApertureFNumber() const = 0;
130 
140  virtual Status setFrameDurationRange(const Range<uint64_t>& frameDurationRange) = 0;
141 
145  virtual Range<uint64_t> getFrameDurationRange() const = 0;
146 
156  virtual Status setGainRange(const Range<float>& gainRange) = 0;
157 
161  virtual Range<float> getGainRange() const = 0;
162 
172  virtual Status setSensorMode(SensorMode* mode) = 0;
173 
177  virtual SensorMode* getSensorMode() const = 0;
178 
187  virtual Status setOpticalBlack(const BayerTuple<float>& opticalBlackLevels) = 0;
188 
194  virtual BayerTuple<float> getOpticalBlack() const = 0;
195 
204  virtual Status setOpticalBlackEnable(bool enable) = 0;
205 
213  virtual bool getOpticalBlackEnable() const = 0;
214 
215 
216 protected:
218 };
219 
227 DEFINE_UUID(InterfaceID, IID_AUTO_CONTROL_SETTINGS, 1f2ad1c6,cb13,440b,bc95,3f,fd,0d,19,91,db);
229 {
230 public:
231  static const InterfaceID& id() { return IID_AUTO_CONTROL_SETTINGS; }
232 
239  virtual Status setAeAntibandingMode(const AeAntibandingMode& mode) = 0;
240 
244  virtual AeAntibandingMode getAeAntibandingMode() const = 0;
245 
252  virtual Status setAeLock(bool lock) = 0;
253 
257  virtual bool getAeLock() const = 0;
258 
270  virtual Status setAeRegions(const std::vector<AcRegion>& regions) = 0;
271 
278  virtual Status getAeRegions(std::vector<AcRegion>* regions) const = 0;
279 
287  virtual Status setBayerHistogramRegion(const Rectangle<uint32_t>& region) = 0;
288 
292  virtual Rectangle<uint32_t> getBayerHistogramRegion() const = 0;
293 
300  virtual Status setAwbLock(bool lock) = 0;
301 
305  virtual bool getAwbLock() const = 0;
306 
313  virtual Status setAwbMode(const AwbMode& mode) = 0;
314 
318  virtual AwbMode getAwbMode() const = 0;
319 
328  virtual Status setAwbRegions(const std::vector<AcRegion>& regions) = 0;
329 
336  virtual Status getAwbRegions(std::vector<AcRegion>* regions) const = 0;
337 
346  virtual Status setAfRegions(const std::vector<AcRegion>& regions) = 0;
347 
354  virtual Status getAfRegions(std::vector<AcRegion>* regions) const = 0;
355 
362  virtual Status setWbGains(const BayerTuple<float>& gains) = 0;
363 
369  virtual BayerTuple<float> getWbGains() const = 0;
370 
375 
388  virtual Status setColorCorrectionMatrix(const std::vector<float>& matrix) = 0;
389 
396  virtual Status getColorCorrectionMatrix(std::vector<float>* matrix) const = 0;
397 
405  virtual Status setColorCorrectionMatrixEnable(bool enable) = 0;
406 
410  virtual bool getColorCorrectionMatrixEnable() const = 0;
411 
423  virtual Status setColorSaturation(float saturation) = 0;
424 
428  virtual float getColorSaturation() const = 0;
429 
437  virtual Status setColorSaturationEnable(bool enable) = 0;
438 
442  virtual bool getColorSaturationEnable() const = 0;
443 
458  virtual Status setColorSaturationBias(float bias) = 0;
459 
463  virtual float getColorSaturationBias() const = 0;
464 
472  virtual Status setExposureCompensation(float ev) = 0;
473 
477  virtual float getExposureCompensation() const = 0;
478 
483  virtual uint32_t getToneMapCurveSize(RGBChannel channel) const = 0;
484 
495  virtual Status setToneMapCurve(RGBChannel channel, const std::vector<float>& curve) = 0;
496 
505  virtual Status getToneMapCurve(RGBChannel channel, std::vector<float>* curve) const = 0;
506 
513  virtual Status setToneMapCurveEnable(bool enable) = 0;
514 
518  virtual bool getToneMapCurveEnable() const = 0;
519 
526  virtual Status setIspDigitalGainRange(const Range<float>& gain) = 0;
527 
533  virtual Range<float> getIspDigitalGainRange() const = 0;
534 
535 protected:
537 };
538 
546 DEFINE_UUID(InterfaceID, IID_STREAM_SETTINGS, c477aeaf,9cc8,4467,a834,c7,07,d7,b6,9f,a4);
548 {
549 public:
550  static const InterfaceID& id() { return IID_STREAM_SETTINGS; }
551 
560  virtual Status setSourceClipRect(const Rectangle<float>& clipRect) = 0;
561 
565  virtual Rectangle<float> getSourceClipRect() const = 0;
566 
576  virtual void setPostProcessingEnable(bool enable) = 0;
577 
581  virtual bool getPostProcessingEnable() const = 0;
582 
583 protected:
585 };
586 
594 DEFINE_UUID(InterfaceID, IID_DENOISE_SETTINGS, 7A461D20,6AE1,11E6,BDF4,08,00,20,0C,9A,66);
596 {
597 public:
598  static const InterfaceID& id() { return IID_DENOISE_SETTINGS; }
599 
610  virtual Status setDenoiseMode(const DenoiseMode& mode) = 0;
611 
615  virtual DenoiseMode getDenoiseMode() const = 0;
616 
626  virtual Status setDenoiseStrength(float strength) = 0;
627 
631  virtual float getDenoiseStrength() const = 0;
632 
633 protected:
635 };
636 
644 DEFINE_UUID(InterfaceID, IID_EDGE_ENHANCE_SETTINGS, 7A461D21,6AE1,11E6,BDF4,08,00,20,0C,9A,66);
646 {
647 public:
648  static const InterfaceID& id() { return IID_EDGE_ENHANCE_SETTINGS; }
649 
660  virtual Status setEdgeEnhanceMode(const EdgeEnhanceMode& mode) = 0;
661 
665  virtual EdgeEnhanceMode getEdgeEnhanceMode() const = 0;
666 
676  virtual Status setEdgeEnhanceStrength(float strength) = 0;
677 
681  virtual float getEdgeEnhanceStrength() const = 0;
682 
683 protected:
685 };
686 
687 } // namespace Argus
688 
689 #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 setAperturePosition(int32_t position)=0
Sets the aperture position.
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)
virtual Status setAfRegions(const std::vector< AcRegion > &regions)=0
Sets the AF regions of interest.
Interface to the auto control settings (provided by IRequest::getAutoControlSettings()).
Definition: Settings.h:228
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 float getApertureFNumber() const =0
Returns the aperture f-number.
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:231
Interface to denoise settings.
Definition: Settings.h:595
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:598
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 getAfRegions(std::vector< AcRegion > *regions) const =0
Returns the AF regions of interest.
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.
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:550
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 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:547
Interface to edge enhancement settings.
Definition: Settings.h:645
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 Rectangle< uint32_t > getBayerHistogramRegion() const =0
Returns the rectangle of the bayer histogram region of interest.
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:648
virtual Status setBayerHistogramRegion(const Rectangle< uint32_t > &region)=0
Sets the bayer histogram region of interest.
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 Status setApertureFNumber(float fnumber)=0
Sets the aperture f-number.
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
virtual int32_t getAperturePosition() const =0
Returns the aperture position.