L4T Multimedia API Reference

28.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-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_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 
96  virtual Status setFrameDurationRange(const Range<uint64_t>& frameDurationRange) = 0;
97 
101  virtual Range<uint64_t> getFrameDurationRange() const = 0;
102 
112  virtual Status setGainRange(const Range<float>& gainRange) = 0;
113 
117  virtual Range<float> getGainRange() const = 0;
118 
128  virtual Status setSensorMode(SensorMode* mode) = 0;
129 
133  virtual SensorMode* getSensorMode() const = 0;
134 
143  virtual Status setOpticalBlack(const BayerTuple<float>& opticalBlackLevels) = 0;
144 
150  virtual BayerTuple<float> getOpticalBlack() const = 0;
151 
160  virtual Status setOpticalBlackEnable(bool enable) = 0;
161 
169  virtual bool getOpticalBlackEnable() const = 0;
170 
171 
172 protected:
174 };
175 
183 DEFINE_UUID(InterfaceID, IID_AUTO_CONTROL_SETTINGS, 1f2ad1c6,cb13,440b,bc95,3f,fd,0d,19,91,db);
185 {
186 public:
187  static const InterfaceID& id() { return IID_AUTO_CONTROL_SETTINGS; }
188 
196 
200  virtual AeAntibandingMode getAeAntibandingMode() const = 0;
201 
208  virtual Status setAeLock(bool lock) = 0;
209 
213  virtual bool getAeLock() const = 0;
214 
223  virtual Status setAeRegions(const std::vector<AcRegion>& regions) = 0;
224 
231  virtual Status getAeRegions(std::vector<AcRegion>* regions) const = 0;
232 
239  virtual Status setAwbLock(bool lock) = 0;
240 
244  virtual bool getAwbLock() const = 0;
245 
252  virtual Status setAwbMode(const AwbMode& mode) = 0;
253 
257  virtual AwbMode getAwbMode() const = 0;
258 
267  virtual Status setAwbRegions(const std::vector<AcRegion>& regions) = 0;
268 
275  virtual Status getAwbRegions(std::vector<AcRegion>* regions) const = 0;
276 
283  virtual Status setWbGains(const BayerTuple<float>& gains) = 0;
284 
290  virtual BayerTuple<float> getWbGains() const = 0;
291 
296 
309  virtual Status setColorCorrectionMatrix(const std::vector<float>& matrix) = 0;
310 
317  virtual Status getColorCorrectionMatrix(std::vector<float>* matrix) const = 0;
318 
326  virtual Status setColorCorrectionMatrixEnable(bool enable) = 0;
327 
331  virtual bool getColorCorrectionMatrixEnable() const = 0;
332 
344  virtual Status setColorSaturation(float saturation) = 0;
345 
349  virtual float getColorSaturation() const = 0;
350 
358  virtual Status setColorSaturationEnable(bool enable) = 0;
359 
363  virtual bool getColorSaturationEnable() const = 0;
364 
379  virtual Status setColorSaturationBias(float bias) = 0;
380 
384  virtual float getColorSaturationBias() const = 0;
385 
393  virtual Status setExposureCompensation(float ev) = 0;
394 
398  virtual float getExposureCompensation() const = 0;
399 
404  virtual uint32_t getToneMapCurveSize(RGBChannel channel) const = 0;
405 
416  virtual Status setToneMapCurve(RGBChannel channel, const std::vector<float>& curve) = 0;
417 
426  virtual Status getToneMapCurve(RGBChannel channel, std::vector<float>* curve) const = 0;
427 
434  virtual Status setToneMapCurveEnable(bool enable) = 0;
435 
439  virtual bool getToneMapCurveEnable() const = 0;
440 
447  virtual Status setIspDigitalGainRange(const Range<float>& gain) = 0;
448 
454  virtual Range<float> getIspDigitalGainRange() const = 0;
455 
456 protected:
458 };
459 
467 DEFINE_UUID(InterfaceID, IID_STREAM_SETTINGS, c477aeaf,9cc8,4467,a834,c7,07,d7,b6,9f,a4);
469 {
470 public:
471  static const InterfaceID& id() { return IID_STREAM_SETTINGS; }
472 
481  virtual Status setSourceClipRect(const Rectangle<float>& clipRect) = 0;
482 
486  virtual Rectangle<float> getSourceClipRect() const = 0;
487 
498  virtual void setPostProcessingEnable(bool enable) = 0;
499 
503  virtual bool getPostProcessingEnable() const = 0;
504 
505 protected:
507 };
508 
516 DEFINE_UUID(InterfaceID, IID_DENOISE_SETTINGS, 7A461D20,6AE1,11E6,BDF4,08,00,20,0C,9A,66);
518 {
519 public:
520  static const InterfaceID& id() { return IID_DENOISE_SETTINGS; }
521 
532  virtual Status setDenoiseMode(const DenoiseMode& mode) = 0;
533 
537  virtual DenoiseMode getDenoiseMode() const = 0;
538 
548  virtual Status setDenoiseStrength(float strength) = 0;
549 
553  virtual float getDenoiseStrength() const = 0;
554 
555 protected:
557 };
558 
566 DEFINE_UUID(InterfaceID, IID_EDGE_ENHANCE_SETTINGS, 7A461D21,6AE1,11E6,BDF4,08,00,20,0C,9A,66);
568 {
569 public:
570  static const InterfaceID& id() { return IID_EDGE_ENHANCE_SETTINGS; }
571 
582  virtual Status setEdgeEnhanceMode(const EdgeEnhanceMode& mode) = 0;
583 
587  virtual EdgeEnhanceMode getEdgeEnhanceMode() const = 0;
588 
598  virtual Status setEdgeEnhanceStrength(float strength) = 0;
599 
603  virtual float getEdgeEnhanceStrength() const = 0;
604 
605 protected:
607 };
608 
616 DEFINE_UUID(InterfaceID, IID_VIDEO_STABILIZATION_SETTINGS, 7A461D22,6AE1,11E6,BDF4,08,00,20,0C,9A,66);
618 {
619 public:
620  static const InterfaceID& id() { return IID_VIDEO_STABILIZATION_SETTINGS; }
621 
628  virtual Status setVideoStabilizationMode(const VideoStabilizationMode& mode) = 0;
629 
633  virtual VideoStabilizationMode getVideoStabilizationMode() const = 0;
634 
635 protected:
637 };
638 
639 } // namespace Argus
640 
641 #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:184
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 Status setVideoStabilizationMode(const VideoStabilizationMode &mode)=0
Sets the video stabilization mode to use for the request.
virtual AeAntibandingMode getAeAntibandingMode() const =0
Returns the AE antibanding mode.
Status
Status values returned by API function calls.
Definition: Types.h:218
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:187
Interface to denoise settings.
Definition: Settings.h:517
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:320
virtual Status setFocusPosition(int32_t position)=0
Sets the focus position, in focuser units.
virtual Status setAeAntibandingMode(AeAntibandingMode mode)=0
Sets the AE antibanding mode.
virtual Status setDenoiseMode(const DenoiseMode &mode)=0
Sets the denoise (noise reduction) mode for the request.
static const InterfaceID & id()
Definition: Settings.h:520
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 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:697
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.
virtual VideoStabilizationMode getVideoStabilizationMode() const =0
Returns the video stabilization mode for the request.
static const InterfaceID & id()
Definition: Settings.h:471
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:468
Interface to edge enhancement settings.
Definition: Settings.h:567
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:570
virtual Status setOpticalBlack(const BayerTuple< float > &opticalBlackLevels)=0
Sets the user-specified optical black levels.
AeAntibandingMode
Definition: Types.h:174
Interface to video stabilization settings.
Definition: Settings.h:617
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:740
A unique identifier for a libargus Interface.
Definition: Types.h:330
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 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:570
virtual float getEdgeEnhanceStrength() const =0
Returns the edge enhancement strength.
static const InterfaceID & id()
Definition: Settings.h:620
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 int32_t getFocusPosition() const =0
Returns the focus position, in focuser units.
virtual BayerTuple< float > getOpticalBlack() const =0
Returns user-specified opticalBlack level per bayer phase.
RGBChannel
Definition: Types.h:251