Multimedia API Reference

November 16, 2016 | 24.2.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, 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 
37 #ifndef _ARGUS_SETTINGS_H
38 #define _ARGUS_SETTINGS_H
39 
50 namespace Argus
51 {
52 
58 DEFINE_UUID(InterfaceID, IID_SOURCE_SETTINGS, eb7ae38c,3c62,4161,a92a,a6,4f,ba,c6,38,83);
59 
60 class ISourceSettings : public Interface
61 {
62 public:
63  static const InterfaceID& id() { return IID_SOURCE_SETTINGS; }
64 
75  virtual Status setExposureTimeRange(const Range<uint64_t>& exposureTimeRange) = 0;
76 
80  virtual Range<uint64_t> getExposureTimeRange() const = 0;
81 
90  virtual Status setFocusPosition(int32_t position) = 0;
91 
95  virtual int32_t getFocusPosition() const = 0;
96 
106  virtual Status setFrameDurationRange(const Range<uint64_t>& frameDurationRange) = 0;
107 
111  virtual Range<uint64_t> getFrameDurationRange() const = 0;
112 
122  virtual Status setGainRange(const Range<float>& gainRange) = 0;
123 
127  virtual Range<float> getGainRange() const = 0;
128 
138  virtual Status setSensorMode(SensorMode* mode) = 0;
139 
143  virtual SensorMode* getSensorMode() const = 0;
144 
145 protected:
147 };
148 
153 DEFINE_UUID(InterfaceID, IID_AUTO_CONTROL_SETTINGS, 1f2ad1c6,cb13,440b,bc95,3f,fd,0d,19,91,db);
154 
156 {
157 public:
158  static const InterfaceID& id() { return IID_AUTO_CONTROL_SETTINGS; }
159 
167 
171  virtual AeAntibandingMode getAeAntibandingMode() const = 0;
172 
179  virtual Status setAeLock(bool lock) = 0;
180 
184  virtual bool getAeLock() const = 0;
185 
194  virtual Status setAeRegions(const std::vector<AcRegion>& regions) = 0;
195 
202  virtual Status getAeRegions(std::vector<AcRegion>* regions) const = 0;
203 
210  virtual Status setAwbLock(bool lock) = 0;
211 
215  virtual bool getAwbLock() const = 0;
216 
223  virtual Status setAwbMode(const AwbMode& mode) = 0;
224 
228  virtual AwbMode getAwbMode() const = 0;
229 
238  virtual Status setAwbRegions(const std::vector<AcRegion>& regions) = 0;
239 
246  virtual Status getAwbRegions(std::vector<AcRegion>* regions) const = 0;
247 
251  virtual Size getColorCorrectionMatrixSize() const = 0;
252 
262  virtual Status setColorCorrectionMatrix(const std::vector<float>& matrix) = 0;
263 
270  virtual Status getColorCorrectionMatrix(std::vector<float>* matrix) const = 0;
271 
279  virtual Status setColorCorrectionMatrixEnable(bool enable) = 0;
280 
284  virtual bool getColorCorrectionMatrixEnable() const = 0;
285 
293  virtual Status setExposureCompensation(float ev) = 0;
294 
298  virtual float getExposureCompensation() const = 0;
299 
304  virtual uint32_t getToneMapCurveSize(RGBColorChannel channel) const = 0;
305 
316  virtual Status setToneMapCurve(RGBColorChannel channel, const std::vector<float>& curve) = 0;
317 
326  virtual Status getToneMapCurve(RGBColorChannel channel, std::vector<float>* curve) const = 0;
327 
334  virtual Status setToneMapCurveEnable(bool enable) = 0;
335 
339  virtual bool getToneMapCurveEnable() const = 0;
340 
341 protected:
343 };
344 
350 DEFINE_UUID(InterfaceID, IID_STREAM_SETTINGS, c477aeaf,9cc8,4467,a834,c7,07,d7,b6,9f,a4);
351 
353 {
354 public:
355  static const InterfaceID& id() { return IID_STREAM_SETTINGS; }
356 
365  virtual Status setSourceClipRect(const NormalizedRect& clipRect) = 0;
366 
370  virtual NormalizedRect getSourceClipRect() const = 0;
371 
378  virtual Status setDenoiseMode(const DenoiseMode& mode) = 0;
379 
383  virtual DenoiseMode getDenoiseMode() const = 0;
384 
391  virtual Status setVideoStabilizationMode(const VideoStabilizationMode& mode) = 0;
392 
396  virtual VideoStabilizationMode getVideoStabilizationMode() const = 0;
397 
398 protected:
400 };
401 
402 } // namespace Argus
404 #endif // _ARGUS_SETTINGS_H
virtual Status setAeRegions(const std::vector< AcRegion > &regions)=0
Sets the AE regions of interest.
An interface to settings related to autocontrol.
Definition: Settings.h:155
An interface to settings that control the sensor module.
Definition: Settings.h:60
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 AeAntibandingMode getAeAntibandingMode() const =0
Returns the AE antibanding mode.
Status
Status values returned by API function calls.
Definition: Types.h:220
virtual Status setAwbMode(const AwbMode &mode)=0
Sets the AWB mode.
static const InterfaceID & id()
Definition: Settings.h:158
RGBColorChannel
Definition: Types.h:253
virtual Range< float > getGainRange() const =0
Returns the gain range.
static const InterfaceID & id()
Definition: Settings.h:63
The top-level interface class.
Definition: Types.h:312
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 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 setSourceClipRect(const NormalizedRect &clipRect)=0
Sets the clip rectangle for the stream.
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 Size getColorCorrectionMatrixSize() const =0
Returns the size of the color correction matrix.
A templatized class to hold a min/max range of values.
Definition: Types.h:462
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 getToneMapCurve(RGBColorChannel channel, std::vector< float > *curve) const =0
Returns the user-specified tone map curve for a channel on the stream.
virtual VideoStabilizationMode getVideoStabilizationMode() const =0
Returns the video stabilization mode for the stream.
static const InterfaceID & id()
Definition: Settings.h:355
virtual Status setAwbRegions(const std::vector< AcRegion > &regions)=0
Sets the AWB regions of interest.
DEFINE_UUID(ExtensionName, EXT_BAYER_SHARPNESS_MAP, 7d5e0470, 4ea6, 11e6, bdf4, 08, 00, 20, 0c, 9a, 66)
The Ext::BayerSharpnessMap extension adds internally-generated sharpness metrics to CaptureMetadata r...
An object representing the sensor mode of a CameraDevice.
Definition: CameraDevice.h:133
virtual Status setDenoiseMode(const DenoiseMode &mode)=0
Sets the denoise (noise reduction) mode for the stream.
virtual Status setColorCorrectionMatrixEnable(bool enable)=0
Enables the user-specified color correction matrix.
virtual Status setSensorMode(SensorMode *mode)=0
Sets the sensor mode.
An interface to per-stream settings.
Definition: Settings.h:352
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.
AeAntibandingMode
Definition: Types.h:176
virtual Status setToneMapCurve(RGBColorChannel channel, const std::vector< float > &curve)=0
Sets the user-specified tone map curve for a channel on the stream.
A unique identifier for an libargus Interface.
Definition: Types.h:322
Aggregates width and height in a single structure.
Definition: Types.h:505
virtual uint32_t getToneMapCurveSize(RGBColorChannel channel) const =0
Returns the number of elements required for the tone map curve.
virtual Range< uint64_t > getExposureTimeRange() const =0
Returns the exposure time range of the source, in nanoseconds.
virtual bool getAeLock() const =0
Returns the AE lock.
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 NormalizedRect getSourceClipRect() const =0
Returns the clip rectangle for the stream.
virtual int32_t getFocusPosition() const =0
Returns the focus position, in focuser units.
virtual Status setVideoStabilizationMode(const VideoStabilizationMode &mode)=0
Sets the video stabilization mode (post-process, not optical) for the stream.
virtual DenoiseMode getDenoiseMode() const =0
Returns the denoise mode for the stream.
Defines a normalized rectangle region in [0.0, 1.0].
Definition: Types.h:543