NativeMethods_xphoto.cs 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. using System.Diagnostics.Contracts;
  2. using System.Runtime.InteropServices;
  3. #pragma warning disable 1591
  4. #pragma warning disable CA1401 // P/Invokes should not be visible
  5. #pragma warning disable CA1707 // Underscore
  6. #pragma warning disable CA2101 // Specify marshaling for P/Invoke string arguments
  7. #pragma warning disable IDE1006 // Naming style
  8. namespace OpenCvSharp.Internal;
  9. static partial class NativeMethods
  10. {
  11. #region bm3d_image_denoising.hpp
  12. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  13. public static extern ExceptionStatus xphoto_bm3dDenoising1(
  14. IntPtr src,
  15. IntPtr dstStep1,
  16. IntPtr dstStep2,
  17. float h,
  18. int templateWindowSize,
  19. int searchWindowSize,
  20. int blockMatchingStep1,
  21. int blockMatchingStep2,
  22. int groupSize,
  23. int slidingStep,
  24. float beta,
  25. int normType,
  26. int step,
  27. int transformType);
  28. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  29. public static extern ExceptionStatus xphoto_bm3dDenoising2(
  30. IntPtr src,
  31. IntPtr dst,
  32. float h,
  33. int templateWindowSize,
  34. int searchWindowSize,
  35. int blockMatchingStep1,
  36. int blockMatchingStep2,
  37. int groupSize,
  38. int slidingStep,
  39. float beta,
  40. int normType,
  41. int step,
  42. int transformType);
  43. #endregion
  44. #region dct_image_denoising.hpp
  45. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  46. public static extern ExceptionStatus xphoto_dctDenoising(IntPtr src, IntPtr dst, double sigma, int psize);
  47. #endregion
  48. #region inpainting.hpp
  49. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  50. public static extern ExceptionStatus xphoto_inpaint(IntPtr prt, IntPtr src, IntPtr dst, int algorithm);
  51. #endregion
  52. #region oilpainting.hpp
  53. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  54. public static extern ExceptionStatus xphoto_oilPainting(
  55. IntPtr src, IntPtr dst, int size, int dynRatio, int code);
  56. #endregion
  57. #region tonemap.hpp
  58. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  59. public static extern ExceptionStatus xphoto_TonemapDurand_getSaturation(IntPtr obj, out float returnValue);
  60. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  61. public static extern ExceptionStatus xphoto_TonemapDurand_setSaturation(IntPtr obj, float saturation);
  62. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  63. public static extern ExceptionStatus xphoto_TonemapDurand_getContrast(IntPtr obj, out float returnValue);
  64. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  65. public static extern ExceptionStatus xphoto_TonemapDurand_setContrast(IntPtr obj, float contrast);
  66. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  67. public static extern ExceptionStatus xphoto_TonemapDurand_getSigmaSpace(IntPtr obj, out float returnValue);
  68. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  69. public static extern ExceptionStatus xphoto_TonemapDurand_setSigmaSpace(IntPtr obj, float saturation);
  70. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  71. public static extern ExceptionStatus xphoto_TonemapDurand_getSigmaColor(IntPtr obj, out float returnValue);
  72. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  73. public static extern ExceptionStatus xphoto_TonemapDurand_setSigmaColor(IntPtr obj, float saturation);
  74. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  75. public static extern ExceptionStatus xphoto_createTonemapDurand(
  76. float gamma, float contrast, float saturation, float sigmaSpace, float sigmaColor, out IntPtr returnValue);
  77. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  78. public static extern ExceptionStatus xphoto_Ptr_TonemapDurand_delete(IntPtr ptr);
  79. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  80. public static extern ExceptionStatus xphoto_Ptr_TonemapDurand_get(IntPtr ptr, out IntPtr returnValue);
  81. #endregion
  82. #region white_balance.hpp
  83. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  84. public static extern ExceptionStatus xphoto_applyChannelGains(
  85. IntPtr src, IntPtr dst, float gainB, float gainG, float gainR);
  86. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  87. public static extern ExceptionStatus xphoto_createGrayworldWB(out IntPtr returnValue);
  88. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  89. public static extern ExceptionStatus xphoto_Ptr_GrayworldWB_delete(IntPtr prt);
  90. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  91. public static extern ExceptionStatus xphoto_Ptr_GrayworldWB_get(IntPtr prt, out IntPtr returnValue);
  92. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  93. public static extern ExceptionStatus xphoto_GrayworldWB_balanceWhite(IntPtr prt, IntPtr src, IntPtr dst);
  94. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  95. public static extern ExceptionStatus xphoto_GrayworldWB_SaturationThreshold_get(IntPtr ptr, out float returnValue);
  96. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  97. public static extern ExceptionStatus xphoto_GrayworldWB_SaturationThreshold_set(IntPtr ptr, float val);
  98. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  99. public static extern ExceptionStatus xphoto_createLearningBasedWB(string trackerType, out IntPtr returnValue);
  100. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  101. public static extern ExceptionStatus xphoto_Ptr_LearningBasedWB_delete(IntPtr prt);
  102. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  103. public static extern ExceptionStatus xphoto_Ptr_LearningBasedWB_get(IntPtr prt, out IntPtr returnValue);
  104. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  105. public static extern ExceptionStatus xphoto_LearningBasedWB_balanceWhite(IntPtr prt, IntPtr src, IntPtr dst);
  106. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  107. public static extern ExceptionStatus xphoto_LearningBasedWB_extractSimpleFeatures(IntPtr prt, IntPtr src, IntPtr dst);
  108. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  109. public static extern ExceptionStatus xphoto_LearningBasedWB_HistBinNum_set(IntPtr prt, int value);
  110. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  111. public static extern ExceptionStatus xphoto_LearningBasedWB_RangeMaxVal_set(IntPtr prt, int value);
  112. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  113. public static extern ExceptionStatus xphoto_LearningBasedWB_SaturationThreshold_set(IntPtr prt, float value);
  114. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  115. public static extern ExceptionStatus xphoto_LearningBasedWB_HistBinNum_get(IntPtr prt, out int returnValue);
  116. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  117. public static extern ExceptionStatus xphoto_LearningBasedWB_RangeMaxVal_get(IntPtr prt, out int returnValue);
  118. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  119. public static extern ExceptionStatus xphoto_LearningBasedWB_SaturationThreshold_get(IntPtr prt, out float returnValue);
  120. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  121. public static extern ExceptionStatus xphoto_createSimpleWB(out IntPtr returnValue);
  122. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  123. public static extern ExceptionStatus xphoto_Ptr_SimpleWB_delete(IntPtr prt);
  124. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  125. public static extern ExceptionStatus xphoto_Ptr_SimpleWB_get(IntPtr prt, out IntPtr returnValue);
  126. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  127. public static extern ExceptionStatus xphoto_SimpleWB_balanceWhite(IntPtr prt, IntPtr src, IntPtr dst);
  128. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  129. public static extern ExceptionStatus xphoto_SimpleWB_InputMax_get(IntPtr prt, out float returnValue);
  130. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  131. public static extern ExceptionStatus xphoto_SimpleWB_InputMax_set(IntPtr prt, float value);
  132. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  133. public static extern ExceptionStatus xphoto_SimpleWB_InputMin_get(IntPtr prt, out float returnValue);
  134. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  135. public static extern ExceptionStatus xphoto_SimpleWB_InputMin_set(IntPtr prt, float value);
  136. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  137. public static extern ExceptionStatus xphoto_SimpleWB_OutputMax_get(IntPtr prt, out float returnValue);
  138. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  139. public static extern ExceptionStatus xphoto_SimpleWB_OutputMax_set(IntPtr prt, float value);
  140. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  141. public static extern ExceptionStatus xphoto_SimpleWB_OutputMin_get(IntPtr prt, out float returnValue);
  142. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  143. public static extern ExceptionStatus xphoto_SimpleWB_OutputMin_set(IntPtr prt, float value);
  144. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  145. public static extern ExceptionStatus xphoto_SimpleWB_P_get(IntPtr prt, out float returnValue);
  146. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  147. public static extern ExceptionStatus xphoto_SimpleWB_P_set(IntPtr prt, float value);
  148. #endregion
  149. }