ruby-iup 0.0.2 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (478) hide show
  1. data/CHANGES +3 -0
  2. data/MANIFEST +8 -0
  3. data/MIT-LICENSE +18 -0
  4. data/README +12 -0
  5. data/Rakefile +68 -80
  6. data/doc/build_install.txt +9 -12
  7. data/examples/ctrl/cbox.rb +14 -15
  8. data/examples/ctrl/checkboard.rb +1 -1
  9. data/examples/ctrl/example1.rb +53 -53
  10. data/examples/ctrl/example2.rb +39 -39
  11. data/examples/ctrl/iupcolorbar.rb +95 -95
  12. data/examples/ctrl/iupcolorbrowser.rb +45 -45
  13. data/examples/ctrl/iupdial.rb +117 -117
  14. data/examples/ctrl/iupgetcolor.rb +7 -7
  15. data/examples/ctrl/iupgetparam.rb +62 -62
  16. data/examples/ctrl/iupglcanvas.rb +172 -172
  17. data/examples/ctrl/iupmask.rb +1 -3
  18. data/examples/ctrl/iupmatrix.rb +39 -39
  19. data/examples/ctrl/iupplot2.rb +2 -1
  20. data/examples/ctrl/iuptabs.rb +22 -22
  21. data/examples/ctrl/iuptree.rb +190 -190
  22. data/examples/ctrl/iupval.rb +71 -71
  23. data/examples/ctrl/numbering.rb +46 -46
  24. data/examples/ctrl/sample.rb +166 -166
  25. data/examples/dlg/iupfiledlg.rb +19 -19
  26. data/examples/dlg/iupgetfile.rb +19 -19
  27. data/examples/dlg/iuplistdialog.rb +26 -26
  28. data/examples/dlg/iupmessage.rb +5 -5
  29. data/examples/dlg/iupscanf.rb +17 -17
  30. data/examples/elem/iupdialog2.rb +25 -25
  31. data/examples/elem/iupfill.rb +51 -51
  32. data/examples/elem/iupframe.rb +25 -25
  33. data/examples/elem/iuphbox.rb +68 -68
  34. data/examples/elem/iupimage.rb +113 -113
  35. data/examples/elem/iupitem.rb +60 -60
  36. data/examples/elem/iuplabel.rb +57 -57
  37. data/examples/elem/iuplist.rb +41 -41
  38. data/examples/elem/iuplist2.rb +125 -125
  39. data/examples/elem/iupmenu.rb +32 -32
  40. data/examples/elem/iupmultiline.rb +24 -24
  41. data/examples/elem/iupmultiline2.rb +156 -156
  42. data/examples/elem/iupradio.rb +32 -32
  43. data/examples/elem/iupseparator.rb +81 -81
  44. data/examples/elem/iupsubmenu.rb +85 -85
  45. data/examples/elem/iuptext.rb +61 -61
  46. data/examples/elem/iuptimer.rb +36 -36
  47. data/examples/elem/iuptoggle.rb +110 -110
  48. data/examples/elem/iupvbox.rb +87 -87
  49. data/examples/elem/iupzbox.rb +60 -60
  50. data/examples/elem/mdisample.rb +377 -376
  51. data/examples/elem/scrollbar.rb +66 -66
  52. data/examples/elem/tray.rb +90 -90
  53. data/examples/func/iupgetattribute.rb +32 -32
  54. data/examples/func/iupidle.rb +48 -48
  55. data/ext/extconf.rb +62 -27
  56. data/ext/iup-linux/include/cd.h +9 -5
  57. data/ext/iup-linux/include/cd_private.h +13 -6
  58. data/ext/iup-linux/include/cdsvg.h +22 -0
  59. data/ext/iup-linux/include/im.h +287 -282
  60. data/ext/iup-linux/include/im_attrib.h +120 -116
  61. data/ext/iup-linux/include/im_attrib_flat.h +39 -39
  62. data/ext/iup-linux/include/im_binfile.h +224 -214
  63. data/ext/iup-linux/include/im_capture.h +365 -365
  64. data/ext/iup-linux/include/im_color.h +465 -465
  65. data/ext/iup-linux/include/im_colorhsi.h +56 -61
  66. data/ext/iup-linux/include/im_complex.h +180 -160
  67. data/ext/iup-linux/include/im_convert.h +142 -127
  68. data/ext/iup-linux/include/im_counter.h +69 -69
  69. data/ext/iup-linux/include/im_dib.h +195 -195
  70. data/ext/iup-linux/include/im_file.h +115 -111
  71. data/ext/iup-linux/include/im_format.h +97 -79
  72. data/ext/iup-linux/include/im_format_all.h +575 -576
  73. data/ext/iup-linux/include/im_format_avi.h +88 -87
  74. data/ext/iup-linux/include/im_format_ecw.h +93 -93
  75. data/ext/iup-linux/include/im_format_jp2.h +79 -78
  76. data/ext/iup-linux/include/im_format_raw.h +74 -64
  77. data/ext/iup-linux/include/im_format_wmv.h +101 -100
  78. data/ext/iup-linux/include/im_image.h +425 -403
  79. data/ext/iup-linux/include/im_kernel.h +315 -315
  80. data/ext/iup-linux/include/im_lib.h +191 -191
  81. data/ext/iup-linux/include/im_math.h +368 -368
  82. data/ext/iup-linux/include/im_math_op.h +214 -219
  83. data/ext/iup-linux/include/im_palette.h +172 -172
  84. data/ext/iup-linux/include/im_plus.h +73 -73
  85. data/ext/iup-linux/include/im_process.h +36 -35
  86. data/ext/iup-linux/include/im_process_ana.h +222 -221
  87. data/ext/iup-linux/include/im_process_glo.h +170 -170
  88. data/ext/iup-linux/include/im_process_loc.h +608 -577
  89. data/ext/iup-linux/include/im_process_pon.h +734 -712
  90. data/ext/iup-linux/include/im_raw.h +34 -34
  91. data/ext/iup-linux/include/im_util.h +277 -277
  92. data/ext/iup-linux/include/imlua.h +75 -83
  93. data/ext/iup-linux/include/iup.h +86 -40
  94. data/ext/iup-linux/include/iupcb.h +1 -25
  95. data/ext/iup-linux/include/iupcbox.h +1 -0
  96. data/ext/iup-linux/include/iupcbs.h +1 -1
  97. data/ext/iup-linux/include/iupcells.h +1 -130
  98. data/ext/iup-linux/include/iupcolorbar.h +1 -126
  99. data/ext/iup-linux/include/iupcontrols.h +26 -16
  100. data/ext/iup-linux/include/iupdef.h +205 -0
  101. data/ext/iup-linux/include/iupdial.h +1 -63
  102. data/ext/iup-linux/include/iupgauge.h +1 -57
  103. data/ext/iup-linux/include/iupgc.h +1 -0
  104. data/ext/iup-linux/include/iupgetparam.h +1 -27
  105. data/ext/iup-linux/include/iupgl.h +2 -7
  106. data/ext/iup-linux/include/iupim.h +7 -1
  107. data/ext/iup-linux/include/iupkey.h +4 -4
  108. data/ext/iup-linux/include/iupmask.h +2 -1
  109. data/ext/iup-linux/include/iupmatrix.h +1 -63
  110. data/ext/iup-linux/include/iupsbox.h +1 -0
  111. data/ext/iup-linux/include/iupspin.h +1 -21
  112. data/ext/iup-linux/include/iuptabs.h +1 -75
  113. data/ext/iup-linux/include/iuptree.h +1 -93
  114. data/ext/iup-linux/include/iupval.h +1 -46
  115. data/ext/iup-linux/include/old_im.h +59 -59
  116. data/ext/iup-linux/include/wd.h +5 -0
  117. data/ext/iup-linux/libcd.a +0 -0
  118. data/ext/iup-linux/libcdcontextplus.a +0 -0
  119. data/ext/iup-linux/libcdgdk.a +0 -0
  120. data/ext/iup-linux/libcdpdf.a +0 -0
  121. data/ext/iup-linux/libfreetype.a +0 -0
  122. data/ext/iup-linux/libim.a +0 -0
  123. data/ext/iup-linux/libim_fftw.a +0 -0
  124. data/ext/iup-linux/libim_jp2.a +0 -0
  125. data/ext/iup-linux/libim_process.a +0 -0
  126. data/ext/iup-linux/libiup.a +0 -0
  127. data/ext/iup-linux/libiup_pplot.a +0 -0
  128. data/ext/iup-linux/libiupcd.a +0 -0
  129. data/ext/iup-linux/libiupcontrols.a +0 -0
  130. data/ext/iup-linux/libiupgl.a +0 -0
  131. data/ext/iup-linux/libiupim.a +0 -0
  132. data/ext/iup-linux/libiupimglib.a +0 -0
  133. data/ext/iup-linux/libiupmot.a +0 -0
  134. data/ext/iup-linux/libpdflib.a +0 -0
  135. data/ext/{iup-win32 → iup-mingw32}/include/cd.h +9 -5
  136. data/ext/{iup-win32 → iup-mingw32}/include/cd_canvas.hpp +0 -0
  137. data/ext/{iup-win32 → iup-mingw32}/include/cd_old.h +0 -0
  138. data/ext/{iup-win32 → iup-mingw32}/include/cd_private.h +13 -6
  139. data/ext/{iup-win32 → iup-mingw32}/include/cdcgm.h +0 -0
  140. data/ext/{iup-win32 → iup-mingw32}/include/cdclipbd.h +0 -0
  141. data/ext/{iup-win32 → iup-mingw32}/include/cddbuf.h +0 -0
  142. data/ext/{iup-win32 → iup-mingw32}/include/cddebug.h +0 -0
  143. data/ext/{iup-win32 → iup-mingw32}/include/cddgn.h +0 -0
  144. data/ext/{iup-win32 → iup-mingw32}/include/cddxf.h +0 -0
  145. data/ext/{iup-win32 → iup-mingw32}/include/cdemf.h +0 -0
  146. data/ext/{iup-win32 → iup-mingw32}/include/cdgdiplus.h +0 -0
  147. data/ext/{iup-win32 → iup-mingw32}/include/cdimage.h +0 -0
  148. data/ext/{iup-win32 → iup-mingw32}/include/cdirgb.h +0 -0
  149. data/ext/{iup-win32 → iup-mingw32}/include/cdiup.h +0 -0
  150. data/ext/{iup-win32 → iup-mingw32}/include/cdlua.h +0 -0
  151. data/ext/{iup-win32 → iup-mingw32}/include/cdlua3_private.h +0 -0
  152. data/ext/{iup-win32 → iup-mingw32}/include/cdlua5_private.h +0 -0
  153. data/ext/{iup-win32 → iup-mingw32}/include/cdluaim.h +0 -0
  154. data/ext/{iup-win32 → iup-mingw32}/include/cdluaiup.h +0 -0
  155. data/ext/{iup-win32 → iup-mingw32}/include/cdluapdf.h +0 -0
  156. data/ext/{iup-win32 → iup-mingw32}/include/cdmf.h +0 -0
  157. data/ext/{iup-win32 → iup-mingw32}/include/cdmf_private.h +0 -0
  158. data/ext/{iup-win32 → iup-mingw32}/include/cdnative.h +0 -0
  159. data/ext/{iup-win32 → iup-mingw32}/include/cdpdf.h +0 -0
  160. data/ext/{iup-win32 → iup-mingw32}/include/cdpicture.h +0 -0
  161. data/ext/{iup-win32 → iup-mingw32}/include/cdprint.h +0 -0
  162. data/ext/{iup-win32 → iup-mingw32}/include/cdps.h +0 -0
  163. data/ext/iup-mingw32/include/cdsvg.h +22 -0
  164. data/ext/{iup-win32 → iup-mingw32}/include/cdwmf.h +0 -0
  165. data/ext/iup-mingw32/include/im.h +287 -0
  166. data/ext/iup-mingw32/include/im_attrib.h +120 -0
  167. data/ext/iup-mingw32/include/im_attrib_flat.h +39 -0
  168. data/ext/iup-mingw32/include/im_binfile.h +224 -0
  169. data/ext/iup-mingw32/include/im_capture.h +365 -0
  170. data/ext/iup-mingw32/include/im_color.h +465 -0
  171. data/ext/iup-mingw32/include/im_colorhsi.h +56 -0
  172. data/ext/iup-mingw32/include/im_complex.h +180 -0
  173. data/ext/iup-mingw32/include/im_convert.h +142 -0
  174. data/ext/iup-mingw32/include/im_counter.h +69 -0
  175. data/ext/iup-mingw32/include/im_dib.h +195 -0
  176. data/ext/iup-mingw32/include/im_file.h +115 -0
  177. data/ext/iup-mingw32/include/im_format.h +97 -0
  178. data/ext/iup-mingw32/include/im_format_all.h +575 -0
  179. data/ext/iup-mingw32/include/im_format_avi.h +88 -0
  180. data/ext/iup-mingw32/include/im_format_ecw.h +93 -0
  181. data/ext/iup-mingw32/include/im_format_jp2.h +79 -0
  182. data/ext/iup-mingw32/include/im_format_raw.h +74 -0
  183. data/ext/iup-mingw32/include/im_format_wmv.h +101 -0
  184. data/ext/iup-mingw32/include/im_image.h +425 -0
  185. data/ext/iup-mingw32/include/im_kernel.h +315 -0
  186. data/ext/iup-mingw32/include/im_lib.h +191 -0
  187. data/ext/iup-mingw32/include/im_math.h +368 -0
  188. data/ext/iup-mingw32/include/im_math_op.h +214 -0
  189. data/ext/iup-mingw32/include/im_palette.h +172 -0
  190. data/ext/iup-mingw32/include/im_plus.h +73 -0
  191. data/ext/iup-mingw32/include/im_process.h +36 -0
  192. data/ext/iup-mingw32/include/im_process_ana.h +222 -0
  193. data/ext/iup-mingw32/include/im_process_glo.h +170 -0
  194. data/ext/iup-mingw32/include/im_process_loc.h +608 -0
  195. data/ext/iup-mingw32/include/im_process_pon.h +734 -0
  196. data/ext/iup-mingw32/include/im_raw.h +34 -0
  197. data/ext/iup-mingw32/include/im_util.h +277 -0
  198. data/ext/iup-mingw32/include/imlua.h +75 -0
  199. data/ext/{iup-win32 → iup-mingw32}/include/iup.h +86 -40
  200. data/ext/{iup-win32 → iup-mingw32}/include/iup_pplot.h +0 -0
  201. data/ext/iup-mingw32/include/iupcb.h +1 -0
  202. data/ext/iup-mingw32/include/iupcbox.h +1 -0
  203. data/ext/{iup-win32 → iup-mingw32}/include/iupcbs.h +1 -1
  204. data/ext/iup-mingw32/include/iupcells.h +1 -0
  205. data/ext/iup-mingw32/include/iupcolorbar.h +1 -0
  206. data/ext/iup-mingw32/include/iupcontrols.h +46 -0
  207. data/ext/{iup-win32 → iup-mingw32}/include/iupdef.h +205 -0
  208. data/ext/iup-mingw32/include/iupdial.h +1 -0
  209. data/ext/iup-mingw32/include/iupgauge.h +1 -0
  210. data/ext/iup-mingw32/include/iupgc.h +1 -0
  211. data/ext/iup-mingw32/include/iupgetparam.h +1 -0
  212. data/ext/{iup-win32 → iup-mingw32}/include/iupgl.h +2 -7
  213. data/ext/{iup-win32 → iup-mingw32}/include/iupim.h +7 -1
  214. data/ext/{iup-win32 → iup-mingw32}/include/iupkey.h +4 -4
  215. data/ext/{iup-win32 → iup-mingw32}/include/iuplua.h +0 -0
  216. data/ext/{iup-win32 → iup-mingw32}/include/iuplua_pplot.h +0 -0
  217. data/ext/{iup-win32 → iup-mingw32}/include/iupluacontrols.h +0 -0
  218. data/ext/{iup-win32 → iup-mingw32}/include/iupluagl.h +0 -0
  219. data/ext/{iup-win32 → iup-mingw32}/include/iupluaim.h +0 -0
  220. data/ext/{iup-win32 → iup-mingw32}/include/iupluaole.h +0 -0
  221. data/ext/{iup-win32 → iup-mingw32}/include/iupmask.h +2 -1
  222. data/ext/iup-mingw32/include/iupmatrix.h +1 -0
  223. data/ext/{iup-win32 → iup-mingw32}/include/iupole.h +0 -0
  224. data/ext/iup-mingw32/include/iupsbox.h +1 -0
  225. data/ext/iup-mingw32/include/iupspin.h +1 -0
  226. data/ext/iup-mingw32/include/iuptabs.h +1 -0
  227. data/ext/iup-mingw32/include/iuptree.h +1 -0
  228. data/ext/iup-mingw32/include/iupval.h +1 -0
  229. data/ext/iup-mingw32/include/old_im.h +59 -0
  230. data/ext/{iup-win32 → iup-mingw32}/include/wd.h +5 -0
  231. data/ext/{iup-win32 → iup-mingw32}/include/wd_old.h +0 -0
  232. data/ext/iup-mingw32/libcd.a +0 -0
  233. data/ext/iup-mingw32/libcdpdf.a +0 -0
  234. data/ext/iup-mingw32/libfreetype6.a +0 -0
  235. data/ext/iup-mingw32/libim.a +0 -0
  236. data/ext/iup-mingw32/libim_avi.a +0 -0
  237. data/ext/iup-mingw32/libim_fftw.a +0 -0
  238. data/ext/iup-mingw32/libim_jp2.a +0 -0
  239. data/ext/iup-mingw32/libim_process.a +0 -0
  240. data/ext/iup-mingw32/libiup.a +0 -0
  241. data/ext/iup-mingw32/libiup_pplot.a +0 -0
  242. data/ext/iup-mingw32/libiupcd.a +0 -0
  243. data/ext/iup-mingw32/libiupcontrols.a +0 -0
  244. data/ext/iup-mingw32/libiupgl.a +0 -0
  245. data/ext/iup-mingw32/libiupim.a +0 -0
  246. data/ext/iup-mingw32/libiupimglib.a +0 -0
  247. data/ext/iup-mingw32/libiupole.a +0 -0
  248. data/ext/iup-mingw32/libpdflib.a +0 -0
  249. data/ext/iup-mswin32/cd.lib +0 -0
  250. data/ext/iup-mswin32/cdcontextplus.lib +0 -0
  251. data/ext/iup-mswin32/cdgdk.lib +0 -0
  252. data/ext/iup-mswin32/cdpdf.lib +0 -0
  253. data/ext/iup-mswin32/freetype6.lib +0 -0
  254. data/ext/iup-mswin32/im.lib +0 -0
  255. data/ext/iup-mswin32/im_avi.lib +0 -0
  256. data/ext/iup-mswin32/im_capture.lib +0 -0
  257. data/ext/iup-mswin32/im_fftw.lib +0 -0
  258. data/ext/iup-mswin32/im_jp2.lib +0 -0
  259. data/ext/iup-mswin32/im_process.lib +0 -0
  260. data/ext/iup-mswin32/im_wmv.lib +0 -0
  261. data/ext/iup-mswin32/include/cd.h +498 -0
  262. data/ext/iup-mswin32/include/cd_canvas.hpp +358 -0
  263. data/ext/iup-mswin32/include/cd_old.h +158 -0
  264. data/ext/iup-mswin32/include/cd_private.h +369 -0
  265. data/ext/iup-mswin32/include/cdcgm.h +34 -0
  266. data/ext/iup-mswin32/include/cdclipbd.h +22 -0
  267. data/ext/iup-mswin32/include/cddbuf.h +23 -0
  268. data/ext/iup-mswin32/include/cddebug.h +24 -0
  269. data/ext/iup-mswin32/include/cddgn.h +23 -0
  270. data/ext/iup-mswin32/include/cddxf.h +22 -0
  271. data/ext/iup-mswin32/include/cdemf.h +22 -0
  272. data/ext/iup-mswin32/include/cdgdiplus.h +29 -0
  273. data/ext/iup-mswin32/include/cdimage.h +23 -0
  274. data/ext/iup-mswin32/include/cdirgb.h +30 -0
  275. data/ext/iup-mswin32/include/cdiup.h +22 -0
  276. data/ext/iup-mswin32/include/cdlua.h +39 -0
  277. data/ext/iup-mswin32/include/cdlua3_private.h +120 -0
  278. data/ext/iup-mswin32/include/cdlua5_private.h +141 -0
  279. data/ext/iup-mswin32/include/cdluaim.h +24 -0
  280. data/ext/iup-mswin32/include/cdluaiup.h +27 -0
  281. data/ext/iup-mswin32/include/cdluapdf.h +27 -0
  282. data/ext/iup-mswin32/include/cdmf.h +24 -0
  283. data/ext/iup-mswin32/include/cdmf_private.h +32 -0
  284. data/ext/iup-mswin32/include/cdnative.h +26 -0
  285. data/ext/iup-mswin32/include/cdpdf.h +38 -0
  286. data/ext/iup-mswin32/include/cdpicture.h +22 -0
  287. data/ext/iup-mswin32/include/cdprint.h +23 -0
  288. data/ext/iup-mswin32/include/cdps.h +37 -0
  289. data/ext/iup-mswin32/include/cdsvg.h +22 -0
  290. data/ext/iup-mswin32/include/cdwmf.h +22 -0
  291. data/ext/iup-mswin32/include/im.h +287 -0
  292. data/ext/iup-mswin32/include/im_attrib.h +120 -0
  293. data/ext/iup-mswin32/include/im_attrib_flat.h +39 -0
  294. data/ext/iup-mswin32/include/im_binfile.h +224 -0
  295. data/ext/iup-mswin32/include/im_capture.h +365 -0
  296. data/ext/iup-mswin32/include/im_color.h +465 -0
  297. data/ext/iup-mswin32/include/im_colorhsi.h +56 -0
  298. data/ext/iup-mswin32/include/im_complex.h +180 -0
  299. data/ext/iup-mswin32/include/im_convert.h +142 -0
  300. data/ext/iup-mswin32/include/im_counter.h +69 -0
  301. data/ext/iup-mswin32/include/im_dib.h +195 -0
  302. data/ext/iup-mswin32/include/im_file.h +115 -0
  303. data/ext/iup-mswin32/include/im_format.h +97 -0
  304. data/ext/iup-mswin32/include/im_format_all.h +575 -0
  305. data/ext/iup-mswin32/include/im_format_avi.h +88 -0
  306. data/ext/iup-mswin32/include/im_format_ecw.h +93 -0
  307. data/ext/iup-mswin32/include/im_format_jp2.h +79 -0
  308. data/ext/iup-mswin32/include/im_format_raw.h +74 -0
  309. data/ext/iup-mswin32/include/im_format_wmv.h +101 -0
  310. data/ext/iup-mswin32/include/im_image.h +425 -0
  311. data/ext/iup-mswin32/include/im_kernel.h +315 -0
  312. data/ext/iup-mswin32/include/im_lib.h +191 -0
  313. data/ext/iup-mswin32/include/im_math.h +368 -0
  314. data/ext/iup-mswin32/include/im_math_op.h +214 -0
  315. data/ext/iup-mswin32/include/im_palette.h +172 -0
  316. data/ext/iup-mswin32/include/im_plus.h +73 -0
  317. data/ext/iup-mswin32/include/im_process.h +36 -0
  318. data/ext/iup-mswin32/include/im_process_ana.h +222 -0
  319. data/ext/iup-mswin32/include/im_process_glo.h +170 -0
  320. data/ext/iup-mswin32/include/im_process_loc.h +608 -0
  321. data/ext/iup-mswin32/include/im_process_pon.h +734 -0
  322. data/ext/iup-mswin32/include/im_raw.h +34 -0
  323. data/ext/iup-mswin32/include/im_util.h +277 -0
  324. data/ext/iup-mswin32/include/imlua.h +75 -0
  325. data/ext/iup-mswin32/include/iup.h +364 -0
  326. data/ext/iup-mswin32/include/iup_pplot.h +40 -0
  327. data/ext/iup-mswin32/include/iupcb.h +1 -0
  328. data/ext/iup-mswin32/include/iupcbox.h +1 -0
  329. data/ext/iup-mswin32/include/iupcbs.h +43 -0
  330. data/ext/iup-mswin32/include/iupcells.h +1 -0
  331. data/ext/iup-mswin32/include/iupcolorbar.h +1 -0
  332. data/ext/iup-mswin32/include/iupcontrols.h +46 -0
  333. data/ext/iup-mswin32/include/iupdef.h +725 -0
  334. data/ext/iup-mswin32/include/iupdial.h +1 -0
  335. data/ext/iup-mswin32/include/iupgauge.h +1 -0
  336. data/ext/iup-mswin32/include/iupgc.h +1 -0
  337. data/ext/iup-mswin32/include/iupgetparam.h +1 -0
  338. data/ext/iup-mswin32/include/iupgl.h +96 -0
  339. data/ext/iup-mswin32/include/iupim.h +27 -0
  340. data/ext/iup-mswin32/include/iupkey.h +457 -0
  341. data/ext/iup-mswin32/include/iuplua.h +41 -0
  342. data/ext/iup-mswin32/include/iuplua_pplot.h +26 -0
  343. data/ext/iup-mswin32/include/iupluacontrols.h +27 -0
  344. data/ext/iup-mswin32/include/iupluagl.h +26 -0
  345. data/ext/iup-mswin32/include/iupluaim.h +26 -0
  346. data/ext/iup-mswin32/include/iupluaole.h +26 -0
  347. data/ext/iup-mswin32/include/iupmask.h +41 -0
  348. data/ext/iup-mswin32/include/iupmatrix.h +1 -0
  349. data/ext/iup-mswin32/include/iupole.h +24 -0
  350. data/ext/iup-mswin32/include/iupsbox.h +1 -0
  351. data/ext/iup-mswin32/include/iupspin.h +1 -0
  352. data/ext/iup-mswin32/include/iuptabs.h +1 -0
  353. data/ext/iup-mswin32/include/iuptree.h +1 -0
  354. data/ext/iup-mswin32/include/iupval.h +1 -0
  355. data/ext/iup-mswin32/include/old_im.h +59 -0
  356. data/ext/iup-mswin32/include/wd.h +83 -0
  357. data/ext/iup-mswin32/include/wd_old.h +85 -0
  358. data/ext/iup-mswin32/iup.lib +0 -0
  359. data/ext/iup-mswin32/iup_pplot.lib +0 -0
  360. data/ext/iup-mswin32/iupcd.lib +0 -0
  361. data/ext/iup-mswin32/iupcontrols.lib +0 -0
  362. data/ext/iup-mswin32/iupgl.lib +0 -0
  363. data/ext/iup-mswin32/iupgtk.lib +0 -0
  364. data/ext/iup-mswin32/iupim.lib +0 -0
  365. data/ext/{iup-win32/iupimglib.dll → iup-mswin32/iupimglib.lib} +0 -0
  366. data/ext/iup-mswin32/iupole.lib +0 -0
  367. data/ext/iup-mswin32/pdflib.lib +0 -0
  368. data/ext/iup.c +6 -37
  369. data/ext/{rb_cd.h → rb_cd.c} +300 -302
  370. data/ext/rb_iup.c +2485 -0
  371. data/ext/rb_iup.h +400 -2475
  372. data/ext/{rb_iup_pplot.h → rb_iup_pplot.c} +21 -22
  373. data/ext/{rb_iupcb.h → rb_iupcb.c} +2 -3
  374. data/ext/{rb_iupcells.h → rb_iupcells.c} +5 -5
  375. data/ext/{rb_iupcolorbar.h → rb_iupcolorbar.c} +2 -3
  376. data/ext/{rb_iupcontrols.h → rb_iupcontrols.c} +1 -1
  377. data/ext/{rb_iupdial.h → rb_iupdial.c} +3 -4
  378. data/ext/{rb_iupgauge.h → rb_iupgauge.c} +2 -3
  379. data/ext/{rb_iupgc.h → rb_iupgc.c} +1 -1
  380. data/ext/{rb_iupgetparam.h → rb_iupgetparam.c} +12 -10
  381. data/ext/{rb_iupgl.h → rb_iupgl.c} +10 -10
  382. data/ext/{rb_iupim.h → rb_iupim.c} +6 -6
  383. data/ext/{rb_iupmatrix.h → rb_iupmatrix.c} +15 -16
  384. data/ext/{rb_iupole.h → rb_iupole.c} +4 -4
  385. data/ext/{rb_iupsbox.h → rb_iupsbox.c} +3 -3
  386. data/ext/{rb_iupspin.h → rb_iupspin.c} +4 -5
  387. data/ext/{rb_iuptabs.h → rb_iuptabs.c} +5 -6
  388. data/ext/{rb_iuptree.h → rb_iuptree.c} +20 -21
  389. data/ext/{rb_iupval.h → rb_iupval.c} +3 -4
  390. data/ruby-iup.gemspec +26 -0
  391. data/test/test_ruby_iup.rb +25 -0
  392. metadata +395 -270
  393. data/ext/iup-linux/include/lauxlib.h +0 -174
  394. data/ext/iup-linux/include/lua.h +0 -388
  395. data/ext/iup-linux/include/lua.hpp +0 -9
  396. data/ext/iup-linux/include/luaconf.h +0 -763
  397. data/ext/iup-linux/include/lualib.h +0 -53
  398. data/ext/iup-linux/libcd.so +0 -0
  399. data/ext/iup-linux/libcdcontextplus.so +0 -0
  400. data/ext/iup-linux/libcdpdf.so +0 -0
  401. data/ext/iup-linux/libfreetype.so +0 -0
  402. data/ext/iup-linux/libim.so +0 -0
  403. data/ext/iup-linux/libim_fftw.so +0 -0
  404. data/ext/iup-linux/libim_jp2.so +0 -0
  405. data/ext/iup-linux/libim_process.so +0 -0
  406. data/ext/iup-linux/libiup.so +0 -0
  407. data/ext/iup-linux/libiup_pplot.so +0 -0
  408. data/ext/iup-linux/libiupcd.so +0 -0
  409. data/ext/iup-linux/libiupcontrols.so +0 -0
  410. data/ext/iup-linux/libiupgl.so +0 -0
  411. data/ext/iup-linux/libiupim.so +0 -0
  412. data/ext/iup-linux/libiupimglib.so +0 -0
  413. data/ext/iup-linux/libiupmot.so +0 -0
  414. data/ext/iup-linux/libpdflib.so +0 -0
  415. data/ext/iup-win32/cd.dll +0 -0
  416. data/ext/iup-win32/cd.lib +0 -0
  417. data/ext/iup-win32/cdcontextplus.dll +0 -0
  418. data/ext/iup-win32/cdcontextplus.lib +0 -0
  419. data/ext/iup-win32/cdpdf.dll +0 -0
  420. data/ext/iup-win32/cdpdf.lib +0 -0
  421. data/ext/iup-win32/freetype6.dll +0 -0
  422. data/ext/iup-win32/freetype6.lib +0 -0
  423. data/ext/iup-win32/im.dll +0 -0
  424. data/ext/iup-win32/im.lib +0 -0
  425. data/ext/iup-win32/im_avi.dll +0 -0
  426. data/ext/iup-win32/im_avi.lib +0 -0
  427. data/ext/iup-win32/im_capture.dll +0 -0
  428. data/ext/iup-win32/im_capture.lib +0 -0
  429. data/ext/iup-win32/im_ecw.dll +0 -0
  430. data/ext/iup-win32/im_fftw.dll +0 -0
  431. data/ext/iup-win32/im_fftw.lib +0 -0
  432. data/ext/iup-win32/im_jp2.dll +0 -0
  433. data/ext/iup-win32/im_jp2.lib +0 -0
  434. data/ext/iup-win32/im_process.dll +0 -0
  435. data/ext/iup-win32/im_process.lib +0 -0
  436. data/ext/iup-win32/im_wmv.dll +0 -0
  437. data/ext/iup-win32/im_wmv.lib +0 -0
  438. data/ext/iup-win32/imlua_capture51.dll +0 -0
  439. data/ext/iup-win32/imlua_capture51.lib +0 -0
  440. data/ext/iup-win32/imlua_wmv51.dll +0 -0
  441. data/ext/iup-win32/imlua_wmv51.lib +0 -0
  442. data/ext/iup-win32/include/iupcb.h +0 -25
  443. data/ext/iup-win32/include/iupcells.h +0 -130
  444. data/ext/iup-win32/include/iupcolorbar.h +0 -126
  445. data/ext/iup-win32/include/iupcontrols.h +0 -36
  446. data/ext/iup-win32/include/iupdial.h +0 -63
  447. data/ext/iup-win32/include/iupgauge.h +0 -57
  448. data/ext/iup-win32/include/iupgetparam.h +0 -27
  449. data/ext/iup-win32/include/iupmatrix.h +0 -63
  450. data/ext/iup-win32/include/iupspin.h +0 -21
  451. data/ext/iup-win32/include/iuptabs.h +0 -75
  452. data/ext/iup-win32/include/iuptree.h +0 -93
  453. data/ext/iup-win32/include/iupval.h +0 -46
  454. data/ext/iup-win32/iup.dll +0 -0
  455. data/ext/iup-win32/iup.lib +0 -0
  456. data/ext/iup-win32/iup_pplot.dll +0 -0
  457. data/ext/iup-win32/iup_pplot.lib +0 -0
  458. data/ext/iup-win32/iupcd.dll +0 -0
  459. data/ext/iup-win32/iupcd.lib +0 -0
  460. data/ext/iup-win32/iupcontrols.dll +0 -0
  461. data/ext/iup-win32/iupcontrols.lib +0 -0
  462. data/ext/iup-win32/iupgl.dll +0 -0
  463. data/ext/iup-win32/iupgl.lib +0 -0
  464. data/ext/iup-win32/iupgtk.dll +0 -0
  465. data/ext/iup-win32/iupgtk.lib +0 -0
  466. data/ext/iup-win32/iupim.dll +0 -0
  467. data/ext/iup-win32/iupim.lib +0 -0
  468. data/ext/iup-win32/iupimglib.lib +0 -0
  469. data/ext/iup-win32/iupole.dll +0 -0
  470. data/ext/iup-win32/iupole.lib +0 -0
  471. data/ext/iup-win32/iupstub.lib +0 -0
  472. data/ext/iup-win32/pdflib.dll +0 -0
  473. data/ext/iup-win32/pdflib.lib +0 -0
  474. data/ext/mkrf_conf.rb +0 -72
  475. data/ext/rb_iupcompat.h +0 -237
  476. data/ext/rb_iupdef.h +0 -3
  477. data/ext/rb_iupmask.h +0 -189
  478. data/lib/README +0 -1
@@ -1,712 +1,734 @@
1
- /** \file
2
- * \brief Image Processing - Pontual Operations
3
- *
4
- * See Copyright Notice in im_lib.h
5
- */
6
-
7
- #ifndef __IM_PROCESS_PON_H
8
- #define __IM_PROCESS_PON_H
9
-
10
- #include "im_image.h"
11
-
12
- #if defined(__cplusplus)
13
- extern "C" {
14
- #endif
15
-
16
-
17
-
18
- /** \defgroup arithm Arithmetic Operations
19
- * \par
20
- * Simple math operations for images.
21
- * \par
22
- * See \ref im_process_pon.h
23
- * \ingroup process */
24
-
25
- /** Unary Arithmetic Operations.
26
- * Inverse and log may lead to math exceptions.
27
- * \ingroup arithm */
28
- enum imUnaryOp {
29
- IM_UN_EQL, /**< equal = a */
30
- IM_UN_ABS, /**< abssolute = |a| */
31
- IM_UN_LESS, /**< less = -a */
32
- IM_UN_INC, /**< increment += a */
33
- IM_UN_INV, /**< invert = 1/a (#) */
34
- IM_UN_SQR, /**< square = a*a */
35
- IM_UN_SQRT, /**< square root = a^(1/2) */
36
- IM_UN_LOG, /**< natural logarithm = ln(a) (#) */
37
- IM_UN_EXP, /**< exponential = exp(a) */
38
- IM_UN_SIN, /**< sine = sin(a) */
39
- IM_UN_COS, /**< cosine = cos(a) */
40
- IM_UN_CONJ, /**< complex conjugate = ar - ai*i */
41
- IM_UN_CPXNORM /**< complex normalization by magnitude = a / cpxmag(a) */
42
- };
43
-
44
- /** Apply an arithmetic unary operation. \n
45
- * Can be done in place, images must match size, does not need to match type.
46
- *
47
- * \verbatim im.ProcessUnArithmeticOp(src_image: imImage, dst_image: imImage, op: number) [in Lua 5] \endverbatim
48
- * \verbatim im.ProcessUnArithmeticOpNew(image: imImage, op: number) -> new_image: imImage [in Lua 5] \endverbatim
49
- * \ingroup arithm */
50
- void imProcessUnArithmeticOp(const imImage* src_image, imImage* dst_image, int op);
51
-
52
- /** Binary Arithmetic Operations.
53
- * Inverse and log may lead to math exceptions.
54
- * \ingroup arithm */
55
- enum imBinaryOp {
56
- IM_BIN_ADD, /**< add = a+b */
57
- IM_BIN_SUB, /**< subtract = a-b */
58
- IM_BIN_MUL, /**< multiply = a*b */
59
- IM_BIN_DIV, /**< divide = a/b (#) */
60
- IM_BIN_DIFF, /**< difference = |a-b| */
61
- IM_BIN_POW, /**< power = a^b */
62
- IM_BIN_MIN, /**< minimum = (a < b)? a: b */
63
- IM_BIN_MAX /**< maximum = (a > b)? a: b */
64
- };
65
-
66
- /** Apply a binary arithmetic operation. \n
67
- * Can be done in place, images must match size. \n
68
- * Source images must match type, destiny image can be several types depending on source: \n
69
- * \li byte -> byte, ushort, int, float
70
- * \li ushort -> ushort, int, float
71
- * \li int -> int, float
72
- * \li float -> float
73
- * \li complex -> complex
74
- * One exception is that you can combine complex with float resulting complex.
75
- *
76
- * \verbatim im.ProcessArithmeticOp(src_image1: imImage, src_image2: imImage, dst_image: imImage, op: number) [in Lua 5] \endverbatim
77
- * \verbatim im.ProcessArithmeticOpNew(image1: imImage, image2: imImage, op: number) -> new_image: imImage [in Lua 5] \endverbatim
78
- * The New function will create a new image of the same type of the source images.
79
- * \ingroup arithm */
80
- void imProcessArithmeticOp(const imImage* src_image1, const imImage* src_image2, imImage* dst_image, int op);
81
-
82
- /** Apply a binary arithmetic operation with a constant value. \n
83
- * Can be done in place, images must match size. \n
84
- * Destiny image can be several types depending on source: \n
85
- * \li byte -> byte, ushort, int, float
86
- * \li ushort -> byte, ushort, int, float
87
- * \li int -> byte, ushort, int, float
88
- * \li float -> float
89
- * \li complex -> complex
90
- * The constant value is type casted to an apropriate type before the operation.
91
- *
92
- * \verbatim im.ProcessArithmeticConstOp(src_image: imImage, src_const: number, dst_image: imImage, op: number) [in Lua 5] \endverbatim
93
- * \verbatim im.ProcessArithmeticConstOpNew(image: imImage, src_const: number, op: number) -> new_image: imImage [in Lua 5] \endverbatim
94
- * \ingroup arithm */
95
- void imProcessArithmeticConstOp(const imImage* src_image, float src_const, imImage* dst_image, int op);
96
-
97
- /** Blend two images using an alpha value = [a * alpha + b * (1 - alpha)]. \n
98
- * Can be done in place, images must match size and type. \n
99
- * alpha value must be in the interval [0.0 - 1.0].
100
- *
101
- * \verbatim im.ProcessBlendConst(src_image1: imImage, src_image2: imImage, dst_image: imImage, alpha: number) [in Lua 5] \endverbatim
102
- * \verbatim im.ProcessBlendConstNew(image1: imImage, image2: imImage, alpha: number) -> new_image: imImage [in Lua 5] \endverbatim
103
- * \ingroup arithm */
104
- void imProcessBlendConst(const imImage* src_image1, const imImage* src_image2, imImage* dst_image, float alpha);
105
-
106
- /** Blend two images using an alpha channel = [a * alpha + b * (1 - alpha)]. \n
107
- * Can be done in place, images must match size and type. \n
108
- * alpha_image must have the same data type except for complex images that must be float, and color_space must be IM_GRAY.
109
- * integer alpha values must be:
110
- \verbatim
111
- 0 - 255 IM_BYTE
112
- 0 - 65535 IM_USHORT
113
- 0 - 2147483647 IM_INT
114
- \endverbatim
115
- * that will be normalized to 0 - 1.
116
- * \verbatim im.ProcessBlend(src_image1: imImage, src_image2: imImage, alpha_image: imImage, dst_image: imImage) [in Lua 5] \endverbatim
117
- * \verbatim im.ProcessBlendNew(image1: imImage, image2: imImage, alpha_image: imImage) -> new_image: imImage [in Lua 5] \endverbatim
118
- * \ingroup arithm */
119
- void imProcessBlend(const imImage* src_image1, const imImage* src_image2, const imImage* alpha_image, imImage* dst_image);
120
-
121
- /** Split a complex image into two images with real and imaginary parts \n
122
- * or magnitude and phase parts (polar). \n
123
- * Source image must be IM_CFLOAT, destiny images must be IM_FLOAT.
124
- *
125
- * \verbatim im.ProcessSplitComplex(src_image: imImage, dst_image1: imImage, dst_image2: imImage, do_polar: boolean) [in Lua 5] \endverbatim
126
- * \verbatim im.ProcessSplitComplexNew(image: imImage, do_polar: boolean) -> dst_image1: imImage, dst_image2: imImage [in Lua 5] \endverbatim
127
- * \ingroup arithm */
128
- void imProcessSplitComplex(const imImage* src_image, imImage* dst_image1, imImage* dst_image2, int do_polar);
129
-
130
- /** Merges two images as the real and imaginary parts of a complex image, \n
131
- * or as magnitude and phase parts (polar = 1). \n
132
- * Source images must be IM_FLOAT, destiny image must be IM_CFLOAT.
133
- *
134
- * \verbatim im.ProcessMergeComplex(src_image1: imImage, src_image2: imImage, dst_image: imImage) [in Lua 5] \endverbatim
135
- * \verbatim im.ProcessMergeComplexNew(image1: imImage, image2: imImage) -> new_image: imImage [in Lua 5] \endverbatim
136
- * \ingroup arithm */
137
- void imProcessMergeComplex(const imImage* src_image1, const imImage* src_image2, imImage* dst_image, int polar);
138
-
139
- /** Calculates the mean of multiple images. \n
140
- * Images must match size and type.
141
- *
142
- * \verbatim im.ProcessMultipleMean(src_image_list: table of imImage, dst_image: imImage) [in Lua 5] \endverbatim
143
- * \verbatim im.ProcessMultipleMeanNew(src_image_list: table of imImage) -> new_image: imImage [in Lua 5] \endverbatim
144
- * \ingroup arithm */
145
- void imProcessMultipleMean(const imImage** src_image_list, int src_image_count, imImage* dst_image);
146
-
147
- /** Calculates the standard deviation of multiple images. \n
148
- * Images must match size and type. Use \ref imProcessMultipleMean to calculate the mean_image.
149
- *
150
- * \verbatim im.ProcessMultipleStdDev(src_image_list: table of imImage, mean_image: imImage, dst_image: imImage) [in Lua 5] \endverbatim
151
- * \verbatim im.ProcessMultipleStdDevNew(src_image_list: table of imImage, mean_image: imImage) -> new_image: imImage [in Lua 5] \endverbatim
152
- * \ingroup arithm */
153
- void imProcessMultipleStdDev(const imImage** src_image_list, int src_image_count, const imImage *mean_image, imImage* dst_image);
154
-
155
- /** Calculates the auto-covariance of an image with the mean of a set of images. \n
156
- * Images must match size and type. Returns zero if the counter aborted. \n
157
- * Destiny is IM_FLOAT.
158
- *
159
- * \verbatim im.ProcessAutoCovariance(src_image: imImage, mean_image: imImage, dst_image: imImage) -> counter: boolean [in Lua 5] \endverbatim
160
- * \verbatim im.ProcessAutoCovarianceNew(src_image: imImage, mean_image: imImage) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim
161
- * \ingroup arithm */
162
- int imProcessAutoCovariance(const imImage* src_image, const imImage* mean_image, imImage* dst_image);
163
-
164
- /** Multiplies the conjugate of one complex image with another complex image. \n
165
- * Images must match size. Conj(img1) * img2 \n
166
- * Can be done in-place.
167
- *
168
- * \verbatim im.ProcessMultiplyConj(src_image1: imImage, src_image2: imImage, dst_image: imImage) [in Lua 5] \endverbatim
169
- * \verbatim im.ProcessMultiplyConjNew(src_image1: imImage, src_image2: imImage) -> new_image: imImage [in Lua 5] \endverbatim
170
- * \ingroup arithm */
171
- void imProcessMultiplyConj(const imImage* src_image1, const imImage* src_image2, imImage* dst_image);
172
-
173
-
174
-
175
- /** \defgroup quantize Additional Image Quantization Operations
176
- * \par
177
- * Additionally operations to the \ref imConvertColorSpace function.
178
- * \par
179
- * See \ref im_process_pon.h
180
- * \ingroup process */
181
-
182
- /** Converts a RGB image to a MAP image using uniform quantization
183
- * with an optional 8x8 ordered dither. The RGB image must have data type IM_BYTE.
184
- *
185
- * \verbatim im.ProcessQuantizeRGBUniform(src_image: imImage, dst_image: imImage, do_dither: boolean) [in Lua 5] \endverbatim
186
- * \verbatim im.ProcessQuantizeRGBUniformNew(src_image: imImage, do_dither: boolean) -> new_image: imImage [in Lua 5] \endverbatim
187
- * \ingroup quantize */
188
- void imProcessQuantizeRGBUniform(const imImage* src_image, imImage* dst_image, int do_dither);
189
-
190
- /** Quantizes a gray scale image in less that 256 grays using uniform quantization. \n
191
- * Both images must be IM_BYTE/IM_GRAY. Can be done in place.
192
- *
193
- * \verbatim im.ProcessQuantizeGrayUniform(src_image: imImage, dst_image: imImage, grays: number) [in Lua 5] \endverbatim
194
- * \verbatim im.ProcessQuantizeGrayUniformNew(src_image: imImage, grays: number) -> new_image: imImage [in Lua 5] \endverbatim
195
- * \ingroup quantize */
196
- void imProcessQuantizeGrayUniform(const imImage* src_image, imImage* dst_image, int grays);
197
-
198
-
199
-
200
- /** \defgroup histo Histogram Based Operations
201
- * \par
202
- * See \ref im_process_pon.h
203
- * \ingroup process */
204
-
205
- /** Performs an histogram expansion based on a percentage of the number of pixels. \n
206
- * Percentage defines an amount of pixels to include at the lowest level and at the highest level.
207
- * If its is zero only empty counts of the histogram will be considered. \n
208
- * Images must be IM_BYTE/(IM_RGB or IM_GRAY). Can be done in place. \n
209
- * To expand the gammut without using the histogram, by just specifing the lowest and highest levels
210
- * use the \ref IM_GAMUT_EXPAND tone gammut operation (\ref imProcessToneGamut).
211
- *
212
- * \verbatim im.ProcessExpandHistogram(src_image: imImage, dst_image: imImage, percent: number) [in Lua 5] \endverbatim
213
- * \verbatim im.ProcessExpandHistogramNew(src_image: imImage, percent: number) -> new_image: imImage [in Lua 5] \endverbatim
214
- * \ingroup histo */
215
- void imProcessExpandHistogram(const imImage* src_image, imImage* dst_image, float percent);
216
-
217
- /** Performs an histogram equalization. \n
218
- * Images must be IM_BYTE/(IM_RGB or IM_GRAY). Can be done in place.
219
- *
220
- * \verbatim im.ProcessEqualizeHistogram(src_image: imImage, dst_image: imImage) [in Lua 5] \endverbatim
221
- * \verbatim im.ProcessEqualizeHistogramNew(src_image: imImage) -> new_image: imImage [in Lua 5] \endverbatim
222
- * \ingroup histo */
223
- void imProcessEqualizeHistogram(const imImage* src_image, imImage* dst_image);
224
-
225
-
226
-
227
- /** \defgroup colorproc Color Processing Operations
228
- * \par
229
- * Operations to change the color components configuration.
230
- * \par
231
- * See \ref im_process_pon.h
232
- * \ingroup process */
233
-
234
- /** Split a RGB image into luma and chroma. \n
235
- * Chroma is calculated as R-Y,G-Y,B-Y. Source image must be IM_RGB/IM_BYTE. \n
236
- * luma image is IM_GRAY/IM_BYTE and chroma is IM_RGB/IM_BYTE. \n
237
- * Source and destiny must have the same size.
238
- *
239
- * \verbatim im.ProcessSplitYChroma(src_image: imImage, y_image: imImage, chroma_image: imImage) [in Lua 5] \endverbatim
240
- * \verbatim im.ProcessSplitYChromaNew(src_image: imImage) -> y_image: imImage, chroma_image: imImage [in Lua 5] \endverbatim
241
- * \ingroup colorproc */
242
- void imProcessSplitYChroma(const imImage* src_image, imImage* y_image, imImage* chroma_image);
243
-
244
- /** Split a RGB image into HSI planes. \n
245
- * Source image must be IM_RGB/IM_BYTE,IM_FLOAT. Destiny images are all IM_GRAY/IM_FLOAT. \n
246
- * Source images must normalized to 0-1 if type is IM_FLOAT (\ref imProcessToneGamut can be used). See \ref hsi for a definition of the color conversion.\n
247
- * Source and destiny must have the same size.
248
- *
249
- * \verbatim im.ProcessSplitHSI(src_image: imImage, h_image: imImage, s_image: imImage, i_image: imImage) [in Lua 5] \endverbatim
250
- * \verbatim im.ProcessSplitHSINew(src_image: imImage) -> h_image: imImage, s_image: imImage, i_image: imImage [in Lua 5] \endverbatim
251
- * \ingroup colorproc */
252
- void imProcessSplitHSI(const imImage* src_image, imImage* h_image, imImage* s_image, imImage* i_image);
253
-
254
- /** Merge HSI planes into a RGB image. \n
255
- * Source images must be IM_GRAY/IM_FLOAT. Destiny image can be IM_RGB/IM_BYTE,IM_FLOAT. \n
256
- * Source and destiny must have the same size. See \ref hsi for a definition of the color conversion.
257
- *
258
- * \verbatim im.ProcessMergeHSI(h_image: imImage, s_image: imImage, i_image: imImage, dst_image: imImage) [in Lua 5] \endverbatim
259
- * \verbatim im.ProcessMergeHSINew(h_image: imImage, s_image: imImage, i_image: imImage) -> dst_image: imImage [in Lua 5] \endverbatim
260
- * \ingroup colorproc */
261
- void imProcessMergeHSI(const imImage* h_image, const imImage* s_image, const imImage* i_image, imImage* dst_image);
262
-
263
- /** Split a multicomponent image into separate components.\n
264
- * Destiny images must be IM_GRAY. Size and data types must be all the same.\n
265
- * The number of destiny images must match the depth of the source image.
266
- *
267
- * \verbatim im.ProcessSplitComponents(src_image: imImage, dst_image_list: table of imImage) [in Lua 5] \endverbatim
268
- * \verbatim im.ProcessSplitComponentsNew(src_image: imImage) -> dst_image_list: table of imImage [in Lua 5] \endverbatim
269
- * \ingroup colorproc */
270
- void imProcessSplitComponents(const imImage* src_image, imImage** dst_image_list);
271
-
272
- /** Merges separate components into a multicomponent image.\n
273
- * Source images must be IM_GRAY. Size and data types must be all the same.\n
274
- * The number of source images must match the depth of the destiny image.
275
- *
276
- * \verbatim im.ProcessMergeComponents(src_image_list: table of imImage, dst_image: imImage) [in Lua 5] \endverbatim
277
- * \verbatim im.ProcessMergeComponentsNew(src_image_list: table of imImage) -> dst_image: imImage [in Lua 5] \endverbatim
278
- * \ingroup colorproc */
279
- void imProcessMergeComponents(const imImage** src_image_list, imImage* dst_image);
280
-
281
- /** Normalize the color components by their sum. Example: c1 = c1/(c1+c2+c3). \n
282
- * Destiny image must be IM_FLOAT.
283
- *
284
- * \verbatim im.ProcessNormalizeComponents(src_image: imImage, dst_image: imImage) [in Lua 5] \endverbatim
285
- * \verbatim im.ProcessNormalizeComponentsNew(src_image: imImage) -> new_image: imImage [in Lua 5] \endverbatim
286
- * \ingroup colorproc */
287
- void imProcessNormalizeComponents(const imImage* src_image, imImage* dst_image);
288
-
289
- /** Replaces the source color by the destiny color. \n
290
- * The color will be type casted to the image data type. \n
291
- * The colors must have the same number of components of the images. \n
292
- * Supports all color spaces and all data types except IM_CFLOAT.
293
- *
294
- * \verbatim im.ProcessReplaceColor(src_image: imImage, dst_image: imImage, src_color: table of numbers, dst_color: table of numbers) [in Lua 5] \endverbatim
295
- * \verbatim im.ProcessReplaceColorNew(src_image: imImage, src_color: table of numbers, dst_color: table of numbers) -> new_image: imImage [in Lua 5] \endverbatim
296
- * \ingroup colorproc */
297
- void imProcessReplaceColor(const imImage* src_image, imImage* dst_image, float* src_color, float* dst_color);
298
-
299
-
300
-
301
- /** \defgroup logic Logical Arithmetic Operations
302
- * \par
303
- * Logical binary math operations for images.
304
- * \par
305
- * See \ref im_process_pon.h
306
- * \ingroup process */
307
-
308
- /** Logical Operations.
309
- * \ingroup logic */
310
- enum imLogicOp {
311
- IM_BIT_AND, /**< and = a & b */
312
- IM_BIT_OR, /**< or = a | b */
313
- IM_BIT_XOR /**< xor = ~(a | b) */
314
- };
315
-
316
- /** Apply a logical operation.\n
317
- * Images must have data type IM_BYTE, IM_USHORT or IM_INT. Can be done in place.
318
- *
319
- * \verbatim im.ProcessBitwiseOp(src_image1: imImage, src_image2: imImage, dst_image: imImage, op: number) [in Lua 5] \endverbatim
320
- * \verbatim im.ProcessBitwiseOpNew(src_image1: imImage, src_image2: imImage, op: number) -> new_image: imImage [in Lua 5] \endverbatim
321
- * \ingroup logic */
322
- void imProcessBitwiseOp(const imImage* src_image1, const imImage* src_image2, imImage* dst_image, int op);
323
-
324
- /** Apply a logical NOT operation.\n
325
- * Images must have data type IM_BYTE, IM_USHORT or IM_INT. Can be done in place.
326
- *
327
- * \verbatim im.ProcessBitwiseNot(src_image: imImage, dst_image: imImage) [in Lua 5] \endverbatim
328
- * \verbatim im.ProcessBitwiseNotNew(src_image: imImage) -> new_image: imImage [in Lua 5] \endverbatim
329
- * \ingroup logic */
330
- void imProcessBitwiseNot(const imImage* src_image, imImage* dst_image);
331
-
332
- /** Apply a bit mask. \n
333
- * The same as imProcessBitwiseOp but the second image is replaced by a fixed mask. \n
334
- * Images must have data type IM_BYTE. It is valid only for AND, OR and XOR. Can be done in place.
335
- *
336
- * \verbatim im.ProcessBitMask(src_image: imImage, dst_image: imImage, mask: string, op: number) [in Lua 5] \endverbatim
337
- * \verbatim im.ProcessBitMaskNew(src_image: imImage, mask: string, op: number) -> new_image: imImage [in Lua 5] \endverbatim
338
- * In Lua, mask is a string with 0s and 1s, for example: "11001111".
339
- * \ingroup logic */
340
- void imProcessBitMask(const imImage* src_image, imImage* dst_image, unsigned char mask, int op);
341
-
342
- /** Extract or Reset a bit plane. For ex: 000X0000 or XXX0XXXX (plane=3).\n
343
- * Images must have data type IM_BYTE. Can be done in place.
344
- *
345
- * \verbatim im.ProcessBitPlane(src_image: imImage, dst_image: imImage, plane: number, do_reset: boolean) [in Lua 5] \endverbatim
346
- * \verbatim im.ProcessBitPlaneNew(src_image: imImage, plane: number, do_reset: boolean) -> new_image: imImage [in Lua 5] \endverbatim
347
- * \ingroup logic */
348
- void imProcessBitPlane(const imImage* src_image, imImage* dst_image, int plane, int do_reset);
349
-
350
-
351
-
352
- /** \defgroup render Synthetic Image Render
353
- * \par
354
- * Renders some 2D mathematical functions as images. All the functions operates in place
355
- * and supports all data types except IM_CFLOAT.
356
- * \par
357
- * See \ref im_process_pon.h
358
- * \ingroup process */
359
-
360
- /** Render Funtion.
361
- * \verbatim render_func(x: number, y: number, d: number, param: table of number) -> value: number [in Lua 5] \endverbatim
362
- * \ingroup render */
363
- typedef float (*imRenderFunc)(int x, int y, int d, float* param);
364
-
365
- /** Render Conditional Funtion.
366
- * \verbatim render_cond_func(x: number, y: number, d: number, param: table of number) -> value: number, cond: boolean [in Lua 5] \endverbatim
367
- * \ingroup render */
368
- typedef float (*imRenderCondFunc)(int x, int y, int d, int *cond, float* param);
369
-
370
- /** Render a synthetic image using a render function. \n
371
- * plus will make the render be added to the current image data,
372
- * or else all data will be replaced. All the render functions use this or the conditional function. \n
373
- * Returns zero if the counter aborted.
374
- *
375
- * \verbatim im.ProcessRenderOp(image: imImage, render_func: function, render_name: string, param: table of number, plus: boolean) -> counter: boolean [in Lua 5] \endverbatim
376
- * \ingroup render */
377
- int imProcessRenderOp(imImage* image, imRenderFunc render_func, char* render_name, float* param, int plus);
378
-
379
- /** Render a synthetic image using a conditional render function. \n
380
- * Data will be rendered only if the condional param is true. \n
381
- * Returns zero if the counter aborted.
382
- *
383
- * \verbatim im.ProcessRenderCondOp(image: imImage, render_cond_func: function, render_name: string, param: table of number) -> counter: boolean [in Lua 5] \endverbatim
384
- * \ingroup render */
385
- int imProcessRenderCondOp(imImage* image, imRenderCondFunc render_cond_func, char* render_name, float* param);
386
-
387
- /** Render speckle noise on existing data. Can be done in place.
388
- *
389
- * \verbatim im.ProcessRenderAddSpeckleNoise(src_image: imImage, dst_image: imImage, percent: number) -> counter: boolean [in Lua 5] \endverbatim
390
- * \verbatim im.ProcessRenderAddSpeckleNoiseNew(src_image: imImage, percent: number) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim
391
- * \ingroup render */
392
- int imProcessRenderAddSpeckleNoise(const imImage* src_image, imImage* dst_image, float percent);
393
-
394
- /** Render gaussian noise on existing data. Can be done in place.
395
- *
396
- * \verbatim im.ProcessRenderAddGaussianNoise(src_image: imImage, dst_image: imImage, mean: number, stddev: number) -> counter: boolean [in Lua 5] \endverbatim
397
- * \verbatim im.ProcessRenderAddGaussianNoiseNew(src_image: imImage, mean: number, stddev: number) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim
398
- * \ingroup render */
399
- int imProcessRenderAddGaussianNoise(const imImage* src_image, imImage* dst_image, float mean, float stddev);
400
-
401
- /** Render uniform noise on existing data. Can be done in place.
402
- *
403
- * \verbatim im.ProcessRenderAddUniformNoise(src_image: imImage, dst_image: imImage, mean: number, stddev: number) -> counter: boolean [in Lua 5] \endverbatim
404
- * \verbatim im.ProcessRenderAddUniformNoiseNew(src_image: imImage, mean: number, stddev: number) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim
405
- * \ingroup render */
406
- int imProcessRenderAddUniformNoise(const imImage* src_image, imImage* dst_image, float mean, float stddev);
407
-
408
- /** Render random noise.
409
- *
410
- * \verbatim im.ProcessRenderRandomNoise(image: imImage) -> counter: boolean [in Lua 5] \endverbatim
411
- * \ingroup render */
412
- int imProcessRenderRandomNoise(imImage* image);
413
-
414
- /** Render a constant. The number of values must match the depth of the image.
415
- *
416
- * \verbatim im.ProcessRenderConstant(image: imImage, value: table of number) -> counter: boolean [in Lua 5] \endverbatim
417
- * \ingroup render */
418
- int imProcessRenderConstant(imImage* image, float* value);
419
-
420
- /** Render a centered wheel.
421
- *
422
- * \verbatim im.ProcessRenderWheel(image: imImage, internal_radius: number, external_radius: number) -> counter: boolean [in Lua 5] \endverbatim
423
- * \ingroup render */
424
- int imProcessRenderWheel(imImage* image, int internal_radius, int external_radius);
425
-
426
- /** Render a centered cone.
427
- *
428
- * \verbatim im.ProcessRenderCone(image: imImage, radius: number) -> counter: boolean [in Lua 5] \endverbatim
429
- * \ingroup render */
430
- int imProcessRenderCone(imImage* image, int radius);
431
-
432
- /** Render a centered tent.
433
- *
434
- * \verbatim im.ProcessRenderTent(image: imImage, tent_width: number, tent_height: number) -> counter: boolean [in Lua 5] \endverbatim
435
- * \ingroup render */
436
- int imProcessRenderTent(imImage* image, int tent_width, int tent_height);
437
-
438
- /** Render a ramp. Direction can be vertical (1) or horizontal (0).
439
- *
440
- * \verbatim im.ProcessRenderRamp(image: imImage, start: number, end: number, vert_dir: boolean) -> counter: boolean [in Lua 5] \endverbatim
441
- * \ingroup render */
442
- int imProcessRenderRamp(imImage* image, int start, int end, int vert_dir);
443
-
444
- /** Render a centered box.
445
- *
446
- * \verbatim im.ProcessRenderBox(image: imImage, box_width: number, box_height: number) -> counter: boolean [in Lua 5] \endverbatim
447
- * \ingroup render */
448
- int imProcessRenderBox(imImage* image, int box_width, int box_height);
449
-
450
- /** Render a centered sinc.
451
- *
452
- * \verbatim im.ProcessRenderSinc(image: imImage, x_period: number, y_period: number) -> counter: boolean [in Lua 5] \endverbatim
453
- * \ingroup render */
454
- int imProcessRenderSinc(imImage* image, float x_period, float y_period);
455
-
456
- /** Render a centered gaussian.
457
- *
458
- * \verbatim im.ProcessRenderGaussian(image: imImage, stddev: number) -> counter: boolean [in Lua 5] \endverbatim
459
- * \ingroup render */
460
- int imProcessRenderGaussian(imImage* image, float stddev);
461
-
462
- /** Render the laplacian of a centered gaussian.
463
- *
464
- * \verbatim im.ProcessRenderLapOfGaussian(image: imImage, stddev: number) -> counter: boolean [in Lua 5] \endverbatim
465
- * \ingroup render */
466
- int imProcessRenderLapOfGaussian(imImage* image, float stddev);
467
-
468
- /** Render a centered cosine.
469
- *
470
- * \verbatim im.ProcessRenderCosine(image: imImage, x_period: number, y_period: number) -> counter: boolean [in Lua 5] \endverbatim
471
- * \ingroup render */
472
- int imProcessRenderCosine(imImage* image, float x_period, float y_period);
473
-
474
- /** Render a centered grid.
475
- *
476
- * \verbatim im.ProcessRenderGrid(image: imImage, x_space: number, y_space: number) -> counter: boolean [in Lua 5] \endverbatim
477
- * \ingroup render */
478
- int imProcessRenderGrid(imImage* image, int x_space, int y_space);
479
-
480
- /** Render a centered chessboard.
481
- *
482
- * \verbatim im.ProcessRenderChessboard(image: imImage, x_space: number, y_space: number) -> counter: boolean [in Lua 5] \endverbatim
483
- * \ingroup render */
484
- int imProcessRenderChessboard(imImage* image, int x_space, int y_space);
485
-
486
-
487
-
488
- /** \defgroup tonegamut Tone Gamut Operations
489
- * \par
490
- * Operations that try to preserve the min-max interval in the output (the dynamic range).
491
- * \par
492
- * See \ref im_process_pon.h
493
- * \ingroup process */
494
-
495
-
496
- /** Tone Gamut Operations.
497
- * \ingroup tonegamut */
498
- enum imToneGamut {
499
- IM_GAMUT_NORMALIZE, /**< normalize = (a-min) / (max-min) (destiny image must be IM_FLOAT) */
500
- IM_GAMUT_POW, /**< pow = ((a-min) / (max-min))^gamma * (max-min) + min \n
501
- param[0]=gamma */
502
- IM_GAMUT_LOG, /**< log = log(K * (a-min) / (max-min) + 1))*(max-min)/log(K+1) + min \n
503
- param[0]=K (K>0) */
504
- IM_GAMUT_EXP, /**< exp = (exp(K * (a-min) / (max-min)) - 1))*(max-min)/(exp(K)-1) + min \n
505
- param[0]=K */
506
- IM_GAMUT_INVERT, /**< invert = max - (a-min) */
507
- IM_GAMUT_ZEROSTART, /**< zerostart = a - min */
508
- IM_GAMUT_SOLARIZE, /**< solarize = a < level ? a: (level * (max-min) - a * (level-min)) / (max-level) \n
509
- param[0]=level percentage (0-100) relative to min-max \n
510
- photography solarization effect. */
511
- IM_GAMUT_SLICE, /**< slice = start < a || a > end ? min: binarize? max: a \n
512
- param[0]=start, param[1]=end, param[2]=binarize */
513
- IM_GAMUT_EXPAND, /**< expand = a < start ? min: a > end ? max : (a-start)*(max-min)/(end-start) + min \n
514
- param[0]=start, param[1]=end */
515
- IM_GAMUT_CROP, /**< crop = a < start ? start: a > end ? end : a \n
516
- param[0]=start, param[1]=end */
517
- IM_GAMUT_BRIGHTCONT /**< brightcont = a < min ? min: a > max ? max: a * tan(c_a) + b_s + (max-min)*(1 - tan(c_a))/2 \n
518
- param[0]=bright_shift (-100%..+100%), param[1]=contrast_factor (-100%..+100%) \n
519
- change brightness and contrast simultaneously. */
520
- };
521
-
522
- /** Apply a gamut operation with arguments. \n
523
- * Supports all data types except IM_CFLOAT. \n
524
- * The linear operation do a special convertion when min > 0 and max < 1, it forces min=0 and max=1. \n
525
- * IM_BYTE images have min=0 and max=255 always. \n
526
- * Can be done in place. When there is no extra params use NULL.
527
- *
528
- * \verbatim im.ProcessToneGamut(src_image: imImage, dst_image: imImage, op: number, param: table of number) [in Lua 5] \endverbatim
529
- * \verbatim im.ProcessToneGamutNew(src_image: imImage, op: number, param: table of number) -> new_image: imImage [in Lua 5] \endverbatim
530
- * \ingroup tonegamut */
531
- void imProcessToneGamut(const imImage* src_image, imImage* dst_image, int op, float* param);
532
-
533
- /** Converts from (0-1) to (0-255), crop out of bounds values. \n
534
- * Source image must be IM_FLOAT, and destiny image must be IM_BYTE.
535
- *
536
- * \verbatim im.ProcessUnNormalize(src_image: imImage, dst_image: imImage) [in Lua 5] \endverbatim
537
- * \verbatim im.ProcessUnNormalizeNew(src_image: imImage) -> new_image: imImage [in Lua 5] \endverbatim
538
- * \ingroup tonegamut */
539
- void imProcessUnNormalize(const imImage* src_image, imImage* dst_image);
540
-
541
- /** Directly converts IM_USHORT, IM_INT and IM_FLOAT into IM_BYTE images. \n
542
- * This can also be done using \ref imConvertDataType with IM_CAST_DIRECT.
543
- *
544
- * \verbatim im.ProcessDirectConv(src_image: imImage, dst_image: imImage) [in Lua 5] \endverbatim
545
- * \verbatim im.ProcessDirectConvNew(src_image: imImage) -> new_image: imImage [in Lua 5] \endverbatim
546
- * \ingroup tonegamut */
547
- void imProcessDirectConv(const imImage* src_image, imImage* dst_image);
548
-
549
- /** A negative effect. Uses \ref imProcessToneGamut with IM_GAMUT_INVERT for non MAP images. \n
550
- * Supports all color spaces and all data types except IM_CFLOAT. \n
551
- * Can be done in place.
552
- *
553
- * \verbatim im.ProcessNegative(src_image: imImage, dst_image: imImage) [in Lua 5] \endverbatim
554
- * \verbatim im.ProcessNegativeNew(src_image: imImage) -> new_image: imImage [in Lua 5] \endverbatim
555
- * \ingroup tonegamut */
556
- void imProcessNegative(const imImage* src_image, imImage* dst_image);
557
-
558
-
559
-
560
- /** \defgroup threshold Threshold Operations
561
- * \par
562
- * Operations that converts a usually IM_GRAY/IM_BYTE image into a IM_BINARY image using several threshold techniques.
563
- * \par
564
- * See \ref im_process_pon.h
565
- * \ingroup process */
566
-
567
- /** Apply a manual threshold. \n
568
- * threshold = a <= level ? 0: value \n
569
- * Normal value is 1 but another common value is 255. Can be done in place for IM_BYTE source. \n
570
- * Supports all integer IM_GRAY images as source, and IM_BINARY as destiny.
571
- *
572
- * \verbatim im.ProcessThreshold(src_image: imImage, dst_image: imImage, level: number, value: number) [in Lua 5] \endverbatim
573
- * \verbatim im.ProcessThresholdNew(src_image: imImage, level: number, value: number) -> new_image: imImage [in Lua 5] \endverbatim
574
- * \ingroup threshold */
575
- void imProcessThreshold(const imImage* src_image, imImage* dst_image, int level, int value);
576
-
577
- /** Apply a threshold by the difference of two images. \n
578
- * threshold = a1 <= a2 ? 0: 1 \n
579
- * Can be done in place.
580
- *
581
- * \verbatim im.ProcessThresholdByDiff(src_image1: imImage, src_image2: imImage, dst_image: imImage) [in Lua 5] \endverbatim
582
- * \verbatim im.ProcessThresholdByDiffNew(src_image1: imImage, src_image2: imImage) -> new_image: imImage [in Lua 5] \endverbatim
583
- * \ingroup threshold */
584
- void imProcessThresholdByDiff(const imImage* src_image1, const imImage* src_image2, imImage* dst_image);
585
-
586
- /** Apply a threshold by the Hysteresis method. \n
587
- * Hysteresis thersholding of edge pixels. Starting at pixels with a
588
- * value greater than the HIGH threshold, trace a connected sequence
589
- * of pixels that have a value greater than the LOW threhsold. \n
590
- * Supports only IM_BYTE images.
591
- * Note: could not find the original source code author name.
592
- *
593
- * \verbatim im.ProcessHysteresisThreshold(src_image: imImage, dst_image: imImage, low_thres: number, high_thres: number) [in Lua 5] \endverbatim
594
- * \verbatim im.ProcessHysteresisThresholdNew(src_image: imImage, low_thres: number, high_thres: number) -> new_image: imImage [in Lua 5] \endverbatim
595
- * \ingroup threshold */
596
- void imProcessHysteresisThreshold(const imImage* src_image, imImage* dst_image, int low_thres, int high_thres);
597
-
598
- /** Estimates hysteresis low and high threshold levels. \n
599
- * Supports only IM_BYTE images.
600
- * Usefull for \ref imProcessHysteresisThreshold.
601
- *
602
- * \verbatim im.ProcessHysteresisThresEstimate(image: imImage) -> low_level: number, high_level: number [in Lua 5] \endverbatim
603
- * \ingroup threshold */
604
- void imProcessHysteresisThresEstimate(const imImage* image, int *low_level, int *high_level);
605
-
606
- /** Calculates the threshold level for manual threshold using an uniform error approach. \n
607
- * Supports only IM_BYTE images.
608
- * Extracted from XITE, Copyright 1991, Blab, UiO \n
609
- * http://www.ifi.uio.no/~blab/Software/Xite/
610
- \verbatim
611
- Reference:
612
- S. M. Dunn & D. Harwood & L. S. Davis:
613
- "Local Estimation of the Uniform Error Threshold"
614
- IEEE Trans. on PAMI, Vol PAMI-6, No 6, Nov 1984.
615
- Comments: It only works well on images whith large objects.
616
- Author: Olav Borgli, BLAB, ifi, UiO
617
- Image processing lab, Department of Informatics, University of Oslo
618
- \endverbatim
619
- * Returns the used level.
620
- *
621
- * \verbatim im.ProcessUniformErrThreshold(src_image: imImage, dst_image: imImage) -> level: number [in Lua 5] \endverbatim
622
- * \verbatim im.ProcessUniformErrThresholdNew(src_image: imImage) -> level: number, new_image: imImage [in Lua 5] \endverbatim
623
- * \ingroup threshold */
624
- int imProcessUniformErrThreshold(const imImage* src_image, imImage* dst_image);
625
-
626
- /** Apply a dithering on each image channel by using a difusion error method. \n
627
- * It can be applied on any IM_BYTE images. It will "threshold" each channel indivudually, so
628
- * source and destiny must be of the same depth.
629
- *
630
- * \verbatim im.ProcessDifusionErrThreshold(src_image: imImage, dst_image: imImage, level: number) [in Lua 5] \endverbatim
631
- * \verbatim im.ProcessDifusionErrThresholdNew(src_image: imImage, level: number) -> new_image: imImage [in Lua 5] \endverbatim
632
- * \ingroup threshold */
633
- void imProcessDifusionErrThreshold(const imImage* src_image, imImage* dst_image, int level);
634
-
635
- /** Calculates the threshold level for manual threshold using a percentage of pixels
636
- * that should stay bellow the threshold. \n
637
- * Supports only IM_BYTE images.
638
- * Returns the used level.
639
- *
640
- * \verbatim im.ProcessPercentThreshold(src_image: imImage, dst_image: imImage, percent: number) -> level: number [in Lua 5] \endverbatim
641
- * \verbatim im.ProcessPercentThresholdNew(src_image: imImage, percent: number) -> level: number, new_image: imImage [in Lua 5] \endverbatim
642
- * \ingroup threshold */
643
- int imProcessPercentThreshold(const imImage* src_image, imImage* dst_image, float percent);
644
-
645
- /** Calculates the threshold level for manual threshold using the Otsu approach. \n
646
- * Returns the used level. \n
647
- * Supports only IM_BYTE images.
648
- * Original implementation by Flavio Szenberg.
649
- *
650
- * \verbatim im.ProcessOtsuThreshold(src_image: imImage, dst_image: imImage) -> level: number [in Lua 5] \endverbatim
651
- * \verbatim im.ProcessOtsuThresholdNew(src_image: imImage) -> level: number, new_image: imImage [in Lua 5] \endverbatim
652
- * \ingroup threshold */
653
- int imProcessOtsuThreshold(const imImage* src_image, imImage* dst_image);
654
-
655
- /** Calculates the threshold level for manual threshold using (max-min)/2. \n
656
- * Returns the used level. \n
657
- * Supports all integer IM_GRAY images as source, and IM_BINARY as destiny.
658
- *
659
- * \verbatim im.ProcessMinMaxThreshold(src_image: imImage, dst_image: imImage) -> level: number [in Lua 5] \endverbatim
660
- * \verbatim im.ProcessMinMaxThresholdNew(src_image: imImage) -> level: number, new_image: imImage [in Lua 5] \endverbatim
661
- * \ingroup threshold */
662
- int imProcessMinMaxThreshold(const imImage* src_image, imImage* dst_image);
663
-
664
- /** Estimates Local Max threshold level for IM_BYTE images.
665
- *
666
- * \verbatim im.ProcessLocalMaxThresEstimate(image: imImage) -> level: number [in Lua 5] \endverbatim
667
- * \ingroup threshold */
668
- void imProcessLocalMaxThresEstimate(const imImage* image, int *level);
669
-
670
- /** Apply a manual threshold using an interval. \n
671
- * threshold = start_level <= a <= end_level ? 1: 0 \n
672
- * Normal value is 1 but another common value is 255. Can be done in place for IM_BYTE source. \n
673
- * Supports all integer IM_GRAY images as source, and IM_BINARY as destiny.
674
- *
675
- * \verbatim im.ProcessSliceThreshold(src_image: imImage, dst_image: imImage, start_level: number, end_level: number) [in Lua 5] \endverbatim
676
- * \verbatim im.ProcessSliceThresholdNew(src_image: imImage, start_level: number, end_level: number) -> new_image: imImage [in Lua 5] \endverbatim
677
- * \ingroup threshold */
678
- void imProcessSliceThreshold(const imImage* src_image, imImage* dst_image, int start_level, int end_level);
679
-
680
-
681
- /** \defgroup effects Special Effects
682
- * \par
683
- * Operations to change image appearance.
684
- * \par
685
- * See \ref im_process_pon.h
686
- * \ingroup process */
687
-
688
-
689
- /** Generates a zoom in effect averaging colors inside a square region. \n
690
- * Operates only on IM_BYTE images.
691
- *
692
- * \verbatim im.ProcessPixelate(src_image: imImage, dst_image: imImage, box_size: number) [in Lua 5] \endverbatim
693
- * \verbatim im.ProcessPixelateNew(src_image: imImage, box_size: number) -> new_image: imImage [in Lua 5] \endverbatim
694
- * \ingroup effects */
695
- void imProcessPixelate(const imImage* src_image, imImage* dst_image, int box_size);
696
-
697
- /** A simple Posterize effect. It reduces the number of colors in the image eliminating
698
- * less significant bit planes. Can have 1 to 7 levels. See \ref imProcessBitMask. \n
699
- * Images must have data type IM_BYTE.
700
- *
701
- * \verbatim im.ProcessPosterize(src_image: imImage, dst_image: imImage, level: number) [in Lua 5] \endverbatim
702
- * \verbatim im.ProcessPosterizeNew(src_image: imImage, level: number) -> new_image: imImage [in Lua 5] \endverbatim
703
- * \ingroup effects */
704
- void imProcessPosterize(const imImage* src_image, imImage* dst_image, int level);
705
-
706
-
707
-
708
- #if defined(__cplusplus)
709
- }
710
- #endif
711
-
712
- #endif
1
+ /** \file
2
+ * \brief Image Processing - Pontual Operations
3
+ *
4
+ * See Copyright Notice in im_lib.h
5
+ */
6
+
7
+ #ifndef __IM_PROCESS_PON_H
8
+ #define __IM_PROCESS_PON_H
9
+
10
+ #include "im_image.h"
11
+
12
+ #if defined(__cplusplus)
13
+ extern "C" {
14
+ #endif
15
+
16
+
17
+
18
+ /** \defgroup arithm Arithmetic Operations
19
+ * \par
20
+ * Simple math operations for images.
21
+ * \par
22
+ * See \ref im_process_pon.h
23
+ * \ingroup process */
24
+
25
+ /** Unary Arithmetic Operations. \n
26
+ * Inverse and log may lead to math exceptions.
27
+ * \ingroup arithm */
28
+ enum imUnaryOp {
29
+ IM_UN_EQL, /**< equal = a */
30
+ IM_UN_ABS, /**< abssolute = |a| */
31
+ IM_UN_LESS, /**< less = -a */
32
+ IM_UN_INV, /**< invert = 1/a (#) */
33
+ IM_UN_SQR, /**< square = a*a */
34
+ IM_UN_SQRT, /**< square root = a^(1/2) */
35
+ IM_UN_LOG, /**< natural logarithm = ln(a) (#) */
36
+ IM_UN_EXP, /**< exponential = exp(a) */
37
+ IM_UN_SIN, /**< sine = sin(a) */
38
+ IM_UN_COS, /**< cosine = cos(a) */
39
+ IM_UN_CONJ, /**< complex conjugate = ar - ai*i */
40
+ IM_UN_CPXNORM /**< complex normalization by magnitude = a / cpxmag(a) */
41
+ };
42
+
43
+ /** Apply an arithmetic unary operation. \n
44
+ * Can be done in place, images must match size. \n
45
+ * Destiny image can be several types depending on source: \n
46
+ * \li byte -> byte, ushort, int, float
47
+ * \li ushort -> byte, ushort, int, float
48
+ * \li int -> byte, ushort, int, float
49
+ * \li float -> float
50
+ * \li complex -> complex
51
+ * If destiny is byte, then the result is cropped to 0-255.
52
+ *
53
+ * \verbatim im.ProcessUnArithmeticOp(src_image: imImage, dst_image: imImage, op: number) [in Lua 5] \endverbatim
54
+ * \verbatim im.ProcessUnArithmeticOpNew(image: imImage, op: number) -> new_image: imImage [in Lua 5] \endverbatim
55
+ * \ingroup arithm */
56
+ void imProcessUnArithmeticOp(const imImage* src_image, imImage* dst_image, int op);
57
+
58
+ /** Binary Arithmetic Operations. \n
59
+ * Divide may lead to math exceptions.
60
+ * \ingroup arithm */
61
+ enum imBinaryOp {
62
+ IM_BIN_ADD, /**< add = a+b */
63
+ IM_BIN_SUB, /**< subtract = a-b */
64
+ IM_BIN_MUL, /**< multiply = a*b */
65
+ IM_BIN_DIV, /**< divide = a/b (#) */
66
+ IM_BIN_DIFF, /**< difference = |a-b| */
67
+ IM_BIN_POW, /**< power = a^b */
68
+ IM_BIN_MIN, /**< minimum = (a < b)? a: b */
69
+ IM_BIN_MAX /**< maximum = (a > b)? a: b */
70
+ };
71
+
72
+ /** Apply a binary arithmetic operation. \n
73
+ * Can be done in place, images must match size. \n
74
+ * Source images must match type, destiny image can be several types depending on source: \n
75
+ * \li byte -> byte, ushort, int, float
76
+ * \li ushort -> ushort, int, float
77
+ * \li int -> int, float
78
+ * \li float -> float
79
+ * \li complex -> complex
80
+ * One exception is that you can combine complex with float resulting complex.
81
+ * If destiny is byte, then the result is cropped to 0-255.
82
+ *
83
+ * \verbatim im.ProcessArithmeticOp(src_image1: imImage, src_image2: imImage, dst_image: imImage, op: number) [in Lua 5] \endverbatim
84
+ * \verbatim im.ProcessArithmeticOpNew(image1: imImage, image2: imImage, op: number) -> new_image: imImage [in Lua 5] \endverbatim
85
+ * The New function will create a new image of the same type of the source images.
86
+ * \ingroup arithm */
87
+ void imProcessArithmeticOp(const imImage* src_image1, const imImage* src_image2, imImage* dst_image, int op);
88
+
89
+ /** Apply a binary arithmetic operation with a constant value. \n
90
+ * Can be done in place, images must match size. \n
91
+ * Destiny image can be several types depending on source: \n
92
+ * \li byte -> byte, ushort, int, float
93
+ * \li ushort -> byte, ushort, int, float
94
+ * \li int -> byte, ushort, int, float
95
+ * \li float -> float
96
+ * \li complex -> complex
97
+ * The constant value is type casted to an apropriate type before the operation.
98
+ * If destiny is byte, then the result is cropped to 0-255.
99
+ *
100
+ * \verbatim im.ProcessArithmeticConstOp(src_image: imImage, src_const: number, dst_image: imImage, op: number) [in Lua 5] \endverbatim
101
+ * \verbatim im.ProcessArithmeticConstOpNew(image: imImage, src_const: number, op: number) -> new_image: imImage [in Lua 5] \endverbatim
102
+ * \ingroup arithm */
103
+ void imProcessArithmeticConstOp(const imImage* src_image, float src_const, imImage* dst_image, int op);
104
+
105
+ /** Blend two images using an alpha value = [a * alpha + b * (1 - alpha)]. \n
106
+ * Can be done in place, images must match size and type. \n
107
+ * alpha value must be in the interval [0.0 - 1.0].
108
+ *
109
+ * \verbatim im.ProcessBlendConst(src_image1: imImage, src_image2: imImage, dst_image: imImage, alpha: number) [in Lua 5] \endverbatim
110
+ * \verbatim im.ProcessBlendConstNew(image1: imImage, image2: imImage, alpha: number) -> new_image: imImage [in Lua 5] \endverbatim
111
+ * \ingroup arithm */
112
+ void imProcessBlendConst(const imImage* src_image1, const imImage* src_image2, imImage* dst_image, float alpha);
113
+
114
+ /** Blend two images using an alpha channel = [a * alpha + b * (1 - alpha)]. \n
115
+ * Can be done in place, images must match size and type. \n
116
+ * alpha_image must have the same data type except for complex images that must be float, and color_space must be IM_GRAY.
117
+ * integer alpha values must be:
118
+ \verbatim
119
+ 0 - 255 IM_BYTE
120
+ 0 - 65535 IM_USHORT
121
+ 0 - 2147483647 IM_INT
122
+ \endverbatim
123
+ * that will be normalized to 0 - 1.
124
+ * \verbatim im.ProcessBlend(src_image1: imImage, src_image2: imImage, alpha_image: imImage, dst_image: imImage) [in Lua 5] \endverbatim
125
+ * \verbatim im.ProcessBlendNew(image1: imImage, image2: imImage, alpha_image: imImage) -> new_image: imImage [in Lua 5] \endverbatim
126
+ * \ingroup arithm */
127
+ void imProcessBlend(const imImage* src_image1, const imImage* src_image2, const imImage* alpha_image, imImage* dst_image);
128
+
129
+ /** Compose two images that have an alpha channel using the OVER operator. \n
130
+ * Can be done in place, images must match size and type. \n
131
+ * Integer alpha values must be:
132
+ \verbatim
133
+ 0 - 255 IM_BYTE
134
+ 0 - 65535 IM_USHORT
135
+ 0 - 2147483647 IM_INT
136
+ \endverbatim
137
+ * that will be normalized to 0 - 1.
138
+ * \verbatim im.ProcessCompose(src_image1: imImage, src_image2: imImage, dst_image: imImage) [in Lua 5] \endverbatim
139
+ * \verbatim im.ProcessComposeNew(image1: imImage, image2: imImage) -> new_image: imImage [in Lua 5] \endverbatim
140
+ * \ingroup arithm */
141
+ void imProcessCompose(const imImage* src_image1, const imImage* src_image2, imImage* dst_image);
142
+
143
+ /** Split a complex image into two images with real and imaginary parts \n
144
+ * or magnitude and phase parts (polar). \n
145
+ * Source image must be IM_CFLOAT, destiny images must be IM_FLOAT.
146
+ *
147
+ * \verbatim im.ProcessSplitComplex(src_image: imImage, dst_image1: imImage, dst_image2: imImage, polar: boolean) [in Lua 5] \endverbatim
148
+ * \verbatim im.ProcessSplitComplexNew(image: imImage, polar: boolean) -> dst_image1: imImage, dst_image2: imImage [in Lua 5] \endverbatim
149
+ * \ingroup arithm */
150
+ void imProcessSplitComplex(const imImage* src_image, imImage* dst_image1, imImage* dst_image2, int polar);
151
+
152
+ /** Merges two images as the real and imaginary parts of a complex image, \n
153
+ * or as magnitude and phase parts (polar = 1). \n
154
+ * Source images must be IM_FLOAT, destiny image must be IM_CFLOAT.
155
+ *
156
+ * \verbatim im.ProcessMergeComplex(src_image1: imImage, src_image2: imImage, dst_image: imImage, polar: boolean) [in Lua 5] \endverbatim
157
+ * \verbatim im.ProcessMergeComplexNew(image1: imImage, image2: imImage, polar: boolean) -> new_image: imImage [in Lua 5] \endverbatim
158
+ * \ingroup arithm */
159
+ void imProcessMergeComplex(const imImage* src_image1, const imImage* src_image2, imImage* dst_image, int polar);
160
+
161
+ /** Calculates the mean of multiple images. \n
162
+ * Images must match size and type.
163
+ *
164
+ * \verbatim im.ProcessMultipleMean(src_image_list: table of imImage, dst_image: imImage) [in Lua 5] \endverbatim
165
+ * \verbatim im.ProcessMultipleMeanNew(src_image_list: table of imImage) -> new_image: imImage [in Lua 5] \endverbatim
166
+ * \ingroup arithm */
167
+ void imProcessMultipleMean(const imImage** src_image_list, int src_image_count, imImage* dst_image);
168
+
169
+ /** Calculates the standard deviation of multiple images. \n
170
+ * Images must match size and type. Use \ref imProcessMultipleMean to calculate the mean_image.
171
+ *
172
+ * \verbatim im.ProcessMultipleStdDev(src_image_list: table of imImage, mean_image: imImage, dst_image: imImage) [in Lua 5] \endverbatim
173
+ * \verbatim im.ProcessMultipleStdDevNew(src_image_list: table of imImage, mean_image: imImage) -> new_image: imImage [in Lua 5] \endverbatim
174
+ * \ingroup arithm */
175
+ void imProcessMultipleStdDev(const imImage** src_image_list, int src_image_count, const imImage *mean_image, imImage* dst_image);
176
+
177
+ /** Calculates the auto-covariance of an image with the mean of a set of images. \n
178
+ * Images must match size and type. Returns zero if the counter aborted. \n
179
+ * Destiny is IM_FLOAT.
180
+ *
181
+ * \verbatim im.ProcessAutoCovariance(src_image: imImage, mean_image: imImage, dst_image: imImage) -> counter: boolean [in Lua 5] \endverbatim
182
+ * \verbatim im.ProcessAutoCovarianceNew(src_image: imImage, mean_image: imImage) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim
183
+ * \ingroup arithm */
184
+ int imProcessAutoCovariance(const imImage* src_image, const imImage* mean_image, imImage* dst_image);
185
+
186
+ /** Multiplies the conjugate of one complex image with another complex image. \n
187
+ * Images must match size. Conj(img1) * img2 \n
188
+ * Can be done in-place.
189
+ *
190
+ * \verbatim im.ProcessMultiplyConj(src_image1: imImage, src_image2: imImage, dst_image: imImage) [in Lua 5] \endverbatim
191
+ * \verbatim im.ProcessMultiplyConjNew(src_image1: imImage, src_image2: imImage) -> new_image: imImage [in Lua 5] \endverbatim
192
+ * \ingroup arithm */
193
+ void imProcessMultiplyConj(const imImage* src_image1, const imImage* src_image2, imImage* dst_image);
194
+
195
+
196
+
197
+ /** \defgroup quantize Additional Image Quantization Operations
198
+ * \par
199
+ * Additionally operations to the \ref imConvertColorSpace function.
200
+ * \par
201
+ * See \ref im_process_pon.h
202
+ * \ingroup process */
203
+
204
+ /** Converts a RGB image to a MAP image using uniform quantization
205
+ * with an optional 8x8 ordered dither. The RGB image must have data type IM_BYTE.
206
+ *
207
+ * \verbatim im.ProcessQuantizeRGBUniform(src_image: imImage, dst_image: imImage, do_dither: boolean) [in Lua 5] \endverbatim
208
+ * \verbatim im.ProcessQuantizeRGBUniformNew(src_image: imImage, do_dither: boolean) -> new_image: imImage [in Lua 5] \endverbatim
209
+ * \ingroup quantize */
210
+ void imProcessQuantizeRGBUniform(const imImage* src_image, imImage* dst_image, int do_dither);
211
+
212
+ /** Quantizes a gray scale image in less that 256 grays using uniform quantization. \n
213
+ * Both images must be IM_BYTE/IM_GRAY. Can be done in place.
214
+ *
215
+ * \verbatim im.ProcessQuantizeGrayUniform(src_image: imImage, dst_image: imImage, grays: number) [in Lua 5] \endverbatim
216
+ * \verbatim im.ProcessQuantizeGrayUniformNew(src_image: imImage, grays: number) -> new_image: imImage [in Lua 5] \endverbatim
217
+ * \ingroup quantize */
218
+ void imProcessQuantizeGrayUniform(const imImage* src_image, imImage* dst_image, int grays);
219
+
220
+
221
+
222
+ /** \defgroup histo Histogram Based Operations
223
+ * \par
224
+ * See \ref im_process_pon.h
225
+ * \ingroup process */
226
+
227
+ /** Performs an histogram expansion based on a percentage of the number of pixels. \n
228
+ * Percentage defines an amount of pixels to include at the lowest level and at the highest level.
229
+ * If its is zero only empty counts of the histogram will be considered. \n
230
+ * Images must be IM_BYTE/(IM_RGB or IM_GRAY). Can be done in place. \n
231
+ * To expand the gammut without using the histogram, by just specifing the lowest and highest levels
232
+ * use the \ref IM_GAMUT_EXPAND tone gammut operation (\ref imProcessToneGamut).
233
+ *
234
+ * \verbatim im.ProcessExpandHistogram(src_image: imImage, dst_image: imImage, percent: number) [in Lua 5] \endverbatim
235
+ * \verbatim im.ProcessExpandHistogramNew(src_image: imImage, percent: number) -> new_image: imImage [in Lua 5] \endverbatim
236
+ * \ingroup histo */
237
+ void imProcessExpandHistogram(const imImage* src_image, imImage* dst_image, float percent);
238
+
239
+ /** Performs an histogram equalization. \n
240
+ * Images must be IM_BYTE/(IM_RGB or IM_GRAY). Can be done in place.
241
+ *
242
+ * \verbatim im.ProcessEqualizeHistogram(src_image: imImage, dst_image: imImage) [in Lua 5] \endverbatim
243
+ * \verbatim im.ProcessEqualizeHistogramNew(src_image: imImage) -> new_image: imImage [in Lua 5] \endverbatim
244
+ * \ingroup histo */
245
+ void imProcessEqualizeHistogram(const imImage* src_image, imImage* dst_image);
246
+
247
+
248
+
249
+ /** \defgroup colorproc Color Processing Operations
250
+ * \par
251
+ * Operations to change the color components configuration.
252
+ * \par
253
+ * See \ref im_process_pon.h
254
+ * \ingroup process */
255
+
256
+ /** Split a RGB image into luma and chroma. \n
257
+ * Chroma is calculated as R-Y,G-Y,B-Y. Source image must be IM_RGB/IM_BYTE. \n
258
+ * luma image is IM_GRAY/IM_BYTE and chroma is IM_RGB/IM_BYTE. \n
259
+ * Source and destiny must have the same size.
260
+ *
261
+ * \verbatim im.ProcessSplitYChroma(src_image: imImage, y_image: imImage, chroma_image: imImage) [in Lua 5] \endverbatim
262
+ * \verbatim im.ProcessSplitYChromaNew(src_image: imImage) -> y_image: imImage, chroma_image: imImage [in Lua 5] \endverbatim
263
+ * \ingroup colorproc */
264
+ void imProcessSplitYChroma(const imImage* src_image, imImage* y_image, imImage* chroma_image);
265
+
266
+ /** Split a RGB image into HSI planes. \n
267
+ * Source image must be IM_RGB/IM_BYTE,IM_FLOAT. Destiny images are all IM_GRAY/IM_FLOAT. \n
268
+ * Source images must normalized to 0-1 if type is IM_FLOAT (\ref imProcessToneGamut can be used). See \ref hsi for a definition of the color conversion.\n
269
+ * Source and destiny must have the same size.
270
+ *
271
+ * \verbatim im.ProcessSplitHSI(src_image: imImage, h_image: imImage, s_image: imImage, i_image: imImage) [in Lua 5] \endverbatim
272
+ * \verbatim im.ProcessSplitHSINew(src_image: imImage) -> h_image: imImage, s_image: imImage, i_image: imImage [in Lua 5] \endverbatim
273
+ * \ingroup colorproc */
274
+ void imProcessSplitHSI(const imImage* src_image, imImage* h_image, imImage* s_image, imImage* i_image);
275
+
276
+ /** Merge HSI planes into a RGB image. \n
277
+ * Source images must be IM_GRAY/IM_FLOAT. Destiny image can be IM_RGB/IM_BYTE,IM_FLOAT. \n
278
+ * Source and destiny must have the same size. See \ref hsi for a definition of the color conversion.
279
+ *
280
+ * \verbatim im.ProcessMergeHSI(h_image: imImage, s_image: imImage, i_image: imImage, dst_image: imImage) [in Lua 5] \endverbatim
281
+ * \verbatim im.ProcessMergeHSINew(h_image: imImage, s_image: imImage, i_image: imImage) -> dst_image: imImage [in Lua 5] \endverbatim
282
+ * \ingroup colorproc */
283
+ void imProcessMergeHSI(const imImage* h_image, const imImage* s_image, const imImage* i_image, imImage* dst_image);
284
+
285
+ /** Split a multicomponent image into separate components, including alpha.\n
286
+ * Destiny images must be IM_GRAY. Size and data types must be all the same.\n
287
+ * The number of destiny images must match the depth of the source image, including alpha.
288
+ *
289
+ * \verbatim im.ProcessSplitComponents(src_image: imImage, dst_image_list: table of imImage) [in Lua 5] \endverbatim
290
+ * \verbatim im.ProcessSplitComponentsNew(src_image: imImage) -> dst_image_list: table of imImage [in Lua 5] \endverbatim
291
+ * \ingroup colorproc */
292
+ void imProcessSplitComponents(const imImage* src_image, imImage** dst_image_list);
293
+
294
+ /** Merges separate components into a multicomponent image, including alpha.\n
295
+ * Source images must be IM_GRAY. Size and data types must be all the same.\n
296
+ * The number of source images must match the depth of the destiny image, including alpha.
297
+ *
298
+ * \verbatim im.ProcessMergeComponents(src_image_list: table of imImage, dst_image: imImage) [in Lua 5] \endverbatim
299
+ * \verbatim im.ProcessMergeComponentsNew(src_image_list: table of imImage) -> dst_image: imImage [in Lua 5] \endverbatim
300
+ * \ingroup colorproc */
301
+ void imProcessMergeComponents(const imImage** src_image_list, imImage* dst_image);
302
+
303
+ /** Normalize the color components by their sum. Example: c1 = c1/(c1+c2+c3). \n
304
+ * Destiny image must be IM_FLOAT.
305
+ *
306
+ * \verbatim im.ProcessNormalizeComponents(src_image: imImage, dst_image: imImage) [in Lua 5] \endverbatim
307
+ * \verbatim im.ProcessNormalizeComponentsNew(src_image: imImage) -> new_image: imImage [in Lua 5] \endverbatim
308
+ * \ingroup colorproc */
309
+ void imProcessNormalizeComponents(const imImage* src_image, imImage* dst_image);
310
+
311
+ /** Replaces the source color by the destiny color. \n
312
+ * The color will be type casted to the image data type. \n
313
+ * The colors must have the same number of components of the images. \n
314
+ * Supports all color spaces and all data types except IM_CFLOAT.
315
+ *
316
+ * \verbatim im.ProcessReplaceColor(src_image: imImage, dst_image: imImage, src_color: table of numbers, dst_color: table of numbers) [in Lua 5] \endverbatim
317
+ * \verbatim im.ProcessReplaceColorNew(src_image: imImage, src_color: table of numbers, dst_color: table of numbers) -> new_image: imImage [in Lua 5] \endverbatim
318
+ * \ingroup colorproc */
319
+ void imProcessReplaceColor(const imImage* src_image, imImage* dst_image, float* src_color, float* dst_color);
320
+
321
+
322
+
323
+ /** \defgroup logic Logical Arithmetic Operations
324
+ * \par
325
+ * Logical binary math operations for images.
326
+ * \par
327
+ * See \ref im_process_pon.h
328
+ * \ingroup process */
329
+
330
+ /** Logical Operations.
331
+ * \ingroup logic */
332
+ enum imLogicOp {
333
+ IM_BIT_AND, /**< and = a & b */
334
+ IM_BIT_OR, /**< or = a | b */
335
+ IM_BIT_XOR /**< xor = ~(a | b) */
336
+ };
337
+
338
+ /** Apply a logical operation.\n
339
+ * Images must have data type IM_BYTE, IM_USHORT or IM_INT. Can be done in place.
340
+ *
341
+ * \verbatim im.ProcessBitwiseOp(src_image1: imImage, src_image2: imImage, dst_image: imImage, op: number) [in Lua 5] \endverbatim
342
+ * \verbatim im.ProcessBitwiseOpNew(src_image1: imImage, src_image2: imImage, op: number) -> new_image: imImage [in Lua 5] \endverbatim
343
+ * \ingroup logic */
344
+ void imProcessBitwiseOp(const imImage* src_image1, const imImage* src_image2, imImage* dst_image, int op);
345
+
346
+ /** Apply a logical NOT operation.\n
347
+ * Images must have data type IM_BYTE, IM_USHORT or IM_INT. Can be done in place.
348
+ *
349
+ * \verbatim im.ProcessBitwiseNot(src_image: imImage, dst_image: imImage) [in Lua 5] \endverbatim
350
+ * \verbatim im.ProcessBitwiseNotNew(src_image: imImage) -> new_image: imImage [in Lua 5] \endverbatim
351
+ * \ingroup logic */
352
+ void imProcessBitwiseNot(const imImage* src_image, imImage* dst_image);
353
+
354
+ /** Apply a bit mask. \n
355
+ * The same as imProcessBitwiseOp but the second image is replaced by a fixed mask. \n
356
+ * Images must have data type IM_BYTE. It is valid only for AND, OR and XOR. Can be done in place.
357
+ *
358
+ * \verbatim im.ProcessBitMask(src_image: imImage, dst_image: imImage, mask: string, op: number) [in Lua 5] \endverbatim
359
+ * \verbatim im.ProcessBitMaskNew(src_image: imImage, mask: string, op: number) -> new_image: imImage [in Lua 5] \endverbatim
360
+ * In Lua, mask is a string with 0s and 1s, for example: "11001111".
361
+ * \ingroup logic */
362
+ void imProcessBitMask(const imImage* src_image, imImage* dst_image, unsigned char mask, int op);
363
+
364
+ /** Extract or Reset a bit plane. For ex: 000X0000 or XXX0XXXX (plane=3).\n
365
+ * Images must have data type IM_BYTE. Can be done in place.
366
+ *
367
+ * \verbatim im.ProcessBitPlane(src_image: imImage, dst_image: imImage, plane: number, do_reset: boolean) [in Lua 5] \endverbatim
368
+ * \verbatim im.ProcessBitPlaneNew(src_image: imImage, plane: number, do_reset: boolean) -> new_image: imImage [in Lua 5] \endverbatim
369
+ * \ingroup logic */
370
+ void imProcessBitPlane(const imImage* src_image, imImage* dst_image, int plane, int do_reset);
371
+
372
+
373
+
374
+ /** \defgroup render Synthetic Image Render
375
+ * \par
376
+ * Renders some 2D mathematical functions as images. All the functions operates in place
377
+ * and supports all data types except IM_CFLOAT.
378
+ * \par
379
+ * See \ref im_process_pon.h
380
+ * \ingroup process */
381
+
382
+ /** Render Funtion.
383
+ * \verbatim render_func(x: number, y: number, d: number, param: table of number) -> value: number [in Lua 5] \endverbatim
384
+ * \ingroup render */
385
+ typedef float (*imRenderFunc)(int x, int y, int d, float* param);
386
+
387
+ /** Render Conditional Funtion.
388
+ * \verbatim render_cond_func(x: number, y: number, d: number, param: table of number) -> value: number, cond: boolean [in Lua 5] \endverbatim
389
+ * \ingroup render */
390
+ typedef float (*imRenderCondFunc)(int x, int y, int d, int *cond, float* param);
391
+
392
+ /** Render a synthetic image using a render function. \n
393
+ * plus will make the render be added to the current image data,
394
+ * or else all data will be replaced. All the render functions use this or the conditional function. \n
395
+ * Returns zero if the counter aborted.
396
+ *
397
+ * \verbatim im.ProcessRenderOp(image: imImage, render_func: function, render_name: string, param: table of number, plus: boolean) -> counter: boolean [in Lua 5] \endverbatim
398
+ * \ingroup render */
399
+ int imProcessRenderOp(imImage* image, imRenderFunc render_func, char* render_name, float* param, int plus);
400
+
401
+ /** Render a synthetic image using a conditional render function. \n
402
+ * Data will be rendered only if the condional param is true. \n
403
+ * Returns zero if the counter aborted.
404
+ *
405
+ * \verbatim im.ProcessRenderCondOp(image: imImage, render_cond_func: function, render_name: string, param: table of number) -> counter: boolean [in Lua 5] \endverbatim
406
+ * \ingroup render */
407
+ int imProcessRenderCondOp(imImage* image, imRenderCondFunc render_cond_func, char* render_name, float* param);
408
+
409
+ /** Render speckle noise on existing data. Can be done in place.
410
+ *
411
+ * \verbatim im.ProcessRenderAddSpeckleNoise(src_image: imImage, dst_image: imImage, percent: number) -> counter: boolean [in Lua 5] \endverbatim
412
+ * \verbatim im.ProcessRenderAddSpeckleNoiseNew(src_image: imImage, percent: number) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim
413
+ * \ingroup render */
414
+ int imProcessRenderAddSpeckleNoise(const imImage* src_image, imImage* dst_image, float percent);
415
+
416
+ /** Render gaussian noise on existing data. Can be done in place.
417
+ *
418
+ * \verbatim im.ProcessRenderAddGaussianNoise(src_image: imImage, dst_image: imImage, mean: number, stddev: number) -> counter: boolean [in Lua 5] \endverbatim
419
+ * \verbatim im.ProcessRenderAddGaussianNoiseNew(src_image: imImage, mean: number, stddev: number) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim
420
+ * \ingroup render */
421
+ int imProcessRenderAddGaussianNoise(const imImage* src_image, imImage* dst_image, float mean, float stddev);
422
+
423
+ /** Render uniform noise on existing data. Can be done in place.
424
+ *
425
+ * \verbatim im.ProcessRenderAddUniformNoise(src_image: imImage, dst_image: imImage, mean: number, stddev: number) -> counter: boolean [in Lua 5] \endverbatim
426
+ * \verbatim im.ProcessRenderAddUniformNoiseNew(src_image: imImage, mean: number, stddev: number) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim
427
+ * \ingroup render */
428
+ int imProcessRenderAddUniformNoise(const imImage* src_image, imImage* dst_image, float mean, float stddev);
429
+
430
+ /** Render random noise.
431
+ *
432
+ * \verbatim im.ProcessRenderRandomNoise(image: imImage) -> counter: boolean [in Lua 5] \endverbatim
433
+ * \ingroup render */
434
+ int imProcessRenderRandomNoise(imImage* image);
435
+
436
+ /** Render a constant. The number of values must match the depth of the image.
437
+ *
438
+ * \verbatim im.ProcessRenderConstant(image: imImage, value: table of number) -> counter: boolean [in Lua 5] \endverbatim
439
+ * \ingroup render */
440
+ int imProcessRenderConstant(imImage* image, float* value);
441
+
442
+ /** Render a centered wheel.
443
+ *
444
+ * \verbatim im.ProcessRenderWheel(image: imImage, internal_radius: number, external_radius: number) -> counter: boolean [in Lua 5] \endverbatim
445
+ * \ingroup render */
446
+ int imProcessRenderWheel(imImage* image, int internal_radius, int external_radius);
447
+
448
+ /** Render a centered cone.
449
+ *
450
+ * \verbatim im.ProcessRenderCone(image: imImage, radius: number) -> counter: boolean [in Lua 5] \endverbatim
451
+ * \ingroup render */
452
+ int imProcessRenderCone(imImage* image, int radius);
453
+
454
+ /** Render a centered tent.
455
+ *
456
+ * \verbatim im.ProcessRenderTent(image: imImage, tent_width: number, tent_height: number) -> counter: boolean [in Lua 5] \endverbatim
457
+ * \ingroup render */
458
+ int imProcessRenderTent(imImage* image, int tent_width, int tent_height);
459
+
460
+ /** Render a ramp. Direction can be vertical (1) or horizontal (0).
461
+ *
462
+ * \verbatim im.ProcessRenderRamp(image: imImage, start: number, end: number, vert_dir: boolean) -> counter: boolean [in Lua 5] \endverbatim
463
+ * \ingroup render */
464
+ int imProcessRenderRamp(imImage* image, int start, int end, int vert_dir);
465
+
466
+ /** Render a centered box.
467
+ *
468
+ * \verbatim im.ProcessRenderBox(image: imImage, box_width: number, box_height: number) -> counter: boolean [in Lua 5] \endverbatim
469
+ * \ingroup render */
470
+ int imProcessRenderBox(imImage* image, int box_width, int box_height);
471
+
472
+ /** Render a centered sinc.
473
+ *
474
+ * \verbatim im.ProcessRenderSinc(image: imImage, x_period: number, y_period: number) -> counter: boolean [in Lua 5] \endverbatim
475
+ * \ingroup render */
476
+ int imProcessRenderSinc(imImage* image, float x_period, float y_period);
477
+
478
+ /** Render a centered gaussian.
479
+ *
480
+ * \verbatim im.ProcessRenderGaussian(image: imImage, stddev: number) -> counter: boolean [in Lua 5] \endverbatim
481
+ * \ingroup render */
482
+ int imProcessRenderGaussian(imImage* image, float stddev);
483
+
484
+ /** Render the laplacian of a centered gaussian.
485
+ *
486
+ * \verbatim im.ProcessRenderLapOfGaussian(image: imImage, stddev: number) -> counter: boolean [in Lua 5] \endverbatim
487
+ * \ingroup render */
488
+ int imProcessRenderLapOfGaussian(imImage* image, float stddev);
489
+
490
+ /** Render a centered cosine.
491
+ *
492
+ * \verbatim im.ProcessRenderCosine(image: imImage, x_period: number, y_period: number) -> counter: boolean [in Lua 5] \endverbatim
493
+ * \ingroup render */
494
+ int imProcessRenderCosine(imImage* image, float x_period, float y_period);
495
+
496
+ /** Render a centered grid.
497
+ *
498
+ * \verbatim im.ProcessRenderGrid(image: imImage, x_space: number, y_space: number) -> counter: boolean [in Lua 5] \endverbatim
499
+ * \ingroup render */
500
+ int imProcessRenderGrid(imImage* image, int x_space, int y_space);
501
+
502
+ /** Render a centered chessboard.
503
+ *
504
+ * \verbatim im.ProcessRenderChessboard(image: imImage, x_space: number, y_space: number) -> counter: boolean [in Lua 5] \endverbatim
505
+ * \ingroup render */
506
+ int imProcessRenderChessboard(imImage* image, int x_space, int y_space);
507
+
508
+
509
+
510
+ /** \defgroup tonegamut Tone Gamut Operations
511
+ * \par
512
+ * Operations that try to preserve the min-max interval in the output (the dynamic range).
513
+ * \par
514
+ * See \ref im_process_pon.h
515
+ * \ingroup process */
516
+
517
+
518
+ /** Tone Gamut Operations.
519
+ * \ingroup tonegamut */
520
+ enum imToneGamut {
521
+ IM_GAMUT_NORMALIZE, /**< normalize = (a-min) / (max-min) (destiny image must be IM_FLOAT) */
522
+ IM_GAMUT_POW, /**< pow = ((a-min) / (max-min))^gamma * (max-min) + min \n
523
+ param[0]=gamma */
524
+ IM_GAMUT_LOG, /**< log = log(K * (a-min) / (max-min) + 1))*(max-min)/log(K+1) + min \n
525
+ param[0]=K (K>0) */
526
+ IM_GAMUT_EXP, /**< exp = (exp(K * (a-min) / (max-min)) - 1))*(max-min)/(exp(K)-1) + min \n
527
+ param[0]=K */
528
+ IM_GAMUT_INVERT, /**< invert = max - (a-min) */
529
+ IM_GAMUT_ZEROSTART, /**< zerostart = a - min */
530
+ IM_GAMUT_SOLARIZE, /**< solarize = a < level ? a: (level * (max-min) - a * (level-min)) / (max-level) \n
531
+ param[0]=level percentage (0-100) relative to min-max \n
532
+ photography solarization effect. */
533
+ IM_GAMUT_SLICE, /**< slice = start < a || a > end ? min: binarize? max: a \n
534
+ param[0]=start, param[1]=end, param[2]=binarize */
535
+ IM_GAMUT_EXPAND, /**< expand = a < start ? min: a > end ? max : (a-start)*(max-min)/(end-start) + min \n
536
+ param[0]=start, param[1]=end */
537
+ IM_GAMUT_CROP, /**< crop = a < start ? start: a > end ? end : a \n
538
+ param[0]=start, param[1]=end */
539
+ IM_GAMUT_BRIGHTCONT /**< brightcont = a < min ? min: a > max ? max: a * tan(c_a) + b_s + (max-min)*(1 - tan(c_a))/2 \n
540
+ param[0]=bright_shift (-100%..+100%), param[1]=contrast_factor (-100%..+100%) \n
541
+ change brightness and contrast simultaneously. */
542
+ };
543
+
544
+ /** Apply a gamut operation with arguments. \n
545
+ * Supports all data types except IM_CFLOAT. \n
546
+ * The linear operation do a special convertion when min > 0 and max < 1, it forces min=0 and max=1. \n
547
+ * IM_BYTE images have min=0 and max=255 always. \n
548
+ * Can be done in place. When there is no extra params, can use NULL.
549
+ *
550
+ * \verbatim im.ProcessToneGamut(src_image: imImage, dst_image: imImage, op: number, param: table of number) [in Lua 5] \endverbatim
551
+ * \verbatim im.ProcessToneGamutNew(src_image: imImage, op: number, param: table of number) -> new_image: imImage [in Lua 5] \endverbatim
552
+ * \ingroup tonegamut */
553
+ void imProcessToneGamut(const imImage* src_image, imImage* dst_image, int op, float* param);
554
+
555
+ /** Converts from (0-1) to (0-255), crop out of bounds values. \n
556
+ * Source image must be IM_FLOAT, and destiny image must be IM_BYTE.
557
+ *
558
+ * \verbatim im.ProcessUnNormalize(src_image: imImage, dst_image: imImage) [in Lua 5] \endverbatim
559
+ * \verbatim im.ProcessUnNormalizeNew(src_image: imImage) -> new_image: imImage [in Lua 5] \endverbatim
560
+ * \ingroup tonegamut */
561
+ void imProcessUnNormalize(const imImage* src_image, imImage* dst_image);
562
+
563
+ /** Directly converts IM_USHORT, IM_INT and IM_FLOAT into IM_BYTE images. \n
564
+ * This can also be done using \ref imConvertDataType with IM_CAST_DIRECT.
565
+ *
566
+ * \verbatim im.ProcessDirectConv(src_image: imImage, dst_image: imImage) [in Lua 5] \endverbatim
567
+ * \verbatim im.ProcessDirectConvNew(src_image: imImage) -> new_image: imImage [in Lua 5] \endverbatim
568
+ * \ingroup tonegamut */
569
+ void imProcessDirectConv(const imImage* src_image, imImage* dst_image);
570
+
571
+ /** A negative effect. Uses \ref imProcessToneGamut with IM_GAMUT_INVERT for non MAP images. \n
572
+ * Supports all color spaces and all data types except IM_CFLOAT. \n
573
+ * Can be done in place.
574
+ *
575
+ * \verbatim im.ProcessNegative(src_image: imImage, dst_image: imImage) [in Lua 5] \endverbatim
576
+ * \verbatim im.ProcessNegativeNew(src_image: imImage) -> new_image: imImage [in Lua 5] \endverbatim
577
+ * \ingroup tonegamut */
578
+ void imProcessNegative(const imImage* src_image, imImage* dst_image);
579
+
580
+
581
+
582
+ /** \defgroup threshold Threshold Operations
583
+ * \par
584
+ * Operations that converts a usually IM_GRAY/IM_BYTE image into a IM_BINARY image using several threshold techniques.
585
+ * \par
586
+ * See \ref im_process_pon.h
587
+ * \ingroup process */
588
+
589
+ /** Apply a manual threshold. \n
590
+ * threshold = a <= level ? 0: value \n
591
+ * Normal value is 1 but another common value is 255. Can be done in place for IM_BYTE source. \n
592
+ * Supports all integer IM_GRAY images as source, and IM_BINARY as destiny.
593
+ *
594
+ * \verbatim im.ProcessThreshold(src_image: imImage, dst_image: imImage, level: number, value: number) [in Lua 5] \endverbatim
595
+ * \verbatim im.ProcessThresholdNew(src_image: imImage, level: number, value: number) -> new_image: imImage [in Lua 5] \endverbatim
596
+ * \ingroup threshold */
597
+ void imProcessThreshold(const imImage* src_image, imImage* dst_image, int level, int value);
598
+
599
+ /** Apply a threshold by the difference of two images. \n
600
+ * threshold = a1 <= a2 ? 0: 1 \n
601
+ * Can be done in place.
602
+ *
603
+ * \verbatim im.ProcessThresholdByDiff(src_image1: imImage, src_image2: imImage, dst_image: imImage) [in Lua 5] \endverbatim
604
+ * \verbatim im.ProcessThresholdByDiffNew(src_image1: imImage, src_image2: imImage) -> new_image: imImage [in Lua 5] \endverbatim
605
+ * \ingroup threshold */
606
+ void imProcessThresholdByDiff(const imImage* src_image1, const imImage* src_image2, imImage* dst_image);
607
+
608
+ /** Apply a threshold by the Hysteresis method. \n
609
+ * Hysteresis thersholding of edge pixels. Starting at pixels with a
610
+ * value greater than the HIGH threshold, trace a connected sequence
611
+ * of pixels that have a value greater than the LOW threhsold. \n
612
+ * Supports only IM_BYTE images.
613
+ * Note: could not find the original source code author name.
614
+ *
615
+ * \verbatim im.ProcessHysteresisThreshold(src_image: imImage, dst_image: imImage, low_thres: number, high_thres: number) [in Lua 5] \endverbatim
616
+ * \verbatim im.ProcessHysteresisThresholdNew(src_image: imImage, low_thres: number, high_thres: number) -> new_image: imImage [in Lua 5] \endverbatim
617
+ * \ingroup threshold */
618
+ void imProcessHysteresisThreshold(const imImage* src_image, imImage* dst_image, int low_thres, int high_thres);
619
+
620
+ /** Estimates hysteresis low and high threshold levels. \n
621
+ * Supports only IM_BYTE images.
622
+ * Usefull for \ref imProcessHysteresisThreshold.
623
+ *
624
+ * \verbatim im.ProcessHysteresisThresEstimate(image: imImage) -> low_level: number, high_level: number [in Lua 5] \endverbatim
625
+ * \ingroup threshold */
626
+ void imProcessHysteresisThresEstimate(const imImage* image, int *low_level, int *high_level);
627
+
628
+ /** Calculates the threshold level for manual threshold using an uniform error approach. \n
629
+ * Supports only IM_BYTE images.
630
+ * Extracted from XITE, Copyright 1991, Blab, UiO \n
631
+ * http://www.ifi.uio.no/~blab/Software/Xite/
632
+ \verbatim
633
+ Reference:
634
+ S. M. Dunn & D. Harwood & L. S. Davis:
635
+ "Local Estimation of the Uniform Error Threshold"
636
+ IEEE Trans. on PAMI, Vol PAMI-6, No 6, Nov 1984.
637
+ Comments: It only works well on images whith large objects.
638
+ Author: Olav Borgli, BLAB, ifi, UiO
639
+ Image processing lab, Department of Informatics, University of Oslo
640
+ \endverbatim
641
+ * Returns the used level.
642
+ *
643
+ * \verbatim im.ProcessUniformErrThreshold(src_image: imImage, dst_image: imImage) -> level: number [in Lua 5] \endverbatim
644
+ * \verbatim im.ProcessUniformErrThresholdNew(src_image: imImage) -> level: number, new_image: imImage [in Lua 5] \endverbatim
645
+ * \ingroup threshold */
646
+ int imProcessUniformErrThreshold(const imImage* src_image, imImage* dst_image);
647
+
648
+ /** Apply a dithering on each image channel by using a difusion error method. \n
649
+ * It can be applied on any IM_BYTE images. It will "threshold" each channel indivudually, so
650
+ * source and destiny must be of the same depth.
651
+ *
652
+ * \verbatim im.ProcessDifusionErrThreshold(src_image: imImage, dst_image: imImage, level: number) [in Lua 5] \endverbatim
653
+ * \verbatim im.ProcessDifusionErrThresholdNew(src_image: imImage, level: number) -> new_image: imImage [in Lua 5] \endverbatim
654
+ * \ingroup threshold */
655
+ void imProcessDifusionErrThreshold(const imImage* src_image, imImage* dst_image, int level);
656
+
657
+ /** Calculates the threshold level for manual threshold using a percentage of pixels
658
+ * that should stay bellow the threshold. \n
659
+ * Supports only IM_BYTE images.
660
+ * Returns the used level.
661
+ *
662
+ * \verbatim im.ProcessPercentThreshold(src_image: imImage, dst_image: imImage, percent: number) -> level: number [in Lua 5] \endverbatim
663
+ * \verbatim im.ProcessPercentThresholdNew(src_image: imImage, percent: number) -> level: number, new_image: imImage [in Lua 5] \endverbatim
664
+ * \ingroup threshold */
665
+ int imProcessPercentThreshold(const imImage* src_image, imImage* dst_image, float percent);
666
+
667
+ /** Calculates the threshold level for manual threshold using the Otsu approach. \n
668
+ * Returns the used level. \n
669
+ * Supports only IM_BYTE images.
670
+ * Original implementation by Flavio Szenberg.
671
+ *
672
+ * \verbatim im.ProcessOtsuThreshold(src_image: imImage, dst_image: imImage) -> level: number [in Lua 5] \endverbatim
673
+ * \verbatim im.ProcessOtsuThresholdNew(src_image: imImage) -> level: number, new_image: imImage [in Lua 5] \endverbatim
674
+ * \ingroup threshold */
675
+ int imProcessOtsuThreshold(const imImage* src_image, imImage* dst_image);
676
+
677
+ /** Calculates the threshold level for manual threshold using (max-min)/2. \n
678
+ * Returns the used level. \n
679
+ * Supports all integer IM_GRAY images as source, and IM_BINARY as destiny.
680
+ *
681
+ * \verbatim im.ProcessMinMaxThreshold(src_image: imImage, dst_image: imImage) -> level: number [in Lua 5] \endverbatim
682
+ * \verbatim im.ProcessMinMaxThresholdNew(src_image: imImage) -> level: number, new_image: imImage [in Lua 5] \endverbatim
683
+ * \ingroup threshold */
684
+ int imProcessMinMaxThreshold(const imImage* src_image, imImage* dst_image);
685
+
686
+ /** Estimates Local Max threshold level for IM_BYTE images.
687
+ *
688
+ * \verbatim im.ProcessLocalMaxThresEstimate(image: imImage) -> level: number [in Lua 5] \endverbatim
689
+ * \ingroup threshold */
690
+ void imProcessLocalMaxThresEstimate(const imImage* image, int *level);
691
+
692
+ /** Apply a manual threshold using an interval. \n
693
+ * threshold = start_level <= a <= end_level ? 1: 0 \n
694
+ * Normal value is 1 but another common value is 255. Can be done in place for IM_BYTE source. \n
695
+ * Supports all integer IM_GRAY images as source, and IM_BINARY as destiny.
696
+ *
697
+ * \verbatim im.ProcessSliceThreshold(src_image: imImage, dst_image: imImage, start_level: number, end_level: number) [in Lua 5] \endverbatim
698
+ * \verbatim im.ProcessSliceThresholdNew(src_image: imImage, start_level: number, end_level: number) -> new_image: imImage [in Lua 5] \endverbatim
699
+ * \ingroup threshold */
700
+ void imProcessSliceThreshold(const imImage* src_image, imImage* dst_image, int start_level, int end_level);
701
+
702
+
703
+ /** \defgroup effects Special Effects
704
+ * \par
705
+ * Operations to change image appearance.
706
+ * \par
707
+ * See \ref im_process_pon.h
708
+ * \ingroup process */
709
+
710
+
711
+ /** Generates a zoom in effect averaging colors inside a square region. \n
712
+ * Operates only on IM_BYTE images.
713
+ *
714
+ * \verbatim im.ProcessPixelate(src_image: imImage, dst_image: imImage, box_size: number) [in Lua 5] \endverbatim
715
+ * \verbatim im.ProcessPixelateNew(src_image: imImage, box_size: number) -> new_image: imImage [in Lua 5] \endverbatim
716
+ * \ingroup effects */
717
+ void imProcessPixelate(const imImage* src_image, imImage* dst_image, int box_size);
718
+
719
+ /** A simple Posterize effect. It reduces the number of colors in the image eliminating
720
+ * less significant bit planes. Can have 1 to 7 levels. See \ref imProcessBitMask. \n
721
+ * Images must have data type IM_BYTE.
722
+ *
723
+ * \verbatim im.ProcessPosterize(src_image: imImage, dst_image: imImage, level: number) [in Lua 5] \endverbatim
724
+ * \verbatim im.ProcessPosterizeNew(src_image: imImage, level: number) -> new_image: imImage [in Lua 5] \endverbatim
725
+ * \ingroup effects */
726
+ void imProcessPosterize(const imImage* src_image, imImage* dst_image, int level);
727
+
728
+
729
+
730
+ #if defined(__cplusplus)
731
+ }
732
+ #endif
733
+
734
+ #endif