Settings.h 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691
  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. /**
  29. * @file
  30. * <b>Libargus API: Settings API</b>
  31. *
  32. * @b Description: This file defines the settings that control the sensor module.
  33. */
  34. #ifndef _ARGUS_SETTINGS_H
  35. #define _ARGUS_SETTINGS_H
  36. namespace Argus
  37. {
  38. /**
  39. * @class ISourceSettings
  40. *
  41. * Interface to the source settings (provided by IRequest::getSourceSettings()).
  42. *
  43. * @ingroup ArgusSourceSettings
  44. */
  45. DEFINE_UUID(InterfaceID, IID_SOURCE_SETTINGS, eb7ae38c,3c62,4161,a92a,a6,4f,ba,c6,38,83);
  46. class ISourceSettings : public Interface
  47. {
  48. public:
  49. static const InterfaceID& id() { return IID_SOURCE_SETTINGS; }
  50. /**
  51. * Sets the exposure time range of the source, in nanoseconds.
  52. * If the exposure range is outside of the available range, the capture's exposure time
  53. * will be as close as possible to the exposure range specified.
  54. * @param[in] exposureTimeRange Exposure time range, in nanoseconds.
  55. * @see ISensorMode::getExposureTimeRange()
  56. * @todo Document implications of quantization.
  57. *
  58. * @returns success/status of the call.
  59. */
  60. virtual Status setExposureTimeRange(const Range<uint64_t>& exposureTimeRange) = 0;
  61. /**
  62. * Returns the exposure time range of the source, in nanoseconds.
  63. */
  64. virtual Range<uint64_t> getExposureTimeRange() const = 0;
  65. /**
  66. * Sets the focus position, in focuser units. If the position
  67. * is set outside of the focuser limits, the position will be clamped.
  68. * @param[in] position The new focus position, in focuser units.
  69. * @see ICameraProperties::getFocusPositionRange()
  70. *
  71. * @returns success/status of the call.
  72. */
  73. virtual Status setFocusPosition(int32_t position) = 0;
  74. /**
  75. * Returns the focus position, in focuser units.
  76. */
  77. virtual int32_t getFocusPosition() const = 0;
  78. /**
  79. * Sets the aperture position. If the position is not valid,
  80. * error will be returned.
  81. * @param[in] position The new aperture position.
  82. * @see ICameraProperties::getAperturePositionRange()
  83. *
  84. * @returns success/status of the call.
  85. */
  86. virtual Status setAperturePosition(int32_t position) = 0;
  87. /**
  88. * Returns the aperture position.
  89. */
  90. virtual int32_t getAperturePosition() const = 0;
  91. /**
  92. * Sets the aperture motor speed in motor steps/second. If the speed
  93. * is set outside of the speed limits, the speed will be clamped.
  94. * @param[in] speed The new speed.
  95. * @see ICameraProperties::getApertureMotorSpeedRange()
  96. *
  97. * @returns success/status of the call.
  98. */
  99. virtual Status setApertureMotorSpeed(float speed) = 0;
  100. /**
  101. * Returns the aperture motor speed in motor steps/second.
  102. */
  103. virtual float getApertureMotorSpeed() const = 0;
  104. /**
  105. * Sets the aperture f-number. If the f-number is not valid,
  106. * error will be returned.
  107. * @param[in] fnumber The new f-number.
  108. *
  109. * @returns success/status of the call.
  110. */
  111. virtual Status setApertureFNumber(float fnumber) = 0;
  112. /**
  113. * Returns the aperture f-number.
  114. */
  115. virtual float getApertureFNumber() const = 0;
  116. /**
  117. * Sets the frame duration range, in nanoseconds.
  118. * If frame range is out of bounds of the current sensor mode,
  119. * the capture's frame duration will be as close as possible to the range specified.
  120. * @param[in] frameDurationRange Frame duration range, in nanoseconds
  121. * @see ISensorMode::getFrameDurationRange()
  122. *
  123. * @returns success/status of the call.
  124. */
  125. virtual Status setFrameDurationRange(const Range<uint64_t>& frameDurationRange) = 0;
  126. /**
  127. * Returns the frame duration range, in nanoseconds.
  128. */
  129. virtual Range<uint64_t> getFrameDurationRange() const = 0;
  130. /**
  131. * Sets the gain range for the sensor.
  132. * The range has to be within the max and min reported in the CameraProperties
  133. * Otherwise the range will be clipped.
  134. * @param[in] gainRange scalar gain range
  135. * @see ISensorMode::getAnalogGainRange()
  136. *
  137. * @returns success/status of the call.
  138. */
  139. virtual Status setGainRange(const Range<float>& gainRange) = 0;
  140. /**
  141. * Returns the gain range.
  142. */
  143. virtual Range<float> getGainRange() const = 0;
  144. /**
  145. * Sets the sensor mode.
  146. * Note that changing sensor mode from one capture to the next may result in
  147. * multiple sensor frames being dropped between the two captures.
  148. * @param[in] mode Desired sensor mode for the capture.
  149. * @see ICameraProperties::getAllSensorModes()
  150. *
  151. * @returns success/status of the call.
  152. */
  153. virtual Status setSensorMode(SensorMode* mode) = 0;
  154. /**
  155. * Returns the sensor mode.
  156. */
  157. virtual SensorMode* getSensorMode() const = 0;
  158. /**
  159. * Sets the user-specified optical black levels.
  160. * These values will be ignored unless <tt>getOpticalBlackEnable() == true</tt>
  161. * Values are floating point in the range [0,1) normalized based on sensor bit depth.
  162. * @param[in] opticalBlackLevels opticalBlack levels in range [0,1) per bayer phase
  163. *
  164. * @returns success/status of the call.
  165. */
  166. virtual Status setOpticalBlack(const BayerTuple<float>& opticalBlackLevels) = 0;
  167. /**
  168. * Returns user-specified opticalBlack level per bayer phase.
  169. *
  170. * @returns opticalBlackLevels
  171. */
  172. virtual BayerTuple<float> getOpticalBlack() const = 0;
  173. /**
  174. * Sets whether or not user-provided optical black levels are used.
  175. * @param[in] enable If @c true, Argus will use the user-specified optical black levels.
  176. * @see setOpticalBlack()
  177. * If @c false, the Argus implementation will choose the optical black values.
  178. *
  179. * @returns success/status of the call.
  180. */
  181. virtual Status setOpticalBlackEnable(bool enable) = 0;
  182. /**
  183. * Returns whether user-specified optical black levels are enabled.
  184. * If false, the Argus implementation will choose the optical black values.
  185. * @see setOpticalBlackEnable()
  186. *
  187. * @returns enable
  188. */
  189. virtual bool getOpticalBlackEnable() const = 0;
  190. protected:
  191. ~ISourceSettings() {}
  192. };
  193. /**
  194. * @class IAutoControlSettings
  195. *
  196. * Interface to the auto control settings (provided by IRequest::getAutoControlSettings()).
  197. *
  198. * @ingroup ArgusAutoControlSettings
  199. */
  200. DEFINE_UUID(InterfaceID, IID_AUTO_CONTROL_SETTINGS, 1f2ad1c6,cb13,440b,bc95,3f,fd,0d,19,91,db);
  201. class IAutoControlSettings : public Interface
  202. {
  203. public:
  204. static const InterfaceID& id() { return IID_AUTO_CONTROL_SETTINGS; }
  205. /**
  206. * Sets the AE antibanding mode.
  207. * @param[in] mode The requested antibanding mode.
  208. *
  209. * @returns success/status of the call.
  210. */
  211. virtual Status setAeAntibandingMode(const AeAntibandingMode& mode) = 0;
  212. /**
  213. * Returns the AE antibanding mode.
  214. */
  215. virtual AeAntibandingMode getAeAntibandingMode() const = 0;
  216. /**
  217. * Sets the AE lock. When locked, AE will maintain constant exposure.
  218. * @param[in] lock If @c true, locks AE at its current exposure.
  219. *
  220. * @returns success/status of the call.
  221. */
  222. virtual Status setAeLock(bool lock) = 0;
  223. /**
  224. * Returns the AE lock.
  225. */
  226. virtual bool getAeLock() const = 0;
  227. /**
  228. * Sets the AE regions of interest.
  229. * If no regions are specified, the region of interest will be determined by device
  230. * and obtain by CameraMetadata::getAeRegions.
  231. * @param[in] regions The AE regions of interest.
  232. * The maximum number of regions is returned by @c ICameraProperties::getMaxAeRegions().
  233. * The minimum supported size of resultatnt region is returned by
  234. * @c ICameraProperties::getMinAeRegionSize().
  235. *
  236. * @returns success/status of the call.
  237. */
  238. virtual Status setAeRegions(const std::vector<AcRegion>& regions) = 0;
  239. /**
  240. * Returns the AE regions of interest.
  241. * @param[out] regions A vector that will be populated with the AE regions of interest.
  242. *
  243. * @returns success/status of the call.
  244. */
  245. virtual Status getAeRegions(std::vector<AcRegion>* regions) const = 0;
  246. /**
  247. * Sets the bayer histogram region of interest.
  248. * If no region is specified, the entire image is the region of interest.
  249. * @param[in] region The bayer histogram region of interest.
  250. *
  251. * @returns success/status of the call.
  252. */
  253. virtual Status setBayerHistogramRegion(const Rectangle<uint32_t>& region) = 0;
  254. /**
  255. * Returns the rectangle of the bayer histogram region of interest.
  256. */
  257. virtual Rectangle<uint32_t> getBayerHistogramRegion() const = 0;
  258. /**
  259. * Sets the AWB lock.
  260. * @param[in] lock If @c true, locks AWB at its current state.
  261. *
  262. * @returns success/status of the call.
  263. */
  264. virtual Status setAwbLock(bool lock) = 0;
  265. /**
  266. * Returns the AWB lock.
  267. */
  268. virtual bool getAwbLock() const = 0;
  269. /**
  270. * Sets the AWB mode.
  271. * @param[in] mode The new AWB mode.
  272. *
  273. * @returns success/status of the call.
  274. */
  275. virtual Status setAwbMode(const AwbMode& mode) = 0;
  276. /**
  277. * Returns the AWB mode.
  278. */
  279. virtual AwbMode getAwbMode() const = 0;
  280. /**
  281. * Sets the AWB regions of interest.
  282. * If no regions are specified, the region of interest will be determined by device
  283. * and obtain by CameraMetadata::getAwbRegions.
  284. * @param[in] regions The AWB regions of interest.
  285. * The maximum number of regions is returned by @c ICameraProperties::getMaxAwbRegions().
  286. *
  287. * @returns success/status of the call.
  288. */
  289. virtual Status setAwbRegions(const std::vector<AcRegion>& regions) = 0;
  290. /**
  291. * Returns the AWB regions of interest.
  292. * @param[out] regions A vector that will be populated with the AWB regions of interest.
  293. *
  294. * @returns success/status of the call.
  295. */
  296. virtual Status getAwbRegions(std::vector<AcRegion>* regions) const = 0;
  297. /**
  298. * Sets the AF regions of interest.
  299. * If no regions are specified, the region of interest will be determined by device
  300. * and obtain by CameraMetadata::getAfRegions.
  301. * @param[in] regions The AF regions of interest.
  302. * The maximum number of regions is returned by @c ICameraProperties::getMaxAfRegions().
  303. *
  304. * @returns success/status of the call.
  305. */
  306. virtual Status setAfRegions(const std::vector<AcRegion>& regions) = 0;
  307. /**
  308. * Returns the AF regions of interest.
  309. * @param[out] regions A vector that will be populated with the AF regions of interest.
  310. *
  311. * @returns success/status of the call.
  312. */
  313. virtual Status getAfRegions(std::vector<AcRegion>* regions) const = 0;
  314. /**
  315. * Sets the Manual White Balance gains.
  316. * @param[in] gains The Manual White Balance Gains
  317. *
  318. * @returns success/status of the call.
  319. */
  320. virtual Status setWbGains(const BayerTuple<float>& gains) = 0;
  321. /**
  322. * Returns the Manual White Balance gains.
  323. *
  324. * @returns Manual White Balance Gains structure
  325. */
  326. virtual BayerTuple<float> getWbGains() const = 0;
  327. /**
  328. * Returns the size of the color correction matrix.
  329. */
  330. virtual Size2D<uint32_t> getColorCorrectionMatrixSize() const = 0;
  331. /**
  332. * Sets the user-specified color correction matrix.
  333. * This matrix will be ignored unless <tt>getColorCorrectionMatrixEnable() == true</tt>.
  334. * The active color correction matrix used for image processing may be internally modified
  335. * to account for the active color saturation value (either user-specified or automatically
  336. * generated, after biasing, @see setColorSaturation and @see setColorSaturationBias).
  337. * @param[in] matrix A color correction matrix that maps sensor RGB to linear sRGB. This matrix
  338. * is given in row-major order and must have the size w*h, where w and h are
  339. * the width and height of the Size returned by getColorCorrectionMatrixSize()
  340. *
  341. * @returns success/status of the call.
  342. */
  343. virtual Status setColorCorrectionMatrix(const std::vector<float>& matrix) = 0;
  344. /**
  345. * Returns the user-specified color correction matrix.
  346. * @param[out] matrix A matrix that will be populated with the CCM.
  347. *
  348. * @returns success/status of the call.
  349. */
  350. virtual Status getColorCorrectionMatrix(std::vector<float>* matrix) const = 0;
  351. /**
  352. * Enables the user-specified color correction matrix.
  353. * @param[in] enable If @c true, libargus uses the user-specified matrix.
  354. * @see setColorCorrectionMatrix()
  355. *
  356. * @returns success/status of the call.
  357. */
  358. virtual Status setColorCorrectionMatrixEnable(bool enable) = 0;
  359. /**
  360. * Returns the enable for the user-specified color correction matrix.
  361. */
  362. virtual bool getColorCorrectionMatrixEnable() const = 0;
  363. /**
  364. * Sets the user-specified absolute color saturation. This must be enabled via
  365. * @see setColorSaturationEnable, otherwise saturation will be determined automatically.
  366. * This saturation value may be used to modify the color correction matrix used
  367. * for processing (@see setColorCorrectionMatrix), and these changes will be reflected
  368. * in the color correction matrix output to the capture metadata.
  369. * @param[in] saturation The absolute color saturation. Acceptable values are in
  370. * [0.0, 2.0], and the default value is 1.0.
  371. * @returns success/status of the call.
  372. */
  373. virtual Status setColorSaturation(float saturation) = 0;
  374. /**
  375. * Returns the user-specified absolute color saturation (@see setColorSaturation).
  376. */
  377. virtual float getColorSaturation() const = 0;
  378. /**
  379. * Enables the user-specified absolute color saturation.
  380. * @param[in] enable If @c true, libargus uses the user-specified color saturation.
  381. * @see setColorSaturation()
  382. *
  383. * @returns success/status of the call.
  384. */
  385. virtual Status setColorSaturationEnable(bool enable) = 0;
  386. /**
  387. * Returns the enable for the user-specified color saturation.
  388. */
  389. virtual bool getColorSaturationEnable() const = 0;
  390. /**
  391. * Sets the color saturation bias. This bias is used to multiply the active saturation
  392. * value, either the user-specified or the automatically generated value depending on the state
  393. * of @see getColorSaturationEnable, and produces the final saturation value to use for
  394. * capture processing. This is used primarily to tweak automatically generated saturation
  395. * values when the application prefers more or less saturation than what the implementation
  396. * or hardware generates by default. The final saturation value (after biasing) may affect the
  397. * color correction matrix used for processing (@see setColorCorrectionMatrix).
  398. * @param[in] bias The color saturation bias. Acceptable values are in [0.0, 2.0], where
  399. * 1.0 does not modify the saturation (default), 0.0 is fully desaturated
  400. * (greyscale), and 2.0 is highly saturated.
  401. *
  402. * @returns success/status of the call.
  403. */
  404. virtual Status setColorSaturationBias(float bias) = 0;
  405. /**
  406. * Returns the color saturation bias.
  407. */
  408. virtual float getColorSaturationBias() const = 0;
  409. /**
  410. * Sets the exposure compensation.
  411. * Exposure compensation is applied after AE is solved.
  412. * @param[in] ev The exposure adjustment step in stops.
  413. *
  414. * @returns success/status of the call.
  415. */
  416. virtual Status setExposureCompensation(float ev) = 0;
  417. /**
  418. * Returns the exposure compensation.
  419. */
  420. virtual float getExposureCompensation() const = 0;
  421. /**
  422. * Returns the number of elements required for the tone map curve.
  423. * @param[in] channel The color channel the curve size corresponds to.
  424. */
  425. virtual uint32_t getToneMapCurveSize(RGBChannel channel) const = 0;
  426. /**
  427. * Sets the user-specified tone map curve for a channel on the stream.
  428. * The user-specified tone map will be ignored unless <tt>getToneMapCurveEnable() == true</tt>.
  429. * @param[in] channel The color the curve corresponds to.
  430. * @param[in] curve A float vector that describes the LUT.
  431. * The number of elements must match the number of elements
  432. * returned from getToneMapCurve() of the same channel.
  433. *
  434. * @returns success/status of the call.
  435. */
  436. virtual Status setToneMapCurve(RGBChannel channel, const std::vector<float>& curve) = 0;
  437. /**
  438. * Returns the user-specified tone map curve for a channel on the stream.
  439. * @param[in] channel The color the curve corresponds to.
  440. * @param[out] curve A vector that will be populated by the tone map curve for the specified
  441. * color channel.
  442. *
  443. * @returns success/status of the call.
  444. */
  445. virtual Status getToneMapCurve(RGBChannel channel, std::vector<float>* curve) const = 0;
  446. /**
  447. * Enables the user-specified tone map.
  448. * @param[in] enable If @c true, libargus uses the user-specified tone map.
  449. *
  450. * @returns success/status of the call.
  451. */
  452. virtual Status setToneMapCurveEnable(bool enable) = 0;
  453. /**
  454. * Returns the enable for the user-specified tone map.
  455. */
  456. virtual bool getToneMapCurveEnable() const = 0;
  457. /**
  458. * Sets the user-specified Isp Digital gain range.
  459. * @param[in] gain The user-specified Isp Digital gain.
  460. *
  461. * @returns success/status of the call.
  462. */
  463. virtual Status setIspDigitalGainRange(const Range<float>& gain) = 0;
  464. /**
  465. * Returns the user-specified Isp Digital gain range.
  466. *
  467. * @returns Isp Digital gain
  468. */
  469. virtual Range<float> getIspDigitalGainRange() const = 0;
  470. protected:
  471. ~IAutoControlSettings() {}
  472. };
  473. /**
  474. * @class IStreamSettings
  475. *
  476. * Interface to per-stream settings (provided by IRequest::getStreamSettings()).
  477. *
  478. * @ingroup ArgusStreamSettings
  479. */
  480. DEFINE_UUID(InterfaceID, IID_STREAM_SETTINGS, c477aeaf,9cc8,4467,a834,c7,07,d7,b6,9f,a4);
  481. class IStreamSettings : public Interface
  482. {
  483. public:
  484. static const InterfaceID& id() { return IID_STREAM_SETTINGS; }
  485. /**
  486. * Sets the clip rectangle for the stream.
  487. * A clip rectangle is a normalized rectangle
  488. * with valid coordinates contained in the [0.0,1.0] range.
  489. * @param[in] clipRect The clip rectangle.
  490. *
  491. * @returns success/status of the call.
  492. */
  493. virtual Status setSourceClipRect(const Rectangle<float>& clipRect) = 0;
  494. /**
  495. * Returns the clip rectangle for the stream.
  496. */
  497. virtual Rectangle<float> getSourceClipRect() const = 0;
  498. /**
  499. * Sets whether or not post-processing is enabled for this stream.
  500. * Post-processing features are controlled on a per-Request basis and all streams share the
  501. * same post-processing control values, but this enable allows certain streams to be excluded
  502. * from all post-processing. The current controls defined to be a part of "post-processing"
  503. * includes (but may not be limited to):
  504. * - Denoise
  505. * Default value is true.
  506. */
  507. virtual void setPostProcessingEnable(bool enable) = 0;
  508. /**
  509. * Returns the post-processing enable for the stream.
  510. */
  511. virtual bool getPostProcessingEnable() const = 0;
  512. protected:
  513. ~IStreamSettings() {}
  514. };
  515. /**
  516. * @class IDenoiseSettings
  517. *
  518. * Interface to denoise settings.
  519. *
  520. * @ingroup ArgusRequest
  521. */
  522. DEFINE_UUID(InterfaceID, IID_DENOISE_SETTINGS, 7A461D20,6AE1,11E6,BDF4,08,00,20,0C,9A,66);
  523. class IDenoiseSettings : public Interface
  524. {
  525. public:
  526. static const InterfaceID& id() { return IID_DENOISE_SETTINGS; }
  527. /**
  528. * Sets the denoise (noise reduction) mode for the request.
  529. * @param[in] mode The denoise mode:
  530. * OFF: Denoise algorithms are disabled.
  531. * FAST: Noise reduction will be enabled, but it will not slow down
  532. * the capture rate.
  533. * HIGH_QUALITY: Maximum noise reduction will be enabled to achieve
  534. * the highest quality, but may slow down the capture rate.
  535. * @returns success/status of the call.
  536. */
  537. virtual Status setDenoiseMode(const DenoiseMode& mode) = 0;
  538. /**
  539. * Returns the denoise mode for the request.
  540. */
  541. virtual DenoiseMode getDenoiseMode() const = 0;
  542. /**
  543. * Sets the strength for the denoise operation.
  544. * @param[in] strength The denoise strength. This must be within the range [0.0, 1.0], where
  545. * 0.0 is the least and 1.0 is the most amount of noise reduction that can be
  546. * applied. This denoise strength is relative to the current noise reduction mode;
  547. * using a FAST denoise mode with a full strength of 1.0 may not perform as well
  548. * as using a HIGH_QUALITY mode with a lower relative strength.
  549. * @returns success/status of the call.
  550. */
  551. virtual Status setDenoiseStrength(float strength) = 0;
  552. /**
  553. * Returns the denoise strength.
  554. */
  555. virtual float getDenoiseStrength() const = 0;
  556. protected:
  557. ~IDenoiseSettings() {}
  558. };
  559. /**
  560. * @class IEdgeEnhanceSettings
  561. *
  562. * Interface to edge enhancement settings.
  563. *
  564. * @ingroup ArgusRequest
  565. */
  566. DEFINE_UUID(InterfaceID, IID_EDGE_ENHANCE_SETTINGS, 7A461D21,6AE1,11E6,BDF4,08,00,20,0C,9A,66);
  567. class IEdgeEnhanceSettings : public Interface
  568. {
  569. public:
  570. static const InterfaceID& id() { return IID_EDGE_ENHANCE_SETTINGS; }
  571. /**
  572. * Sets the edge enhancement mode for the request.
  573. * @param[in] mode The edge enhancement mode:
  574. * OFF: Edge enhancement algorithms are disabled.
  575. * FAST: Edge enhancement will be enabled, but it will not slow down
  576. * the capture rate.
  577. * HIGH_QUALITY: Maximum edge enhancement will be enabled to achieve
  578. * the highest quality, but may slow down the capture rate.
  579. * @returns success/status of the call.
  580. */
  581. virtual Status setEdgeEnhanceMode(const EdgeEnhanceMode& mode) = 0;
  582. /**
  583. * Returns the edge enhancement mode for the request.
  584. */
  585. virtual EdgeEnhanceMode getEdgeEnhanceMode() const = 0;
  586. /**
  587. * Sets the strength for the edge enhancement operation.
  588. * @param[in] strength The edge enhancement strength. This must be within the range [0.0, 1.0],
  589. * where 0.0 is the least and 1.0 is the most amount of edge enhancement that can be
  590. * applied. This strength is relative to the current edge enhancement mode; using
  591. * a FAST edge enhancement mode with a full strength of 1.0 may not perform as well
  592. * as using a HIGH_QUALITY mode with a lower relative strength.
  593. * @returns success/status of the call.
  594. */
  595. virtual Status setEdgeEnhanceStrength(float strength) = 0;
  596. /**
  597. * Returns the edge enhancement strength.
  598. */
  599. virtual float getEdgeEnhanceStrength() const = 0;
  600. protected:
  601. ~IEdgeEnhanceSettings() {}
  602. };
  603. } // namespace Argus
  604. #endif // _ARGUS_SETTINGS_H