Xphoto.cs 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686
  1. 
  2. using OpenCVForUnity.CoreModule;
  3. using OpenCVForUnity.UtilsModule;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Runtime.InteropServices;
  7. namespace OpenCVForUnity.XphotoModule
  8. {
  9. // C++: class Xphoto
  10. //javadoc: Xphoto
  11. public class Xphoto
  12. {
  13. // C++: enum InpaintTypes
  14. public const int INPAINT_SHIFTMAP = 0;
  15. // C++: enum Bm3dSteps
  16. public const int BM3D_STEPALL = 0;
  17. public const int BM3D_STEP1 = 1;
  18. public const int BM3D_STEP2 = 2;
  19. // C++: enum TransformTypes
  20. public const int HAAR = 0;
  21. //
  22. // C++: Ptr_GrayworldWB cv::xphoto::createGrayworldWB()
  23. //
  24. //javadoc: createGrayworldWB()
  25. public static GrayworldWB createGrayworldWB ()
  26. {
  27. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  28. GrayworldWB retVal = GrayworldWB.__fromPtr__(xphoto_Xphoto_createGrayworldWB_10());
  29. return retVal;
  30. #else
  31. return null;
  32. #endif
  33. }
  34. //
  35. // C++: Ptr_LearningBasedWB cv::xphoto::createLearningBasedWB(String path_to_model = String())
  36. //
  37. //javadoc: createLearningBasedWB(path_to_model)
  38. public static LearningBasedWB createLearningBasedWB (string path_to_model)
  39. {
  40. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  41. LearningBasedWB retVal = LearningBasedWB.__fromPtr__(xphoto_Xphoto_createLearningBasedWB_10(path_to_model));
  42. return retVal;
  43. #else
  44. return null;
  45. #endif
  46. }
  47. //javadoc: createLearningBasedWB()
  48. public static LearningBasedWB createLearningBasedWB ()
  49. {
  50. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  51. LearningBasedWB retVal = LearningBasedWB.__fromPtr__(xphoto_Xphoto_createLearningBasedWB_11());
  52. return retVal;
  53. #else
  54. return null;
  55. #endif
  56. }
  57. //
  58. // C++: Ptr_SimpleWB cv::xphoto::createSimpleWB()
  59. //
  60. //javadoc: createSimpleWB()
  61. public static SimpleWB createSimpleWB ()
  62. {
  63. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  64. SimpleWB retVal = SimpleWB.__fromPtr__(xphoto_Xphoto_createSimpleWB_10());
  65. return retVal;
  66. #else
  67. return null;
  68. #endif
  69. }
  70. //
  71. // C++: void cv::xphoto::applyChannelGains(Mat src, Mat& dst, float gainB, float gainG, float gainR)
  72. //
  73. //javadoc: applyChannelGains(src, dst, gainB, gainG, gainR)
  74. public static void applyChannelGains (Mat src, Mat dst, float gainB, float gainG, float gainR)
  75. {
  76. if (src != null) src.ThrowIfDisposed ();
  77. if (dst != null) dst.ThrowIfDisposed ();
  78. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  79. xphoto_Xphoto_applyChannelGains_10(src.nativeObj, dst.nativeObj, gainB, gainG, gainR);
  80. return;
  81. #else
  82. return;
  83. #endif
  84. }
  85. //
  86. // C++: void cv::xphoto::bm3dDenoising(Mat src, Mat& dst, float h = 1, int templateWindowSize = 4, int searchWindowSize = 16, int blockMatchingStep1 = 2500, int blockMatchingStep2 = 400, int groupSize = 8, int slidingStep = 1, float beta = 2.0f, int normType = cv::NORM_L2, int step = cv::xphoto::BM3D_STEPALL, int transformType = cv::xphoto::HAAR)
  87. //
  88. //javadoc: bm3dDenoising(src, dst, h, templateWindowSize, searchWindowSize, blockMatchingStep1, blockMatchingStep2, groupSize, slidingStep, beta, normType, step, transformType)
  89. public static void bm3dDenoising (Mat src, Mat dst, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1, int blockMatchingStep2, int groupSize, int slidingStep, float beta, int normType, int step, int transformType)
  90. {
  91. if (src != null) src.ThrowIfDisposed ();
  92. if (dst != null) dst.ThrowIfDisposed ();
  93. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  94. xphoto_Xphoto_bm3dDenoising_10(src.nativeObj, dst.nativeObj, h, templateWindowSize, searchWindowSize, blockMatchingStep1, blockMatchingStep2, groupSize, slidingStep, beta, normType, step, transformType);
  95. return;
  96. #else
  97. return;
  98. #endif
  99. }
  100. //javadoc: bm3dDenoising(src, dst, h, templateWindowSize, searchWindowSize, blockMatchingStep1, blockMatchingStep2, groupSize, slidingStep, beta, normType, step)
  101. public static void bm3dDenoising (Mat src, Mat dst, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1, int blockMatchingStep2, int groupSize, int slidingStep, float beta, int normType, int step)
  102. {
  103. if (src != null) src.ThrowIfDisposed ();
  104. if (dst != null) dst.ThrowIfDisposed ();
  105. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  106. xphoto_Xphoto_bm3dDenoising_11(src.nativeObj, dst.nativeObj, h, templateWindowSize, searchWindowSize, blockMatchingStep1, blockMatchingStep2, groupSize, slidingStep, beta, normType, step);
  107. return;
  108. #else
  109. return;
  110. #endif
  111. }
  112. //javadoc: bm3dDenoising(src, dst, h, templateWindowSize, searchWindowSize, blockMatchingStep1, blockMatchingStep2, groupSize, slidingStep, beta, normType)
  113. public static void bm3dDenoising (Mat src, Mat dst, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1, int blockMatchingStep2, int groupSize, int slidingStep, float beta, int normType)
  114. {
  115. if (src != null) src.ThrowIfDisposed ();
  116. if (dst != null) dst.ThrowIfDisposed ();
  117. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  118. xphoto_Xphoto_bm3dDenoising_12(src.nativeObj, dst.nativeObj, h, templateWindowSize, searchWindowSize, blockMatchingStep1, blockMatchingStep2, groupSize, slidingStep, beta, normType);
  119. return;
  120. #else
  121. return;
  122. #endif
  123. }
  124. //javadoc: bm3dDenoising(src, dst, h, templateWindowSize, searchWindowSize, blockMatchingStep1, blockMatchingStep2, groupSize, slidingStep, beta)
  125. public static void bm3dDenoising (Mat src, Mat dst, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1, int blockMatchingStep2, int groupSize, int slidingStep, float beta)
  126. {
  127. if (src != null) src.ThrowIfDisposed ();
  128. if (dst != null) dst.ThrowIfDisposed ();
  129. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  130. xphoto_Xphoto_bm3dDenoising_13(src.nativeObj, dst.nativeObj, h, templateWindowSize, searchWindowSize, blockMatchingStep1, blockMatchingStep2, groupSize, slidingStep, beta);
  131. return;
  132. #else
  133. return;
  134. #endif
  135. }
  136. //javadoc: bm3dDenoising(src, dst, h, templateWindowSize, searchWindowSize, blockMatchingStep1, blockMatchingStep2, groupSize, slidingStep)
  137. public static void bm3dDenoising (Mat src, Mat dst, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1, int blockMatchingStep2, int groupSize, int slidingStep)
  138. {
  139. if (src != null) src.ThrowIfDisposed ();
  140. if (dst != null) dst.ThrowIfDisposed ();
  141. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  142. xphoto_Xphoto_bm3dDenoising_14(src.nativeObj, dst.nativeObj, h, templateWindowSize, searchWindowSize, blockMatchingStep1, blockMatchingStep2, groupSize, slidingStep);
  143. return;
  144. #else
  145. return;
  146. #endif
  147. }
  148. //javadoc: bm3dDenoising(src, dst, h, templateWindowSize, searchWindowSize, blockMatchingStep1, blockMatchingStep2, groupSize)
  149. public static void bm3dDenoising (Mat src, Mat dst, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1, int blockMatchingStep2, int groupSize)
  150. {
  151. if (src != null) src.ThrowIfDisposed ();
  152. if (dst != null) dst.ThrowIfDisposed ();
  153. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  154. xphoto_Xphoto_bm3dDenoising_15(src.nativeObj, dst.nativeObj, h, templateWindowSize, searchWindowSize, blockMatchingStep1, blockMatchingStep2, groupSize);
  155. return;
  156. #else
  157. return;
  158. #endif
  159. }
  160. //javadoc: bm3dDenoising(src, dst, h, templateWindowSize, searchWindowSize, blockMatchingStep1, blockMatchingStep2)
  161. public static void bm3dDenoising (Mat src, Mat dst, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1, int blockMatchingStep2)
  162. {
  163. if (src != null) src.ThrowIfDisposed ();
  164. if (dst != null) dst.ThrowIfDisposed ();
  165. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  166. xphoto_Xphoto_bm3dDenoising_16(src.nativeObj, dst.nativeObj, h, templateWindowSize, searchWindowSize, blockMatchingStep1, blockMatchingStep2);
  167. return;
  168. #else
  169. return;
  170. #endif
  171. }
  172. //javadoc: bm3dDenoising(src, dst, h, templateWindowSize, searchWindowSize, blockMatchingStep1)
  173. public static void bm3dDenoising (Mat src, Mat dst, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1)
  174. {
  175. if (src != null) src.ThrowIfDisposed ();
  176. if (dst != null) dst.ThrowIfDisposed ();
  177. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  178. xphoto_Xphoto_bm3dDenoising_17(src.nativeObj, dst.nativeObj, h, templateWindowSize, searchWindowSize, blockMatchingStep1);
  179. return;
  180. #else
  181. return;
  182. #endif
  183. }
  184. //javadoc: bm3dDenoising(src, dst, h, templateWindowSize, searchWindowSize)
  185. public static void bm3dDenoising (Mat src, Mat dst, float h, int templateWindowSize, int searchWindowSize)
  186. {
  187. if (src != null) src.ThrowIfDisposed ();
  188. if (dst != null) dst.ThrowIfDisposed ();
  189. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  190. xphoto_Xphoto_bm3dDenoising_18(src.nativeObj, dst.nativeObj, h, templateWindowSize, searchWindowSize);
  191. return;
  192. #else
  193. return;
  194. #endif
  195. }
  196. //javadoc: bm3dDenoising(src, dst, h, templateWindowSize)
  197. public static void bm3dDenoising (Mat src, Mat dst, float h, int templateWindowSize)
  198. {
  199. if (src != null) src.ThrowIfDisposed ();
  200. if (dst != null) dst.ThrowIfDisposed ();
  201. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  202. xphoto_Xphoto_bm3dDenoising_19(src.nativeObj, dst.nativeObj, h, templateWindowSize);
  203. return;
  204. #else
  205. return;
  206. #endif
  207. }
  208. //javadoc: bm3dDenoising(src, dst, h)
  209. public static void bm3dDenoising (Mat src, Mat dst, float h)
  210. {
  211. if (src != null) src.ThrowIfDisposed ();
  212. if (dst != null) dst.ThrowIfDisposed ();
  213. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  214. xphoto_Xphoto_bm3dDenoising_110(src.nativeObj, dst.nativeObj, h);
  215. return;
  216. #else
  217. return;
  218. #endif
  219. }
  220. //javadoc: bm3dDenoising(src, dst)
  221. public static void bm3dDenoising (Mat src, Mat dst)
  222. {
  223. if (src != null) src.ThrowIfDisposed ();
  224. if (dst != null) dst.ThrowIfDisposed ();
  225. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  226. xphoto_Xphoto_bm3dDenoising_111(src.nativeObj, dst.nativeObj);
  227. return;
  228. #else
  229. return;
  230. #endif
  231. }
  232. //
  233. // C++: void cv::xphoto::bm3dDenoising(Mat src, Mat& dstStep1, Mat& dstStep2, float h = 1, int templateWindowSize = 4, int searchWindowSize = 16, int blockMatchingStep1 = 2500, int blockMatchingStep2 = 400, int groupSize = 8, int slidingStep = 1, float beta = 2.0f, int normType = cv::NORM_L2, int step = cv::xphoto::BM3D_STEPALL, int transformType = cv::xphoto::HAAR)
  234. //
  235. //javadoc: bm3dDenoising(src, dstStep1, dstStep2, h, templateWindowSize, searchWindowSize, blockMatchingStep1, blockMatchingStep2, groupSize, slidingStep, beta, normType, step, transformType)
  236. public static void bm3dDenoising (Mat src, Mat dstStep1, Mat dstStep2, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1, int blockMatchingStep2, int groupSize, int slidingStep, float beta, int normType, int step, int transformType)
  237. {
  238. if (src != null) src.ThrowIfDisposed ();
  239. if (dstStep1 != null) dstStep1.ThrowIfDisposed ();
  240. if (dstStep2 != null) dstStep2.ThrowIfDisposed ();
  241. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  242. xphoto_Xphoto_bm3dDenoising_112(src.nativeObj, dstStep1.nativeObj, dstStep2.nativeObj, h, templateWindowSize, searchWindowSize, blockMatchingStep1, blockMatchingStep2, groupSize, slidingStep, beta, normType, step, transformType);
  243. return;
  244. #else
  245. return;
  246. #endif
  247. }
  248. //javadoc: bm3dDenoising(src, dstStep1, dstStep2, h, templateWindowSize, searchWindowSize, blockMatchingStep1, blockMatchingStep2, groupSize, slidingStep, beta, normType, step)
  249. public static void bm3dDenoising (Mat src, Mat dstStep1, Mat dstStep2, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1, int blockMatchingStep2, int groupSize, int slidingStep, float beta, int normType, int step)
  250. {
  251. if (src != null) src.ThrowIfDisposed ();
  252. if (dstStep1 != null) dstStep1.ThrowIfDisposed ();
  253. if (dstStep2 != null) dstStep2.ThrowIfDisposed ();
  254. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  255. xphoto_Xphoto_bm3dDenoising_113(src.nativeObj, dstStep1.nativeObj, dstStep2.nativeObj, h, templateWindowSize, searchWindowSize, blockMatchingStep1, blockMatchingStep2, groupSize, slidingStep, beta, normType, step);
  256. return;
  257. #else
  258. return;
  259. #endif
  260. }
  261. //javadoc: bm3dDenoising(src, dstStep1, dstStep2, h, templateWindowSize, searchWindowSize, blockMatchingStep1, blockMatchingStep2, groupSize, slidingStep, beta, normType)
  262. public static void bm3dDenoising (Mat src, Mat dstStep1, Mat dstStep2, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1, int blockMatchingStep2, int groupSize, int slidingStep, float beta, int normType)
  263. {
  264. if (src != null) src.ThrowIfDisposed ();
  265. if (dstStep1 != null) dstStep1.ThrowIfDisposed ();
  266. if (dstStep2 != null) dstStep2.ThrowIfDisposed ();
  267. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  268. xphoto_Xphoto_bm3dDenoising_114(src.nativeObj, dstStep1.nativeObj, dstStep2.nativeObj, h, templateWindowSize, searchWindowSize, blockMatchingStep1, blockMatchingStep2, groupSize, slidingStep, beta, normType);
  269. return;
  270. #else
  271. return;
  272. #endif
  273. }
  274. //javadoc: bm3dDenoising(src, dstStep1, dstStep2, h, templateWindowSize, searchWindowSize, blockMatchingStep1, blockMatchingStep2, groupSize, slidingStep, beta)
  275. public static void bm3dDenoising (Mat src, Mat dstStep1, Mat dstStep2, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1, int blockMatchingStep2, int groupSize, int slidingStep, float beta)
  276. {
  277. if (src != null) src.ThrowIfDisposed ();
  278. if (dstStep1 != null) dstStep1.ThrowIfDisposed ();
  279. if (dstStep2 != null) dstStep2.ThrowIfDisposed ();
  280. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  281. xphoto_Xphoto_bm3dDenoising_115(src.nativeObj, dstStep1.nativeObj, dstStep2.nativeObj, h, templateWindowSize, searchWindowSize, blockMatchingStep1, blockMatchingStep2, groupSize, slidingStep, beta);
  282. return;
  283. #else
  284. return;
  285. #endif
  286. }
  287. //javadoc: bm3dDenoising(src, dstStep1, dstStep2, h, templateWindowSize, searchWindowSize, blockMatchingStep1, blockMatchingStep2, groupSize, slidingStep)
  288. public static void bm3dDenoising (Mat src, Mat dstStep1, Mat dstStep2, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1, int blockMatchingStep2, int groupSize, int slidingStep)
  289. {
  290. if (src != null) src.ThrowIfDisposed ();
  291. if (dstStep1 != null) dstStep1.ThrowIfDisposed ();
  292. if (dstStep2 != null) dstStep2.ThrowIfDisposed ();
  293. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  294. xphoto_Xphoto_bm3dDenoising_116(src.nativeObj, dstStep1.nativeObj, dstStep2.nativeObj, h, templateWindowSize, searchWindowSize, blockMatchingStep1, blockMatchingStep2, groupSize, slidingStep);
  295. return;
  296. #else
  297. return;
  298. #endif
  299. }
  300. //javadoc: bm3dDenoising(src, dstStep1, dstStep2, h, templateWindowSize, searchWindowSize, blockMatchingStep1, blockMatchingStep2, groupSize)
  301. public static void bm3dDenoising (Mat src, Mat dstStep1, Mat dstStep2, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1, int blockMatchingStep2, int groupSize)
  302. {
  303. if (src != null) src.ThrowIfDisposed ();
  304. if (dstStep1 != null) dstStep1.ThrowIfDisposed ();
  305. if (dstStep2 != null) dstStep2.ThrowIfDisposed ();
  306. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  307. xphoto_Xphoto_bm3dDenoising_117(src.nativeObj, dstStep1.nativeObj, dstStep2.nativeObj, h, templateWindowSize, searchWindowSize, blockMatchingStep1, blockMatchingStep2, groupSize);
  308. return;
  309. #else
  310. return;
  311. #endif
  312. }
  313. //javadoc: bm3dDenoising(src, dstStep1, dstStep2, h, templateWindowSize, searchWindowSize, blockMatchingStep1, blockMatchingStep2)
  314. public static void bm3dDenoising (Mat src, Mat dstStep1, Mat dstStep2, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1, int blockMatchingStep2)
  315. {
  316. if (src != null) src.ThrowIfDisposed ();
  317. if (dstStep1 != null) dstStep1.ThrowIfDisposed ();
  318. if (dstStep2 != null) dstStep2.ThrowIfDisposed ();
  319. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  320. xphoto_Xphoto_bm3dDenoising_118(src.nativeObj, dstStep1.nativeObj, dstStep2.nativeObj, h, templateWindowSize, searchWindowSize, blockMatchingStep1, blockMatchingStep2);
  321. return;
  322. #else
  323. return;
  324. #endif
  325. }
  326. //javadoc: bm3dDenoising(src, dstStep1, dstStep2, h, templateWindowSize, searchWindowSize, blockMatchingStep1)
  327. public static void bm3dDenoising (Mat src, Mat dstStep1, Mat dstStep2, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1)
  328. {
  329. if (src != null) src.ThrowIfDisposed ();
  330. if (dstStep1 != null) dstStep1.ThrowIfDisposed ();
  331. if (dstStep2 != null) dstStep2.ThrowIfDisposed ();
  332. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  333. xphoto_Xphoto_bm3dDenoising_119(src.nativeObj, dstStep1.nativeObj, dstStep2.nativeObj, h, templateWindowSize, searchWindowSize, blockMatchingStep1);
  334. return;
  335. #else
  336. return;
  337. #endif
  338. }
  339. //javadoc: bm3dDenoising(src, dstStep1, dstStep2, h, templateWindowSize, searchWindowSize)
  340. public static void bm3dDenoising (Mat src, Mat dstStep1, Mat dstStep2, float h, int templateWindowSize, int searchWindowSize)
  341. {
  342. if (src != null) src.ThrowIfDisposed ();
  343. if (dstStep1 != null) dstStep1.ThrowIfDisposed ();
  344. if (dstStep2 != null) dstStep2.ThrowIfDisposed ();
  345. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  346. xphoto_Xphoto_bm3dDenoising_120(src.nativeObj, dstStep1.nativeObj, dstStep2.nativeObj, h, templateWindowSize, searchWindowSize);
  347. return;
  348. #else
  349. return;
  350. #endif
  351. }
  352. //javadoc: bm3dDenoising(src, dstStep1, dstStep2, h, templateWindowSize)
  353. public static void bm3dDenoising (Mat src, Mat dstStep1, Mat dstStep2, float h, int templateWindowSize)
  354. {
  355. if (src != null) src.ThrowIfDisposed ();
  356. if (dstStep1 != null) dstStep1.ThrowIfDisposed ();
  357. if (dstStep2 != null) dstStep2.ThrowIfDisposed ();
  358. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  359. xphoto_Xphoto_bm3dDenoising_121(src.nativeObj, dstStep1.nativeObj, dstStep2.nativeObj, h, templateWindowSize);
  360. return;
  361. #else
  362. return;
  363. #endif
  364. }
  365. //javadoc: bm3dDenoising(src, dstStep1, dstStep2, h)
  366. public static void bm3dDenoising (Mat src, Mat dstStep1, Mat dstStep2, float h)
  367. {
  368. if (src != null) src.ThrowIfDisposed ();
  369. if (dstStep1 != null) dstStep1.ThrowIfDisposed ();
  370. if (dstStep2 != null) dstStep2.ThrowIfDisposed ();
  371. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  372. xphoto_Xphoto_bm3dDenoising_122(src.nativeObj, dstStep1.nativeObj, dstStep2.nativeObj, h);
  373. return;
  374. #else
  375. return;
  376. #endif
  377. }
  378. //javadoc: bm3dDenoising(src, dstStep1, dstStep2)
  379. public static void bm3dDenoising (Mat src, Mat dstStep1, Mat dstStep2)
  380. {
  381. if (src != null) src.ThrowIfDisposed ();
  382. if (dstStep1 != null) dstStep1.ThrowIfDisposed ();
  383. if (dstStep2 != null) dstStep2.ThrowIfDisposed ();
  384. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  385. xphoto_Xphoto_bm3dDenoising_123(src.nativeObj, dstStep1.nativeObj, dstStep2.nativeObj);
  386. return;
  387. #else
  388. return;
  389. #endif
  390. }
  391. //
  392. // C++: void cv::xphoto::dctDenoising(Mat src, Mat dst, double sigma, int psize = 16)
  393. //
  394. //javadoc: dctDenoising(src, dst, sigma, psize)
  395. public static void dctDenoising (Mat src, Mat dst, double sigma, int psize)
  396. {
  397. if (src != null) src.ThrowIfDisposed ();
  398. if (dst != null) dst.ThrowIfDisposed ();
  399. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  400. xphoto_Xphoto_dctDenoising_10(src.nativeObj, dst.nativeObj, sigma, psize);
  401. return;
  402. #else
  403. return;
  404. #endif
  405. }
  406. //javadoc: dctDenoising(src, dst, sigma)
  407. public static void dctDenoising (Mat src, Mat dst, double sigma)
  408. {
  409. if (src != null) src.ThrowIfDisposed ();
  410. if (dst != null) dst.ThrowIfDisposed ();
  411. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  412. xphoto_Xphoto_dctDenoising_11(src.nativeObj, dst.nativeObj, sigma);
  413. return;
  414. #else
  415. return;
  416. #endif
  417. }
  418. //
  419. // C++: void cv::xphoto::inpaint(Mat src, Mat mask, Mat dst, int algorithmType)
  420. //
  421. //javadoc: inpaint(src, mask, dst, algorithmType)
  422. public static void inpaint (Mat src, Mat mask, Mat dst, int algorithmType)
  423. {
  424. if (src != null) src.ThrowIfDisposed ();
  425. if (mask != null) mask.ThrowIfDisposed ();
  426. if (dst != null) dst.ThrowIfDisposed ();
  427. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  428. xphoto_Xphoto_inpaint_10(src.nativeObj, mask.nativeObj, dst.nativeObj, algorithmType);
  429. return;
  430. #else
  431. return;
  432. #endif
  433. }
  434. //
  435. // C++: void cv::xphoto::oilPainting(Mat src, Mat& dst, int size, int dynRatio, int code)
  436. //
  437. //javadoc: oilPainting(src, dst, size, dynRatio, code)
  438. public static void oilPainting (Mat src, Mat dst, int size, int dynRatio, int code)
  439. {
  440. if (src != null) src.ThrowIfDisposed ();
  441. if (dst != null) dst.ThrowIfDisposed ();
  442. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  443. xphoto_Xphoto_oilPainting_10(src.nativeObj, dst.nativeObj, size, dynRatio, code);
  444. return;
  445. #else
  446. return;
  447. #endif
  448. }
  449. //
  450. // C++: void cv::xphoto::oilPainting(Mat src, Mat& dst, int size, int dynRatio)
  451. //
  452. //javadoc: oilPainting(src, dst, size, dynRatio)
  453. public static void oilPainting (Mat src, Mat dst, int size, int dynRatio)
  454. {
  455. if (src != null) src.ThrowIfDisposed ();
  456. if (dst != null) dst.ThrowIfDisposed ();
  457. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  458. xphoto_Xphoto_oilPainting_11(src.nativeObj, dst.nativeObj, size, dynRatio);
  459. return;
  460. #else
  461. return;
  462. #endif
  463. }
  464. #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
  465. const string LIBNAME = "__Internal";
  466. #else
  467. const string LIBNAME = "opencvforunity";
  468. #endif
  469. // C++: Ptr_GrayworldWB cv::xphoto::createGrayworldWB()
  470. [DllImport (LIBNAME)]
  471. private static extern IntPtr xphoto_Xphoto_createGrayworldWB_10 ();
  472. // C++: Ptr_LearningBasedWB cv::xphoto::createLearningBasedWB(String path_to_model = String())
  473. [DllImport (LIBNAME)]
  474. private static extern IntPtr xphoto_Xphoto_createLearningBasedWB_10 (string path_to_model);
  475. [DllImport (LIBNAME)]
  476. private static extern IntPtr xphoto_Xphoto_createLearningBasedWB_11 ();
  477. // C++: Ptr_SimpleWB cv::xphoto::createSimpleWB()
  478. [DllImport (LIBNAME)]
  479. private static extern IntPtr xphoto_Xphoto_createSimpleWB_10 ();
  480. // C++: void cv::xphoto::applyChannelGains(Mat src, Mat& dst, float gainB, float gainG, float gainR)
  481. [DllImport (LIBNAME)]
  482. private static extern void xphoto_Xphoto_applyChannelGains_10 (IntPtr src_nativeObj, IntPtr dst_nativeObj, float gainB, float gainG, float gainR);
  483. // C++: void cv::xphoto::bm3dDenoising(Mat src, Mat& dst, float h = 1, int templateWindowSize = 4, int searchWindowSize = 16, int blockMatchingStep1 = 2500, int blockMatchingStep2 = 400, int groupSize = 8, int slidingStep = 1, float beta = 2.0f, int normType = cv::NORM_L2, int step = cv::xphoto::BM3D_STEPALL, int transformType = cv::xphoto::HAAR)
  484. [DllImport (LIBNAME)]
  485. private static extern void xphoto_Xphoto_bm3dDenoising_10 (IntPtr src_nativeObj, IntPtr dst_nativeObj, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1, int blockMatchingStep2, int groupSize, int slidingStep, float beta, int normType, int step, int transformType);
  486. [DllImport (LIBNAME)]
  487. private static extern void xphoto_Xphoto_bm3dDenoising_11 (IntPtr src_nativeObj, IntPtr dst_nativeObj, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1, int blockMatchingStep2, int groupSize, int slidingStep, float beta, int normType, int step);
  488. [DllImport (LIBNAME)]
  489. private static extern void xphoto_Xphoto_bm3dDenoising_12 (IntPtr src_nativeObj, IntPtr dst_nativeObj, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1, int blockMatchingStep2, int groupSize, int slidingStep, float beta, int normType);
  490. [DllImport (LIBNAME)]
  491. private static extern void xphoto_Xphoto_bm3dDenoising_13 (IntPtr src_nativeObj, IntPtr dst_nativeObj, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1, int blockMatchingStep2, int groupSize, int slidingStep, float beta);
  492. [DllImport (LIBNAME)]
  493. private static extern void xphoto_Xphoto_bm3dDenoising_14 (IntPtr src_nativeObj, IntPtr dst_nativeObj, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1, int blockMatchingStep2, int groupSize, int slidingStep);
  494. [DllImport (LIBNAME)]
  495. private static extern void xphoto_Xphoto_bm3dDenoising_15 (IntPtr src_nativeObj, IntPtr dst_nativeObj, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1, int blockMatchingStep2, int groupSize);
  496. [DllImport (LIBNAME)]
  497. private static extern void xphoto_Xphoto_bm3dDenoising_16 (IntPtr src_nativeObj, IntPtr dst_nativeObj, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1, int blockMatchingStep2);
  498. [DllImport (LIBNAME)]
  499. private static extern void xphoto_Xphoto_bm3dDenoising_17 (IntPtr src_nativeObj, IntPtr dst_nativeObj, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1);
  500. [DllImport (LIBNAME)]
  501. private static extern void xphoto_Xphoto_bm3dDenoising_18 (IntPtr src_nativeObj, IntPtr dst_nativeObj, float h, int templateWindowSize, int searchWindowSize);
  502. [DllImport (LIBNAME)]
  503. private static extern void xphoto_Xphoto_bm3dDenoising_19 (IntPtr src_nativeObj, IntPtr dst_nativeObj, float h, int templateWindowSize);
  504. [DllImport (LIBNAME)]
  505. private static extern void xphoto_Xphoto_bm3dDenoising_110 (IntPtr src_nativeObj, IntPtr dst_nativeObj, float h);
  506. [DllImport (LIBNAME)]
  507. private static extern void xphoto_Xphoto_bm3dDenoising_111 (IntPtr src_nativeObj, IntPtr dst_nativeObj);
  508. // C++: void cv::xphoto::bm3dDenoising(Mat src, Mat& dstStep1, Mat& dstStep2, float h = 1, int templateWindowSize = 4, int searchWindowSize = 16, int blockMatchingStep1 = 2500, int blockMatchingStep2 = 400, int groupSize = 8, int slidingStep = 1, float beta = 2.0f, int normType = cv::NORM_L2, int step = cv::xphoto::BM3D_STEPALL, int transformType = cv::xphoto::HAAR)
  509. [DllImport (LIBNAME)]
  510. private static extern void xphoto_Xphoto_bm3dDenoising_112 (IntPtr src_nativeObj, IntPtr dstStep1_nativeObj, IntPtr dstStep2_nativeObj, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1, int blockMatchingStep2, int groupSize, int slidingStep, float beta, int normType, int step, int transformType);
  511. [DllImport (LIBNAME)]
  512. private static extern void xphoto_Xphoto_bm3dDenoising_113 (IntPtr src_nativeObj, IntPtr dstStep1_nativeObj, IntPtr dstStep2_nativeObj, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1, int blockMatchingStep2, int groupSize, int slidingStep, float beta, int normType, int step);
  513. [DllImport (LIBNAME)]
  514. private static extern void xphoto_Xphoto_bm3dDenoising_114 (IntPtr src_nativeObj, IntPtr dstStep1_nativeObj, IntPtr dstStep2_nativeObj, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1, int blockMatchingStep2, int groupSize, int slidingStep, float beta, int normType);
  515. [DllImport (LIBNAME)]
  516. private static extern void xphoto_Xphoto_bm3dDenoising_115 (IntPtr src_nativeObj, IntPtr dstStep1_nativeObj, IntPtr dstStep2_nativeObj, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1, int blockMatchingStep2, int groupSize, int slidingStep, float beta);
  517. [DllImport (LIBNAME)]
  518. private static extern void xphoto_Xphoto_bm3dDenoising_116 (IntPtr src_nativeObj, IntPtr dstStep1_nativeObj, IntPtr dstStep2_nativeObj, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1, int blockMatchingStep2, int groupSize, int slidingStep);
  519. [DllImport (LIBNAME)]
  520. private static extern void xphoto_Xphoto_bm3dDenoising_117 (IntPtr src_nativeObj, IntPtr dstStep1_nativeObj, IntPtr dstStep2_nativeObj, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1, int blockMatchingStep2, int groupSize);
  521. [DllImport (LIBNAME)]
  522. private static extern void xphoto_Xphoto_bm3dDenoising_118 (IntPtr src_nativeObj, IntPtr dstStep1_nativeObj, IntPtr dstStep2_nativeObj, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1, int blockMatchingStep2);
  523. [DllImport (LIBNAME)]
  524. private static extern void xphoto_Xphoto_bm3dDenoising_119 (IntPtr src_nativeObj, IntPtr dstStep1_nativeObj, IntPtr dstStep2_nativeObj, float h, int templateWindowSize, int searchWindowSize, int blockMatchingStep1);
  525. [DllImport (LIBNAME)]
  526. private static extern void xphoto_Xphoto_bm3dDenoising_120 (IntPtr src_nativeObj, IntPtr dstStep1_nativeObj, IntPtr dstStep2_nativeObj, float h, int templateWindowSize, int searchWindowSize);
  527. [DllImport (LIBNAME)]
  528. private static extern void xphoto_Xphoto_bm3dDenoising_121 (IntPtr src_nativeObj, IntPtr dstStep1_nativeObj, IntPtr dstStep2_nativeObj, float h, int templateWindowSize);
  529. [DllImport (LIBNAME)]
  530. private static extern void xphoto_Xphoto_bm3dDenoising_122 (IntPtr src_nativeObj, IntPtr dstStep1_nativeObj, IntPtr dstStep2_nativeObj, float h);
  531. [DllImport (LIBNAME)]
  532. private static extern void xphoto_Xphoto_bm3dDenoising_123 (IntPtr src_nativeObj, IntPtr dstStep1_nativeObj, IntPtr dstStep2_nativeObj);
  533. // C++: void cv::xphoto::dctDenoising(Mat src, Mat dst, double sigma, int psize = 16)
  534. [DllImport (LIBNAME)]
  535. private static extern void xphoto_Xphoto_dctDenoising_10 (IntPtr src_nativeObj, IntPtr dst_nativeObj, double sigma, int psize);
  536. [DllImport (LIBNAME)]
  537. private static extern void xphoto_Xphoto_dctDenoising_11 (IntPtr src_nativeObj, IntPtr dst_nativeObj, double sigma);
  538. // C++: void cv::xphoto::inpaint(Mat src, Mat mask, Mat dst, int algorithmType)
  539. [DllImport (LIBNAME)]
  540. private static extern void xphoto_Xphoto_inpaint_10 (IntPtr src_nativeObj, IntPtr mask_nativeObj, IntPtr dst_nativeObj, int algorithmType);
  541. // C++: void cv::xphoto::oilPainting(Mat src, Mat& dst, int size, int dynRatio, int code)
  542. [DllImport (LIBNAME)]
  543. private static extern void xphoto_Xphoto_oilPainting_10 (IntPtr src_nativeObj, IntPtr dst_nativeObj, int size, int dynRatio, int code);
  544. // C++: void cv::xphoto::oilPainting(Mat src, Mat& dst, int size, int dynRatio)
  545. [DllImport (LIBNAME)]
  546. private static extern void xphoto_Xphoto_oilPainting_11 (IntPtr src_nativeObj, IntPtr dst_nativeObj, int size, int dynRatio);
  547. }
  548. }