Photo.h 79 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517
  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/photo.hpp"
  8. #else
  9. #define CV_EXPORTS
  10. #endif
  11. #import <Foundation/Foundation.h>
  12. @class AlignMTB;
  13. @class CalibrateDebevec;
  14. @class CalibrateRobertson;
  15. @class FloatVector;
  16. @class Mat;
  17. @class MergeDebevec;
  18. @class MergeMertens;
  19. @class MergeRobertson;
  20. @class Point2i;
  21. @class Tonemap;
  22. @class TonemapDrago;
  23. @class TonemapMantiuk;
  24. @class TonemapReinhard;
  25. NS_ASSUME_NONNULL_BEGIN
  26. // C++: class Photo
  27. /**
  28. * The Photo module
  29. *
  30. * Member classes: `Tonemap`, `TonemapDrago`, `TonemapReinhard`, `TonemapMantiuk`, `AlignExposures`, `AlignMTB`, `CalibrateCRF`, `CalibrateDebevec`, `CalibrateRobertson`, `MergeExposures`, `MergeDebevec`, `MergeMertens`, `MergeRobertson`
  31. *
  32. */
  33. CV_EXPORTS @interface Photo : NSObject
  34. #pragma mark - Class Constants
  35. @property (class, readonly) int INPAINT_NS NS_SWIFT_NAME(INPAINT_NS);
  36. @property (class, readonly) int INPAINT_TELEA NS_SWIFT_NAME(INPAINT_TELEA);
  37. @property (class, readonly) int LDR_SIZE NS_SWIFT_NAME(LDR_SIZE);
  38. @property (class, readonly) int NORMAL_CLONE NS_SWIFT_NAME(NORMAL_CLONE);
  39. @property (class, readonly) int MIXED_CLONE NS_SWIFT_NAME(MIXED_CLONE);
  40. @property (class, readonly) int MONOCHROME_TRANSFER NS_SWIFT_NAME(MONOCHROME_TRANSFER);
  41. @property (class, readonly) int RECURS_FILTER NS_SWIFT_NAME(RECURS_FILTER);
  42. @property (class, readonly) int NORMCONV_FILTER NS_SWIFT_NAME(NORMCONV_FILTER);
  43. #pragma mark - Methods
  44. //
  45. // void cv::inpaint(Mat src, Mat inpaintMask, Mat& dst, double inpaintRadius, int flags)
  46. //
  47. /**
  48. * Restores the selected region in an image using the region neighborhood.
  49. *
  50. * @param src Input 8-bit, 16-bit unsigned or 32-bit float 1-channel or 8-bit 3-channel image.
  51. * @param inpaintMask Inpainting mask, 8-bit 1-channel image. Non-zero pixels indicate the area that
  52. * needs to be inpainted.
  53. * @param dst Output image with the same size and type as src .
  54. * @param inpaintRadius Radius of a circular neighborhood of each point inpainted that is considered
  55. * by the algorithm.
  56. * @param flags Inpainting method that could be cv::INPAINT_NS or cv::INPAINT_TELEA
  57. *
  58. * The function reconstructs the selected image area from the pixel near the area boundary. The
  59. * function may be used to remove dust and scratches from a scanned photo, or to remove undesirable
  60. * objects from still images or video. See <http://en.wikipedia.org/wiki/Inpainting> for more details.
  61. *
  62. * NOTE:
  63. * - An example using the inpainting technique can be found at
  64. * opencv_source_code/samples/cpp/inpaint.cpp
  65. * - (Python) An example using the inpainting technique can be found at
  66. * opencv_source_code/samples/python/inpaint.py
  67. */
  68. + (void)inpaint:(Mat*)src inpaintMask:(Mat*)inpaintMask dst:(Mat*)dst inpaintRadius:(double)inpaintRadius flags:(int)flags NS_SWIFT_NAME(inpaint(src:inpaintMask:dst:inpaintRadius:flags:));
  69. //
  70. // void cv::fastNlMeansDenoising(Mat src, Mat& dst, float h = 3, int templateWindowSize = 7, int searchWindowSize = 21)
  71. //
  72. /**
  73. * Perform image denoising using Non-local Means Denoising algorithm
  74. * <http://www.ipol.im/pub/algo/bcm_non_local_means_denoising/> with several computational
  75. * optimizations. Noise expected to be a gaussian white noise
  76. *
  77. * @param src Input 8-bit 1-channel, 2-channel, 3-channel or 4-channel image.
  78. * @param dst Output image with the same size and type as src .
  79. * @param templateWindowSize Size in pixels of the template patch that is used to compute weights.
  80. * Should be odd. Recommended value 7 pixels
  81. * @param searchWindowSize Size in pixels of the window that is used to compute weighted average for
  82. * given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater
  83. * denoising time. Recommended value 21 pixels
  84. * @param h Parameter regulating filter strength. Big h value perfectly removes noise but also
  85. * removes image details, smaller h value preserves details but also preserves some noise
  86. *
  87. * This function expected to be applied to grayscale images. For colored images look at
  88. * fastNlMeansDenoisingColored. Advanced usage of this functions can be manual denoising of colored
  89. * image in different colorspaces. Such approach is used in fastNlMeansDenoisingColored by converting
  90. * image to CIELAB colorspace and then separately denoise L and AB components with different h
  91. * parameter.
  92. */
  93. + (void)fastNlMeansDenoising:(Mat*)src dst:(Mat*)dst h:(float)h templateWindowSize:(int)templateWindowSize searchWindowSize:(int)searchWindowSize NS_SWIFT_NAME(fastNlMeansDenoising(src:dst:h:templateWindowSize:searchWindowSize:));
  94. /**
  95. * Perform image denoising using Non-local Means Denoising algorithm
  96. * <http://www.ipol.im/pub/algo/bcm_non_local_means_denoising/> with several computational
  97. * optimizations. Noise expected to be a gaussian white noise
  98. *
  99. * @param src Input 8-bit 1-channel, 2-channel, 3-channel or 4-channel image.
  100. * @param dst Output image with the same size and type as src .
  101. * @param templateWindowSize Size in pixels of the template patch that is used to compute weights.
  102. * Should be odd. Recommended value 7 pixels
  103. * given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater
  104. * denoising time. Recommended value 21 pixels
  105. * @param h Parameter regulating filter strength. Big h value perfectly removes noise but also
  106. * removes image details, smaller h value preserves details but also preserves some noise
  107. *
  108. * This function expected to be applied to grayscale images. For colored images look at
  109. * fastNlMeansDenoisingColored. Advanced usage of this functions can be manual denoising of colored
  110. * image in different colorspaces. Such approach is used in fastNlMeansDenoisingColored by converting
  111. * image to CIELAB colorspace and then separately denoise L and AB components with different h
  112. * parameter.
  113. */
  114. + (void)fastNlMeansDenoising:(Mat*)src dst:(Mat*)dst h:(float)h templateWindowSize:(int)templateWindowSize NS_SWIFT_NAME(fastNlMeansDenoising(src:dst:h:templateWindowSize:));
  115. /**
  116. * Perform image denoising using Non-local Means Denoising algorithm
  117. * <http://www.ipol.im/pub/algo/bcm_non_local_means_denoising/> with several computational
  118. * optimizations. Noise expected to be a gaussian white noise
  119. *
  120. * @param src Input 8-bit 1-channel, 2-channel, 3-channel or 4-channel image.
  121. * @param dst Output image with the same size and type as src .
  122. * Should be odd. Recommended value 7 pixels
  123. * given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater
  124. * denoising time. Recommended value 21 pixels
  125. * @param h Parameter regulating filter strength. Big h value perfectly removes noise but also
  126. * removes image details, smaller h value preserves details but also preserves some noise
  127. *
  128. * This function expected to be applied to grayscale images. For colored images look at
  129. * fastNlMeansDenoisingColored. Advanced usage of this functions can be manual denoising of colored
  130. * image in different colorspaces. Such approach is used in fastNlMeansDenoisingColored by converting
  131. * image to CIELAB colorspace and then separately denoise L and AB components with different h
  132. * parameter.
  133. */
  134. + (void)fastNlMeansDenoising:(Mat*)src dst:(Mat*)dst h:(float)h NS_SWIFT_NAME(fastNlMeansDenoising(src:dst:h:));
  135. /**
  136. * Perform image denoising using Non-local Means Denoising algorithm
  137. * <http://www.ipol.im/pub/algo/bcm_non_local_means_denoising/> with several computational
  138. * optimizations. Noise expected to be a gaussian white noise
  139. *
  140. * @param src Input 8-bit 1-channel, 2-channel, 3-channel or 4-channel image.
  141. * @param dst Output image with the same size and type as src .
  142. * Should be odd. Recommended value 7 pixels
  143. * given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater
  144. * denoising time. Recommended value 21 pixels
  145. * removes image details, smaller h value preserves details but also preserves some noise
  146. *
  147. * This function expected to be applied to grayscale images. For colored images look at
  148. * fastNlMeansDenoisingColored. Advanced usage of this functions can be manual denoising of colored
  149. * image in different colorspaces. Such approach is used in fastNlMeansDenoisingColored by converting
  150. * image to CIELAB colorspace and then separately denoise L and AB components with different h
  151. * parameter.
  152. */
  153. + (void)fastNlMeansDenoising:(Mat*)src dst:(Mat*)dst NS_SWIFT_NAME(fastNlMeansDenoising(src:dst:));
  154. //
  155. // void cv::fastNlMeansDenoising(Mat src, Mat& dst, vector_float hVector, int templateWindowSize = 7, int searchWindowSize = 21, int normType = NORM_L2)
  156. //
  157. /**
  158. * Perform image denoising using Non-local Means Denoising algorithm
  159. * <http://www.ipol.im/pub/algo/bcm_non_local_means_denoising/> with several computational
  160. * optimizations. Noise expected to be a gaussian white noise
  161. *
  162. * @param src Input 8-bit or 16-bit (only with NORM_L1) 1-channel,
  163. * 2-channel, 3-channel or 4-channel image.
  164. * @param dst Output image with the same size and type as src .
  165. * @param templateWindowSize Size in pixels of the template patch that is used to compute weights.
  166. * Should be odd. Recommended value 7 pixels
  167. * @param searchWindowSize Size in pixels of the window that is used to compute weighted average for
  168. * given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater
  169. * denoising time. Recommended value 21 pixels
  170. * parameter applied to all channels or one per channel in dst. Big h value
  171. * perfectly removes noise but also removes image details, smaller h
  172. * value preserves details but also preserves some noise
  173. * @param normType Type of norm used for weight calculation. Can be either NORM_L2 or NORM_L1
  174. *
  175. * This function expected to be applied to grayscale images. For colored images look at
  176. * fastNlMeansDenoisingColored. Advanced usage of this functions can be manual denoising of colored
  177. * image in different colorspaces. Such approach is used in fastNlMeansDenoisingColored by converting
  178. * image to CIELAB colorspace and then separately denoise L and AB components with different h
  179. * parameter.
  180. */
  181. + (void)fastNlMeansDenoising:(Mat*)src dst:(Mat*)dst hVector:(FloatVector*)hVector templateWindowSize:(int)templateWindowSize searchWindowSize:(int)searchWindowSize normType:(int)normType NS_SWIFT_NAME(fastNlMeansDenoising(src:dst:hVector:templateWindowSize:searchWindowSize:normType:));
  182. /**
  183. * Perform image denoising using Non-local Means Denoising algorithm
  184. * <http://www.ipol.im/pub/algo/bcm_non_local_means_denoising/> with several computational
  185. * optimizations. Noise expected to be a gaussian white noise
  186. *
  187. * @param src Input 8-bit or 16-bit (only with NORM_L1) 1-channel,
  188. * 2-channel, 3-channel or 4-channel image.
  189. * @param dst Output image with the same size and type as src .
  190. * @param templateWindowSize Size in pixels of the template patch that is used to compute weights.
  191. * Should be odd. Recommended value 7 pixels
  192. * @param searchWindowSize Size in pixels of the window that is used to compute weighted average for
  193. * given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater
  194. * denoising time. Recommended value 21 pixels
  195. * parameter applied to all channels or one per channel in dst. Big h value
  196. * perfectly removes noise but also removes image details, smaller h
  197. * value preserves details but also preserves some noise
  198. *
  199. * This function expected to be applied to grayscale images. For colored images look at
  200. * fastNlMeansDenoisingColored. Advanced usage of this functions can be manual denoising of colored
  201. * image in different colorspaces. Such approach is used in fastNlMeansDenoisingColored by converting
  202. * image to CIELAB colorspace and then separately denoise L and AB components with different h
  203. * parameter.
  204. */
  205. + (void)fastNlMeansDenoising:(Mat*)src dst:(Mat*)dst hVector:(FloatVector*)hVector templateWindowSize:(int)templateWindowSize searchWindowSize:(int)searchWindowSize NS_SWIFT_NAME(fastNlMeansDenoising(src:dst:hVector:templateWindowSize:searchWindowSize:));
  206. /**
  207. * Perform image denoising using Non-local Means Denoising algorithm
  208. * <http://www.ipol.im/pub/algo/bcm_non_local_means_denoising/> with several computational
  209. * optimizations. Noise expected to be a gaussian white noise
  210. *
  211. * @param src Input 8-bit or 16-bit (only with NORM_L1) 1-channel,
  212. * 2-channel, 3-channel or 4-channel image.
  213. * @param dst Output image with the same size and type as src .
  214. * @param templateWindowSize Size in pixels of the template patch that is used to compute weights.
  215. * Should be odd. Recommended value 7 pixels
  216. * given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater
  217. * denoising time. Recommended value 21 pixels
  218. * parameter applied to all channels or one per channel in dst. Big h value
  219. * perfectly removes noise but also removes image details, smaller h
  220. * value preserves details but also preserves some noise
  221. *
  222. * This function expected to be applied to grayscale images. For colored images look at
  223. * fastNlMeansDenoisingColored. Advanced usage of this functions can be manual denoising of colored
  224. * image in different colorspaces. Such approach is used in fastNlMeansDenoisingColored by converting
  225. * image to CIELAB colorspace and then separately denoise L and AB components with different h
  226. * parameter.
  227. */
  228. + (void)fastNlMeansDenoising:(Mat*)src dst:(Mat*)dst hVector:(FloatVector*)hVector templateWindowSize:(int)templateWindowSize NS_SWIFT_NAME(fastNlMeansDenoising(src:dst:hVector:templateWindowSize:));
  229. /**
  230. * Perform image denoising using Non-local Means Denoising algorithm
  231. * <http://www.ipol.im/pub/algo/bcm_non_local_means_denoising/> with several computational
  232. * optimizations. Noise expected to be a gaussian white noise
  233. *
  234. * @param src Input 8-bit or 16-bit (only with NORM_L1) 1-channel,
  235. * 2-channel, 3-channel or 4-channel image.
  236. * @param dst Output image with the same size and type as src .
  237. * Should be odd. Recommended value 7 pixels
  238. * given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater
  239. * denoising time. Recommended value 21 pixels
  240. * parameter applied to all channels or one per channel in dst. Big h value
  241. * perfectly removes noise but also removes image details, smaller h
  242. * value preserves details but also preserves some noise
  243. *
  244. * This function expected to be applied to grayscale images. For colored images look at
  245. * fastNlMeansDenoisingColored. Advanced usage of this functions can be manual denoising of colored
  246. * image in different colorspaces. Such approach is used in fastNlMeansDenoisingColored by converting
  247. * image to CIELAB colorspace and then separately denoise L and AB components with different h
  248. * parameter.
  249. */
  250. + (void)fastNlMeansDenoising:(Mat*)src dst:(Mat*)dst hVector:(FloatVector*)hVector NS_SWIFT_NAME(fastNlMeansDenoising(src:dst:hVector:));
  251. //
  252. // void cv::fastNlMeansDenoisingColored(Mat src, Mat& dst, float h = 3, float hColor = 3, int templateWindowSize = 7, int searchWindowSize = 21)
  253. //
  254. /**
  255. * Modification of fastNlMeansDenoising function for colored images
  256. *
  257. * @param src Input 8-bit 3-channel image.
  258. * @param dst Output image with the same size and type as src .
  259. * @param templateWindowSize Size in pixels of the template patch that is used to compute weights.
  260. * Should be odd. Recommended value 7 pixels
  261. * @param searchWindowSize Size in pixels of the window that is used to compute weighted average for
  262. * given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater
  263. * denoising time. Recommended value 21 pixels
  264. * @param h Parameter regulating filter strength for luminance component. Bigger h value perfectly
  265. * removes noise but also removes image details, smaller h value preserves details but also preserves
  266. * some noise
  267. * @param hColor The same as h but for color components. For most images value equals 10
  268. * will be enough to remove colored noise and do not distort colors
  269. *
  270. * The function converts image to CIELAB colorspace and then separately denoise L and AB components
  271. * with given h parameters using fastNlMeansDenoising function.
  272. */
  273. + (void)fastNlMeansDenoisingColored:(Mat*)src dst:(Mat*)dst h:(float)h hColor:(float)hColor templateWindowSize:(int)templateWindowSize searchWindowSize:(int)searchWindowSize NS_SWIFT_NAME(fastNlMeansDenoisingColored(src:dst:h:hColor:templateWindowSize:searchWindowSize:));
  274. /**
  275. * Modification of fastNlMeansDenoising function for colored images
  276. *
  277. * @param src Input 8-bit 3-channel image.
  278. * @param dst Output image with the same size and type as src .
  279. * @param templateWindowSize Size in pixels of the template patch that is used to compute weights.
  280. * Should be odd. Recommended value 7 pixels
  281. * given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater
  282. * denoising time. Recommended value 21 pixels
  283. * @param h Parameter regulating filter strength for luminance component. Bigger h value perfectly
  284. * removes noise but also removes image details, smaller h value preserves details but also preserves
  285. * some noise
  286. * @param hColor The same as h but for color components. For most images value equals 10
  287. * will be enough to remove colored noise and do not distort colors
  288. *
  289. * The function converts image to CIELAB colorspace and then separately denoise L and AB components
  290. * with given h parameters using fastNlMeansDenoising function.
  291. */
  292. + (void)fastNlMeansDenoisingColored:(Mat*)src dst:(Mat*)dst h:(float)h hColor:(float)hColor templateWindowSize:(int)templateWindowSize NS_SWIFT_NAME(fastNlMeansDenoisingColored(src:dst:h:hColor:templateWindowSize:));
  293. /**
  294. * Modification of fastNlMeansDenoising function for colored images
  295. *
  296. * @param src Input 8-bit 3-channel image.
  297. * @param dst Output image with the same size and type as src .
  298. * Should be odd. Recommended value 7 pixels
  299. * given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater
  300. * denoising time. Recommended value 21 pixels
  301. * @param h Parameter regulating filter strength for luminance component. Bigger h value perfectly
  302. * removes noise but also removes image details, smaller h value preserves details but also preserves
  303. * some noise
  304. * @param hColor The same as h but for color components. For most images value equals 10
  305. * will be enough to remove colored noise and do not distort colors
  306. *
  307. * The function converts image to CIELAB colorspace and then separately denoise L and AB components
  308. * with given h parameters using fastNlMeansDenoising function.
  309. */
  310. + (void)fastNlMeansDenoisingColored:(Mat*)src dst:(Mat*)dst h:(float)h hColor:(float)hColor NS_SWIFT_NAME(fastNlMeansDenoisingColored(src:dst:h:hColor:));
  311. /**
  312. * Modification of fastNlMeansDenoising function for colored images
  313. *
  314. * @param src Input 8-bit 3-channel image.
  315. * @param dst Output image with the same size and type as src .
  316. * Should be odd. Recommended value 7 pixels
  317. * given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater
  318. * denoising time. Recommended value 21 pixels
  319. * @param h Parameter regulating filter strength for luminance component. Bigger h value perfectly
  320. * removes noise but also removes image details, smaller h value preserves details but also preserves
  321. * some noise
  322. * will be enough to remove colored noise and do not distort colors
  323. *
  324. * The function converts image to CIELAB colorspace and then separately denoise L and AB components
  325. * with given h parameters using fastNlMeansDenoising function.
  326. */
  327. + (void)fastNlMeansDenoisingColored:(Mat*)src dst:(Mat*)dst h:(float)h NS_SWIFT_NAME(fastNlMeansDenoisingColored(src:dst:h:));
  328. /**
  329. * Modification of fastNlMeansDenoising function for colored images
  330. *
  331. * @param src Input 8-bit 3-channel image.
  332. * @param dst Output image with the same size and type as src .
  333. * Should be odd. Recommended value 7 pixels
  334. * given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater
  335. * denoising time. Recommended value 21 pixels
  336. * removes noise but also removes image details, smaller h value preserves details but also preserves
  337. * some noise
  338. * will be enough to remove colored noise and do not distort colors
  339. *
  340. * The function converts image to CIELAB colorspace and then separately denoise L and AB components
  341. * with given h parameters using fastNlMeansDenoising function.
  342. */
  343. + (void)fastNlMeansDenoisingColored:(Mat*)src dst:(Mat*)dst NS_SWIFT_NAME(fastNlMeansDenoisingColored(src:dst:));
  344. //
  345. // void cv::fastNlMeansDenoisingMulti(vector_Mat srcImgs, Mat& dst, int imgToDenoiseIndex, int temporalWindowSize, float h = 3, int templateWindowSize = 7, int searchWindowSize = 21)
  346. //
  347. /**
  348. * Modification of fastNlMeansDenoising function for images sequence where consecutive images have been
  349. * captured in small period of time. For example video. This version of the function is for grayscale
  350. * images or for manual manipulation with colorspaces. For more details see
  351. * <http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.131.6394>
  352. *
  353. * @param srcImgs Input 8-bit 1-channel, 2-channel, 3-channel or
  354. * 4-channel images sequence. All images should have the same type and
  355. * size.
  356. * @param imgToDenoiseIndex Target image to denoise index in srcImgs sequence
  357. * @param temporalWindowSize Number of surrounding images to use for target image denoising. Should
  358. * be odd. Images from imgToDenoiseIndex - temporalWindowSize / 2 to
  359. * imgToDenoiseIndex - temporalWindowSize / 2 from srcImgs will be used to denoise
  360. * srcImgs[imgToDenoiseIndex] image.
  361. * @param dst Output image with the same size and type as srcImgs images.
  362. * @param templateWindowSize Size in pixels of the template patch that is used to compute weights.
  363. * Should be odd. Recommended value 7 pixels
  364. * @param searchWindowSize Size in pixels of the window that is used to compute weighted average for
  365. * given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater
  366. * denoising time. Recommended value 21 pixels
  367. * @param h Parameter regulating filter strength. Bigger h value
  368. * perfectly removes noise but also removes image details, smaller h
  369. * value preserves details but also preserves some noise
  370. */
  371. + (void)fastNlMeansDenoisingMulti:(NSArray<Mat*>*)srcImgs dst:(Mat*)dst imgToDenoiseIndex:(int)imgToDenoiseIndex temporalWindowSize:(int)temporalWindowSize h:(float)h templateWindowSize:(int)templateWindowSize searchWindowSize:(int)searchWindowSize NS_SWIFT_NAME(fastNlMeansDenoisingMulti(srcImgs:dst:imgToDenoiseIndex:temporalWindowSize:h:templateWindowSize:searchWindowSize:));
  372. /**
  373. * Modification of fastNlMeansDenoising function for images sequence where consecutive images have been
  374. * captured in small period of time. For example video. This version of the function is for grayscale
  375. * images or for manual manipulation with colorspaces. For more details see
  376. * <http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.131.6394>
  377. *
  378. * @param srcImgs Input 8-bit 1-channel, 2-channel, 3-channel or
  379. * 4-channel images sequence. All images should have the same type and
  380. * size.
  381. * @param imgToDenoiseIndex Target image to denoise index in srcImgs sequence
  382. * @param temporalWindowSize Number of surrounding images to use for target image denoising. Should
  383. * be odd. Images from imgToDenoiseIndex - temporalWindowSize / 2 to
  384. * imgToDenoiseIndex - temporalWindowSize / 2 from srcImgs will be used to denoise
  385. * srcImgs[imgToDenoiseIndex] image.
  386. * @param dst Output image with the same size and type as srcImgs images.
  387. * @param templateWindowSize Size in pixels of the template patch that is used to compute weights.
  388. * Should be odd. Recommended value 7 pixels
  389. * given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater
  390. * denoising time. Recommended value 21 pixels
  391. * @param h Parameter regulating filter strength. Bigger h value
  392. * perfectly removes noise but also removes image details, smaller h
  393. * value preserves details but also preserves some noise
  394. */
  395. + (void)fastNlMeansDenoisingMulti:(NSArray<Mat*>*)srcImgs dst:(Mat*)dst imgToDenoiseIndex:(int)imgToDenoiseIndex temporalWindowSize:(int)temporalWindowSize h:(float)h templateWindowSize:(int)templateWindowSize NS_SWIFT_NAME(fastNlMeansDenoisingMulti(srcImgs:dst:imgToDenoiseIndex:temporalWindowSize:h:templateWindowSize:));
  396. /**
  397. * Modification of fastNlMeansDenoising function for images sequence where consecutive images have been
  398. * captured in small period of time. For example video. This version of the function is for grayscale
  399. * images or for manual manipulation with colorspaces. For more details see
  400. * <http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.131.6394>
  401. *
  402. * @param srcImgs Input 8-bit 1-channel, 2-channel, 3-channel or
  403. * 4-channel images sequence. All images should have the same type and
  404. * size.
  405. * @param imgToDenoiseIndex Target image to denoise index in srcImgs sequence
  406. * @param temporalWindowSize Number of surrounding images to use for target image denoising. Should
  407. * be odd. Images from imgToDenoiseIndex - temporalWindowSize / 2 to
  408. * imgToDenoiseIndex - temporalWindowSize / 2 from srcImgs will be used to denoise
  409. * srcImgs[imgToDenoiseIndex] image.
  410. * @param dst Output image with the same size and type as srcImgs images.
  411. * Should be odd. Recommended value 7 pixels
  412. * given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater
  413. * denoising time. Recommended value 21 pixels
  414. * @param h Parameter regulating filter strength. Bigger h value
  415. * perfectly removes noise but also removes image details, smaller h
  416. * value preserves details but also preserves some noise
  417. */
  418. + (void)fastNlMeansDenoisingMulti:(NSArray<Mat*>*)srcImgs dst:(Mat*)dst imgToDenoiseIndex:(int)imgToDenoiseIndex temporalWindowSize:(int)temporalWindowSize h:(float)h NS_SWIFT_NAME(fastNlMeansDenoisingMulti(srcImgs:dst:imgToDenoiseIndex:temporalWindowSize:h:));
  419. /**
  420. * Modification of fastNlMeansDenoising function for images sequence where consecutive images have been
  421. * captured in small period of time. For example video. This version of the function is for grayscale
  422. * images or for manual manipulation with colorspaces. For more details see
  423. * <http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.131.6394>
  424. *
  425. * @param srcImgs Input 8-bit 1-channel, 2-channel, 3-channel or
  426. * 4-channel images sequence. All images should have the same type and
  427. * size.
  428. * @param imgToDenoiseIndex Target image to denoise index in srcImgs sequence
  429. * @param temporalWindowSize Number of surrounding images to use for target image denoising. Should
  430. * be odd. Images from imgToDenoiseIndex - temporalWindowSize / 2 to
  431. * imgToDenoiseIndex - temporalWindowSize / 2 from srcImgs will be used to denoise
  432. * srcImgs[imgToDenoiseIndex] image.
  433. * @param dst Output image with the same size and type as srcImgs images.
  434. * Should be odd. Recommended value 7 pixels
  435. * given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater
  436. * denoising time. Recommended value 21 pixels
  437. * perfectly removes noise but also removes image details, smaller h
  438. * value preserves details but also preserves some noise
  439. */
  440. + (void)fastNlMeansDenoisingMulti:(NSArray<Mat*>*)srcImgs dst:(Mat*)dst imgToDenoiseIndex:(int)imgToDenoiseIndex temporalWindowSize:(int)temporalWindowSize NS_SWIFT_NAME(fastNlMeansDenoisingMulti(srcImgs:dst:imgToDenoiseIndex:temporalWindowSize:));
  441. //
  442. // void cv::fastNlMeansDenoisingMulti(vector_Mat srcImgs, Mat& dst, int imgToDenoiseIndex, int temporalWindowSize, vector_float hVector, int templateWindowSize = 7, int searchWindowSize = 21, int normType = NORM_L2)
  443. //
  444. /**
  445. * Modification of fastNlMeansDenoising function for images sequence where consecutive images have been
  446. * captured in small period of time. For example video. This version of the function is for grayscale
  447. * images or for manual manipulation with colorspaces. For more details see
  448. * <http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.131.6394>
  449. *
  450. * @param srcImgs Input 8-bit or 16-bit (only with NORM_L1) 1-channel,
  451. * 2-channel, 3-channel or 4-channel images sequence. All images should
  452. * have the same type and size.
  453. * @param imgToDenoiseIndex Target image to denoise index in srcImgs sequence
  454. * @param temporalWindowSize Number of surrounding images to use for target image denoising. Should
  455. * be odd. Images from imgToDenoiseIndex - temporalWindowSize / 2 to
  456. * imgToDenoiseIndex - temporalWindowSize / 2 from srcImgs will be used to denoise
  457. * srcImgs[imgToDenoiseIndex] image.
  458. * @param dst Output image with the same size and type as srcImgs images.
  459. * @param templateWindowSize Size in pixels of the template patch that is used to compute weights.
  460. * Should be odd. Recommended value 7 pixels
  461. * @param searchWindowSize Size in pixels of the window that is used to compute weighted average for
  462. * given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater
  463. * denoising time. Recommended value 21 pixels
  464. * parameter applied to all channels or one per channel in dst. Big h value
  465. * perfectly removes noise but also removes image details, smaller h
  466. * value preserves details but also preserves some noise
  467. * @param normType Type of norm used for weight calculation. Can be either NORM_L2 or NORM_L1
  468. */
  469. + (void)fastNlMeansDenoisingMulti:(NSArray<Mat*>*)srcImgs dst:(Mat*)dst imgToDenoiseIndex:(int)imgToDenoiseIndex temporalWindowSize:(int)temporalWindowSize hVector:(FloatVector*)hVector templateWindowSize:(int)templateWindowSize searchWindowSize:(int)searchWindowSize normType:(int)normType NS_SWIFT_NAME(fastNlMeansDenoisingMulti(srcImgs:dst:imgToDenoiseIndex:temporalWindowSize:hVector:templateWindowSize:searchWindowSize:normType:));
  470. /**
  471. * Modification of fastNlMeansDenoising function for images sequence where consecutive images have been
  472. * captured in small period of time. For example video. This version of the function is for grayscale
  473. * images or for manual manipulation with colorspaces. For more details see
  474. * <http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.131.6394>
  475. *
  476. * @param srcImgs Input 8-bit or 16-bit (only with NORM_L1) 1-channel,
  477. * 2-channel, 3-channel or 4-channel images sequence. All images should
  478. * have the same type and size.
  479. * @param imgToDenoiseIndex Target image to denoise index in srcImgs sequence
  480. * @param temporalWindowSize Number of surrounding images to use for target image denoising. Should
  481. * be odd. Images from imgToDenoiseIndex - temporalWindowSize / 2 to
  482. * imgToDenoiseIndex - temporalWindowSize / 2 from srcImgs will be used to denoise
  483. * srcImgs[imgToDenoiseIndex] image.
  484. * @param dst Output image with the same size and type as srcImgs images.
  485. * @param templateWindowSize Size in pixels of the template patch that is used to compute weights.
  486. * Should be odd. Recommended value 7 pixels
  487. * @param searchWindowSize Size in pixels of the window that is used to compute weighted average for
  488. * given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater
  489. * denoising time. Recommended value 21 pixels
  490. * parameter applied to all channels or one per channel in dst. Big h value
  491. * perfectly removes noise but also removes image details, smaller h
  492. * value preserves details but also preserves some noise
  493. */
  494. + (void)fastNlMeansDenoisingMulti:(NSArray<Mat*>*)srcImgs dst:(Mat*)dst imgToDenoiseIndex:(int)imgToDenoiseIndex temporalWindowSize:(int)temporalWindowSize hVector:(FloatVector*)hVector templateWindowSize:(int)templateWindowSize searchWindowSize:(int)searchWindowSize NS_SWIFT_NAME(fastNlMeansDenoisingMulti(srcImgs:dst:imgToDenoiseIndex:temporalWindowSize:hVector:templateWindowSize:searchWindowSize:));
  495. /**
  496. * Modification of fastNlMeansDenoising function for images sequence where consecutive images have been
  497. * captured in small period of time. For example video. This version of the function is for grayscale
  498. * images or for manual manipulation with colorspaces. For more details see
  499. * <http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.131.6394>
  500. *
  501. * @param srcImgs Input 8-bit or 16-bit (only with NORM_L1) 1-channel,
  502. * 2-channel, 3-channel or 4-channel images sequence. All images should
  503. * have the same type and size.
  504. * @param imgToDenoiseIndex Target image to denoise index in srcImgs sequence
  505. * @param temporalWindowSize Number of surrounding images to use for target image denoising. Should
  506. * be odd. Images from imgToDenoiseIndex - temporalWindowSize / 2 to
  507. * imgToDenoiseIndex - temporalWindowSize / 2 from srcImgs will be used to denoise
  508. * srcImgs[imgToDenoiseIndex] image.
  509. * @param dst Output image with the same size and type as srcImgs images.
  510. * @param templateWindowSize Size in pixels of the template patch that is used to compute weights.
  511. * Should be odd. Recommended value 7 pixels
  512. * given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater
  513. * denoising time. Recommended value 21 pixels
  514. * parameter applied to all channels or one per channel in dst. Big h value
  515. * perfectly removes noise but also removes image details, smaller h
  516. * value preserves details but also preserves some noise
  517. */
  518. + (void)fastNlMeansDenoisingMulti:(NSArray<Mat*>*)srcImgs dst:(Mat*)dst imgToDenoiseIndex:(int)imgToDenoiseIndex temporalWindowSize:(int)temporalWindowSize hVector:(FloatVector*)hVector templateWindowSize:(int)templateWindowSize NS_SWIFT_NAME(fastNlMeansDenoisingMulti(srcImgs:dst:imgToDenoiseIndex:temporalWindowSize:hVector:templateWindowSize:));
  519. /**
  520. * Modification of fastNlMeansDenoising function for images sequence where consecutive images have been
  521. * captured in small period of time. For example video. This version of the function is for grayscale
  522. * images or for manual manipulation with colorspaces. For more details see
  523. * <http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.131.6394>
  524. *
  525. * @param srcImgs Input 8-bit or 16-bit (only with NORM_L1) 1-channel,
  526. * 2-channel, 3-channel or 4-channel images sequence. All images should
  527. * have the same type and size.
  528. * @param imgToDenoiseIndex Target image to denoise index in srcImgs sequence
  529. * @param temporalWindowSize Number of surrounding images to use for target image denoising. Should
  530. * be odd. Images from imgToDenoiseIndex - temporalWindowSize / 2 to
  531. * imgToDenoiseIndex - temporalWindowSize / 2 from srcImgs will be used to denoise
  532. * srcImgs[imgToDenoiseIndex] image.
  533. * @param dst Output image with the same size and type as srcImgs images.
  534. * Should be odd. Recommended value 7 pixels
  535. * given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater
  536. * denoising time. Recommended value 21 pixels
  537. * parameter applied to all channels or one per channel in dst. Big h value
  538. * perfectly removes noise but also removes image details, smaller h
  539. * value preserves details but also preserves some noise
  540. */
  541. + (void)fastNlMeansDenoisingMulti:(NSArray<Mat*>*)srcImgs dst:(Mat*)dst imgToDenoiseIndex:(int)imgToDenoiseIndex temporalWindowSize:(int)temporalWindowSize hVector:(FloatVector*)hVector NS_SWIFT_NAME(fastNlMeansDenoisingMulti(srcImgs:dst:imgToDenoiseIndex:temporalWindowSize:hVector:));
  542. //
  543. // void cv::fastNlMeansDenoisingColoredMulti(vector_Mat srcImgs, Mat& dst, int imgToDenoiseIndex, int temporalWindowSize, float h = 3, float hColor = 3, int templateWindowSize = 7, int searchWindowSize = 21)
  544. //
  545. /**
  546. * Modification of fastNlMeansDenoisingMulti function for colored images sequences
  547. *
  548. * @param srcImgs Input 8-bit 3-channel images sequence. All images should have the same type and
  549. * size.
  550. * @param imgToDenoiseIndex Target image to denoise index in srcImgs sequence
  551. * @param temporalWindowSize Number of surrounding images to use for target image denoising. Should
  552. * be odd. Images from imgToDenoiseIndex - temporalWindowSize / 2 to
  553. * imgToDenoiseIndex - temporalWindowSize / 2 from srcImgs will be used to denoise
  554. * srcImgs[imgToDenoiseIndex] image.
  555. * @param dst Output image with the same size and type as srcImgs images.
  556. * @param templateWindowSize Size in pixels of the template patch that is used to compute weights.
  557. * Should be odd. Recommended value 7 pixels
  558. * @param searchWindowSize Size in pixels of the window that is used to compute weighted average for
  559. * given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater
  560. * denoising time. Recommended value 21 pixels
  561. * @param h Parameter regulating filter strength for luminance component. Bigger h value perfectly
  562. * removes noise but also removes image details, smaller h value preserves details but also preserves
  563. * some noise.
  564. * @param hColor The same as h but for color components.
  565. *
  566. * The function converts images to CIELAB colorspace and then separately denoise L and AB components
  567. * with given h parameters using fastNlMeansDenoisingMulti function.
  568. */
  569. + (void)fastNlMeansDenoisingColoredMulti:(NSArray<Mat*>*)srcImgs dst:(Mat*)dst imgToDenoiseIndex:(int)imgToDenoiseIndex temporalWindowSize:(int)temporalWindowSize h:(float)h hColor:(float)hColor templateWindowSize:(int)templateWindowSize searchWindowSize:(int)searchWindowSize NS_SWIFT_NAME(fastNlMeansDenoisingColoredMulti(srcImgs:dst:imgToDenoiseIndex:temporalWindowSize:h:hColor:templateWindowSize:searchWindowSize:));
  570. /**
  571. * Modification of fastNlMeansDenoisingMulti function for colored images sequences
  572. *
  573. * @param srcImgs Input 8-bit 3-channel images sequence. All images should have the same type and
  574. * size.
  575. * @param imgToDenoiseIndex Target image to denoise index in srcImgs sequence
  576. * @param temporalWindowSize Number of surrounding images to use for target image denoising. Should
  577. * be odd. Images from imgToDenoiseIndex - temporalWindowSize / 2 to
  578. * imgToDenoiseIndex - temporalWindowSize / 2 from srcImgs will be used to denoise
  579. * srcImgs[imgToDenoiseIndex] image.
  580. * @param dst Output image with the same size and type as srcImgs images.
  581. * @param templateWindowSize Size in pixels of the template patch that is used to compute weights.
  582. * Should be odd. Recommended value 7 pixels
  583. * given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater
  584. * denoising time. Recommended value 21 pixels
  585. * @param h Parameter regulating filter strength for luminance component. Bigger h value perfectly
  586. * removes noise but also removes image details, smaller h value preserves details but also preserves
  587. * some noise.
  588. * @param hColor The same as h but for color components.
  589. *
  590. * The function converts images to CIELAB colorspace and then separately denoise L and AB components
  591. * with given h parameters using fastNlMeansDenoisingMulti function.
  592. */
  593. + (void)fastNlMeansDenoisingColoredMulti:(NSArray<Mat*>*)srcImgs dst:(Mat*)dst imgToDenoiseIndex:(int)imgToDenoiseIndex temporalWindowSize:(int)temporalWindowSize h:(float)h hColor:(float)hColor templateWindowSize:(int)templateWindowSize NS_SWIFT_NAME(fastNlMeansDenoisingColoredMulti(srcImgs:dst:imgToDenoiseIndex:temporalWindowSize:h:hColor:templateWindowSize:));
  594. /**
  595. * Modification of fastNlMeansDenoisingMulti function for colored images sequences
  596. *
  597. * @param srcImgs Input 8-bit 3-channel images sequence. All images should have the same type and
  598. * size.
  599. * @param imgToDenoiseIndex Target image to denoise index in srcImgs sequence
  600. * @param temporalWindowSize Number of surrounding images to use for target image denoising. Should
  601. * be odd. Images from imgToDenoiseIndex - temporalWindowSize / 2 to
  602. * imgToDenoiseIndex - temporalWindowSize / 2 from srcImgs will be used to denoise
  603. * srcImgs[imgToDenoiseIndex] image.
  604. * @param dst Output image with the same size and type as srcImgs images.
  605. * Should be odd. Recommended value 7 pixels
  606. * given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater
  607. * denoising time. Recommended value 21 pixels
  608. * @param h Parameter regulating filter strength for luminance component. Bigger h value perfectly
  609. * removes noise but also removes image details, smaller h value preserves details but also preserves
  610. * some noise.
  611. * @param hColor The same as h but for color components.
  612. *
  613. * The function converts images to CIELAB colorspace and then separately denoise L and AB components
  614. * with given h parameters using fastNlMeansDenoisingMulti function.
  615. */
  616. + (void)fastNlMeansDenoisingColoredMulti:(NSArray<Mat*>*)srcImgs dst:(Mat*)dst imgToDenoiseIndex:(int)imgToDenoiseIndex temporalWindowSize:(int)temporalWindowSize h:(float)h hColor:(float)hColor NS_SWIFT_NAME(fastNlMeansDenoisingColoredMulti(srcImgs:dst:imgToDenoiseIndex:temporalWindowSize:h:hColor:));
  617. /**
  618. * Modification of fastNlMeansDenoisingMulti function for colored images sequences
  619. *
  620. * @param srcImgs Input 8-bit 3-channel images sequence. All images should have the same type and
  621. * size.
  622. * @param imgToDenoiseIndex Target image to denoise index in srcImgs sequence
  623. * @param temporalWindowSize Number of surrounding images to use for target image denoising. Should
  624. * be odd. Images from imgToDenoiseIndex - temporalWindowSize / 2 to
  625. * imgToDenoiseIndex - temporalWindowSize / 2 from srcImgs will be used to denoise
  626. * srcImgs[imgToDenoiseIndex] image.
  627. * @param dst Output image with the same size and type as srcImgs images.
  628. * Should be odd. Recommended value 7 pixels
  629. * given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater
  630. * denoising time. Recommended value 21 pixels
  631. * @param h Parameter regulating filter strength for luminance component. Bigger h value perfectly
  632. * removes noise but also removes image details, smaller h value preserves details but also preserves
  633. * some noise.
  634. *
  635. * The function converts images to CIELAB colorspace and then separately denoise L and AB components
  636. * with given h parameters using fastNlMeansDenoisingMulti function.
  637. */
  638. + (void)fastNlMeansDenoisingColoredMulti:(NSArray<Mat*>*)srcImgs dst:(Mat*)dst imgToDenoiseIndex:(int)imgToDenoiseIndex temporalWindowSize:(int)temporalWindowSize h:(float)h NS_SWIFT_NAME(fastNlMeansDenoisingColoredMulti(srcImgs:dst:imgToDenoiseIndex:temporalWindowSize:h:));
  639. /**
  640. * Modification of fastNlMeansDenoisingMulti function for colored images sequences
  641. *
  642. * @param srcImgs Input 8-bit 3-channel images sequence. All images should have the same type and
  643. * size.
  644. * @param imgToDenoiseIndex Target image to denoise index in srcImgs sequence
  645. * @param temporalWindowSize Number of surrounding images to use for target image denoising. Should
  646. * be odd. Images from imgToDenoiseIndex - temporalWindowSize / 2 to
  647. * imgToDenoiseIndex - temporalWindowSize / 2 from srcImgs will be used to denoise
  648. * srcImgs[imgToDenoiseIndex] image.
  649. * @param dst Output image with the same size and type as srcImgs images.
  650. * Should be odd. Recommended value 7 pixels
  651. * given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater
  652. * denoising time. Recommended value 21 pixels
  653. * removes noise but also removes image details, smaller h value preserves details but also preserves
  654. * some noise.
  655. *
  656. * The function converts images to CIELAB colorspace and then separately denoise L and AB components
  657. * with given h parameters using fastNlMeansDenoisingMulti function.
  658. */
  659. + (void)fastNlMeansDenoisingColoredMulti:(NSArray<Mat*>*)srcImgs dst:(Mat*)dst imgToDenoiseIndex:(int)imgToDenoiseIndex temporalWindowSize:(int)temporalWindowSize NS_SWIFT_NAME(fastNlMeansDenoisingColoredMulti(srcImgs:dst:imgToDenoiseIndex:temporalWindowSize:));
  660. //
  661. // void cv::denoise_TVL1(vector_Mat observations, Mat result, double lambda = 1.0, int niters = 30)
  662. //
  663. /**
  664. * Primal-dual algorithm is an algorithm for solving special types of variational problems (that is,
  665. * finding a function to minimize some functional). As the image denoising, in particular, may be seen
  666. * as the variational problem, primal-dual algorithm then can be used to perform denoising and this is
  667. * exactly what is implemented.
  668. *
  669. * It should be noted, that this implementation was taken from the July 2013 blog entry
  670. * CITE: MA13 , which also contained (slightly more general) ready-to-use source code on Python.
  671. * Subsequently, that code was rewritten on C++ with the usage of openCV by Vadim Pisarevsky at the end
  672. * of July 2013 and finally it was slightly adapted by later authors.
  673. *
  674. * Although the thorough discussion and justification of the algorithm involved may be found in
  675. * CITE: ChambolleEtAl, it might make sense to skim over it here, following CITE: MA13 . To begin
  676. * with, we consider the 1-byte gray-level images as the functions from the rectangular domain of
  677. * pixels (it may be seen as set
  678. * `$$\left\{(x,y)\in\mathbb{N}\times\mathbb{N}\mid 1\leq x\leq n,\;1\leq y\leq m\right\}$$` for some
  679. * `$$m,\;n\in\mathbb{N}$$`) into `$$\{0,1,\dots,255\}$$`. We shall denote the noised images as `$$f_i$$` and with
  680. * this view, given some image `$$x$$` of the same size, we may measure how bad it is by the formula
  681. *
  682. * `$$\left\|\left\|\nabla x\right\|\right\| + \lambda\sum_i\left\|\left\|x-f_i\right\|\right\|$$`
  683. *
  684. * `$$\|\|\cdot\|\|$$` here denotes `$$L_2$$`-norm and as you see, the first addend states that we want our
  685. * image to be smooth (ideally, having zero gradient, thus being constant) and the second states that
  686. * we want our result to be close to the observations we've got. If we treat `$$x$$` as a function, this is
  687. * exactly the functional what we seek to minimize and here the Primal-Dual algorithm comes into play.
  688. *
  689. * @param observations This array should contain one or more noised versions of the image that is to
  690. * be restored.
  691. * @param result Here the denoised image will be stored. There is no need to do pre-allocation of
  692. * storage space, as it will be automatically allocated, if necessary.
  693. * @param lambda Corresponds to `$$\lambda$$` in the formulas above. As it is enlarged, the smooth
  694. * (blurred) images are treated more favorably than detailed (but maybe more noised) ones. Roughly
  695. * speaking, as it becomes smaller, the result will be more blur but more sever outliers will be
  696. * removed.
  697. * @param niters Number of iterations that the algorithm will run. Of course, as more iterations as
  698. * better, but it is hard to quantitatively refine this statement, so just use the default and
  699. * increase it if the results are poor.
  700. */
  701. + (void)denoise_TVL1:(NSArray<Mat*>*)observations result:(Mat*)result lambda:(double)lambda niters:(int)niters NS_SWIFT_NAME(denoise_TVL1(observations:result:lambda:niters:));
  702. /**
  703. * Primal-dual algorithm is an algorithm for solving special types of variational problems (that is,
  704. * finding a function to minimize some functional). As the image denoising, in particular, may be seen
  705. * as the variational problem, primal-dual algorithm then can be used to perform denoising and this is
  706. * exactly what is implemented.
  707. *
  708. * It should be noted, that this implementation was taken from the July 2013 blog entry
  709. * CITE: MA13 , which also contained (slightly more general) ready-to-use source code on Python.
  710. * Subsequently, that code was rewritten on C++ with the usage of openCV by Vadim Pisarevsky at the end
  711. * of July 2013 and finally it was slightly adapted by later authors.
  712. *
  713. * Although the thorough discussion and justification of the algorithm involved may be found in
  714. * CITE: ChambolleEtAl, it might make sense to skim over it here, following CITE: MA13 . To begin
  715. * with, we consider the 1-byte gray-level images as the functions from the rectangular domain of
  716. * pixels (it may be seen as set
  717. * `$$\left\{(x,y)\in\mathbb{N}\times\mathbb{N}\mid 1\leq x\leq n,\;1\leq y\leq m\right\}$$` for some
  718. * `$$m,\;n\in\mathbb{N}$$`) into `$$\{0,1,\dots,255\}$$`. We shall denote the noised images as `$$f_i$$` and with
  719. * this view, given some image `$$x$$` of the same size, we may measure how bad it is by the formula
  720. *
  721. * `$$\left\|\left\|\nabla x\right\|\right\| + \lambda\sum_i\left\|\left\|x-f_i\right\|\right\|$$`
  722. *
  723. * `$$\|\|\cdot\|\|$$` here denotes `$$L_2$$`-norm and as you see, the first addend states that we want our
  724. * image to be smooth (ideally, having zero gradient, thus being constant) and the second states that
  725. * we want our result to be close to the observations we've got. If we treat `$$x$$` as a function, this is
  726. * exactly the functional what we seek to minimize and here the Primal-Dual algorithm comes into play.
  727. *
  728. * @param observations This array should contain one or more noised versions of the image that is to
  729. * be restored.
  730. * @param result Here the denoised image will be stored. There is no need to do pre-allocation of
  731. * storage space, as it will be automatically allocated, if necessary.
  732. * @param lambda Corresponds to `$$\lambda$$` in the formulas above. As it is enlarged, the smooth
  733. * (blurred) images are treated more favorably than detailed (but maybe more noised) ones. Roughly
  734. * speaking, as it becomes smaller, the result will be more blur but more sever outliers will be
  735. * removed.
  736. * better, but it is hard to quantitatively refine this statement, so just use the default and
  737. * increase it if the results are poor.
  738. */
  739. + (void)denoise_TVL1:(NSArray<Mat*>*)observations result:(Mat*)result lambda:(double)lambda NS_SWIFT_NAME(denoise_TVL1(observations:result:lambda:));
  740. /**
  741. * Primal-dual algorithm is an algorithm for solving special types of variational problems (that is,
  742. * finding a function to minimize some functional). As the image denoising, in particular, may be seen
  743. * as the variational problem, primal-dual algorithm then can be used to perform denoising and this is
  744. * exactly what is implemented.
  745. *
  746. * It should be noted, that this implementation was taken from the July 2013 blog entry
  747. * CITE: MA13 , which also contained (slightly more general) ready-to-use source code on Python.
  748. * Subsequently, that code was rewritten on C++ with the usage of openCV by Vadim Pisarevsky at the end
  749. * of July 2013 and finally it was slightly adapted by later authors.
  750. *
  751. * Although the thorough discussion and justification of the algorithm involved may be found in
  752. * CITE: ChambolleEtAl, it might make sense to skim over it here, following CITE: MA13 . To begin
  753. * with, we consider the 1-byte gray-level images as the functions from the rectangular domain of
  754. * pixels (it may be seen as set
  755. * `$$\left\{(x,y)\in\mathbb{N}\times\mathbb{N}\mid 1\leq x\leq n,\;1\leq y\leq m\right\}$$` for some
  756. * `$$m,\;n\in\mathbb{N}$$`) into `$$\{0,1,\dots,255\}$$`. We shall denote the noised images as `$$f_i$$` and with
  757. * this view, given some image `$$x$$` of the same size, we may measure how bad it is by the formula
  758. *
  759. * `$$\left\|\left\|\nabla x\right\|\right\| + \lambda\sum_i\left\|\left\|x-f_i\right\|\right\|$$`
  760. *
  761. * `$$\|\|\cdot\|\|$$` here denotes `$$L_2$$`-norm and as you see, the first addend states that we want our
  762. * image to be smooth (ideally, having zero gradient, thus being constant) and the second states that
  763. * we want our result to be close to the observations we've got. If we treat `$$x$$` as a function, this is
  764. * exactly the functional what we seek to minimize and here the Primal-Dual algorithm comes into play.
  765. *
  766. * @param observations This array should contain one or more noised versions of the image that is to
  767. * be restored.
  768. * @param result Here the denoised image will be stored. There is no need to do pre-allocation of
  769. * storage space, as it will be automatically allocated, if necessary.
  770. * (blurred) images are treated more favorably than detailed (but maybe more noised) ones. Roughly
  771. * speaking, as it becomes smaller, the result will be more blur but more sever outliers will be
  772. * removed.
  773. * better, but it is hard to quantitatively refine this statement, so just use the default and
  774. * increase it if the results are poor.
  775. */
  776. + (void)denoise_TVL1:(NSArray<Mat*>*)observations result:(Mat*)result NS_SWIFT_NAME(denoise_TVL1(observations:result:));
  777. //
  778. // Ptr_Tonemap cv::createTonemap(float gamma = 1.0f)
  779. //
  780. /**
  781. * Creates simple linear mapper with gamma correction
  782. *
  783. * @param gamma positive value for gamma correction. Gamma value of 1.0 implies no correction, gamma
  784. * equal to 2.2f is suitable for most displays.
  785. * Generally gamma \> 1 brightens the image and gamma \< 1 darkens it.
  786. */
  787. + (Tonemap*)createTonemap:(float)gamma NS_SWIFT_NAME(createTonemap(gamma:));
  788. /**
  789. * Creates simple linear mapper with gamma correction
  790. *
  791. * equal to 2.2f is suitable for most displays.
  792. * Generally gamma \> 1 brightens the image and gamma \< 1 darkens it.
  793. */
  794. + (Tonemap*)createTonemap NS_SWIFT_NAME(createTonemap());
  795. //
  796. // Ptr_TonemapDrago cv::createTonemapDrago(float gamma = 1.0f, float saturation = 1.0f, float bias = 0.85f)
  797. //
  798. /**
  799. * Creates TonemapDrago object
  800. *
  801. * @param gamma gamma value for gamma correction. See createTonemap
  802. * @param saturation positive saturation enhancement value. 1.0 preserves saturation, values greater
  803. * than 1 increase saturation and values less than 1 decrease it.
  804. * @param bias value for bias function in [0, 1] range. Values from 0.7 to 0.9 usually give best
  805. * results, default value is 0.85.
  806. */
  807. + (TonemapDrago*)createTonemapDrago:(float)gamma saturation:(float)saturation bias:(float)bias NS_SWIFT_NAME(createTonemapDrago(gamma:saturation:bias:));
  808. /**
  809. * Creates TonemapDrago object
  810. *
  811. * @param gamma gamma value for gamma correction. See createTonemap
  812. * @param saturation positive saturation enhancement value. 1.0 preserves saturation, values greater
  813. * than 1 increase saturation and values less than 1 decrease it.
  814. * results, default value is 0.85.
  815. */
  816. + (TonemapDrago*)createTonemapDrago:(float)gamma saturation:(float)saturation NS_SWIFT_NAME(createTonemapDrago(gamma:saturation:));
  817. /**
  818. * Creates TonemapDrago object
  819. *
  820. * @param gamma gamma value for gamma correction. See createTonemap
  821. * than 1 increase saturation and values less than 1 decrease it.
  822. * results, default value is 0.85.
  823. */
  824. + (TonemapDrago*)createTonemapDrago:(float)gamma NS_SWIFT_NAME(createTonemapDrago(gamma:));
  825. /**
  826. * Creates TonemapDrago object
  827. *
  828. * than 1 increase saturation and values less than 1 decrease it.
  829. * results, default value is 0.85.
  830. */
  831. + (TonemapDrago*)createTonemapDrago NS_SWIFT_NAME(createTonemapDrago());
  832. //
  833. // Ptr_TonemapReinhard cv::createTonemapReinhard(float gamma = 1.0f, float intensity = 0.0f, float light_adapt = 1.0f, float color_adapt = 0.0f)
  834. //
  835. /**
  836. * Creates TonemapReinhard object
  837. *
  838. * @param gamma gamma value for gamma correction. See createTonemap
  839. * @param intensity result intensity in [-8, 8] range. Greater intensity produces brighter results.
  840. * @param light_adapt light adaptation in [0, 1] range. If 1 adaptation is based only on pixel
  841. * value, if 0 it's global, otherwise it's a weighted mean of this two cases.
  842. * @param color_adapt chromatic adaptation in [0, 1] range. If 1 channels are treated independently,
  843. * if 0 adaptation level is the same for each channel.
  844. */
  845. + (TonemapReinhard*)createTonemapReinhard:(float)gamma intensity:(float)intensity light_adapt:(float)light_adapt color_adapt:(float)color_adapt NS_SWIFT_NAME(createTonemapReinhard(gamma:intensity:light_adapt:color_adapt:));
  846. /**
  847. * Creates TonemapReinhard object
  848. *
  849. * @param gamma gamma value for gamma correction. See createTonemap
  850. * @param intensity result intensity in [-8, 8] range. Greater intensity produces brighter results.
  851. * @param light_adapt light adaptation in [0, 1] range. If 1 adaptation is based only on pixel
  852. * value, if 0 it's global, otherwise it's a weighted mean of this two cases.
  853. * if 0 adaptation level is the same for each channel.
  854. */
  855. + (TonemapReinhard*)createTonemapReinhard:(float)gamma intensity:(float)intensity light_adapt:(float)light_adapt NS_SWIFT_NAME(createTonemapReinhard(gamma:intensity:light_adapt:));
  856. /**
  857. * Creates TonemapReinhard object
  858. *
  859. * @param gamma gamma value for gamma correction. See createTonemap
  860. * @param intensity result intensity in [-8, 8] range. Greater intensity produces brighter results.
  861. * value, if 0 it's global, otherwise it's a weighted mean of this two cases.
  862. * if 0 adaptation level is the same for each channel.
  863. */
  864. + (TonemapReinhard*)createTonemapReinhard:(float)gamma intensity:(float)intensity NS_SWIFT_NAME(createTonemapReinhard(gamma:intensity:));
  865. /**
  866. * Creates TonemapReinhard object
  867. *
  868. * @param gamma gamma value for gamma correction. See createTonemap
  869. * value, if 0 it's global, otherwise it's a weighted mean of this two cases.
  870. * if 0 adaptation level is the same for each channel.
  871. */
  872. + (TonemapReinhard*)createTonemapReinhard:(float)gamma NS_SWIFT_NAME(createTonemapReinhard(gamma:));
  873. /**
  874. * Creates TonemapReinhard object
  875. *
  876. * value, if 0 it's global, otherwise it's a weighted mean of this two cases.
  877. * if 0 adaptation level is the same for each channel.
  878. */
  879. + (TonemapReinhard*)createTonemapReinhard NS_SWIFT_NAME(createTonemapReinhard());
  880. //
  881. // Ptr_TonemapMantiuk cv::createTonemapMantiuk(float gamma = 1.0f, float scale = 0.7f, float saturation = 1.0f)
  882. //
  883. /**
  884. * Creates TonemapMantiuk object
  885. *
  886. * @param gamma gamma value for gamma correction. See createTonemap
  887. * @param scale contrast scale factor. HVS response is multiplied by this parameter, thus compressing
  888. * dynamic range. Values from 0.6 to 0.9 produce best results.
  889. * @param saturation saturation enhancement value. See createTonemapDrago
  890. */
  891. + (TonemapMantiuk*)createTonemapMantiuk:(float)gamma scale:(float)scale saturation:(float)saturation NS_SWIFT_NAME(createTonemapMantiuk(gamma:scale:saturation:));
  892. /**
  893. * Creates TonemapMantiuk object
  894. *
  895. * @param gamma gamma value for gamma correction. See createTonemap
  896. * @param scale contrast scale factor. HVS response is multiplied by this parameter, thus compressing
  897. * dynamic range. Values from 0.6 to 0.9 produce best results.
  898. */
  899. + (TonemapMantiuk*)createTonemapMantiuk:(float)gamma scale:(float)scale NS_SWIFT_NAME(createTonemapMantiuk(gamma:scale:));
  900. /**
  901. * Creates TonemapMantiuk object
  902. *
  903. * @param gamma gamma value for gamma correction. See createTonemap
  904. * dynamic range. Values from 0.6 to 0.9 produce best results.
  905. */
  906. + (TonemapMantiuk*)createTonemapMantiuk:(float)gamma NS_SWIFT_NAME(createTonemapMantiuk(gamma:));
  907. /**
  908. * Creates TonemapMantiuk object
  909. *
  910. * dynamic range. Values from 0.6 to 0.9 produce best results.
  911. */
  912. + (TonemapMantiuk*)createTonemapMantiuk NS_SWIFT_NAME(createTonemapMantiuk());
  913. //
  914. // Ptr_AlignMTB cv::createAlignMTB(int max_bits = 6, int exclude_range = 4, bool cut = true)
  915. //
  916. /**
  917. * Creates AlignMTB object
  918. *
  919. * @param max_bits logarithm to the base 2 of maximal shift in each dimension. Values of 5 and 6 are
  920. * usually good enough (31 and 63 pixels shift respectively).
  921. * @param exclude_range range for exclusion bitmap that is constructed to suppress noise around the
  922. * median value.
  923. * @param cut if true cuts images, otherwise fills the new regions with zeros.
  924. */
  925. + (AlignMTB*)createAlignMTB:(int)max_bits exclude_range:(int)exclude_range cut:(BOOL)cut NS_SWIFT_NAME(createAlignMTB(max_bits:exclude_range:cut:));
  926. /**
  927. * Creates AlignMTB object
  928. *
  929. * @param max_bits logarithm to the base 2 of maximal shift in each dimension. Values of 5 and 6 are
  930. * usually good enough (31 and 63 pixels shift respectively).
  931. * @param exclude_range range for exclusion bitmap that is constructed to suppress noise around the
  932. * median value.
  933. */
  934. + (AlignMTB*)createAlignMTB:(int)max_bits exclude_range:(int)exclude_range NS_SWIFT_NAME(createAlignMTB(max_bits:exclude_range:));
  935. /**
  936. * Creates AlignMTB object
  937. *
  938. * @param max_bits logarithm to the base 2 of maximal shift in each dimension. Values of 5 and 6 are
  939. * usually good enough (31 and 63 pixels shift respectively).
  940. * median value.
  941. */
  942. + (AlignMTB*)createAlignMTB:(int)max_bits NS_SWIFT_NAME(createAlignMTB(max_bits:));
  943. /**
  944. * Creates AlignMTB object
  945. *
  946. * usually good enough (31 and 63 pixels shift respectively).
  947. * median value.
  948. */
  949. + (AlignMTB*)createAlignMTB NS_SWIFT_NAME(createAlignMTB());
  950. //
  951. // Ptr_CalibrateDebevec cv::createCalibrateDebevec(int samples = 70, float lambda = 10.0f, bool random = false)
  952. //
  953. /**
  954. * Creates CalibrateDebevec object
  955. *
  956. * @param samples number of pixel locations to use
  957. * @param lambda smoothness term weight. Greater values produce smoother results, but can alter the
  958. * response.
  959. * @param random if true sample pixel locations are chosen at random, otherwise they form a
  960. * rectangular grid.
  961. */
  962. + (CalibrateDebevec*)createCalibrateDebevec:(int)samples lambda:(float)lambda random:(BOOL)random NS_SWIFT_NAME(createCalibrateDebevec(samples:lambda:random:));
  963. /**
  964. * Creates CalibrateDebevec object
  965. *
  966. * @param samples number of pixel locations to use
  967. * @param lambda smoothness term weight. Greater values produce smoother results, but can alter the
  968. * response.
  969. * rectangular grid.
  970. */
  971. + (CalibrateDebevec*)createCalibrateDebevec:(int)samples lambda:(float)lambda NS_SWIFT_NAME(createCalibrateDebevec(samples:lambda:));
  972. /**
  973. * Creates CalibrateDebevec object
  974. *
  975. * @param samples number of pixel locations to use
  976. * response.
  977. * rectangular grid.
  978. */
  979. + (CalibrateDebevec*)createCalibrateDebevec:(int)samples NS_SWIFT_NAME(createCalibrateDebevec(samples:));
  980. /**
  981. * Creates CalibrateDebevec object
  982. *
  983. * response.
  984. * rectangular grid.
  985. */
  986. + (CalibrateDebevec*)createCalibrateDebevec NS_SWIFT_NAME(createCalibrateDebevec());
  987. //
  988. // Ptr_CalibrateRobertson cv::createCalibrateRobertson(int max_iter = 30, float threshold = 0.01f)
  989. //
  990. /**
  991. * Creates CalibrateRobertson object
  992. *
  993. * @param max_iter maximal number of Gauss-Seidel solver iterations.
  994. * @param threshold target difference between results of two successive steps of the minimization.
  995. */
  996. + (CalibrateRobertson*)createCalibrateRobertson:(int)max_iter threshold:(float)threshold NS_SWIFT_NAME(createCalibrateRobertson(max_iter:threshold:));
  997. /**
  998. * Creates CalibrateRobertson object
  999. *
  1000. * @param max_iter maximal number of Gauss-Seidel solver iterations.
  1001. */
  1002. + (CalibrateRobertson*)createCalibrateRobertson:(int)max_iter NS_SWIFT_NAME(createCalibrateRobertson(max_iter:));
  1003. /**
  1004. * Creates CalibrateRobertson object
  1005. *
  1006. */
  1007. + (CalibrateRobertson*)createCalibrateRobertson NS_SWIFT_NAME(createCalibrateRobertson());
  1008. //
  1009. // Ptr_MergeDebevec cv::createMergeDebevec()
  1010. //
  1011. /**
  1012. * Creates MergeDebevec object
  1013. */
  1014. + (MergeDebevec*)createMergeDebevec NS_SWIFT_NAME(createMergeDebevec());
  1015. //
  1016. // Ptr_MergeMertens cv::createMergeMertens(float contrast_weight = 1.0f, float saturation_weight = 1.0f, float exposure_weight = 0.0f)
  1017. //
  1018. /**
  1019. * Creates MergeMertens object
  1020. *
  1021. * @param contrast_weight contrast measure weight. See MergeMertens.
  1022. * @param saturation_weight saturation measure weight
  1023. * @param exposure_weight well-exposedness measure weight
  1024. */
  1025. + (MergeMertens*)createMergeMertens:(float)contrast_weight saturation_weight:(float)saturation_weight exposure_weight:(float)exposure_weight NS_SWIFT_NAME(createMergeMertens(contrast_weight:saturation_weight:exposure_weight:));
  1026. /**
  1027. * Creates MergeMertens object
  1028. *
  1029. * @param contrast_weight contrast measure weight. See MergeMertens.
  1030. * @param saturation_weight saturation measure weight
  1031. */
  1032. + (MergeMertens*)createMergeMertens:(float)contrast_weight saturation_weight:(float)saturation_weight NS_SWIFT_NAME(createMergeMertens(contrast_weight:saturation_weight:));
  1033. /**
  1034. * Creates MergeMertens object
  1035. *
  1036. * @param contrast_weight contrast measure weight. See MergeMertens.
  1037. */
  1038. + (MergeMertens*)createMergeMertens:(float)contrast_weight NS_SWIFT_NAME(createMergeMertens(contrast_weight:));
  1039. /**
  1040. * Creates MergeMertens object
  1041. *
  1042. */
  1043. + (MergeMertens*)createMergeMertens NS_SWIFT_NAME(createMergeMertens());
  1044. //
  1045. // Ptr_MergeRobertson cv::createMergeRobertson()
  1046. //
  1047. /**
  1048. * Creates MergeRobertson object
  1049. */
  1050. + (MergeRobertson*)createMergeRobertson NS_SWIFT_NAME(createMergeRobertson());
  1051. //
  1052. // void cv::decolor(Mat src, Mat& grayscale, Mat& color_boost)
  1053. //
  1054. /**
  1055. * Transforms a color image to a grayscale image. It is a basic tool in digital printing, stylized
  1056. * black-and-white photograph rendering, and in many single channel image processing applications
  1057. * CITE: CL12 .
  1058. *
  1059. * @param src Input 8-bit 3-channel image.
  1060. * @param grayscale Output 8-bit 1-channel image.
  1061. * @param color_boost Output 8-bit 3-channel image.
  1062. *
  1063. * This function is to be applied on color images.
  1064. */
  1065. + (void)decolor:(Mat*)src grayscale:(Mat*)grayscale color_boost:(Mat*)color_boost NS_SWIFT_NAME(decolor(src:grayscale:color_boost:));
  1066. //
  1067. // void cv::seamlessClone(Mat src, Mat dst, Mat mask, Point p, Mat& blend, int flags)
  1068. //
  1069. /**
  1070. * Image editing tasks concern either global changes (color/intensity corrections, filters,
  1071. * deformations) or local changes concerned to a selection. Here we are interested in achieving local
  1072. * changes, ones that are restricted to a region manually selected (ROI), in a seamless and effortless
  1073. * manner. The extent of the changes ranges from slight distortions to complete replacement by novel
  1074. * content CITE: PM03 .
  1075. *
  1076. * @param src Input 8-bit 3-channel image.
  1077. * @param dst Input 8-bit 3-channel image.
  1078. * @param mask Input 8-bit 1 or 3-channel image.
  1079. * @param p Point in dst image where object is placed.
  1080. * @param blend Output image with the same size and type as dst.
  1081. * @param flags Cloning method that could be cv::NORMAL_CLONE, cv::MIXED_CLONE or cv::MONOCHROME_TRANSFER
  1082. */
  1083. + (void)seamlessClone:(Mat*)src dst:(Mat*)dst mask:(Mat*)mask p:(Point2i*)p blend:(Mat*)blend flags:(int)flags NS_SWIFT_NAME(seamlessClone(src:dst:mask:p:blend:flags:));
  1084. //
  1085. // void cv::colorChange(Mat src, Mat mask, Mat& dst, float red_mul = 1.0f, float green_mul = 1.0f, float blue_mul = 1.0f)
  1086. //
  1087. /**
  1088. * Given an original color image, two differently colored versions of this image can be mixed
  1089. * seamlessly.
  1090. *
  1091. * @param src Input 8-bit 3-channel image.
  1092. * @param mask Input 8-bit 1 or 3-channel image.
  1093. * @param dst Output image with the same size and type as src .
  1094. * @param red_mul R-channel multiply factor.
  1095. * @param green_mul G-channel multiply factor.
  1096. * @param blue_mul B-channel multiply factor.
  1097. *
  1098. * Multiplication factor is between .5 to 2.5.
  1099. */
  1100. + (void)colorChange:(Mat*)src mask:(Mat*)mask dst:(Mat*)dst red_mul:(float)red_mul green_mul:(float)green_mul blue_mul:(float)blue_mul NS_SWIFT_NAME(colorChange(src:mask:dst:red_mul:green_mul:blue_mul:));
  1101. /**
  1102. * Given an original color image, two differently colored versions of this image can be mixed
  1103. * seamlessly.
  1104. *
  1105. * @param src Input 8-bit 3-channel image.
  1106. * @param mask Input 8-bit 1 or 3-channel image.
  1107. * @param dst Output image with the same size and type as src .
  1108. * @param red_mul R-channel multiply factor.
  1109. * @param green_mul G-channel multiply factor.
  1110. *
  1111. * Multiplication factor is between .5 to 2.5.
  1112. */
  1113. + (void)colorChange:(Mat*)src mask:(Mat*)mask dst:(Mat*)dst red_mul:(float)red_mul green_mul:(float)green_mul NS_SWIFT_NAME(colorChange(src:mask:dst:red_mul:green_mul:));
  1114. /**
  1115. * Given an original color image, two differently colored versions of this image can be mixed
  1116. * seamlessly.
  1117. *
  1118. * @param src Input 8-bit 3-channel image.
  1119. * @param mask Input 8-bit 1 or 3-channel image.
  1120. * @param dst Output image with the same size and type as src .
  1121. * @param red_mul R-channel multiply factor.
  1122. *
  1123. * Multiplication factor is between .5 to 2.5.
  1124. */
  1125. + (void)colorChange:(Mat*)src mask:(Mat*)mask dst:(Mat*)dst red_mul:(float)red_mul NS_SWIFT_NAME(colorChange(src:mask:dst:red_mul:));
  1126. /**
  1127. * Given an original color image, two differently colored versions of this image can be mixed
  1128. * seamlessly.
  1129. *
  1130. * @param src Input 8-bit 3-channel image.
  1131. * @param mask Input 8-bit 1 or 3-channel image.
  1132. * @param dst Output image with the same size and type as src .
  1133. *
  1134. * Multiplication factor is between .5 to 2.5.
  1135. */
  1136. + (void)colorChange:(Mat*)src mask:(Mat*)mask dst:(Mat*)dst NS_SWIFT_NAME(colorChange(src:mask:dst:));
  1137. //
  1138. // void cv::illuminationChange(Mat src, Mat mask, Mat& dst, float alpha = 0.2f, float beta = 0.4f)
  1139. //
  1140. /**
  1141. * Applying an appropriate non-linear transformation to the gradient field inside the selection and
  1142. * then integrating back with a Poisson solver, modifies locally the apparent illumination of an image.
  1143. *
  1144. * @param src Input 8-bit 3-channel image.
  1145. * @param mask Input 8-bit 1 or 3-channel image.
  1146. * @param dst Output image with the same size and type as src.
  1147. * @param alpha Value ranges between 0-2.
  1148. * @param beta Value ranges between 0-2.
  1149. *
  1150. * This is useful to highlight under-exposed foreground objects or to reduce specular reflections.
  1151. */
  1152. + (void)illuminationChange:(Mat*)src mask:(Mat*)mask dst:(Mat*)dst alpha:(float)alpha beta:(float)beta NS_SWIFT_NAME(illuminationChange(src:mask:dst:alpha:beta:));
  1153. /**
  1154. * Applying an appropriate non-linear transformation to the gradient field inside the selection and
  1155. * then integrating back with a Poisson solver, modifies locally the apparent illumination of an image.
  1156. *
  1157. * @param src Input 8-bit 3-channel image.
  1158. * @param mask Input 8-bit 1 or 3-channel image.
  1159. * @param dst Output image with the same size and type as src.
  1160. * @param alpha Value ranges between 0-2.
  1161. *
  1162. * This is useful to highlight under-exposed foreground objects or to reduce specular reflections.
  1163. */
  1164. + (void)illuminationChange:(Mat*)src mask:(Mat*)mask dst:(Mat*)dst alpha:(float)alpha NS_SWIFT_NAME(illuminationChange(src:mask:dst:alpha:));
  1165. /**
  1166. * Applying an appropriate non-linear transformation to the gradient field inside the selection and
  1167. * then integrating back with a Poisson solver, modifies locally the apparent illumination of an image.
  1168. *
  1169. * @param src Input 8-bit 3-channel image.
  1170. * @param mask Input 8-bit 1 or 3-channel image.
  1171. * @param dst Output image with the same size and type as src.
  1172. *
  1173. * This is useful to highlight under-exposed foreground objects or to reduce specular reflections.
  1174. */
  1175. + (void)illuminationChange:(Mat*)src mask:(Mat*)mask dst:(Mat*)dst NS_SWIFT_NAME(illuminationChange(src:mask:dst:));
  1176. //
  1177. // void cv::textureFlattening(Mat src, Mat mask, Mat& dst, float low_threshold = 30, float high_threshold = 45, int kernel_size = 3)
  1178. //
  1179. /**
  1180. * By retaining only the gradients at edge locations, before integrating with the Poisson solver, one
  1181. * washes out the texture of the selected region, giving its contents a flat aspect. Here Canny Edge %Detector is used.
  1182. *
  1183. * @param src Input 8-bit 3-channel image.
  1184. * @param mask Input 8-bit 1 or 3-channel image.
  1185. * @param dst Output image with the same size and type as src.
  1186. * @param low_threshold %Range from 0 to 100.
  1187. * @param high_threshold Value \> 100.
  1188. * @param kernel_size The size of the Sobel kernel to be used.
  1189. *
  1190. * NOTE:
  1191. * The algorithm assumes that the color of the source image is close to that of the destination. This
  1192. * assumption means that when the colors don't match, the source image color gets tinted toward the
  1193. * color of the destination image.
  1194. */
  1195. + (void)textureFlattening:(Mat*)src mask:(Mat*)mask dst:(Mat*)dst low_threshold:(float)low_threshold high_threshold:(float)high_threshold kernel_size:(int)kernel_size NS_SWIFT_NAME(textureFlattening(src:mask:dst:low_threshold:high_threshold:kernel_size:));
  1196. /**
  1197. * By retaining only the gradients at edge locations, before integrating with the Poisson solver, one
  1198. * washes out the texture of the selected region, giving its contents a flat aspect. Here Canny Edge %Detector is used.
  1199. *
  1200. * @param src Input 8-bit 3-channel image.
  1201. * @param mask Input 8-bit 1 or 3-channel image.
  1202. * @param dst Output image with the same size and type as src.
  1203. * @param low_threshold %Range from 0 to 100.
  1204. * @param high_threshold Value \> 100.
  1205. *
  1206. * NOTE:
  1207. * The algorithm assumes that the color of the source image is close to that of the destination. This
  1208. * assumption means that when the colors don't match, the source image color gets tinted toward the
  1209. * color of the destination image.
  1210. */
  1211. + (void)textureFlattening:(Mat*)src mask:(Mat*)mask dst:(Mat*)dst low_threshold:(float)low_threshold high_threshold:(float)high_threshold NS_SWIFT_NAME(textureFlattening(src:mask:dst:low_threshold:high_threshold:));
  1212. /**
  1213. * By retaining only the gradients at edge locations, before integrating with the Poisson solver, one
  1214. * washes out the texture of the selected region, giving its contents a flat aspect. Here Canny Edge %Detector is used.
  1215. *
  1216. * @param src Input 8-bit 3-channel image.
  1217. * @param mask Input 8-bit 1 or 3-channel image.
  1218. * @param dst Output image with the same size and type as src.
  1219. * @param low_threshold %Range from 0 to 100.
  1220. *
  1221. * NOTE:
  1222. * The algorithm assumes that the color of the source image is close to that of the destination. This
  1223. * assumption means that when the colors don't match, the source image color gets tinted toward the
  1224. * color of the destination image.
  1225. */
  1226. + (void)textureFlattening:(Mat*)src mask:(Mat*)mask dst:(Mat*)dst low_threshold:(float)low_threshold NS_SWIFT_NAME(textureFlattening(src:mask:dst:low_threshold:));
  1227. /**
  1228. * By retaining only the gradients at edge locations, before integrating with the Poisson solver, one
  1229. * washes out the texture of the selected region, giving its contents a flat aspect. Here Canny Edge %Detector is used.
  1230. *
  1231. * @param src Input 8-bit 3-channel image.
  1232. * @param mask Input 8-bit 1 or 3-channel image.
  1233. * @param dst Output image with the same size and type as src.
  1234. *
  1235. * NOTE:
  1236. * The algorithm assumes that the color of the source image is close to that of the destination. This
  1237. * assumption means that when the colors don't match, the source image color gets tinted toward the
  1238. * color of the destination image.
  1239. */
  1240. + (void)textureFlattening:(Mat*)src mask:(Mat*)mask dst:(Mat*)dst NS_SWIFT_NAME(textureFlattening(src:mask:dst:));
  1241. //
  1242. // void cv::edgePreservingFilter(Mat src, Mat& dst, int flags = 1, float sigma_s = 60, float sigma_r = 0.4f)
  1243. //
  1244. /**
  1245. * Filtering is the fundamental operation in image and video processing. Edge-preserving smoothing
  1246. * filters are used in many different applications CITE: EM11 .
  1247. *
  1248. * @param src Input 8-bit 3-channel image.
  1249. * @param dst Output 8-bit 3-channel image.
  1250. * @param flags Edge preserving filters: cv::RECURS_FILTER or cv::NORMCONV_FILTER
  1251. * @param sigma_s %Range between 0 to 200.
  1252. * @param sigma_r %Range between 0 to 1.
  1253. */
  1254. + (void)edgePreservingFilter:(Mat*)src dst:(Mat*)dst flags:(int)flags sigma_s:(float)sigma_s sigma_r:(float)sigma_r NS_SWIFT_NAME(edgePreservingFilter(src:dst:flags:sigma_s:sigma_r:));
  1255. /**
  1256. * Filtering is the fundamental operation in image and video processing. Edge-preserving smoothing
  1257. * filters are used in many different applications CITE: EM11 .
  1258. *
  1259. * @param src Input 8-bit 3-channel image.
  1260. * @param dst Output 8-bit 3-channel image.
  1261. * @param flags Edge preserving filters: cv::RECURS_FILTER or cv::NORMCONV_FILTER
  1262. * @param sigma_s %Range between 0 to 200.
  1263. */
  1264. + (void)edgePreservingFilter:(Mat*)src dst:(Mat*)dst flags:(int)flags sigma_s:(float)sigma_s NS_SWIFT_NAME(edgePreservingFilter(src:dst:flags:sigma_s:));
  1265. /**
  1266. * Filtering is the fundamental operation in image and video processing. Edge-preserving smoothing
  1267. * filters are used in many different applications CITE: EM11 .
  1268. *
  1269. * @param src Input 8-bit 3-channel image.
  1270. * @param dst Output 8-bit 3-channel image.
  1271. * @param flags Edge preserving filters: cv::RECURS_FILTER or cv::NORMCONV_FILTER
  1272. */
  1273. + (void)edgePreservingFilter:(Mat*)src dst:(Mat*)dst flags:(int)flags NS_SWIFT_NAME(edgePreservingFilter(src:dst:flags:));
  1274. /**
  1275. * Filtering is the fundamental operation in image and video processing. Edge-preserving smoothing
  1276. * filters are used in many different applications CITE: EM11 .
  1277. *
  1278. * @param src Input 8-bit 3-channel image.
  1279. * @param dst Output 8-bit 3-channel image.
  1280. */
  1281. + (void)edgePreservingFilter:(Mat*)src dst:(Mat*)dst NS_SWIFT_NAME(edgePreservingFilter(src:dst:));
  1282. //
  1283. // void cv::detailEnhance(Mat src, Mat& dst, float sigma_s = 10, float sigma_r = 0.15f)
  1284. //
  1285. /**
  1286. * This filter enhances the details of a particular image.
  1287. *
  1288. * @param src Input 8-bit 3-channel image.
  1289. * @param dst Output image with the same size and type as src.
  1290. * @param sigma_s %Range between 0 to 200.
  1291. * @param sigma_r %Range between 0 to 1.
  1292. */
  1293. + (void)detailEnhance:(Mat*)src dst:(Mat*)dst sigma_s:(float)sigma_s sigma_r:(float)sigma_r NS_SWIFT_NAME(detailEnhance(src:dst:sigma_s:sigma_r:));
  1294. /**
  1295. * This filter enhances the details of a particular image.
  1296. *
  1297. * @param src Input 8-bit 3-channel image.
  1298. * @param dst Output image with the same size and type as src.
  1299. * @param sigma_s %Range between 0 to 200.
  1300. */
  1301. + (void)detailEnhance:(Mat*)src dst:(Mat*)dst sigma_s:(float)sigma_s NS_SWIFT_NAME(detailEnhance(src:dst:sigma_s:));
  1302. /**
  1303. * This filter enhances the details of a particular image.
  1304. *
  1305. * @param src Input 8-bit 3-channel image.
  1306. * @param dst Output image with the same size and type as src.
  1307. */
  1308. + (void)detailEnhance:(Mat*)src dst:(Mat*)dst NS_SWIFT_NAME(detailEnhance(src:dst:));
  1309. //
  1310. // void cv::pencilSketch(Mat src, Mat& dst1, Mat& dst2, float sigma_s = 60, float sigma_r = 0.07f, float shade_factor = 0.02f)
  1311. //
  1312. /**
  1313. * Pencil-like non-photorealistic line drawing
  1314. *
  1315. * @param src Input 8-bit 3-channel image.
  1316. * @param dst1 Output 8-bit 1-channel image.
  1317. * @param dst2 Output image with the same size and type as src.
  1318. * @param sigma_s %Range between 0 to 200.
  1319. * @param sigma_r %Range between 0 to 1.
  1320. * @param shade_factor %Range between 0 to 0.1.
  1321. */
  1322. + (void)pencilSketch:(Mat*)src dst1:(Mat*)dst1 dst2:(Mat*)dst2 sigma_s:(float)sigma_s sigma_r:(float)sigma_r shade_factor:(float)shade_factor NS_SWIFT_NAME(pencilSketch(src:dst1:dst2:sigma_s:sigma_r:shade_factor:));
  1323. /**
  1324. * Pencil-like non-photorealistic line drawing
  1325. *
  1326. * @param src Input 8-bit 3-channel image.
  1327. * @param dst1 Output 8-bit 1-channel image.
  1328. * @param dst2 Output image with the same size and type as src.
  1329. * @param sigma_s %Range between 0 to 200.
  1330. * @param sigma_r %Range between 0 to 1.
  1331. */
  1332. + (void)pencilSketch:(Mat*)src dst1:(Mat*)dst1 dst2:(Mat*)dst2 sigma_s:(float)sigma_s sigma_r:(float)sigma_r NS_SWIFT_NAME(pencilSketch(src:dst1:dst2:sigma_s:sigma_r:));
  1333. /**
  1334. * Pencil-like non-photorealistic line drawing
  1335. *
  1336. * @param src Input 8-bit 3-channel image.
  1337. * @param dst1 Output 8-bit 1-channel image.
  1338. * @param dst2 Output image with the same size and type as src.
  1339. * @param sigma_s %Range between 0 to 200.
  1340. */
  1341. + (void)pencilSketch:(Mat*)src dst1:(Mat*)dst1 dst2:(Mat*)dst2 sigma_s:(float)sigma_s NS_SWIFT_NAME(pencilSketch(src:dst1:dst2:sigma_s:));
  1342. /**
  1343. * Pencil-like non-photorealistic line drawing
  1344. *
  1345. * @param src Input 8-bit 3-channel image.
  1346. * @param dst1 Output 8-bit 1-channel image.
  1347. * @param dst2 Output image with the same size and type as src.
  1348. */
  1349. + (void)pencilSketch:(Mat*)src dst1:(Mat*)dst1 dst2:(Mat*)dst2 NS_SWIFT_NAME(pencilSketch(src:dst1:dst2:));
  1350. //
  1351. // void cv::stylization(Mat src, Mat& dst, float sigma_s = 60, float sigma_r = 0.45f)
  1352. //
  1353. /**
  1354. * Stylization aims to produce digital imagery with a wide variety of effects not focused on
  1355. * photorealism. Edge-aware filters are ideal for stylization, as they can abstract regions of low
  1356. * contrast while preserving, or enhancing, high-contrast features.
  1357. *
  1358. * @param src Input 8-bit 3-channel image.
  1359. * @param dst Output image with the same size and type as src.
  1360. * @param sigma_s %Range between 0 to 200.
  1361. * @param sigma_r %Range between 0 to 1.
  1362. */
  1363. + (void)stylization:(Mat*)src dst:(Mat*)dst sigma_s:(float)sigma_s sigma_r:(float)sigma_r NS_SWIFT_NAME(stylization(src:dst:sigma_s:sigma_r:));
  1364. /**
  1365. * Stylization aims to produce digital imagery with a wide variety of effects not focused on
  1366. * photorealism. Edge-aware filters are ideal for stylization, as they can abstract regions of low
  1367. * contrast while preserving, or enhancing, high-contrast features.
  1368. *
  1369. * @param src Input 8-bit 3-channel image.
  1370. * @param dst Output image with the same size and type as src.
  1371. * @param sigma_s %Range between 0 to 200.
  1372. */
  1373. + (void)stylization:(Mat*)src dst:(Mat*)dst sigma_s:(float)sigma_s NS_SWIFT_NAME(stylization(src:dst:sigma_s:));
  1374. /**
  1375. * Stylization aims to produce digital imagery with a wide variety of effects not focused on
  1376. * photorealism. Edge-aware filters are ideal for stylization, as they can abstract regions of low
  1377. * contrast while preserving, or enhancing, high-contrast features.
  1378. *
  1379. * @param src Input 8-bit 3-channel image.
  1380. * @param dst Output image with the same size and type as src.
  1381. */
  1382. + (void)stylization:(Mat*)src dst:(Mat*)dst NS_SWIFT_NAME(stylization(src:dst:));
  1383. @end
  1384. NS_ASSUME_NONNULL_END