DeFog.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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. /**
  29. * @file
  30. * <b>Libargus Extension: DeFog API</b>
  31. *
  32. * @b Description: This file defines the DeFog extension.
  33. */
  34. #ifndef _ARGUS_DE_FOG_H
  35. #define _ARGUS_DE_FOG_H
  36. namespace Argus
  37. {
  38. /**
  39. * Adds internal de-fog post-processing algorithms. It introduces one new interface:
  40. * - Ext::IDeFogSettings: enables de-fog for a Request.
  41. *
  42. * @defgroup ArgusExtDeFog Ext::DeFog
  43. * @ingroup ArgusExtensions
  44. */
  45. DEFINE_UUID(ExtensionName, EXT_DE_FOG, 9cf05bd0,1d99,4be8,8732,75,99,55,7f,ed,3a);
  46. namespace Ext
  47. {
  48. /**
  49. * @class IDeFogSettings
  50. *
  51. * Interface to de-fog settings.
  52. *
  53. * @ingroup ArgusRequest ArgusExtDeFog
  54. */
  55. DEFINE_UUID(InterfaceID, IID_DE_FOG_SETTINGS, 9cf05bd1,1d99,4be8,8732,75,99,55,7f,ed,3a);
  56. class IDeFogSettings : public Interface
  57. {
  58. public:
  59. static const InterfaceID& id() { return IID_DE_FOG_SETTINGS; }
  60. /**
  61. * Enables or disables de-fog.
  62. * @param[in] enable whether or not de-fog is enabled.
  63. */
  64. virtual void setDeFogEnable(bool enable) = 0;
  65. /**
  66. * @returns whether or not de-fog is enabled.
  67. */
  68. virtual bool getDeFogEnable() const = 0;
  69. /**
  70. * Sets the amount of fog to be removed. Range 0.0 - 1.0 (none - all).
  71. * @param[in] amount amount of fog to remove.
  72. */
  73. virtual Status setDeFogAmount(float amount) = 0;
  74. /**
  75. * @returns the amount of fog to remove.
  76. */
  77. virtual float getDeFogAmount() const = 0;
  78. /**
  79. * Set the quality of the effect, lower quality results in lower execution time.
  80. * Range 0.0 - 1.0 (low quality - high quality).
  81. * @param[in] quality effect quality.
  82. */
  83. virtual Status setDeFogQuality(float quality) = 0;
  84. /**
  85. * @returns the effect quality.
  86. */
  87. virtual float getDeFogQuality() const = 0;
  88. protected:
  89. ~IDeFogSettings() {}
  90. };
  91. } // namespace Ext
  92. } // namespace Argus
  93. #endif // _ARGUS_DE_FOG_H