NativeMethods_photo.cs 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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 IDE1006 // Naming style
  6. // ReSharper disable InconsistentNaming
  7. namespace OpenCvSharp.Internal;
  8. static partial class NativeMethods
  9. {
  10. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  11. public static extern ExceptionStatus photo_inpaint(
  12. IntPtr src, IntPtr inpaintMask,
  13. IntPtr dst, double inpaintRadius, int flags);
  14. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  15. public static extern ExceptionStatus photo_fastNlMeansDenoising(
  16. IntPtr src, IntPtr dst, float h,
  17. int templateWindowSize, int searchWindowSize);
  18. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  19. public static extern ExceptionStatus photo_fastNlMeansDenoisingColored(
  20. IntPtr src, IntPtr dst,
  21. float h, float hColor, int templateWindowSize, int searchWindowSize);
  22. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  23. public static extern ExceptionStatus photo_fastNlMeansDenoisingMulti(
  24. IntPtr[] srcImgs, int srcImgsLength,
  25. IntPtr dst, int imgToDenoiseIndex, int temporalWindowSize,
  26. float h, int templateWindowSize, int searchWindowSize);
  27. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  28. public static extern ExceptionStatus photo_fastNlMeansDenoisingColoredMulti(IntPtr[] srcImgs, int srcImgsLength,
  29. IntPtr dst, int imgToDenoiseIndex, int temporalWindowSize,
  30. float h, float hColor, int templateWindowSize, int searchWindowSize);
  31. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  32. public static extern ExceptionStatus photo_denoise_TVL1(
  33. IntPtr[] observations, int observationsSize, IntPtr result, double lambda, int niters);
  34. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  35. public static extern ExceptionStatus photo_decolor(
  36. IntPtr src, IntPtr grayscale, IntPtr color_boost);
  37. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  38. public static extern ExceptionStatus photo_seamlessClone(
  39. IntPtr src, IntPtr dst, IntPtr mask, Point p, IntPtr blend, int flags);
  40. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  41. public static extern ExceptionStatus photo_colorChange(
  42. IntPtr src, IntPtr mask, IntPtr dst, float red_mul, float green_mul, float blue_mul);
  43. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  44. public static extern ExceptionStatus photo_illuminationChange(
  45. IntPtr src, IntPtr mask, IntPtr dst, float alpha, float beta);
  46. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  47. public static extern ExceptionStatus photo_textureFlattening(
  48. IntPtr src, IntPtr mask, IntPtr dst,
  49. float low_threshold, float high_threshold, int kernel_size);
  50. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  51. public static extern ExceptionStatus photo_edgePreservingFilter(
  52. IntPtr src, IntPtr dst, int flags, float sigma_s, float sigma_r);
  53. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  54. public static extern ExceptionStatus photo_detailEnhance(
  55. IntPtr src, IntPtr dst, float sigma_s, float sigma_r);
  56. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  57. public static extern ExceptionStatus photo_pencilSketch(
  58. IntPtr src, IntPtr dst1, IntPtr dst2,
  59. float sigma_s, float sigma_r, float shade_factor);
  60. [Pure, DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
  61. public static extern ExceptionStatus photo_stylization(
  62. IntPtr src, IntPtr dst, float sigma_s, float sigma_r);
  63. }