Xphoto.h 65 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106
  1. //
  2. // This file is auto-generated. Please don't modify it!
  3. //
  4. #pragma once
  5. #ifdef __cplusplus
  6. //#import "opencv.hpp"
  7. #import "opencv2/xphoto.hpp"
  8. #else
  9. #define CV_EXPORTS
  10. #endif
  11. #import <Foundation/Foundation.h>
  12. @class GrayworldWB;
  13. @class LearningBasedWB;
  14. @class Mat;
  15. @class SimpleWB;
  16. @class TonemapDurand;
  17. // C++: enum Bm3dSteps (cv.xphoto.Bm3dSteps)
  18. typedef NS_ENUM(int, Bm3dSteps) {
  19. BM3D_STEPALL = 0,
  20. BM3D_STEP1 = 1,
  21. BM3D_STEP2 = 2
  22. };
  23. // C++: enum InpaintTypes (cv.xphoto.InpaintTypes)
  24. typedef NS_ENUM(int, InpaintTypes) {
  25. INPAINT_SHIFTMAP = 0,
  26. INPAINT_FSR_BEST = 1,
  27. INPAINT_FSR_FAST = 2
  28. };
  29. // C++: enum TransformTypes (cv.xphoto.TransformTypes)
  30. typedef NS_ENUM(int, TransformTypes) {
  31. HAAR = 0
  32. };
  33. NS_ASSUME_NONNULL_BEGIN
  34. // C++: class Xphoto
  35. /**
  36. * The Xphoto module
  37. *
  38. * Member classes: `TonemapDurand`, `WhiteBalancer`, `SimpleWB`, `GrayworldWB`, `LearningBasedWB`
  39. *
  40. * Member enums: `TransformTypes`, `Bm3dSteps`, `InpaintTypes`
  41. */
  42. CV_EXPORTS @interface Xphoto : NSObject
  43. #pragma mark - Methods
  44. //
  45. // 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)
  46. //
  47. /**
  48. * Performs image denoising using the Block-Matching and 3D-filtering algorithm
  49. * <http://www.cs.tut.fi/~foi/GCF-BM3D/BM3D_TIP_2007.pdf> with several computational
  50. * optimizations. Noise expected to be a gaussian white noise.
  51. *
  52. * @param src Input 8-bit or 16-bit 1-channel image.
  53. * @param dstStep1 Output image of the first step of BM3D with the same size and type as src.
  54. * @param dstStep2 Output image of the second step of BM3D with the same size and type as src.
  55. * @param h Parameter regulating filter strength. Big h value perfectly removes noise but also
  56. * removes image details, smaller h value preserves details but also preserves some noise.
  57. * @param templateWindowSize Size in pixels of the template patch that is used for block-matching.
  58. * Should be power of 2.
  59. * @param searchWindowSize Size in pixels of the window that is used to perform block-matching.
  60. * Affect performance linearly: greater searchWindowsSize - greater denoising time.
  61. * Must be larger than templateWindowSize.
  62. * @param blockMatchingStep1 Block matching threshold for the first step of BM3D (hard thresholding),
  63. * i.e. maximum distance for which two blocks are considered similar.
  64. * Value expressed in euclidean distance.
  65. * @param blockMatchingStep2 Block matching threshold for the second step of BM3D (Wiener filtering),
  66. * i.e. maximum distance for which two blocks are considered similar.
  67. * Value expressed in euclidean distance.
  68. * @param groupSize Maximum size of the 3D group for collaborative filtering.
  69. * @param slidingStep Sliding step to process every next reference block.
  70. * @param beta Kaiser window parameter that affects the sidelobe attenuation of the transform of the
  71. * window. Kaiser window is used in order to reduce border effects. To prevent usage of the window,
  72. * set beta to zero.
  73. * @param normType Norm used to calculate distance between blocks. L2 is slower than L1
  74. * but yields more accurate results.
  75. * @param step Step of BM3D to be executed. Possible variants are: step 1, step 2, both steps.
  76. * @param transformType Type of the orthogonal transform used in collaborative filtering step.
  77. * Currently only Haar transform is supported.
  78. *
  79. * This function expected to be applied to grayscale images. Advanced usage of this function
  80. * can be manual denoising of colored image in different colorspaces.
  81. *
  82. * @sa
  83. * fastNlMeansDenoising
  84. */
  85. + (void)bm3dDenoising:(Mat*)src dstStep1:(Mat*)dstStep1 dstStep2:(Mat*)dstStep2 h:(float)h templateWindowSize:(int)templateWindowSize searchWindowSize:(int)searchWindowSize blockMatchingStep1:(int)blockMatchingStep1 blockMatchingStep2:(int)blockMatchingStep2 groupSize:(int)groupSize slidingStep:(int)slidingStep beta:(float)beta normType:(int)normType step:(int)step transformType:(int)transformType NS_SWIFT_NAME(bm3dDenoising(src:dstStep1:dstStep2:h:templateWindowSize:searchWindowSize:blockMatchingStep1:blockMatchingStep2:groupSize:slidingStep:beta:normType:step:transformType:));
  86. /**
  87. * Performs image denoising using the Block-Matching and 3D-filtering algorithm
  88. * <http://www.cs.tut.fi/~foi/GCF-BM3D/BM3D_TIP_2007.pdf> with several computational
  89. * optimizations. Noise expected to be a gaussian white noise.
  90. *
  91. * @param src Input 8-bit or 16-bit 1-channel image.
  92. * @param dstStep1 Output image of the first step of BM3D with the same size and type as src.
  93. * @param dstStep2 Output image of the second step of BM3D with the same size and type as src.
  94. * @param h Parameter regulating filter strength. Big h value perfectly removes noise but also
  95. * removes image details, smaller h value preserves details but also preserves some noise.
  96. * @param templateWindowSize Size in pixels of the template patch that is used for block-matching.
  97. * Should be power of 2.
  98. * @param searchWindowSize Size in pixels of the window that is used to perform block-matching.
  99. * Affect performance linearly: greater searchWindowsSize - greater denoising time.
  100. * Must be larger than templateWindowSize.
  101. * @param blockMatchingStep1 Block matching threshold for the first step of BM3D (hard thresholding),
  102. * i.e. maximum distance for which two blocks are considered similar.
  103. * Value expressed in euclidean distance.
  104. * @param blockMatchingStep2 Block matching threshold for the second step of BM3D (Wiener filtering),
  105. * i.e. maximum distance for which two blocks are considered similar.
  106. * Value expressed in euclidean distance.
  107. * @param groupSize Maximum size of the 3D group for collaborative filtering.
  108. * @param slidingStep Sliding step to process every next reference block.
  109. * @param beta Kaiser window parameter that affects the sidelobe attenuation of the transform of the
  110. * window. Kaiser window is used in order to reduce border effects. To prevent usage of the window,
  111. * set beta to zero.
  112. * @param normType Norm used to calculate distance between blocks. L2 is slower than L1
  113. * but yields more accurate results.
  114. * @param step Step of BM3D to be executed. Possible variants are: step 1, step 2, both steps.
  115. * Currently only Haar transform is supported.
  116. *
  117. * This function expected to be applied to grayscale images. Advanced usage of this function
  118. * can be manual denoising of colored image in different colorspaces.
  119. *
  120. * @sa
  121. * fastNlMeansDenoising
  122. */
  123. + (void)bm3dDenoising:(Mat*)src dstStep1:(Mat*)dstStep1 dstStep2:(Mat*)dstStep2 h:(float)h templateWindowSize:(int)templateWindowSize searchWindowSize:(int)searchWindowSize blockMatchingStep1:(int)blockMatchingStep1 blockMatchingStep2:(int)blockMatchingStep2 groupSize:(int)groupSize slidingStep:(int)slidingStep beta:(float)beta normType:(int)normType step:(int)step NS_SWIFT_NAME(bm3dDenoising(src:dstStep1:dstStep2:h:templateWindowSize:searchWindowSize:blockMatchingStep1:blockMatchingStep2:groupSize:slidingStep:beta:normType:step:));
  124. /**
  125. * Performs image denoising using the Block-Matching and 3D-filtering algorithm
  126. * <http://www.cs.tut.fi/~foi/GCF-BM3D/BM3D_TIP_2007.pdf> with several computational
  127. * optimizations. Noise expected to be a gaussian white noise.
  128. *
  129. * @param src Input 8-bit or 16-bit 1-channel image.
  130. * @param dstStep1 Output image of the first step of BM3D with the same size and type as src.
  131. * @param dstStep2 Output image of the second step of BM3D with the same size and type as src.
  132. * @param h Parameter regulating filter strength. Big h value perfectly removes noise but also
  133. * removes image details, smaller h value preserves details but also preserves some noise.
  134. * @param templateWindowSize Size in pixels of the template patch that is used for block-matching.
  135. * Should be power of 2.
  136. * @param searchWindowSize Size in pixels of the window that is used to perform block-matching.
  137. * Affect performance linearly: greater searchWindowsSize - greater denoising time.
  138. * Must be larger than templateWindowSize.
  139. * @param blockMatchingStep1 Block matching threshold for the first step of BM3D (hard thresholding),
  140. * i.e. maximum distance for which two blocks are considered similar.
  141. * Value expressed in euclidean distance.
  142. * @param blockMatchingStep2 Block matching threshold for the second step of BM3D (Wiener filtering),
  143. * i.e. maximum distance for which two blocks are considered similar.
  144. * Value expressed in euclidean distance.
  145. * @param groupSize Maximum size of the 3D group for collaborative filtering.
  146. * @param slidingStep Sliding step to process every next reference block.
  147. * @param beta Kaiser window parameter that affects the sidelobe attenuation of the transform of the
  148. * window. Kaiser window is used in order to reduce border effects. To prevent usage of the window,
  149. * set beta to zero.
  150. * @param normType Norm used to calculate distance between blocks. L2 is slower than L1
  151. * but yields more accurate results.
  152. * Currently only Haar transform is supported.
  153. *
  154. * This function expected to be applied to grayscale images. Advanced usage of this function
  155. * can be manual denoising of colored image in different colorspaces.
  156. *
  157. * @sa
  158. * fastNlMeansDenoising
  159. */
  160. + (void)bm3dDenoising:(Mat*)src dstStep1:(Mat*)dstStep1 dstStep2:(Mat*)dstStep2 h:(float)h templateWindowSize:(int)templateWindowSize searchWindowSize:(int)searchWindowSize blockMatchingStep1:(int)blockMatchingStep1 blockMatchingStep2:(int)blockMatchingStep2 groupSize:(int)groupSize slidingStep:(int)slidingStep beta:(float)beta normType:(int)normType NS_SWIFT_NAME(bm3dDenoising(src:dstStep1:dstStep2:h:templateWindowSize:searchWindowSize:blockMatchingStep1:blockMatchingStep2:groupSize:slidingStep:beta:normType:));
  161. /**
  162. * Performs image denoising using the Block-Matching and 3D-filtering algorithm
  163. * <http://www.cs.tut.fi/~foi/GCF-BM3D/BM3D_TIP_2007.pdf> with several computational
  164. * optimizations. Noise expected to be a gaussian white noise.
  165. *
  166. * @param src Input 8-bit or 16-bit 1-channel image.
  167. * @param dstStep1 Output image of the first step of BM3D with the same size and type as src.
  168. * @param dstStep2 Output image of the second step of BM3D with the same size and type as src.
  169. * @param h Parameter regulating filter strength. Big h value perfectly removes noise but also
  170. * removes image details, smaller h value preserves details but also preserves some noise.
  171. * @param templateWindowSize Size in pixels of the template patch that is used for block-matching.
  172. * Should be power of 2.
  173. * @param searchWindowSize Size in pixels of the window that is used to perform block-matching.
  174. * Affect performance linearly: greater searchWindowsSize - greater denoising time.
  175. * Must be larger than templateWindowSize.
  176. * @param blockMatchingStep1 Block matching threshold for the first step of BM3D (hard thresholding),
  177. * i.e. maximum distance for which two blocks are considered similar.
  178. * Value expressed in euclidean distance.
  179. * @param blockMatchingStep2 Block matching threshold for the second step of BM3D (Wiener filtering),
  180. * i.e. maximum distance for which two blocks are considered similar.
  181. * Value expressed in euclidean distance.
  182. * @param groupSize Maximum size of the 3D group for collaborative filtering.
  183. * @param slidingStep Sliding step to process every next reference block.
  184. * @param beta Kaiser window parameter that affects the sidelobe attenuation of the transform of the
  185. * window. Kaiser window is used in order to reduce border effects. To prevent usage of the window,
  186. * set beta to zero.
  187. * but yields more accurate results.
  188. * Currently only Haar transform is supported.
  189. *
  190. * This function expected to be applied to grayscale images. Advanced usage of this function
  191. * can be manual denoising of colored image in different colorspaces.
  192. *
  193. * @sa
  194. * fastNlMeansDenoising
  195. */
  196. + (void)bm3dDenoising:(Mat*)src dstStep1:(Mat*)dstStep1 dstStep2:(Mat*)dstStep2 h:(float)h templateWindowSize:(int)templateWindowSize searchWindowSize:(int)searchWindowSize blockMatchingStep1:(int)blockMatchingStep1 blockMatchingStep2:(int)blockMatchingStep2 groupSize:(int)groupSize slidingStep:(int)slidingStep beta:(float)beta NS_SWIFT_NAME(bm3dDenoising(src:dstStep1:dstStep2:h:templateWindowSize:searchWindowSize:blockMatchingStep1:blockMatchingStep2:groupSize:slidingStep:beta:));
  197. /**
  198. * Performs image denoising using the Block-Matching and 3D-filtering algorithm
  199. * <http://www.cs.tut.fi/~foi/GCF-BM3D/BM3D_TIP_2007.pdf> with several computational
  200. * optimizations. Noise expected to be a gaussian white noise.
  201. *
  202. * @param src Input 8-bit or 16-bit 1-channel image.
  203. * @param dstStep1 Output image of the first step of BM3D with the same size and type as src.
  204. * @param dstStep2 Output image of the second step of BM3D with the same size and type as src.
  205. * @param h Parameter regulating filter strength. Big h value perfectly removes noise but also
  206. * removes image details, smaller h value preserves details but also preserves some noise.
  207. * @param templateWindowSize Size in pixels of the template patch that is used for block-matching.
  208. * Should be power of 2.
  209. * @param searchWindowSize Size in pixels of the window that is used to perform block-matching.
  210. * Affect performance linearly: greater searchWindowsSize - greater denoising time.
  211. * Must be larger than templateWindowSize.
  212. * @param blockMatchingStep1 Block matching threshold for the first step of BM3D (hard thresholding),
  213. * i.e. maximum distance for which two blocks are considered similar.
  214. * Value expressed in euclidean distance.
  215. * @param blockMatchingStep2 Block matching threshold for the second step of BM3D (Wiener filtering),
  216. * i.e. maximum distance for which two blocks are considered similar.
  217. * Value expressed in euclidean distance.
  218. * @param groupSize Maximum size of the 3D group for collaborative filtering.
  219. * @param slidingStep Sliding step to process every next reference block.
  220. * window. Kaiser window is used in order to reduce border effects. To prevent usage of the window,
  221. * set beta to zero.
  222. * but yields more accurate results.
  223. * Currently only Haar transform is supported.
  224. *
  225. * This function expected to be applied to grayscale images. Advanced usage of this function
  226. * can be manual denoising of colored image in different colorspaces.
  227. *
  228. * @sa
  229. * fastNlMeansDenoising
  230. */
  231. + (void)bm3dDenoising:(Mat*)src dstStep1:(Mat*)dstStep1 dstStep2:(Mat*)dstStep2 h:(float)h templateWindowSize:(int)templateWindowSize searchWindowSize:(int)searchWindowSize blockMatchingStep1:(int)blockMatchingStep1 blockMatchingStep2:(int)blockMatchingStep2 groupSize:(int)groupSize slidingStep:(int)slidingStep NS_SWIFT_NAME(bm3dDenoising(src:dstStep1:dstStep2:h:templateWindowSize:searchWindowSize:blockMatchingStep1:blockMatchingStep2:groupSize:slidingStep:));
  232. /**
  233. * Performs image denoising using the Block-Matching and 3D-filtering algorithm
  234. * <http://www.cs.tut.fi/~foi/GCF-BM3D/BM3D_TIP_2007.pdf> with several computational
  235. * optimizations. Noise expected to be a gaussian white noise.
  236. *
  237. * @param src Input 8-bit or 16-bit 1-channel image.
  238. * @param dstStep1 Output image of the first step of BM3D with the same size and type as src.
  239. * @param dstStep2 Output image of the second step of BM3D with the same size and type as src.
  240. * @param h Parameter regulating filter strength. Big h value perfectly removes noise but also
  241. * removes image details, smaller h value preserves details but also preserves some noise.
  242. * @param templateWindowSize Size in pixels of the template patch that is used for block-matching.
  243. * Should be power of 2.
  244. * @param searchWindowSize Size in pixels of the window that is used to perform block-matching.
  245. * Affect performance linearly: greater searchWindowsSize - greater denoising time.
  246. * Must be larger than templateWindowSize.
  247. * @param blockMatchingStep1 Block matching threshold for the first step of BM3D (hard thresholding),
  248. * i.e. maximum distance for which two blocks are considered similar.
  249. * Value expressed in euclidean distance.
  250. * @param blockMatchingStep2 Block matching threshold for the second step of BM3D (Wiener filtering),
  251. * i.e. maximum distance for which two blocks are considered similar.
  252. * Value expressed in euclidean distance.
  253. * @param groupSize Maximum size of the 3D group for collaborative filtering.
  254. * window. Kaiser window is used in order to reduce border effects. To prevent usage of the window,
  255. * set beta to zero.
  256. * but yields more accurate results.
  257. * Currently only Haar transform is supported.
  258. *
  259. * This function expected to be applied to grayscale images. Advanced usage of this function
  260. * can be manual denoising of colored image in different colorspaces.
  261. *
  262. * @sa
  263. * fastNlMeansDenoising
  264. */
  265. + (void)bm3dDenoising:(Mat*)src dstStep1:(Mat*)dstStep1 dstStep2:(Mat*)dstStep2 h:(float)h templateWindowSize:(int)templateWindowSize searchWindowSize:(int)searchWindowSize blockMatchingStep1:(int)blockMatchingStep1 blockMatchingStep2:(int)blockMatchingStep2 groupSize:(int)groupSize NS_SWIFT_NAME(bm3dDenoising(src:dstStep1:dstStep2:h:templateWindowSize:searchWindowSize:blockMatchingStep1:blockMatchingStep2:groupSize:));
  266. /**
  267. * Performs image denoising using the Block-Matching and 3D-filtering algorithm
  268. * <http://www.cs.tut.fi/~foi/GCF-BM3D/BM3D_TIP_2007.pdf> with several computational
  269. * optimizations. Noise expected to be a gaussian white noise.
  270. *
  271. * @param src Input 8-bit or 16-bit 1-channel image.
  272. * @param dstStep1 Output image of the first step of BM3D with the same size and type as src.
  273. * @param dstStep2 Output image of the second step of BM3D with the same size and type as src.
  274. * @param h Parameter regulating filter strength. Big h value perfectly removes noise but also
  275. * removes image details, smaller h value preserves details but also preserves some noise.
  276. * @param templateWindowSize Size in pixels of the template patch that is used for block-matching.
  277. * Should be power of 2.
  278. * @param searchWindowSize Size in pixels of the window that is used to perform block-matching.
  279. * Affect performance linearly: greater searchWindowsSize - greater denoising time.
  280. * Must be larger than templateWindowSize.
  281. * @param blockMatchingStep1 Block matching threshold for the first step of BM3D (hard thresholding),
  282. * i.e. maximum distance for which two blocks are considered similar.
  283. * Value expressed in euclidean distance.
  284. * @param blockMatchingStep2 Block matching threshold for the second step of BM3D (Wiener filtering),
  285. * i.e. maximum distance for which two blocks are considered similar.
  286. * Value expressed in euclidean distance.
  287. * window. Kaiser window is used in order to reduce border effects. To prevent usage of the window,
  288. * set beta to zero.
  289. * but yields more accurate results.
  290. * Currently only Haar transform is supported.
  291. *
  292. * This function expected to be applied to grayscale images. Advanced usage of this function
  293. * can be manual denoising of colored image in different colorspaces.
  294. *
  295. * @sa
  296. * fastNlMeansDenoising
  297. */
  298. + (void)bm3dDenoising:(Mat*)src dstStep1:(Mat*)dstStep1 dstStep2:(Mat*)dstStep2 h:(float)h templateWindowSize:(int)templateWindowSize searchWindowSize:(int)searchWindowSize blockMatchingStep1:(int)blockMatchingStep1 blockMatchingStep2:(int)blockMatchingStep2 NS_SWIFT_NAME(bm3dDenoising(src:dstStep1:dstStep2:h:templateWindowSize:searchWindowSize:blockMatchingStep1:blockMatchingStep2:));
  299. /**
  300. * Performs image denoising using the Block-Matching and 3D-filtering algorithm
  301. * <http://www.cs.tut.fi/~foi/GCF-BM3D/BM3D_TIP_2007.pdf> with several computational
  302. * optimizations. Noise expected to be a gaussian white noise.
  303. *
  304. * @param src Input 8-bit or 16-bit 1-channel image.
  305. * @param dstStep1 Output image of the first step of BM3D with the same size and type as src.
  306. * @param dstStep2 Output image of the second step of BM3D with the same size and type as src.
  307. * @param h Parameter regulating filter strength. Big h value perfectly removes noise but also
  308. * removes image details, smaller h value preserves details but also preserves some noise.
  309. * @param templateWindowSize Size in pixels of the template patch that is used for block-matching.
  310. * Should be power of 2.
  311. * @param searchWindowSize Size in pixels of the window that is used to perform block-matching.
  312. * Affect performance linearly: greater searchWindowsSize - greater denoising time.
  313. * Must be larger than templateWindowSize.
  314. * @param blockMatchingStep1 Block matching threshold for the first step of BM3D (hard thresholding),
  315. * i.e. maximum distance for which two blocks are considered similar.
  316. * Value expressed in euclidean distance.
  317. * i.e. maximum distance for which two blocks are considered similar.
  318. * Value expressed in euclidean distance.
  319. * window. Kaiser window is used in order to reduce border effects. To prevent usage of the window,
  320. * set beta to zero.
  321. * but yields more accurate results.
  322. * Currently only Haar transform is supported.
  323. *
  324. * This function expected to be applied to grayscale images. Advanced usage of this function
  325. * can be manual denoising of colored image in different colorspaces.
  326. *
  327. * @sa
  328. * fastNlMeansDenoising
  329. */
  330. + (void)bm3dDenoising:(Mat*)src dstStep1:(Mat*)dstStep1 dstStep2:(Mat*)dstStep2 h:(float)h templateWindowSize:(int)templateWindowSize searchWindowSize:(int)searchWindowSize blockMatchingStep1:(int)blockMatchingStep1 NS_SWIFT_NAME(bm3dDenoising(src:dstStep1:dstStep2:h:templateWindowSize:searchWindowSize:blockMatchingStep1:));
  331. /**
  332. * Performs image denoising using the Block-Matching and 3D-filtering algorithm
  333. * <http://www.cs.tut.fi/~foi/GCF-BM3D/BM3D_TIP_2007.pdf> with several computational
  334. * optimizations. Noise expected to be a gaussian white noise.
  335. *
  336. * @param src Input 8-bit or 16-bit 1-channel image.
  337. * @param dstStep1 Output image of the first step of BM3D with the same size and type as src.
  338. * @param dstStep2 Output image of the second step of BM3D with the same size and type as src.
  339. * @param h Parameter regulating filter strength. Big h value perfectly removes noise but also
  340. * removes image details, smaller h value preserves details but also preserves some noise.
  341. * @param templateWindowSize Size in pixels of the template patch that is used for block-matching.
  342. * Should be power of 2.
  343. * @param searchWindowSize Size in pixels of the window that is used to perform block-matching.
  344. * Affect performance linearly: greater searchWindowsSize - greater denoising time.
  345. * Must be larger than templateWindowSize.
  346. * i.e. maximum distance for which two blocks are considered similar.
  347. * Value expressed in euclidean distance.
  348. * i.e. maximum distance for which two blocks are considered similar.
  349. * Value expressed in euclidean distance.
  350. * window. Kaiser window is used in order to reduce border effects. To prevent usage of the window,
  351. * set beta to zero.
  352. * but yields more accurate results.
  353. * Currently only Haar transform is supported.
  354. *
  355. * This function expected to be applied to grayscale images. Advanced usage of this function
  356. * can be manual denoising of colored image in different colorspaces.
  357. *
  358. * @sa
  359. * fastNlMeansDenoising
  360. */
  361. + (void)bm3dDenoising:(Mat*)src dstStep1:(Mat*)dstStep1 dstStep2:(Mat*)dstStep2 h:(float)h templateWindowSize:(int)templateWindowSize searchWindowSize:(int)searchWindowSize NS_SWIFT_NAME(bm3dDenoising(src:dstStep1:dstStep2:h:templateWindowSize:searchWindowSize:));
  362. /**
  363. * Performs image denoising using the Block-Matching and 3D-filtering algorithm
  364. * <http://www.cs.tut.fi/~foi/GCF-BM3D/BM3D_TIP_2007.pdf> with several computational
  365. * optimizations. Noise expected to be a gaussian white noise.
  366. *
  367. * @param src Input 8-bit or 16-bit 1-channel image.
  368. * @param dstStep1 Output image of the first step of BM3D with the same size and type as src.
  369. * @param dstStep2 Output image of the second step of BM3D with the same size and type as src.
  370. * @param h Parameter regulating filter strength. Big h value perfectly removes noise but also
  371. * removes image details, smaller h value preserves details but also preserves some noise.
  372. * @param templateWindowSize Size in pixels of the template patch that is used for block-matching.
  373. * Should be power of 2.
  374. * Affect performance linearly: greater searchWindowsSize - greater denoising time.
  375. * Must be larger than templateWindowSize.
  376. * i.e. maximum distance for which two blocks are considered similar.
  377. * Value expressed in euclidean distance.
  378. * i.e. maximum distance for which two blocks are considered similar.
  379. * Value expressed in euclidean distance.
  380. * window. Kaiser window is used in order to reduce border effects. To prevent usage of the window,
  381. * set beta to zero.
  382. * but yields more accurate results.
  383. * Currently only Haar transform is supported.
  384. *
  385. * This function expected to be applied to grayscale images. Advanced usage of this function
  386. * can be manual denoising of colored image in different colorspaces.
  387. *
  388. * @sa
  389. * fastNlMeansDenoising
  390. */
  391. + (void)bm3dDenoising:(Mat*)src dstStep1:(Mat*)dstStep1 dstStep2:(Mat*)dstStep2 h:(float)h templateWindowSize:(int)templateWindowSize NS_SWIFT_NAME(bm3dDenoising(src:dstStep1:dstStep2:h:templateWindowSize:));
  392. /**
  393. * Performs image denoising using the Block-Matching and 3D-filtering algorithm
  394. * <http://www.cs.tut.fi/~foi/GCF-BM3D/BM3D_TIP_2007.pdf> with several computational
  395. * optimizations. Noise expected to be a gaussian white noise.
  396. *
  397. * @param src Input 8-bit or 16-bit 1-channel image.
  398. * @param dstStep1 Output image of the first step of BM3D with the same size and type as src.
  399. * @param dstStep2 Output image of the second step of BM3D with the same size and type as src.
  400. * @param h Parameter regulating filter strength. Big h value perfectly removes noise but also
  401. * removes image details, smaller h value preserves details but also preserves some noise.
  402. * Should be power of 2.
  403. * Affect performance linearly: greater searchWindowsSize - greater denoising time.
  404. * Must be larger than templateWindowSize.
  405. * i.e. maximum distance for which two blocks are considered similar.
  406. * Value expressed in euclidean distance.
  407. * i.e. maximum distance for which two blocks are considered similar.
  408. * Value expressed in euclidean distance.
  409. * window. Kaiser window is used in order to reduce border effects. To prevent usage of the window,
  410. * set beta to zero.
  411. * but yields more accurate results.
  412. * Currently only Haar transform is supported.
  413. *
  414. * This function expected to be applied to grayscale images. Advanced usage of this function
  415. * can be manual denoising of colored image in different colorspaces.
  416. *
  417. * @sa
  418. * fastNlMeansDenoising
  419. */
  420. + (void)bm3dDenoising:(Mat*)src dstStep1:(Mat*)dstStep1 dstStep2:(Mat*)dstStep2 h:(float)h NS_SWIFT_NAME(bm3dDenoising(src:dstStep1:dstStep2:h:));
  421. /**
  422. * Performs image denoising using the Block-Matching and 3D-filtering algorithm
  423. * <http://www.cs.tut.fi/~foi/GCF-BM3D/BM3D_TIP_2007.pdf> with several computational
  424. * optimizations. Noise expected to be a gaussian white noise.
  425. *
  426. * @param src Input 8-bit or 16-bit 1-channel image.
  427. * @param dstStep1 Output image of the first step of BM3D with the same size and type as src.
  428. * @param dstStep2 Output image of the second step of BM3D with the same size and type as src.
  429. * removes image details, smaller h value preserves details but also preserves some noise.
  430. * Should be power of 2.
  431. * Affect performance linearly: greater searchWindowsSize - greater denoising time.
  432. * Must be larger than templateWindowSize.
  433. * i.e. maximum distance for which two blocks are considered similar.
  434. * Value expressed in euclidean distance.
  435. * i.e. maximum distance for which two blocks are considered similar.
  436. * Value expressed in euclidean distance.
  437. * window. Kaiser window is used in order to reduce border effects. To prevent usage of the window,
  438. * set beta to zero.
  439. * but yields more accurate results.
  440. * Currently only Haar transform is supported.
  441. *
  442. * This function expected to be applied to grayscale images. Advanced usage of this function
  443. * can be manual denoising of colored image in different colorspaces.
  444. *
  445. * @sa
  446. * fastNlMeansDenoising
  447. */
  448. + (void)bm3dDenoising:(Mat*)src dstStep1:(Mat*)dstStep1 dstStep2:(Mat*)dstStep2 NS_SWIFT_NAME(bm3dDenoising(src:dstStep1:dstStep2:));
  449. //
  450. // 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)
  451. //
  452. /**
  453. * Performs image denoising using the Block-Matching and 3D-filtering algorithm
  454. * <http://www.cs.tut.fi/~foi/GCF-BM3D/BM3D_TIP_2007.pdf> with several computational
  455. * optimizations. Noise expected to be a gaussian white noise.
  456. *
  457. * @param src Input 8-bit or 16-bit 1-channel image.
  458. * @param dst Output image with the same size and type as src.
  459. * @param h Parameter regulating filter strength. Big h value perfectly removes noise but also
  460. * removes image details, smaller h value preserves details but also preserves some noise.
  461. * @param templateWindowSize Size in pixels of the template patch that is used for block-matching.
  462. * Should be power of 2.
  463. * @param searchWindowSize Size in pixels of the window that is used to perform block-matching.
  464. * Affect performance linearly: greater searchWindowsSize - greater denoising time.
  465. * Must be larger than templateWindowSize.
  466. * @param blockMatchingStep1 Block matching threshold for the first step of BM3D (hard thresholding),
  467. * i.e. maximum distance for which two blocks are considered similar.
  468. * Value expressed in euclidean distance.
  469. * @param blockMatchingStep2 Block matching threshold for the second step of BM3D (Wiener filtering),
  470. * i.e. maximum distance for which two blocks are considered similar.
  471. * Value expressed in euclidean distance.
  472. * @param groupSize Maximum size of the 3D group for collaborative filtering.
  473. * @param slidingStep Sliding step to process every next reference block.
  474. * @param beta Kaiser window parameter that affects the sidelobe attenuation of the transform of the
  475. * window. Kaiser window is used in order to reduce border effects. To prevent usage of the window,
  476. * set beta to zero.
  477. * @param normType Norm used to calculate distance between blocks. L2 is slower than L1
  478. * but yields more accurate results.
  479. * @param step Step of BM3D to be executed. Allowed are only BM3D_STEP1 and BM3D_STEPALL.
  480. * BM3D_STEP2 is not allowed as it requires basic estimate to be present.
  481. * @param transformType Type of the orthogonal transform used in collaborative filtering step.
  482. * Currently only Haar transform is supported.
  483. *
  484. * This function expected to be applied to grayscale images. Advanced usage of this function
  485. * can be manual denoising of colored image in different colorspaces.
  486. *
  487. * @sa
  488. * fastNlMeansDenoising
  489. */
  490. + (void)bm3dDenoising:(Mat*)src dst:(Mat*)dst h:(float)h templateWindowSize:(int)templateWindowSize searchWindowSize:(int)searchWindowSize blockMatchingStep1:(int)blockMatchingStep1 blockMatchingStep2:(int)blockMatchingStep2 groupSize:(int)groupSize slidingStep:(int)slidingStep beta:(float)beta normType:(int)normType step:(int)step transformType:(int)transformType NS_SWIFT_NAME(bm3dDenoising(src:dst:h:templateWindowSize:searchWindowSize:blockMatchingStep1:blockMatchingStep2:groupSize:slidingStep:beta:normType:step:transformType:));
  491. /**
  492. * Performs image denoising using the Block-Matching and 3D-filtering algorithm
  493. * <http://www.cs.tut.fi/~foi/GCF-BM3D/BM3D_TIP_2007.pdf> with several computational
  494. * optimizations. Noise expected to be a gaussian white noise.
  495. *
  496. * @param src Input 8-bit or 16-bit 1-channel image.
  497. * @param dst Output image with the same size and type as src.
  498. * @param h Parameter regulating filter strength. Big h value perfectly removes noise but also
  499. * removes image details, smaller h value preserves details but also preserves some noise.
  500. * @param templateWindowSize Size in pixels of the template patch that is used for block-matching.
  501. * Should be power of 2.
  502. * @param searchWindowSize Size in pixels of the window that is used to perform block-matching.
  503. * Affect performance linearly: greater searchWindowsSize - greater denoising time.
  504. * Must be larger than templateWindowSize.
  505. * @param blockMatchingStep1 Block matching threshold for the first step of BM3D (hard thresholding),
  506. * i.e. maximum distance for which two blocks are considered similar.
  507. * Value expressed in euclidean distance.
  508. * @param blockMatchingStep2 Block matching threshold for the second step of BM3D (Wiener filtering),
  509. * i.e. maximum distance for which two blocks are considered similar.
  510. * Value expressed in euclidean distance.
  511. * @param groupSize Maximum size of the 3D group for collaborative filtering.
  512. * @param slidingStep Sliding step to process every next reference block.
  513. * @param beta Kaiser window parameter that affects the sidelobe attenuation of the transform of the
  514. * window. Kaiser window is used in order to reduce border effects. To prevent usage of the window,
  515. * set beta to zero.
  516. * @param normType Norm used to calculate distance between blocks. L2 is slower than L1
  517. * but yields more accurate results.
  518. * @param step Step of BM3D to be executed. Allowed are only BM3D_STEP1 and BM3D_STEPALL.
  519. * BM3D_STEP2 is not allowed as it requires basic estimate to be present.
  520. * Currently only Haar transform is supported.
  521. *
  522. * This function expected to be applied to grayscale images. Advanced usage of this function
  523. * can be manual denoising of colored image in different colorspaces.
  524. *
  525. * @sa
  526. * fastNlMeansDenoising
  527. */
  528. + (void)bm3dDenoising:(Mat*)src dst:(Mat*)dst h:(float)h templateWindowSize:(int)templateWindowSize searchWindowSize:(int)searchWindowSize blockMatchingStep1:(int)blockMatchingStep1 blockMatchingStep2:(int)blockMatchingStep2 groupSize:(int)groupSize slidingStep:(int)slidingStep beta:(float)beta normType:(int)normType step:(int)step NS_SWIFT_NAME(bm3dDenoising(src:dst:h:templateWindowSize:searchWindowSize:blockMatchingStep1:blockMatchingStep2:groupSize:slidingStep:beta:normType:step:));
  529. /**
  530. * Performs image denoising using the Block-Matching and 3D-filtering algorithm
  531. * <http://www.cs.tut.fi/~foi/GCF-BM3D/BM3D_TIP_2007.pdf> with several computational
  532. * optimizations. Noise expected to be a gaussian white noise.
  533. *
  534. * @param src Input 8-bit or 16-bit 1-channel image.
  535. * @param dst Output image with the same size and type as src.
  536. * @param h Parameter regulating filter strength. Big h value perfectly removes noise but also
  537. * removes image details, smaller h value preserves details but also preserves some noise.
  538. * @param templateWindowSize Size in pixels of the template patch that is used for block-matching.
  539. * Should be power of 2.
  540. * @param searchWindowSize Size in pixels of the window that is used to perform block-matching.
  541. * Affect performance linearly: greater searchWindowsSize - greater denoising time.
  542. * Must be larger than templateWindowSize.
  543. * @param blockMatchingStep1 Block matching threshold for the first step of BM3D (hard thresholding),
  544. * i.e. maximum distance for which two blocks are considered similar.
  545. * Value expressed in euclidean distance.
  546. * @param blockMatchingStep2 Block matching threshold for the second step of BM3D (Wiener filtering),
  547. * i.e. maximum distance for which two blocks are considered similar.
  548. * Value expressed in euclidean distance.
  549. * @param groupSize Maximum size of the 3D group for collaborative filtering.
  550. * @param slidingStep Sliding step to process every next reference block.
  551. * @param beta Kaiser window parameter that affects the sidelobe attenuation of the transform of the
  552. * window. Kaiser window is used in order to reduce border effects. To prevent usage of the window,
  553. * set beta to zero.
  554. * @param normType Norm used to calculate distance between blocks. L2 is slower than L1
  555. * but yields more accurate results.
  556. * BM3D_STEP2 is not allowed as it requires basic estimate to be present.
  557. * Currently only Haar transform is supported.
  558. *
  559. * This function expected to be applied to grayscale images. Advanced usage of this function
  560. * can be manual denoising of colored image in different colorspaces.
  561. *
  562. * @sa
  563. * fastNlMeansDenoising
  564. */
  565. + (void)bm3dDenoising:(Mat*)src dst:(Mat*)dst h:(float)h templateWindowSize:(int)templateWindowSize searchWindowSize:(int)searchWindowSize blockMatchingStep1:(int)blockMatchingStep1 blockMatchingStep2:(int)blockMatchingStep2 groupSize:(int)groupSize slidingStep:(int)slidingStep beta:(float)beta normType:(int)normType NS_SWIFT_NAME(bm3dDenoising(src:dst:h:templateWindowSize:searchWindowSize:blockMatchingStep1:blockMatchingStep2:groupSize:slidingStep:beta:normType:));
  566. /**
  567. * Performs image denoising using the Block-Matching and 3D-filtering algorithm
  568. * <http://www.cs.tut.fi/~foi/GCF-BM3D/BM3D_TIP_2007.pdf> with several computational
  569. * optimizations. Noise expected to be a gaussian white noise.
  570. *
  571. * @param src Input 8-bit or 16-bit 1-channel image.
  572. * @param dst Output image with the same size and type as src.
  573. * @param h Parameter regulating filter strength. Big h value perfectly removes noise but also
  574. * removes image details, smaller h value preserves details but also preserves some noise.
  575. * @param templateWindowSize Size in pixels of the template patch that is used for block-matching.
  576. * Should be power of 2.
  577. * @param searchWindowSize Size in pixels of the window that is used to perform block-matching.
  578. * Affect performance linearly: greater searchWindowsSize - greater denoising time.
  579. * Must be larger than templateWindowSize.
  580. * @param blockMatchingStep1 Block matching threshold for the first step of BM3D (hard thresholding),
  581. * i.e. maximum distance for which two blocks are considered similar.
  582. * Value expressed in euclidean distance.
  583. * @param blockMatchingStep2 Block matching threshold for the second step of BM3D (Wiener filtering),
  584. * i.e. maximum distance for which two blocks are considered similar.
  585. * Value expressed in euclidean distance.
  586. * @param groupSize Maximum size of the 3D group for collaborative filtering.
  587. * @param slidingStep Sliding step to process every next reference block.
  588. * @param beta Kaiser window parameter that affects the sidelobe attenuation of the transform of the
  589. * window. Kaiser window is used in order to reduce border effects. To prevent usage of the window,
  590. * set beta to zero.
  591. * but yields more accurate results.
  592. * BM3D_STEP2 is not allowed as it requires basic estimate to be present.
  593. * Currently only Haar transform is supported.
  594. *
  595. * This function expected to be applied to grayscale images. Advanced usage of this function
  596. * can be manual denoising of colored image in different colorspaces.
  597. *
  598. * @sa
  599. * fastNlMeansDenoising
  600. */
  601. + (void)bm3dDenoising:(Mat*)src dst:(Mat*)dst h:(float)h templateWindowSize:(int)templateWindowSize searchWindowSize:(int)searchWindowSize blockMatchingStep1:(int)blockMatchingStep1 blockMatchingStep2:(int)blockMatchingStep2 groupSize:(int)groupSize slidingStep:(int)slidingStep beta:(float)beta NS_SWIFT_NAME(bm3dDenoising(src:dst:h:templateWindowSize:searchWindowSize:blockMatchingStep1:blockMatchingStep2:groupSize:slidingStep:beta:));
  602. /**
  603. * Performs image denoising using the Block-Matching and 3D-filtering algorithm
  604. * <http://www.cs.tut.fi/~foi/GCF-BM3D/BM3D_TIP_2007.pdf> with several computational
  605. * optimizations. Noise expected to be a gaussian white noise.
  606. *
  607. * @param src Input 8-bit or 16-bit 1-channel image.
  608. * @param dst Output image with the same size and type as src.
  609. * @param h Parameter regulating filter strength. Big h value perfectly removes noise but also
  610. * removes image details, smaller h value preserves details but also preserves some noise.
  611. * @param templateWindowSize Size in pixels of the template patch that is used for block-matching.
  612. * Should be power of 2.
  613. * @param searchWindowSize Size in pixels of the window that is used to perform block-matching.
  614. * Affect performance linearly: greater searchWindowsSize - greater denoising time.
  615. * Must be larger than templateWindowSize.
  616. * @param blockMatchingStep1 Block matching threshold for the first step of BM3D (hard thresholding),
  617. * i.e. maximum distance for which two blocks are considered similar.
  618. * Value expressed in euclidean distance.
  619. * @param blockMatchingStep2 Block matching threshold for the second step of BM3D (Wiener filtering),
  620. * i.e. maximum distance for which two blocks are considered similar.
  621. * Value expressed in euclidean distance.
  622. * @param groupSize Maximum size of the 3D group for collaborative filtering.
  623. * @param slidingStep Sliding step to process every next reference block.
  624. * window. Kaiser window is used in order to reduce border effects. To prevent usage of the window,
  625. * set beta to zero.
  626. * but yields more accurate results.
  627. * BM3D_STEP2 is not allowed as it requires basic estimate to be present.
  628. * Currently only Haar transform is supported.
  629. *
  630. * This function expected to be applied to grayscale images. Advanced usage of this function
  631. * can be manual denoising of colored image in different colorspaces.
  632. *
  633. * @sa
  634. * fastNlMeansDenoising
  635. */
  636. + (void)bm3dDenoising:(Mat*)src dst:(Mat*)dst h:(float)h templateWindowSize:(int)templateWindowSize searchWindowSize:(int)searchWindowSize blockMatchingStep1:(int)blockMatchingStep1 blockMatchingStep2:(int)blockMatchingStep2 groupSize:(int)groupSize slidingStep:(int)slidingStep NS_SWIFT_NAME(bm3dDenoising(src:dst:h:templateWindowSize:searchWindowSize:blockMatchingStep1:blockMatchingStep2:groupSize:slidingStep:));
  637. /**
  638. * Performs image denoising using the Block-Matching and 3D-filtering algorithm
  639. * <http://www.cs.tut.fi/~foi/GCF-BM3D/BM3D_TIP_2007.pdf> with several computational
  640. * optimizations. Noise expected to be a gaussian white noise.
  641. *
  642. * @param src Input 8-bit or 16-bit 1-channel image.
  643. * @param dst Output image with the same size and type as src.
  644. * @param h Parameter regulating filter strength. Big h value perfectly removes noise but also
  645. * removes image details, smaller h value preserves details but also preserves some noise.
  646. * @param templateWindowSize Size in pixels of the template patch that is used for block-matching.
  647. * Should be power of 2.
  648. * @param searchWindowSize Size in pixels of the window that is used to perform block-matching.
  649. * Affect performance linearly: greater searchWindowsSize - greater denoising time.
  650. * Must be larger than templateWindowSize.
  651. * @param blockMatchingStep1 Block matching threshold for the first step of BM3D (hard thresholding),
  652. * i.e. maximum distance for which two blocks are considered similar.
  653. * Value expressed in euclidean distance.
  654. * @param blockMatchingStep2 Block matching threshold for the second step of BM3D (Wiener filtering),
  655. * i.e. maximum distance for which two blocks are considered similar.
  656. * Value expressed in euclidean distance.
  657. * @param groupSize Maximum size of the 3D group for collaborative filtering.
  658. * window. Kaiser window is used in order to reduce border effects. To prevent usage of the window,
  659. * set beta to zero.
  660. * but yields more accurate results.
  661. * BM3D_STEP2 is not allowed as it requires basic estimate to be present.
  662. * Currently only Haar transform is supported.
  663. *
  664. * This function expected to be applied to grayscale images. Advanced usage of this function
  665. * can be manual denoising of colored image in different colorspaces.
  666. *
  667. * @sa
  668. * fastNlMeansDenoising
  669. */
  670. + (void)bm3dDenoising:(Mat*)src dst:(Mat*)dst h:(float)h templateWindowSize:(int)templateWindowSize searchWindowSize:(int)searchWindowSize blockMatchingStep1:(int)blockMatchingStep1 blockMatchingStep2:(int)blockMatchingStep2 groupSize:(int)groupSize NS_SWIFT_NAME(bm3dDenoising(src:dst:h:templateWindowSize:searchWindowSize:blockMatchingStep1:blockMatchingStep2:groupSize:));
  671. /**
  672. * Performs image denoising using the Block-Matching and 3D-filtering algorithm
  673. * <http://www.cs.tut.fi/~foi/GCF-BM3D/BM3D_TIP_2007.pdf> with several computational
  674. * optimizations. Noise expected to be a gaussian white noise.
  675. *
  676. * @param src Input 8-bit or 16-bit 1-channel image.
  677. * @param dst Output image with the same size and type as src.
  678. * @param h Parameter regulating filter strength. Big h value perfectly removes noise but also
  679. * removes image details, smaller h value preserves details but also preserves some noise.
  680. * @param templateWindowSize Size in pixels of the template patch that is used for block-matching.
  681. * Should be power of 2.
  682. * @param searchWindowSize Size in pixels of the window that is used to perform block-matching.
  683. * Affect performance linearly: greater searchWindowsSize - greater denoising time.
  684. * Must be larger than templateWindowSize.
  685. * @param blockMatchingStep1 Block matching threshold for the first step of BM3D (hard thresholding),
  686. * i.e. maximum distance for which two blocks are considered similar.
  687. * Value expressed in euclidean distance.
  688. * @param blockMatchingStep2 Block matching threshold for the second step of BM3D (Wiener filtering),
  689. * i.e. maximum distance for which two blocks are considered similar.
  690. * Value expressed in euclidean distance.
  691. * window. Kaiser window is used in order to reduce border effects. To prevent usage of the window,
  692. * set beta to zero.
  693. * but yields more accurate results.
  694. * BM3D_STEP2 is not allowed as it requires basic estimate to be present.
  695. * Currently only Haar transform is supported.
  696. *
  697. * This function expected to be applied to grayscale images. Advanced usage of this function
  698. * can be manual denoising of colored image in different colorspaces.
  699. *
  700. * @sa
  701. * fastNlMeansDenoising
  702. */
  703. + (void)bm3dDenoising:(Mat*)src dst:(Mat*)dst h:(float)h templateWindowSize:(int)templateWindowSize searchWindowSize:(int)searchWindowSize blockMatchingStep1:(int)blockMatchingStep1 blockMatchingStep2:(int)blockMatchingStep2 NS_SWIFT_NAME(bm3dDenoising(src:dst:h:templateWindowSize:searchWindowSize:blockMatchingStep1:blockMatchingStep2:));
  704. /**
  705. * Performs image denoising using the Block-Matching and 3D-filtering algorithm
  706. * <http://www.cs.tut.fi/~foi/GCF-BM3D/BM3D_TIP_2007.pdf> with several computational
  707. * optimizations. Noise expected to be a gaussian white noise.
  708. *
  709. * @param src Input 8-bit or 16-bit 1-channel image.
  710. * @param dst Output image with the same size and type as src.
  711. * @param h Parameter regulating filter strength. Big h value perfectly removes noise but also
  712. * removes image details, smaller h value preserves details but also preserves some noise.
  713. * @param templateWindowSize Size in pixels of the template patch that is used for block-matching.
  714. * Should be power of 2.
  715. * @param searchWindowSize Size in pixels of the window that is used to perform block-matching.
  716. * Affect performance linearly: greater searchWindowsSize - greater denoising time.
  717. * Must be larger than templateWindowSize.
  718. * @param blockMatchingStep1 Block matching threshold for the first step of BM3D (hard thresholding),
  719. * i.e. maximum distance for which two blocks are considered similar.
  720. * Value expressed in euclidean distance.
  721. * i.e. maximum distance for which two blocks are considered similar.
  722. * Value expressed in euclidean distance.
  723. * window. Kaiser window is used in order to reduce border effects. To prevent usage of the window,
  724. * set beta to zero.
  725. * but yields more accurate results.
  726. * BM3D_STEP2 is not allowed as it requires basic estimate to be present.
  727. * Currently only Haar transform is supported.
  728. *
  729. * This function expected to be applied to grayscale images. Advanced usage of this function
  730. * can be manual denoising of colored image in different colorspaces.
  731. *
  732. * @sa
  733. * fastNlMeansDenoising
  734. */
  735. + (void)bm3dDenoising:(Mat*)src dst:(Mat*)dst h:(float)h templateWindowSize:(int)templateWindowSize searchWindowSize:(int)searchWindowSize blockMatchingStep1:(int)blockMatchingStep1 NS_SWIFT_NAME(bm3dDenoising(src:dst:h:templateWindowSize:searchWindowSize:blockMatchingStep1:));
  736. /**
  737. * Performs image denoising using the Block-Matching and 3D-filtering algorithm
  738. * <http://www.cs.tut.fi/~foi/GCF-BM3D/BM3D_TIP_2007.pdf> with several computational
  739. * optimizations. Noise expected to be a gaussian white noise.
  740. *
  741. * @param src Input 8-bit or 16-bit 1-channel image.
  742. * @param dst Output image with the same size and type as src.
  743. * @param h Parameter regulating filter strength. Big h value perfectly removes noise but also
  744. * removes image details, smaller h value preserves details but also preserves some noise.
  745. * @param templateWindowSize Size in pixels of the template patch that is used for block-matching.
  746. * Should be power of 2.
  747. * @param searchWindowSize Size in pixels of the window that is used to perform block-matching.
  748. * Affect performance linearly: greater searchWindowsSize - greater denoising time.
  749. * Must be larger than templateWindowSize.
  750. * i.e. maximum distance for which two blocks are considered similar.
  751. * Value expressed in euclidean distance.
  752. * i.e. maximum distance for which two blocks are considered similar.
  753. * Value expressed in euclidean distance.
  754. * window. Kaiser window is used in order to reduce border effects. To prevent usage of the window,
  755. * set beta to zero.
  756. * but yields more accurate results.
  757. * BM3D_STEP2 is not allowed as it requires basic estimate to be present.
  758. * Currently only Haar transform is supported.
  759. *
  760. * This function expected to be applied to grayscale images. Advanced usage of this function
  761. * can be manual denoising of colored image in different colorspaces.
  762. *
  763. * @sa
  764. * fastNlMeansDenoising
  765. */
  766. + (void)bm3dDenoising:(Mat*)src dst:(Mat*)dst h:(float)h templateWindowSize:(int)templateWindowSize searchWindowSize:(int)searchWindowSize NS_SWIFT_NAME(bm3dDenoising(src:dst:h:templateWindowSize:searchWindowSize:));
  767. /**
  768. * Performs image denoising using the Block-Matching and 3D-filtering algorithm
  769. * <http://www.cs.tut.fi/~foi/GCF-BM3D/BM3D_TIP_2007.pdf> with several computational
  770. * optimizations. Noise expected to be a gaussian white noise.
  771. *
  772. * @param src Input 8-bit or 16-bit 1-channel image.
  773. * @param dst Output image with the same size and type as src.
  774. * @param h Parameter regulating filter strength. Big h value perfectly removes noise but also
  775. * removes image details, smaller h value preserves details but also preserves some noise.
  776. * @param templateWindowSize Size in pixels of the template patch that is used for block-matching.
  777. * Should be power of 2.
  778. * Affect performance linearly: greater searchWindowsSize - greater denoising time.
  779. * Must be larger than templateWindowSize.
  780. * i.e. maximum distance for which two blocks are considered similar.
  781. * Value expressed in euclidean distance.
  782. * i.e. maximum distance for which two blocks are considered similar.
  783. * Value expressed in euclidean distance.
  784. * window. Kaiser window is used in order to reduce border effects. To prevent usage of the window,
  785. * set beta to zero.
  786. * but yields more accurate results.
  787. * BM3D_STEP2 is not allowed as it requires basic estimate to be present.
  788. * Currently only Haar transform is supported.
  789. *
  790. * This function expected to be applied to grayscale images. Advanced usage of this function
  791. * can be manual denoising of colored image in different colorspaces.
  792. *
  793. * @sa
  794. * fastNlMeansDenoising
  795. */
  796. + (void)bm3dDenoising:(Mat*)src dst:(Mat*)dst h:(float)h templateWindowSize:(int)templateWindowSize NS_SWIFT_NAME(bm3dDenoising(src:dst:h:templateWindowSize:));
  797. /**
  798. * Performs image denoising using the Block-Matching and 3D-filtering algorithm
  799. * <http://www.cs.tut.fi/~foi/GCF-BM3D/BM3D_TIP_2007.pdf> with several computational
  800. * optimizations. Noise expected to be a gaussian white noise.
  801. *
  802. * @param src Input 8-bit or 16-bit 1-channel image.
  803. * @param dst Output image with the same size and type as src.
  804. * @param h Parameter regulating filter strength. Big h value perfectly removes noise but also
  805. * removes image details, smaller h value preserves details but also preserves some noise.
  806. * Should be power of 2.
  807. * Affect performance linearly: greater searchWindowsSize - greater denoising time.
  808. * Must be larger than templateWindowSize.
  809. * i.e. maximum distance for which two blocks are considered similar.
  810. * Value expressed in euclidean distance.
  811. * i.e. maximum distance for which two blocks are considered similar.
  812. * Value expressed in euclidean distance.
  813. * window. Kaiser window is used in order to reduce border effects. To prevent usage of the window,
  814. * set beta to zero.
  815. * but yields more accurate results.
  816. * BM3D_STEP2 is not allowed as it requires basic estimate to be present.
  817. * Currently only Haar transform is supported.
  818. *
  819. * This function expected to be applied to grayscale images. Advanced usage of this function
  820. * can be manual denoising of colored image in different colorspaces.
  821. *
  822. * @sa
  823. * fastNlMeansDenoising
  824. */
  825. + (void)bm3dDenoising:(Mat*)src dst:(Mat*)dst h:(float)h NS_SWIFT_NAME(bm3dDenoising(src:dst:h:));
  826. /**
  827. * Performs image denoising using the Block-Matching and 3D-filtering algorithm
  828. * <http://www.cs.tut.fi/~foi/GCF-BM3D/BM3D_TIP_2007.pdf> with several computational
  829. * optimizations. Noise expected to be a gaussian white noise.
  830. *
  831. * @param src Input 8-bit or 16-bit 1-channel image.
  832. * @param dst Output image with the same size and type as src.
  833. * removes image details, smaller h value preserves details but also preserves some noise.
  834. * Should be power of 2.
  835. * Affect performance linearly: greater searchWindowsSize - greater denoising time.
  836. * Must be larger than templateWindowSize.
  837. * i.e. maximum distance for which two blocks are considered similar.
  838. * Value expressed in euclidean distance.
  839. * i.e. maximum distance for which two blocks are considered similar.
  840. * Value expressed in euclidean distance.
  841. * window. Kaiser window is used in order to reduce border effects. To prevent usage of the window,
  842. * set beta to zero.
  843. * but yields more accurate results.
  844. * BM3D_STEP2 is not allowed as it requires basic estimate to be present.
  845. * Currently only Haar transform is supported.
  846. *
  847. * This function expected to be applied to grayscale images. Advanced usage of this function
  848. * can be manual denoising of colored image in different colorspaces.
  849. *
  850. * @sa
  851. * fastNlMeansDenoising
  852. */
  853. + (void)bm3dDenoising:(Mat*)src dst:(Mat*)dst NS_SWIFT_NAME(bm3dDenoising(src:dst:));
  854. //
  855. // Ptr_TonemapDurand cv::xphoto::createTonemapDurand(float gamma = 1.0f, float contrast = 4.0f, float saturation = 1.0f, float sigma_color = 2.0f, float sigma_space = 2.0f)
  856. //
  857. /**
  858. * Creates TonemapDurand object
  859. *
  860. * You need to set the OPENCV_ENABLE_NONFREE option in cmake to use those. Use them at your own risk.
  861. *
  862. * @param gamma gamma value for gamma correction. See createTonemap
  863. * @param contrast resulting contrast on logarithmic scale, i. e. log(max / min), where max and min
  864. * are maximum and minimum luminance values of the resulting image.
  865. * @param saturation saturation enhancement value. See createTonemapDrago
  866. * @param sigma_color bilateral filter sigma in color space
  867. * @param sigma_space bilateral filter sigma in coordinate space
  868. */
  869. + (TonemapDurand*)createTonemapDurand:(float)gamma contrast:(float)contrast saturation:(float)saturation sigma_color:(float)sigma_color sigma_space:(float)sigma_space NS_SWIFT_NAME(createTonemapDurand(gamma:contrast:saturation:sigma_color:sigma_space:));
  870. /**
  871. * Creates TonemapDurand object
  872. *
  873. * You need to set the OPENCV_ENABLE_NONFREE option in cmake to use those. Use them at your own risk.
  874. *
  875. * @param gamma gamma value for gamma correction. See createTonemap
  876. * @param contrast resulting contrast on logarithmic scale, i. e. log(max / min), where max and min
  877. * are maximum and minimum luminance values of the resulting image.
  878. * @param saturation saturation enhancement value. See createTonemapDrago
  879. * @param sigma_color bilateral filter sigma in color space
  880. */
  881. + (TonemapDurand*)createTonemapDurand:(float)gamma contrast:(float)contrast saturation:(float)saturation sigma_color:(float)sigma_color NS_SWIFT_NAME(createTonemapDurand(gamma:contrast:saturation:sigma_color:));
  882. /**
  883. * Creates TonemapDurand object
  884. *
  885. * You need to set the OPENCV_ENABLE_NONFREE option in cmake to use those. Use them at your own risk.
  886. *
  887. * @param gamma gamma value for gamma correction. See createTonemap
  888. * @param contrast resulting contrast on logarithmic scale, i. e. log(max / min), where max and min
  889. * are maximum and minimum luminance values of the resulting image.
  890. * @param saturation saturation enhancement value. See createTonemapDrago
  891. */
  892. + (TonemapDurand*)createTonemapDurand:(float)gamma contrast:(float)contrast saturation:(float)saturation NS_SWIFT_NAME(createTonemapDurand(gamma:contrast:saturation:));
  893. /**
  894. * Creates TonemapDurand object
  895. *
  896. * You need to set the OPENCV_ENABLE_NONFREE option in cmake to use those. Use them at your own risk.
  897. *
  898. * @param gamma gamma value for gamma correction. See createTonemap
  899. * @param contrast resulting contrast on logarithmic scale, i. e. log(max / min), where max and min
  900. * are maximum and minimum luminance values of the resulting image.
  901. */
  902. + (TonemapDurand*)createTonemapDurand:(float)gamma contrast:(float)contrast NS_SWIFT_NAME(createTonemapDurand(gamma:contrast:));
  903. /**
  904. * Creates TonemapDurand object
  905. *
  906. * You need to set the OPENCV_ENABLE_NONFREE option in cmake to use those. Use them at your own risk.
  907. *
  908. * @param gamma gamma value for gamma correction. See createTonemap
  909. * are maximum and minimum luminance values of the resulting image.
  910. */
  911. + (TonemapDurand*)createTonemapDurand:(float)gamma NS_SWIFT_NAME(createTonemapDurand(gamma:));
  912. /**
  913. * Creates TonemapDurand object
  914. *
  915. * You need to set the OPENCV_ENABLE_NONFREE option in cmake to use those. Use them at your own risk.
  916. *
  917. * are maximum and minimum luminance values of the resulting image.
  918. */
  919. + (TonemapDurand*)createTonemapDurand NS_SWIFT_NAME(createTonemapDurand());
  920. //
  921. // void cv::xphoto::inpaint(Mat src, Mat mask, Mat dst, int algorithmType)
  922. //
  923. /**
  924. * The function implements different single-image inpainting algorithms.
  925. *
  926. * See the original papers CITE: He2012 (Shiftmap) or CITE: GenserPCS2018 and CITE: SeilerTIP2015 (FSR) for details.
  927. *
  928. * @param src source image
  929. * - #INPAINT_SHIFTMAP: it could be of any type and any number of channels from 1 to 4. In case of
  930. * 3- and 4-channels images the function expect them in CIELab colorspace or similar one, where first
  931. * color component shows intensity, while second and third shows colors. Nonetheless you can try any
  932. * colorspaces.
  933. * - #INPAINT_FSR_BEST or #INPAINT_FSR_FAST: 1-channel grayscale or 3-channel BGR image.
  934. * @param mask mask (#CV_8UC1), where non-zero pixels indicate valid image area, while zero pixels
  935. * indicate area to be inpainted
  936. * @param dst destination image
  937. * @param algorithmType see xphoto::InpaintTypes
  938. */
  939. + (void)inpaint:(Mat*)src mask:(Mat*)mask dst:(Mat*)dst algorithmType:(int)algorithmType NS_SWIFT_NAME(inpaint(src:mask:dst:algorithmType:));
  940. //
  941. // void cv::xphoto::dctDenoising(Mat src, Mat dst, double sigma, int psize = 16)
  942. //
  943. /**
  944. * The function implements simple dct-based denoising
  945. *
  946. * <http://www.ipol.im/pub/art/2011/ys-dct/>.
  947. * @param src source image
  948. * @param dst destination image
  949. * @param sigma expected noise standard deviation
  950. * @param psize size of block side where dct is computed
  951. *
  952. * @sa
  953. * fastNlMeansDenoising
  954. */
  955. + (void)dctDenoising:(Mat*)src dst:(Mat*)dst sigma:(double)sigma psize:(int)psize NS_SWIFT_NAME(dctDenoising(src:dst:sigma:psize:));
  956. /**
  957. * The function implements simple dct-based denoising
  958. *
  959. * <http://www.ipol.im/pub/art/2011/ys-dct/>.
  960. * @param src source image
  961. * @param dst destination image
  962. * @param sigma expected noise standard deviation
  963. *
  964. * @sa
  965. * fastNlMeansDenoising
  966. */
  967. + (void)dctDenoising:(Mat*)src dst:(Mat*)dst sigma:(double)sigma NS_SWIFT_NAME(dctDenoising(src:dst:sigma:));
  968. //
  969. // void cv::xphoto::oilPainting(Mat src, Mat& dst, int size, int dynRatio, int code)
  970. //
  971. /**
  972. * oilPainting
  973. * See the book CITE: Holzmann1988 for details.
  974. * @param src Input three-channel or one channel image (either CV_8UC3 or CV_8UC1)
  975. * @param dst Output image of the same size and type as src.
  976. * @param size neighbouring size is 2-size+1
  977. * @param dynRatio image is divided by dynRatio before histogram processing
  978. */
  979. + (void)oilPainting:(Mat*)src dst:(Mat*)dst size:(int)size dynRatio:(int)dynRatio code:(int)code NS_SWIFT_NAME(oilPainting(src:dst:size:dynRatio:code:));
  980. //
  981. // void cv::xphoto::oilPainting(Mat src, Mat& dst, int size, int dynRatio)
  982. //
  983. /**
  984. * oilPainting
  985. * See the book CITE: Holzmann1988 for details.
  986. * @param src Input three-channel or one channel image (either CV_8UC3 or CV_8UC1)
  987. * @param dst Output image of the same size and type as src.
  988. * @param size neighbouring size is 2-size+1
  989. * @param dynRatio image is divided by dynRatio before histogram processing
  990. */
  991. + (void)oilPainting:(Mat*)src dst:(Mat*)dst size:(int)size dynRatio:(int)dynRatio NS_SWIFT_NAME(oilPainting(src:dst:size:dynRatio:));
  992. //
  993. // Ptr_SimpleWB cv::xphoto::createSimpleWB()
  994. //
  995. /**
  996. * Creates an instance of SimpleWB
  997. */
  998. + (SimpleWB*)createSimpleWB NS_SWIFT_NAME(createSimpleWB());
  999. //
  1000. // Ptr_GrayworldWB cv::xphoto::createGrayworldWB()
  1001. //
  1002. /**
  1003. * Creates an instance of GrayworldWB
  1004. */
  1005. + (GrayworldWB*)createGrayworldWB NS_SWIFT_NAME(createGrayworldWB());
  1006. //
  1007. // Ptr_LearningBasedWB cv::xphoto::createLearningBasedWB(String path_to_model = String())
  1008. //
  1009. /**
  1010. * Creates an instance of LearningBasedWB
  1011. *
  1012. * @param path_to_model Path to a .yml file with the model. If not specified, the default model is used
  1013. */
  1014. + (LearningBasedWB*)createLearningBasedWB:(NSString*)path_to_model NS_SWIFT_NAME(createLearningBasedWB(path_to_model:));
  1015. /**
  1016. * Creates an instance of LearningBasedWB
  1017. *
  1018. */
  1019. + (LearningBasedWB*)createLearningBasedWB NS_SWIFT_NAME(createLearningBasedWB());
  1020. //
  1021. // void cv::xphoto::applyChannelGains(Mat src, Mat& dst, float gainB, float gainG, float gainR)
  1022. //
  1023. /**
  1024. * Implements an efficient fixed-point approximation for applying channel gains, which is
  1025. * the last step of multiple white balance algorithms.
  1026. *
  1027. * @param src Input three-channel image in the BGR color space (either CV_8UC3 or CV_16UC3)
  1028. * @param dst Output image of the same size and type as src.
  1029. * @param gainB gain for the B channel
  1030. * @param gainG gain for the G channel
  1031. * @param gainR gain for the R channel
  1032. */
  1033. + (void)applyChannelGains:(Mat*)src dst:(Mat*)dst gainB:(float)gainB gainG:(float)gainG gainR:(float)gainR NS_SWIFT_NAME(applyChannelGains(src:dst:gainB:gainG:gainR:));
  1034. @end
  1035. NS_ASSUME_NONNULL_END