Skip to content
Browse files

Update to latest 2.0 beta. 50% of tests pass.

  • Loading branch information...
1 parent a938b66 commit 7d1ce740af4dd413a6ecef3e24c1210add8facf5 @jdf committed
Showing with 1,708 additions and 25 deletions.
  1. +1 −1 build.xml
  2. BIN buildtime/lib/processing/core.jar
  3. +10 −4 buildtime/py/processing_parser.py
  4. +1 −0 buildtime/template/DriverImpl.java.cog
  5. BIN libraries/processing/dxf.jar
  6. BIN libraries/processing/minim/jsminim.jar
  7. BIN libraries/processing/minim/minim-spi.jar
  8. BIN libraries/processing/minim/minim.jar
  9. +1 −1 libraries/processing/minim/version.txt
  10. BIN libraries/processing/net.jar
  11. +0 −19 libraries/processing/opengl/export.txt
  12. BIN libraries/processing/opengl/gluegen-rt-natives-linux-amd64.jar
  13. BIN libraries/processing/opengl/gluegen-rt-natives-linux-i586.jar
  14. BIN libraries/processing/opengl/gluegen-rt-natives-macosx-ppc.jar
  15. BIN libraries/processing/opengl/gluegen-rt-natives-macosx-universal.jar
  16. BIN libraries/processing/opengl/gluegen-rt-natives-windows-amd64.jar
  17. BIN libraries/processing/opengl/gluegen-rt-natives-windows-i586.jar
  18. BIN libraries/processing/opengl/gluegen-rt.jar
  19. BIN libraries/processing/opengl/gluegen-rt.jar.pack.gz
  20. BIN libraries/processing/opengl/jogl-all-natives-linux-amd64.jar
  21. BIN libraries/processing/opengl/jogl-all-natives-linux-i586.jar
  22. BIN libraries/processing/opengl/jogl-all-natives-macosx-universal.jar
  23. BIN libraries/processing/opengl/jogl-all-natives-windows-amd64.jar
  24. BIN libraries/processing/opengl/jogl-all-natives-windows-i586.jar
  25. BIN libraries/processing/opengl/jogl-all.jar
  26. BIN libraries/processing/opengl/jogl-natives-linux-amd64.jar
  27. BIN libraries/processing/opengl/jogl-natives-linux-i586.jar
  28. BIN libraries/processing/opengl/jogl-natives-macosx-ppc.jar
  29. BIN libraries/processing/opengl/jogl-natives-macosx-universal.jar
  30. BIN libraries/processing/opengl/jogl-natives-windows-amd64.jar
  31. BIN libraries/processing/opengl/jogl-natives-windows-i586.jar
  32. BIN libraries/processing/opengl/jogl.dll
  33. BIN libraries/processing/opengl/jogl.jar
  34. BIN libraries/processing/opengl/jogl.jar.pack.gz
  35. BIN libraries/processing/opengl/jogl_cg.dll
  36. BIN libraries/processing/opengl/libgluegen-rt.so
  37. BIN libraries/processing/opengl/libjogl.jnilib
  38. BIN libraries/processing/opengl/libjogl.so
  39. BIN libraries/processing/opengl/libjogl_awt.so
  40. BIN libraries/processing/opengl/libjogl_cg.jnilib
  41. BIN libraries/processing/opengl/libjogl_cg.so
  42. BIN libraries/processing/opengl/opengl.jar
  43. BIN libraries/processing/pdf/pdf.jar
  44. BIN libraries/processing/serial/{ → library}/RXTXcomm.jar
  45. +1 −0 libraries/processing/serial/library/export.txt
  46. BIN libraries/processing/serial/library/linux32/librxtxSerial.so
  47. BIN libraries/processing/serial/library/linux64/librxtxSerial.so
  48. BIN libraries/processing/serial/library/macosx/librxtxSerial.jnilib
  49. BIN libraries/processing/serial/library/serial.jar
  50. 0 libraries/processing/serial/{ → library/windows32}/rxtxSerial.dll
  51. BIN libraries/processing/serial/librxtxSerial.jnilib
  52. BIN libraries/processing/serial/librxtxSerial.so
  53. BIN libraries/processing/serial/serial.jar
  54. BIN libraries/processing/video.jar
  55. +27 −0 libraries/processing/video/build.xml
  56. +136 −0 libraries/processing/video/examples/Capture/AsciiVideo/AsciiVideo.pde
  57. BIN libraries/processing/video/examples/Capture/AsciiVideo/data/UniversLTStd-Light-48.vlw
  58. +69 −0 libraries/processing/video/examples/Capture/BackgroundSubtraction/BackgroundSubtraction.pde
  59. +58 −0 libraries/processing/video/examples/Capture/BrightnessThresholding/BrightnessThresholding.pde
  60. +53 −0 libraries/processing/video/examples/Capture/BrightnessTracking/BrightnessTracking.pde
  61. +145 −0 libraries/processing/video/examples/Capture/ColorSorting/ColorSorting.pde
  62. +29 −0 libraries/processing/video/examples/Capture/ColorSorting/Tuple.pde
  63. +144 −0 libraries/processing/video/examples/Capture/Disgrand/Disgrand.pde
  64. +29 −0 libraries/processing/video/examples/Capture/Disgrand/Tuple.pde
  65. +65 −0 libraries/processing/video/examples/Capture/FrameDifferencing/FrameDifferencing.pde
  66. +60 −0 libraries/processing/video/examples/Capture/Framingham/Framingham.pde
  67. +40 −0 libraries/processing/video/examples/Capture/GettingStartedCapture/GettingStartedCapture.pde
  68. +205 −0 libraries/processing/video/examples/Capture/HsvSpace/HsvSpace.pde
  69. +33 −0 libraries/processing/video/examples/Capture/HsvSpace/Tuple.pde
  70. +55 −0 libraries/processing/video/examples/Capture/LivePocky/LivePocky.pde
  71. +73 −0 libraries/processing/video/examples/Capture/Mirror/Mirror.pde
  72. +60 −0 libraries/processing/video/examples/Capture/Mirror2/Mirror2.pde
  73. +75 −0 libraries/processing/video/examples/Capture/RadialPocky/RadialPocky.pde
  74. +54 −0 libraries/processing/video/examples/Capture/SlitScan/SlitScan.pde
  75. +79 −0 libraries/processing/video/examples/Movie/Frames/Frames.pde
  76. BIN libraries/processing/video/examples/Movie/Frames/data/transit.mov
  77. +30 −0 libraries/processing/video/examples/Movie/Loop/Loop.pde
  78. BIN libraries/processing/video/examples/Movie/Loop/data/transit.mov
  79. +51 −0 libraries/processing/video/examples/Movie/Pixelate/Pixelate.pde
  80. BIN libraries/processing/video/examples/Movie/Pixelate/data/transit.mov
  81. +51 −0 libraries/processing/video/examples/Movie/Reverse/Reverse.pde
  82. BIN libraries/processing/video/examples/Movie/Reverse/data/transit.mkv
  83. +39 −0 libraries/processing/video/examples/Movie/Scratch/Scratch.pde
  84. BIN libraries/processing/video/examples/Movie/Scratch/data/transit.mov
  85. +33 −0 libraries/processing/video/examples/Movie/Speed/Speed.pde
  86. BIN libraries/processing/video/examples/Movie/Speed/data/transit.mov
  87. +1 −0 libraries/processing/video/library/export.txt
  88. BIN libraries/processing/video/library/gstreamer-java.jar
  89. BIN libraries/processing/video/library/jna.jar
  90. BIN libraries/processing/video/library/macosx32/libcrypto.dylib
  91. BIN libraries/processing/video/library/macosx32/libdc1394.dylib
  92. BIN libraries/processing/video/library/macosx32/libdca.dylib
  93. BIN libraries/processing/video/library/macosx32/libdv.dylib
  94. BIN libraries/processing/video/library/macosx32/libffi.dylib
  95. BIN libraries/processing/video/library/macosx32/libgio-2.0.dylib
  96. BIN libraries/processing/video/library/macosx32/libglib-2.0.dylib
  97. BIN libraries/processing/video/library/macosx32/libgmodule-2.0.dylib
  98. BIN libraries/processing/video/library/macosx32/libgobject-2.0.dylib
  99. BIN libraries/processing/video/library/macosx32/libgstapp-0.10.dylib
  100. BIN libraries/processing/video/library/macosx32/libgstaudio-0.10.dylib
  101. BIN libraries/processing/video/library/macosx32/libgstbase-0.10.dylib
  102. BIN libraries/processing/video/library/macosx32/libgstbasecamerabinsrc-0.10.dylib
  103. BIN libraries/processing/video/library/macosx32/libgstbasevideo-0.10.dylib
  104. BIN libraries/processing/video/library/macosx32/libgstcodecparsers-0.10.dylib
  105. BIN libraries/processing/video/library/macosx32/libgstcontroller-0.10.dylib
  106. BIN libraries/processing/video/library/macosx32/libgstdataprotocol-0.10.dylib
  107. BIN libraries/processing/video/library/macosx32/libgstfft-0.10.dylib
  108. BIN libraries/processing/video/library/macosx32/libgstinterfaces-0.10.dylib
  109. BIN libraries/processing/video/library/macosx32/libgstnetbuffer-0.10.dylib
  110. BIN libraries/processing/video/library/macosx32/libgstpbutils-0.10.dylib
  111. BIN libraries/processing/video/library/macosx32/libgstphotography-0.10.dylib
  112. BIN libraries/processing/video/library/macosx32/libgstreamer-0.10.dylib
  113. BIN libraries/processing/video/library/macosx32/libgstriff-0.10.dylib
  114. BIN libraries/processing/video/library/macosx32/libgstrtp-0.10.dylib
  115. BIN libraries/processing/video/library/macosx32/libgstrtsp-0.10.dylib
  116. BIN libraries/processing/video/library/macosx32/libgstsdp-0.10.dylib
  117. BIN libraries/processing/video/library/macosx32/libgsttag-0.10.dylib
  118. BIN libraries/processing/video/library/macosx32/libgstvideo-0.10.dylib
  119. BIN libraries/processing/{opengl/gluegen-rt.dll → video/library/macosx32/libgthread-2.0.dylib}
  120. BIN libraries/processing/video/library/macosx32/libiconv.dylib
  121. BIN libraries/processing/video/library/macosx32/libintl.dylib
  122. BIN libraries/processing/video/library/macosx32/libjasper.dylib
  123. BIN libraries/processing/video/library/macosx32/libjpeg.dylib
  124. BIN libraries/processing/video/library/macosx32/libmpcdec.dylib
  125. BIN libraries/processing/video/library/macosx32/libncurses.dylib
  126. BIN libraries/processing/video/library/macosx32/libogg.dylib
  127. BIN libraries/processing/video/library/macosx32/liborc-0.4.dylib
  128. BIN libraries/processing/video/library/macosx32/liborc-test-0.4.dylib
  129. BIN libraries/processing/video/library/macosx32/libssl.dylib
  130. BIN libraries/processing/video/library/macosx32/libtheoradec.dylib
  131. BIN libraries/processing/video/library/macosx32/libtheoraenc.dylib
  132. BIN libraries/processing/video/library/macosx32/libusb-1.0.dylib
  133. BIN libraries/processing/video/library/macosx32/libvorbis.dylib
  134. BIN libraries/processing/video/library/macosx32/libvorbisenc.dylib
  135. BIN libraries/processing/video/library/macosx32/libxml2.dylib
  136. BIN libraries/processing/video/library/macosx32/libxvidcore.dylib
  137. BIN libraries/processing/video/library/macosx32/libz.dylib
  138. BIN libraries/processing/video/library/macosx32/plugins/libgstadder.so
  139. BIN libraries/processing/video/library/macosx32/plugins/libgstadpcmdec.so
  140. BIN libraries/processing/video/library/macosx32/plugins/libgstadpcmenc.so
  141. BIN libraries/processing/video/library/macosx32/plugins/libgstaiff.so
  142. BIN libraries/processing/video/library/macosx32/plugins/libgstalaw.so
  143. BIN libraries/processing/video/library/macosx32/plugins/libgstalpha.so
  144. BIN libraries/processing/video/library/macosx32/plugins/libgstalphacolor.so
  145. BIN libraries/processing/video/library/macosx32/plugins/libgstannodex.so
  146. BIN libraries/processing/video/library/macosx32/plugins/libgstapetag.so
  147. BIN libraries/processing/video/library/macosx32/plugins/libgstapexsink.so
  148. BIN libraries/processing/video/library/macosx32/plugins/libgstapp.so
  149. BIN libraries/processing/video/library/macosx32/plugins/libgstapplemedia.so
  150. BIN libraries/processing/video/library/macosx32/plugins/libgstasfmux.so
  151. BIN libraries/processing/video/library/macosx32/plugins/libgstaudioconvert.so
  152. BIN libraries/processing/video/library/macosx32/plugins/libgstaudiofx.so
  153. BIN libraries/processing/video/library/macosx32/plugins/libgstaudioparsers.so
  154. BIN libraries/processing/video/library/macosx32/plugins/libgstaudiorate.so
  155. BIN libraries/processing/video/library/macosx32/plugins/libgstaudioresample.so
  156. BIN libraries/processing/video/library/macosx32/plugins/libgstaudiotestsrc.so
  157. BIN libraries/processing/video/library/macosx32/plugins/libgstauparse.so
  158. BIN libraries/processing/video/library/macosx32/plugins/libgstautoconvert.so
  159. BIN libraries/processing/video/library/macosx32/plugins/libgstautodetect.so
  160. BIN libraries/processing/video/library/macosx32/plugins/libgstavi.so
  161. BIN libraries/processing/video/library/macosx32/plugins/libgstbayer.so
  162. BIN libraries/processing/video/library/macosx32/plugins/libgstbz2.so
  163. BIN libraries/processing/video/library/macosx32/plugins/libgstcamerabin.so
  164. BIN libraries/processing/video/library/macosx32/plugins/libgstcamerabin2.so
  165. BIN libraries/processing/video/library/macosx32/plugins/libgstcdxaparse.so
  166. BIN libraries/processing/video/library/macosx32/plugins/libgstcoloreffects.so
  167. BIN libraries/processing/video/library/macosx32/plugins/libgstcolorspace.so
  168. BIN libraries/processing/video/library/macosx32/plugins/libgstcoreelements.so
  169. BIN libraries/processing/video/library/macosx32/plugins/libgstcoreindexers.so
  170. BIN libraries/processing/video/library/macosx32/plugins/libgstcutter.so
  171. BIN libraries/processing/video/library/macosx32/plugins/libgstdataurisrc.so
  172. BIN libraries/processing/video/library/macosx32/plugins/libgstdc1394.so
  173. BIN libraries/processing/video/library/macosx32/plugins/libgstdccp.so
  174. BIN libraries/processing/video/library/macosx32/plugins/libgstdebug.so
  175. BIN libraries/processing/video/library/macosx32/plugins/libgstdebugutilsbad.so
  176. BIN libraries/processing/video/library/macosx32/plugins/libgstdecodebin.so
  177. BIN libraries/processing/video/library/macosx32/plugins/libgstdecodebin2.so
  178. BIN libraries/processing/video/library/macosx32/plugins/libgstdeinterlace.so
  179. BIN libraries/processing/video/library/macosx32/plugins/libgstdtmf.so
  180. BIN libraries/processing/video/library/macosx32/plugins/libgstdtsdec.so
  181. BIN libraries/processing/video/library/macosx32/plugins/libgstdv.so
  182. BIN libraries/processing/video/library/macosx32/plugins/libgstdvbsuboverlay.so
  183. BIN libraries/processing/video/library/macosx32/plugins/libgstdvdspu.so
  184. BIN libraries/processing/video/library/macosx32/plugins/libgstefence.so
  185. BIN libraries/processing/video/library/macosx32/plugins/libgsteffectv.so
  186. BIN libraries/processing/video/library/macosx32/plugins/libgstencodebin.so
  187. BIN libraries/processing/video/library/macosx32/plugins/libgstequalizer.so
  188. BIN libraries/processing/video/library/macosx32/plugins/libgstfestival.so
  189. BIN libraries/processing/video/library/macosx32/plugins/libgstffmpeg.so
  190. BIN libraries/processing/video/library/macosx32/plugins/libgstffmpegcolorspace.so
  191. BIN libraries/processing/video/library/macosx32/plugins/libgstffmpegscale.so
  192. BIN libraries/processing/video/library/macosx32/plugins/libgstfieldanalysis.so
  193. BIN libraries/processing/video/library/macosx32/plugins/libgstflv.so
  194. BIN libraries/processing/video/library/macosx32/plugins/libgstflxdec.so
  195. BIN libraries/processing/video/library/macosx32/plugins/libgstfragmented.so
  196. BIN libraries/processing/video/library/macosx32/plugins/libgstfreeze.so
  197. BIN libraries/processing/video/library/macosx32/plugins/libgstfrei0r.so
  198. BIN libraries/processing/video/library/macosx32/plugins/libgstgaudieffects.so
  199. BIN libraries/processing/video/library/macosx32/plugins/libgstgdp.so
  200. BIN libraries/processing/video/library/macosx32/plugins/libgstgeometrictransform.so
  201. BIN libraries/processing/video/library/macosx32/plugins/libgstgio.so
  202. BIN libraries/processing/video/library/macosx32/plugins/libgstgoom.so
  203. BIN libraries/processing/video/library/macosx32/plugins/libgstgoom2k1.so
  204. BIN libraries/processing/video/library/macosx32/plugins/libgstgsettingselements.so
  205. BIN libraries/processing/video/library/macosx32/plugins/libgsth264parse.so
  206. BIN libraries/processing/video/library/macosx32/plugins/libgsthdvparse.so
  207. BIN libraries/processing/video/library/macosx32/plugins/libgsticydemux.so
  208. BIN libraries/processing/video/library/macosx32/plugins/libgstid3demux.so
  209. BIN libraries/processing/video/library/macosx32/plugins/libgstid3tag.so
  210. BIN libraries/processing/video/library/macosx32/plugins/libgstimagefreeze.so
  211. BIN libraries/processing/video/library/macosx32/plugins/libgstinterlace.so
  212. BIN libraries/processing/video/library/macosx32/plugins/libgstinterleave.so
  213. BIN libraries/processing/video/library/macosx32/plugins/libgstisomp4.so
  214. BIN libraries/processing/video/library/macosx32/plugins/libgstivfparse.so
  215. BIN libraries/processing/video/library/macosx32/plugins/libgstjp2k.so
  216. BIN libraries/processing/video/library/macosx32/plugins/libgstjp2kdecimator.so
  217. BIN libraries/processing/video/library/macosx32/plugins/libgstjpegformat.so
  218. BIN libraries/processing/video/library/macosx32/plugins/libgstlegacyresample.so
  219. BIN libraries/processing/video/library/macosx32/plugins/libgstlevel.so
  220. BIN libraries/processing/video/library/macosx32/plugins/libgstliveadder.so
  221. BIN libraries/processing/video/library/macosx32/plugins/libgstmatroska.so
  222. BIN libraries/processing/video/library/macosx32/plugins/libgstmpegdemux.so
  223. BIN libraries/processing/video/library/macosx32/plugins/libgstmpegpsmux.so
  224. BIN libraries/processing/video/library/macosx32/plugins/libgstmpegtsdemux.so
  225. BIN libraries/processing/video/library/macosx32/plugins/libgstmpegtsmux.so
  226. BIN libraries/processing/video/library/macosx32/plugins/libgstmpegvideoparse.so
  227. BIN libraries/processing/video/library/macosx32/plugins/libgstmulaw.so
  228. BIN libraries/processing/video/library/macosx32/plugins/libgstmultifile.so
  229. BIN libraries/processing/video/library/macosx32/plugins/libgstmultipart.so
  230. BIN libraries/processing/video/library/macosx32/plugins/libgstmusepack.so
  231. BIN libraries/processing/video/library/macosx32/plugins/libgstmve.so
  232. BIN libraries/processing/video/library/macosx32/plugins/libgstmxf.so
  233. BIN libraries/processing/video/library/macosx32/plugins/libgstnavigationtest.so
  234. BIN libraries/processing/video/library/macosx32/plugins/libgstnsf.so
  235. BIN libraries/processing/video/library/macosx32/plugins/libgstnuvdemux.so
  236. BIN libraries/processing/video/library/macosx32/plugins/libgstogg.so
  237. BIN libraries/processing/video/library/macosx32/plugins/libgstoss4audio.so
  238. BIN libraries/processing/video/library/macosx32/plugins/libgstosxaudio.so
  239. BIN libraries/processing/video/library/macosx32/plugins/libgstosxvideosink.so
  240. BIN libraries/processing/video/library/macosx32/plugins/libgstpatchdetect.so
  241. BIN libraries/processing/video/library/macosx32/plugins/libgstpcapparse.so
  242. BIN libraries/processing/video/library/macosx32/plugins/libgstplaybin.so
  243. BIN libraries/processing/video/library/macosx32/plugins/libgstpnm.so
  244. BIN libraries/processing/video/library/macosx32/plugins/libgstpostproc.so
  245. BIN libraries/processing/video/library/macosx32/plugins/libgstrawparse.so
  246. BIN libraries/processing/video/library/macosx32/plugins/libgstreal.so
  247. BIN libraries/processing/video/library/macosx32/plugins/libgstreplaygain.so
  248. BIN libraries/processing/video/library/macosx32/plugins/libgstrfbsrc.so
  249. BIN libraries/processing/video/library/macosx32/plugins/libgstrtp.so
  250. BIN libraries/processing/video/library/macosx32/plugins/libgstrtpmanager.so
  251. BIN libraries/processing/video/library/macosx32/plugins/libgstrtpmux.so
  252. BIN libraries/processing/video/library/macosx32/plugins/libgstrtpvp8.so
  253. BIN libraries/processing/video/library/macosx32/plugins/libgstrtsp.so
  254. BIN libraries/processing/video/library/macosx32/plugins/libgstscaletempoplugin.so
  255. BIN libraries/processing/video/library/macosx32/plugins/libgstsdi.so
  256. BIN libraries/processing/video/library/macosx32/plugins/libgstsdpelem.so
  257. BIN libraries/processing/video/library/macosx32/plugins/libgstsegmentclip.so
  258. BIN libraries/processing/video/library/macosx32/plugins/libgstshapewipe.so
  259. BIN libraries/processing/video/library/macosx32/plugins/libgstsiren.so
  260. BIN libraries/processing/video/library/macosx32/plugins/libgstsmpte.so
  261. BIN libraries/processing/video/library/macosx32/plugins/libgstspectrum.so
  262. BIN libraries/processing/video/library/macosx32/plugins/libgstspeed.so
  263. BIN libraries/processing/video/library/macosx32/plugins/libgststereo.so
  264. BIN libraries/processing/video/library/macosx32/plugins/libgstsubenc.so
  265. BIN libraries/processing/video/library/macosx32/plugins/libgstsubparse.so
  266. BIN libraries/processing/video/library/macosx32/plugins/libgsttcp.so
  267. BIN libraries/processing/video/library/macosx32/plugins/libgsttheora.so
  268. BIN libraries/processing/video/library/macosx32/plugins/libgsttta.so
  269. BIN libraries/processing/video/library/macosx32/plugins/libgsttypefindfunctions.so
  270. BIN libraries/processing/video/library/macosx32/plugins/libgstudp.so
  271. BIN libraries/processing/video/library/macosx32/plugins/libgstvideobox.so
  272. BIN libraries/processing/video/library/macosx32/plugins/libgstvideocrop.so
  273. BIN libraries/processing/video/library/macosx32/plugins/libgstvideofilter.so
  274. BIN libraries/processing/video/library/macosx32/plugins/libgstvideofiltersbad.so
  275. BIN libraries/processing/video/library/macosx32/plugins/libgstvideomaxrate.so
  276. BIN libraries/processing/video/library/macosx32/plugins/libgstvideomeasure.so
  277. BIN libraries/processing/video/library/macosx32/plugins/libgstvideomixer.so
  278. BIN libraries/processing/video/library/macosx32/plugins/libgstvideoparsersbad.so
  279. BIN libraries/processing/video/library/macosx32/plugins/libgstvideorate.so
  280. BIN libraries/processing/video/library/macosx32/plugins/libgstvideoscale.so
  281. BIN libraries/processing/video/library/macosx32/plugins/libgstvideosignal.so
  282. BIN libraries/processing/video/library/macosx32/plugins/libgstvideotestsrc.so
  283. BIN libraries/processing/video/library/macosx32/plugins/libgstvmnc.so
  284. BIN libraries/processing/video/library/macosx32/plugins/libgstvolume.so
  285. BIN libraries/processing/video/library/macosx32/plugins/libgstvorbis.so
  286. BIN libraries/processing/{opengl/libgluegen-rt.jnilib → video/library/macosx32/plugins/libgstwavenc.so}
  287. BIN libraries/processing/video/library/macosx32/plugins/libgstwavparse.so
  288. BIN libraries/processing/video/library/macosx32/plugins/libgstxvid.so
  289. BIN libraries/processing/video/library/macosx32/plugins/libgsty4mdec.so
  290. BIN libraries/processing/video/library/macosx32/plugins/libgsty4menc.so
  291. BIN libraries/processing/video/library/macosx64/libcrypto.dylib
  292. BIN libraries/processing/video/library/macosx64/libdc1394.dylib
  293. BIN libraries/processing/video/library/macosx64/libdca.dylib
  294. BIN libraries/processing/video/library/macosx64/libdv.dylib
  295. BIN libraries/processing/video/library/macosx64/libffi.dylib
  296. BIN libraries/processing/video/library/macosx64/libgio-2.0.dylib
  297. BIN libraries/processing/video/library/macosx64/libglib-2.0.dylib
  298. BIN libraries/processing/video/library/macosx64/libgmodule-2.0.dylib
  299. BIN libraries/processing/video/library/macosx64/libgobject-2.0.dylib
  300. BIN libraries/processing/video/library/macosx64/libgstapp-0.10.dylib
Sorry, we could not display the entire diff because too many files (875) changed.
View
2 build.xml
@@ -60,7 +60,7 @@
<target name="generate-driver"
description="Generate DriverImpl class">
- <java classpath="buildtime/lib/jython/jython.jar:buildtime/lib/processing/core.jar"
+ <java classpath="buildtime/lib/jython/jython.jar:buildtime/lib/processing/core.jar:libraries/processing/opengl/jogl-all.jar:libraries/processing/opengl/gluegen-rt.jar"
classname="org.python.util.jython"
fork="true">
<arg value="buildtime/py/cog.py"/>
View
BIN buildtime/lib/processing/core.jar
Binary file not shown.
View
14 buildtime/py/processing_parser.py
@@ -15,7 +15,7 @@
^(
screen|args|recorder|frame|g|selectedFile|keyEvent|mouseEvent
|sketchPath|screen(Width|Height)|defaultSize|firstMouse|finished
- |requestImageMax
+ |requestImageMax|online
)$
''', re.X)
@@ -31,7 +31,8 @@
|(get|set|remove)Cache|update|destroy|main|flush|addListeners|dataFile
|die|setup|mouseE(ntered|xited)|paint|sketch[A-Z].*|stop|save(File|Path)
|displayable|method|runSketch|start|focus(Lost|Gained)|(data|create)Path
- |round|abs|max|min|open|append|splice|expand|contract|set|exit
+ |round|abs|max|min|open|append|splice|expand|contract|set|exit|link|param
+ |status
)$
''', re.X)
@@ -58,10 +59,11 @@ def prim(type_name):
We want to create Jython wrappers for all public methods of PApplet except
those in "BAD_METHOD". Also, if we have both foo(int) and foo(char), we throw
away the char variant, and always call the int variant. Same with foo(byte).
-Sadly, Java has no unisgned types, so the distinction is weird.
+Sadly, Java has no unsigned types, so the distinction is weird.
"""
WANTED_METHODS = [m for m in Class.getDeclaredMethods(PApplet)
if Modifier.isPublic(m.getModifiers())
+ and not m.getExceptionTypes()
and not BAD_METHOD.match(m.getName())
and not any(k in USELESS_TYPES for k in m.getParameterTypes())]
@@ -104,10 +106,14 @@ def __init__(self, to_python_prefix, to_java_format, typecheck_format):
'(%(name)s == PyFloat.TYPE '
'|| %(name)s == PyInteger.TYPE '
'|| %(name)s == PyLong.TYPE)'),
+ PRIMITIVES['double']:
+ ClassConversionInfo('new PyFloat',
+ '%s.asDouble()',
+ '%(name)s == PyFloat.TYPE'),
PRIMITIVES['long']:
ClassConversionInfo('new PyLong',
'%s.asLong()',
- None),
+ '%(name)s == PyLong.TYPE'),
Class.forName("java.lang.String"):
ClassConversionInfo('new PyUnicode',
'%s.asString()',
View
1 buildtime/template/DriverImpl.java.cog
@@ -23,6 +23,7 @@ package jycessing;
import org.python.util.InteractiveConsole;
import org.python.core.*;
import processing.core.*;
+import processing.opengl.*;
import java.io.*;
@SuppressWarnings("serial")
View
BIN libraries/processing/dxf.jar
Binary file not shown.
View
BIN libraries/processing/minim/jsminim.jar
Binary file not shown.
View
BIN libraries/processing/minim/minim-spi.jar
Binary file not shown.
View
BIN libraries/processing/minim/minim.jar
Binary file not shown.
View
2 libraries/processing/minim/version.txt
@@ -1 +1 @@
-2.0.2
+3.0 BETA
View
BIN libraries/processing/net.jar
Binary file not shown.
View
19 libraries/processing/opengl/export.txt
@@ -1,19 +0,0 @@
-# If you want to support more platforms, see the jogl.dev.java.net to get the
-# natives libraries for the platform in question (i.e. solaris). Then, add it
-# them to the applet line for export. For applications, you'll have to make the
-# changes by hand, i.e. use the linux version of the export, and modify its
-# contents to include the necessary files for your platform.
-
-name = OpenGL
-
-application.macosx = opengl.jar, jogl.jar, libjogl.jnilib, libjogl_awt.jnilib, libjogl_cg.jnilib, gluegen-rt.jar, libgluegen-rt.jnilib
-
-application.windows = opengl.jar, jogl.jar, jogl.dll, jogl_awt.dll, jogl_cg.dll, gluegen-rt.jar, gluegen-rt.dll
-
-application.linux = opengl.jar, jogl.jar, gluegen-rt.jar, libjogl.so, libjogl_awt.so, libjogl_cg.so, libgluegen-rt.so
-
-# In releases later than (but not including) 1.0.9, the applet JAR files
-# are downloaded directly from Sun, so that a single version is cached
-# on the user's computer, rather than increasing the download size with
-# the versions for each platform.
-applet = opengl.jar
View
BIN libraries/processing/opengl/gluegen-rt-natives-linux-amd64.jar
Binary file not shown.
View
BIN libraries/processing/opengl/gluegen-rt-natives-linux-i586.jar
Binary file not shown.
View
BIN libraries/processing/opengl/gluegen-rt-natives-macosx-ppc.jar
Binary file not shown.
View
BIN libraries/processing/opengl/gluegen-rt-natives-macosx-universal.jar
Binary file not shown.
View
BIN libraries/processing/opengl/gluegen-rt-natives-windows-amd64.jar
Binary file not shown.
View
BIN libraries/processing/opengl/gluegen-rt-natives-windows-i586.jar
Binary file not shown.
View
BIN libraries/processing/opengl/gluegen-rt.jar
Binary file not shown.
View
BIN libraries/processing/opengl/gluegen-rt.jar.pack.gz
Binary file not shown.
View
BIN libraries/processing/opengl/jogl-all-natives-linux-amd64.jar
Binary file not shown.
View
BIN libraries/processing/opengl/jogl-all-natives-linux-i586.jar
Binary file not shown.
View
BIN libraries/processing/opengl/jogl-all-natives-macosx-universal.jar
Binary file not shown.
View
BIN libraries/processing/opengl/jogl-all-natives-windows-amd64.jar
Binary file not shown.
View
BIN libraries/processing/opengl/jogl-all-natives-windows-i586.jar
Binary file not shown.
View
BIN libraries/processing/opengl/jogl-all.jar
Binary file not shown.
View
BIN libraries/processing/opengl/jogl-natives-linux-amd64.jar
Binary file not shown.
View
BIN libraries/processing/opengl/jogl-natives-linux-i586.jar
Binary file not shown.
View
BIN libraries/processing/opengl/jogl-natives-macosx-ppc.jar
Binary file not shown.
View
BIN libraries/processing/opengl/jogl-natives-macosx-universal.jar
Binary file not shown.
View
BIN libraries/processing/opengl/jogl-natives-windows-amd64.jar
Binary file not shown.
View
BIN libraries/processing/opengl/jogl-natives-windows-i586.jar
Binary file not shown.
View
BIN libraries/processing/opengl/jogl.dll
Binary file not shown.
View
BIN libraries/processing/opengl/jogl.jar
Binary file not shown.
View
BIN libraries/processing/opengl/jogl.jar.pack.gz
Binary file not shown.
View
BIN libraries/processing/opengl/jogl_cg.dll
Binary file not shown.
View
BIN libraries/processing/opengl/libgluegen-rt.so
Binary file not shown.
View
BIN libraries/processing/opengl/libjogl.jnilib
Binary file not shown.
View
BIN libraries/processing/opengl/libjogl.so
Binary file not shown.
View
BIN libraries/processing/opengl/libjogl_awt.so
Binary file not shown.
View
BIN libraries/processing/opengl/libjogl_cg.jnilib
Binary file not shown.
View
BIN libraries/processing/opengl/libjogl_cg.so
Binary file not shown.
View
BIN libraries/processing/opengl/opengl.jar
Binary file not shown.
View
BIN libraries/processing/pdf/pdf.jar
Binary file not shown.
View
BIN libraries/processing/serial/RXTXcomm.jar → ...es/processing/serial/library/RXTXcomm.jar
Binary file not shown.
View
1 libraries/processing/serial/library/export.txt
@@ -0,0 +1 @@
+name = Serial I/O
View
BIN libraries/processing/serial/library/linux32/librxtxSerial.so
Binary file not shown.
View
BIN libraries/processing/serial/library/linux64/librxtxSerial.so
Binary file not shown.
View
BIN libraries/processing/serial/library/macosx/librxtxSerial.jnilib
Binary file not shown.
View
BIN libraries/processing/serial/library/serial.jar
Binary file not shown.
View
0 libraries/processing/serial/rxtxSerial.dll → ...g/serial/library/windows32/rxtxSerial.dll 100755 → 100644
File renamed without changes.
View
BIN libraries/processing/serial/librxtxSerial.jnilib
Binary file not shown.
View
BIN libraries/processing/serial/librxtxSerial.so
Binary file not shown.
View
BIN libraries/processing/serial/serial.jar
Binary file not shown.
View
BIN libraries/processing/video.jar
Binary file not shown.
View
27 libraries/processing/video/build.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<project name="Processing Video Library" default="build">
+
+ <target name="clean" description="Clean the build directories">
+ <delete dir="bin" />
+ <delete file="library/video.jar" />
+ </target>
+
+ <target name="compile" description="Compile sources">
+ <condition property="core-built">
+ <available file="../../../core/library/core.jar" />
+ </condition>
+ <fail unless="core-built" message="Please build the core library first and make sure it sits in ../../../core/library/core.jar" />
+
+ <mkdir dir="bin" />
+ <javac source="1.6"
+ target="1.6"
+ srcdir="src" destdir="bin"
+ encoding="UTF-8"
+ includeAntRuntime="false"
+ classpath="../../../core/library/core.jar; library/gstreamer-java.jar; library/jna.jar" />
+ </target>
+
+ <target name="build" depends="compile" description="Build video library">
+ <jar basedir="bin" destfile="library/video.jar" />
+ </target>
+</project>
View
136 libraries/processing/video/examples/Capture/AsciiVideo/AsciiVideo.pde
@@ -0,0 +1,136 @@
+/**
+ * ASCII Video
+ * by Ben Fry.
+ *
+ *
+ * Text characters have been used to represent images since the earliest computers.
+ * This sketch is a simple homage that re-interprets live video as ASCII text.
+ * See the keyPressed function for more options, like changing the font size.
+ */
+
+import processing.video.*;
+
+Capture video;
+boolean cheatScreen;
+
+// All ASCII characters, sorted according to their visual density
+String letterOrder =
+ " .`-_':,;^=+/\"|)\\<>)iv%xclrs{*}I?!][1taeo7zjLu" +
+ "nT#JCwfy325Fp6mqSghVd4EgXPGZbYkOA&8U$@KHDBWNMR0Q";
+char[] letters;
+
+float[] bright;
+char[] chars;
+
+PFont font;
+float fontSize = 1.5;
+
+
+void setup() {
+ size(640, 480, P2D);
+
+ // Uses the default video input, see the reference if this causes an error
+ video = new Capture(this, 160, 120);
+ video.start();
+ int count = video.width * video.height;
+ println(count);
+
+ font = loadFont("UniversLTStd-Light-48.vlw");
+
+ // for the 256 levels of brightness, distribute the letters across
+ // the an array of 256 elements to use for the lookup
+ letters = new char[256];
+ for (int i = 0; i < 256; i++) {
+ int index = int(map(i, 0, 256, 0, letterOrder.length()));
+ letters[i] = letterOrder.charAt(index);
+ }
+
+ // current characters for each position in the video
+ chars = new char[count];
+
+ // current brightness for each point
+ bright = new float[count];
+ for (int i = 0; i < count; i++) {
+ // set each brightness at the midpoint to start
+ bright[i] = 128;
+ }
+}
+
+
+void captureEvent(Capture c) {
+ c.read();
+}
+
+
+void draw() {
+ background(0);
+
+ pushMatrix();
+
+ float hgap = width / float(video.width);
+ float vgap = height / float(video.height);
+
+ scale(max(hgap, vgap) * fontSize);
+ textFont(font, fontSize);
+
+ int index = 0;
+ video.loadPixels();
+ for (int y = 1; y < video.height; y++) {
+
+ // Move down for next line
+ translate(0, 1.0 / fontSize);
+
+ pushMatrix();
+ for (int x = 0; x < video.width; x++) {
+ int pixelColor = video.pixels[index];
+ // Faster method of calculating r, g, b than red(), green(), blue()
+ int r = (pixelColor >> 16) & 0xff;
+ int g = (pixelColor >> 8) & 0xff;
+ int b = pixelColor & 0xff;
+
+ // Another option would be to properly calculate brightness as luminance:
+ // luminance = 0.3*red + 0.59*green + 0.11*blue
+ // Or you could instead red + green + blue, and make the the values[] array
+ // 256*3 elements long instead of just 256.
+ int pixelBright = max(r, g, b);
+
+ // The 0.1 value is used to damp the changes so that letters flicker less
+ float diff = pixelBright - bright[index];
+ bright[index] += diff * 0.1;
+
+ fill(pixelColor);
+ int num = int(bright[index]);
+ text(letters[num], 0, 0);
+
+ // Move to the next pixel
+ index++;
+
+ // Move over for next character
+ translate(1.0 / fontSize, 0);
+ }
+ popMatrix();
+ }
+ popMatrix();
+
+ if (cheatScreen) {
+ //image(video, 0, height - video.height);
+ // set() is faster than image() when drawing untransformed images
+ set(0, height - video.height, video);
+ }
+}
+
+
+/**
+ * Handle key presses:
+ * 'c' toggles the cheat screen that shows the original image in the corner
+ * 'g' grabs an image and saves the frame to a tiff image
+ * 'f' and 'F' increase and decrease the font size
+ */
+void keyPressed() {
+ switch (key) {
+ case 'g': saveFrame(); break;
+ case 'c': cheatScreen = !cheatScreen; break;
+ case 'f': fontSize *= 1.1; break;
+ case 'F': fontSize *= 0.9; break;
+ }
+}
View
BIN libraries/processing/video/examples/Capture/AsciiVideo/data/UniversLTStd-Light-48.vlw
Binary file not shown.
View
69 libraries/processing/video/examples/Capture/BackgroundSubtraction/BackgroundSubtraction.pde
@@ -0,0 +1,69 @@
+/**
+ * Background Subtraction
+ * by Golan Levin.
+ *
+ * Detect the presence of people and objects in the frame using a simple
+ * background-subtraction technique. To initialize the background, press a key.
+ */
+
+
+import processing.video.*;
+
+int numPixels;
+int[] backgroundPixels;
+Capture video;
+
+void setup() {
+ // Change size to 320 x 240 if too slow at 640 x 480
+ size(640, 480, P2D);
+
+ video = new Capture(this, width, height);
+ video.start();
+ numPixels = video.width * video.height;
+ // Create array to store the background image
+ backgroundPixels = new int[numPixels];
+ // Make the pixels[] array available for direct manipulation
+ loadPixels();
+}
+
+void draw() {
+ if (video.available()) {
+ video.read(); // Read a new video frame
+ video.loadPixels(); // Make the pixels of video available
+ // Difference between the current frame and the stored background
+ int presenceSum = 0;
+ for (int i = 0; i < numPixels; i++) { // For each pixel in the video frame...
+ // Fetch the current color in that location, and also the color
+ // of the background in that spot
+ color currColor = video.pixels[i];
+ color bkgdColor = backgroundPixels[i];
+ // Extract the red, green, and blue components of the current pixel�s color
+ int currR = (currColor >> 16) & 0xFF;
+ int currG = (currColor >> 8) & 0xFF;
+ int currB = currColor & 0xFF;
+ // Extract the red, green, and blue components of the background pixel�s color
+ int bkgdR = (bkgdColor >> 16) & 0xFF;
+ int bkgdG = (bkgdColor >> 8) & 0xFF;
+ int bkgdB = bkgdColor & 0xFF;
+ // Compute the difference of the red, green, and blue values
+ int diffR = abs(currR - bkgdR);
+ int diffG = abs(currG - bkgdG);
+ int diffB = abs(currB - bkgdB);
+ // Add these differences to the running tally
+ presenceSum += diffR + diffG + diffB;
+ // Render the difference image to the screen
+ pixels[i] = color(diffR, diffG, diffB);
+ // The following line does the same thing much faster, but is more technical
+ //pixels[i] = 0xFF000000 | (diffR << 16) | (diffG << 8) | diffB;
+ }
+ updatePixels(); // Notify that the pixels[] array has changed
+ println(presenceSum); // Print out the total amount of movement
+ }
+}
+
+// When a key is pressed, capture the background image into the backgroundPixels
+// buffer, by copying each of the current frame�s pixels into it.
+void keyPressed() {
+ video.loadPixels();
+ arraycopy(video.pixels, backgroundPixels);
+}
View
58 ...aries/processing/video/examples/Capture/BrightnessThresholding/BrightnessThresholding.pde
@@ -0,0 +1,58 @@
+/**
+ * Brightness Thresholding
+ * by Golan Levin.
+ *
+ * Determines whether a test location (such as the cursor) is contained within
+ * the silhouette of a dark object.
+ */
+
+
+import processing.video.*;
+
+color black = color(0);
+color white = color(255);
+int numPixels;
+Capture video;
+
+void setup() {
+ size(640, 480, P2D); // Change size to 320 x 240 if too slow at 640 x 480
+ strokeWeight(5);
+ // Uses the default video input, see the reference if this causes an error
+ video = new Capture(this, width, height);
+ video.start();
+ numPixels = video.width * video.height;
+ noCursor();
+ smooth();
+}
+
+void draw() {
+ if (video.available()) {
+ video.read();
+ video.loadPixels();
+ int threshold = 127; // Set the threshold value
+ float pixelBrightness; // Declare variable to store a pixel's color
+ // Turn each pixel in the video frame black or white depending on its brightness
+ loadPixels();
+ for (int i = 0; i < numPixels; i++) {
+ pixelBrightness = brightness(video.pixels[i]);
+ if (pixelBrightness > threshold) { // If the pixel is brighter than the
+ pixels[i] = white; // threshold value, make it white
+ }
+ else { // Otherwise,
+ pixels[i] = black; // make it black
+ }
+ }
+ updatePixels();
+ // Test a location to see where it is contained. Fetch the pixel at the test
+ // location (the cursor), and compute its brightness
+ int testValue = get(mouseX, mouseY);
+ float testBrightness = brightness(testValue);
+ if (testBrightness > threshold) { // If the test location is brighter than
+ fill(black); // the threshold set the fill to black
+ }
+ else { // Otherwise,
+ fill(white); // set the fill to white
+ }
+ ellipse(mouseX, mouseY, 20, 20);
+ }
+}
View
53 libraries/processing/video/examples/Capture/BrightnessTracking/BrightnessTracking.pde
@@ -0,0 +1,53 @@
+/**
+ * Brightness Tracking
+ * by Golan Levin.
+ *
+ * Tracks the brightest pixel in a live video signal.
+ */
+
+
+import processing.video.*;
+
+Capture video;
+
+void setup() {
+ size(640, 480, P2D); // Change size to 320 x 240 if too slow at 640 x 480
+ // Uses the default video input, see the reference if this causes an error
+ video = new Capture(this, width, height);
+ video.start();
+ noStroke();
+ smooth();
+}
+
+void draw() {
+ if (video.available()) {
+ video.read();
+ image(video, 0, 0, width, height); // Draw the webcam video onto the screen
+ int brightestX = 0; // X-coordinate of the brightest video pixel
+ int brightestY = 0; // Y-coordinate of the brightest video pixel
+ float brightestValue = 0; // Brightness of the brightest video pixel
+ // Search for the brightest pixel: For each row of pixels in the video image and
+ // for each pixel in the yth row, compute each pixel's index in the video
+ video.loadPixels();
+ int index = 0;
+ for (int y = 0; y < video.height; y++) {
+ for (int x = 0; x < video.width; x++) {
+ // Get the color stored in the pixel
+ int pixelValue = video.pixels[index];
+ // Determine the brightness of the pixel
+ float pixelBrightness = brightness(pixelValue);
+ // If that value is brighter than any previous, then store the
+ // brightness of that pixel, as well as its (x,y) location
+ if (pixelBrightness > brightestValue) {
+ brightestValue = pixelBrightness;
+ brightestY = y;
+ brightestX = x;
+ }
+ index++;
+ }
+ }
+ // Draw a large, yellow circle at the brightest pixel
+ fill(255, 204, 0, 128);
+ ellipse(brightestX, brightestY, 200, 200);
+ }
+}
View
145 libraries/processing/video/examples/Capture/ColorSorting/ColorSorting.pde
@@ -0,0 +1,145 @@
+/**
+ * Color Sorting
+ * by Ben Fry.
+ *
+ * Example that sorts all colors from the incoming video
+ * and arranges them into vertical bars.
+ */
+
+
+import processing.video.*;
+
+Capture video;
+boolean cheatScreen;
+
+Tuple[] captureColors;
+Tuple[] drawColors;
+int[] bright;
+
+// How many pixels to skip in either direction
+int increment = 5;
+
+
+void setup() {
+ size(800, 600, P2D);
+
+ noCursor();
+ // Uses the default video input, see the reference if this causes an error
+ video = new Capture(this, 160, 120);
+ video.start();
+
+ int count = (video.width * video.height) / (increment * increment);
+ bright = new int[count];
+ captureColors = new Tuple[count];
+ drawColors = new Tuple[count];
+ for (int i = 0; i < count; i++) {
+ captureColors[i] = new Tuple();
+ drawColors[i] = new Tuple(0.5, 0.5, 0.5);
+ }
+}
+
+
+void draw() {
+ if (video.available()) {
+ video.read();
+ video.loadPixels();
+
+ background(0);
+ noStroke();
+
+ int index = 0;
+ for (int j = 0; j < video.height; j += increment) {
+ for (int i = 0; i < video.width; i += increment) {
+ int pixelColor = video.pixels[j*video.width + i];
+
+ int r = (pixelColor >> 16) & 0xff;
+ int g = (pixelColor >> 8) & 0xff;
+ int b = pixelColor & 0xff;
+
+ // Technically would be sqrt of the following, but no need to do
+ // sqrt before comparing the elements since we're only ordering
+ bright[index] = r*r + g*g + b*b;
+ captureColors[index].set(r, g, b);
+
+ index++;
+ }
+ }
+ sort(index, bright, captureColors);
+
+ beginShape(QUAD_STRIP);
+ for (int i = 0; i < index; i++) {
+ drawColors[i].target(captureColors[i], 0.1);
+ drawColors[i].phil();
+
+ float x = map(i, 0, index, 0, width);
+ vertex(x, 0);
+ vertex(x, height);
+ }
+ endShape();
+
+ if (cheatScreen) {
+ //image(video, 0, height - video.height);
+ // Faster method of displaying pixels array on screen
+ set(0, height - video.height, video);
+ }
+ }
+}
+
+
+void keyPressed() {
+ if (key == 'g') {
+ saveFrame();
+ } else if (key == 'c') {
+ cheatScreen = !cheatScreen;
+ }
+}
+
+
+// Functions to handle sorting the color data
+
+
+void sort(int length, int[] a, Tuple[] stuff) {
+ sortSub(a, stuff, 0, length - 1);
+}
+
+
+void sortSwap(int[] a, Tuple[] stuff, int i, int j) {
+ int T = a[i];
+ a[i] = a[j];
+ a[j] = T;
+
+ Tuple v = stuff[i];
+ stuff[i] = stuff[j];
+ stuff[j] = v;
+}
+
+
+void sortSub(int[] a, Tuple[] stuff, int lo0, int hi0) {
+ int lo = lo0;
+ int hi = hi0;
+ int mid;
+
+ if (hi0 > lo0) {
+ mid = a[(lo0 + hi0) / 2];
+
+ while (lo <= hi) {
+ while ((lo < hi0) && (a[lo] < mid)) {
+ ++lo;
+ }
+ while ((hi > lo0) && (a[hi] > mid)) {
+ --hi;
+ }
+ if (lo <= hi) {
+ sortSwap(a, stuff, lo, hi);
+ ++lo;
+ --hi;
+ }
+ }
+
+ if (lo0 < hi)
+ sortSub(a, stuff, lo0, hi);
+
+ if (lo < hi0)
+ sortSub(a, stuff, lo, hi0);
+ }
+}
View
29 libraries/processing/video/examples/Capture/ColorSorting/Tuple.pde
@@ -0,0 +1,29 @@
+// Simple vector class that holds an x,y,z position.
+
+class Tuple {
+ float x, y, z;
+
+ Tuple() { }
+
+ Tuple(float x, float y, float z) {
+ set(x, y, z);
+ }
+
+ void set(float x, float y, float z) {
+ this.x = x;
+ this.y = y;
+ this.z = z;
+ }
+
+ void target(Tuple another, float amount) {
+ float amount1 = 1.0 - amount;
+ x = x*amount1 + another.x*amount;
+ y = y*amount1 + another.y*amount;
+ z = z*amount1 + another.z*amount;
+ }
+
+ void phil() {
+ fill(x, y, z);
+ }
+}
+
View
144 libraries/processing/video/examples/Capture/Disgrand/Disgrand.pde
@@ -0,0 +1,144 @@
+/**
+ * Disgrand
+ * by Ben Fry.
+ *
+ * Example that sorts all colors from the incoming video
+ * and arranges them into vertical bars.
+ */
+
+import processing.video.*;
+
+Capture video;
+boolean cheatScreen;
+
+Tuple[] captureColors;
+Tuple[] drawColors;
+int[] bright;
+
+// How many pixels to skip in either direction
+int increment = 5;
+
+
+void setup() {
+ size(800, 600, P2D);
+
+ noCursor();
+ // Uses the default video input, see the reference if this causes an error
+ video = new Capture(this, 160, 120);
+ video.start();
+
+ int count = (video.width * video.height) / (increment * increment);
+ bright = new int[count];
+ captureColors = new Tuple[count];
+ drawColors = new Tuple[count];
+ for (int i = 0; i < count; i++) {
+ captureColors[i] = new Tuple();
+ drawColors[i] = new Tuple(0.5, 0.5, 0.5);
+ }
+}
+
+
+void draw() {
+ if (video.available()) {
+ video.read();
+ video.loadPixels();
+
+ background(0);
+ noStroke();
+
+ int index = 0;
+ for (int j = 0; j < video.height; j += increment) {
+ for (int i = 0; i < video.width; i += increment) {
+ int pixelColor = video.pixels[j*video.width + i];
+
+ int r = (pixelColor >> 16) & 0xff;
+ int g = (pixelColor >> 8) & 0xff;
+ int b = pixelColor & 0xff;
+
+ // Technically would be sqrt of the following, but no need to do
+ // sqrt before comparing the elements since we're only ordering
+ bright[index] = r*r + g*g + b*b;
+ captureColors[index].set(r, g, b);
+
+ index++;
+ }
+ }
+ sort(index, bright, captureColors);
+
+ beginShape(QUAD_STRIP);
+ for (int i = 0; i < index; i++) {
+ drawColors[i].target(captureColors[i], 0.1);
+ drawColors[i].phil();
+
+ float x = map(i, 0, index, 0, width);
+ vertex(x, 0);
+ vertex(x, height);
+ }
+ endShape();
+
+ if (cheatScreen) {
+ //image(video, 0, height - video.height);
+ // Faster method of displaying pixels array on screen
+ set(0, height - video.height, video);
+ }
+ }
+}
+
+
+void keyPressed() {
+ if (key == 'g') {
+ saveFrame();
+ } else if (key == 'c') {
+ cheatScreen = !cheatScreen;
+ }
+}
+
+
+// Functions to handle sorting the color data
+
+
+void sort(int length, int[] a, Tuple[] stuff) {
+ sortSub(a, stuff, 0, length - 1);
+}
+
+
+void sortSwap(int[] a, Tuple[] stuff, int i, int j) {
+ int T = a[i];
+ a[i] = a[j];
+ a[j] = T;
+
+ Tuple v = stuff[i];
+ stuff[i] = stuff[j];
+ stuff[j] = v;
+}
+
+
+void sortSub(int[] a, Tuple[] stuff, int lo0, int hi0) {
+ int lo = lo0;
+ int hi = hi0;
+ int mid;
+
+ if (hi0 > lo0) {
+ mid = a[(lo0 + hi0) / 2];
+
+ while (lo <= hi) {
+ while ((lo < hi0) && (a[lo] < mid)) {
+ ++lo;
+ }
+ while ((hi > lo0) && (a[hi] > mid)) {
+ --hi;
+ }
+ if (lo <= hi) {
+ sortSwap(a, stuff, lo, hi);
+ ++lo;
+ --hi;
+ }
+ }
+
+ if (lo0 < hi)
+ sortSub(a, stuff, lo0, hi);
+
+ if (lo < hi0)
+ sortSub(a, stuff, lo, hi0);
+ }
+}
View
29 libraries/processing/video/examples/Capture/Disgrand/Tuple.pde
@@ -0,0 +1,29 @@
+// Simple vector class that holds an x,y,z position.
+
+class Tuple {
+ float x, y, z;
+
+ Tuple() { }
+
+ Tuple(float x, float y, float z) {
+ set(x, y, z);
+ }
+
+ void set(float x, float y, float z) {
+ this.x = x;
+ this.y = y;
+ this.z = z;
+ }
+
+ void target(Tuple another, float amount) {
+ float amount1 = 1.0 - amount;
+ x = x*amount1 + another.x*amount;
+ y = y*amount1 + another.y*amount;
+ z = z*amount1 + another.z*amount;
+ }
+
+ void phil() {
+ fill(x, y, z);
+ }
+}
+
View
65 libraries/processing/video/examples/Capture/FrameDifferencing/FrameDifferencing.pde
@@ -0,0 +1,65 @@
+/**
+ * Frame Differencing
+ * by Golan Levin.
+ *
+ * Quantify the amount of movement in the video frame using frame-differencing.
+ */
+
+
+import processing.video.*;
+
+int numPixels;
+int[] previousFrame;
+Capture video;
+
+void setup() {
+ size(640, 480, P2D); // Change size to 320 x 240 if too slow at 640 x 480
+ // Uses the default video input, see the reference if this causes an error
+ video = new Capture(this, width, height);
+ video.start();
+ numPixels = video.width * video.height;
+ // Create an array to store the previously captured frame
+ previousFrame = new int[numPixels];
+ loadPixels();
+}
+
+void draw() {
+ if (video.available()) {
+ // When using video to manipulate the screen, use video.available() and
+ // video.read() inside the draw() method so that it's safe to draw to the screen
+ video.read(); // Read the new frame from the camera
+ video.loadPixels(); // Make its pixels[] array available
+
+ int movementSum = 0; // Amount of movement in the frame
+ for (int i = 0; i < numPixels; i++) { // For each pixel in the video frame...
+ color currColor = video.pixels[i];
+ color prevColor = previousFrame[i];
+ // Extract the red, green, and blue components from current pixel
+ int currR = (currColor >> 16) & 0xFF; // Like red(), but faster
+ int currG = (currColor >> 8) & 0xFF;
+ int currB = currColor & 0xFF;
+ // Extract red, green, and blue components from previous pixel
+ int prevR = (prevColor >> 16) & 0xFF;
+ int prevG = (prevColor >> 8) & 0xFF;
+ int prevB = prevColor & 0xFF;
+ // Compute the difference of the red, green, and blue values
+ int diffR = abs(currR - prevR);
+ int diffG = abs(currG - prevG);
+ int diffB = abs(currB - prevB);
+ // Add these differences to the running tally
+ movementSum += diffR + diffG + diffB;
+ // Render the difference image to the screen
+ pixels[i] = color(diffR, diffG, diffB);
+ // The following line is much faster, but more confusing to read
+ //pixels[i] = 0xff000000 | (diffR << 16) | (diffG << 8) | diffB;
+ // Save the current color into the 'previous' buffer
+ previousFrame[i] = currColor;
+ }
+ // To prevent flicker from frames that are all black (no movement),
+ // only update the screen if the image has changed.
+ if (movementSum > 0) {
+ updatePixels();
+ println(movementSum); // Print the total amount of movement to the console
+ }
+ }
+}
View
60 libraries/processing/video/examples/Capture/Framingham/Framingham.pde
@@ -0,0 +1,60 @@
+/**
+ * Framingham
+ * by Ben Fry.
+ *
+ * Show subsequent frames from video input as a grid. Also fun with movie files.
+ */
+
+
+import processing.video.*;
+
+Capture video;
+int column;
+int columnCount;
+int lastRow;
+
+// Buffer used to move all the pixels up
+int[] scoot;
+
+
+void setup() {
+ size(640, 480, P2D);
+
+ // Uses the default video input, see the reference if this causes an error
+ video = new Capture(this, 160, 120);
+ video.start();
+ // Also try with other video sizes
+
+ column = 0;
+ columnCount = width / video.width;
+ int rowCount = height / video.height;
+ lastRow = rowCount - 1;
+
+ scoot = new int[lastRow*video.height * width];
+ background(0);
+}
+
+
+void draw() {
+ // By using video.available, only the frame rate need be set inside setup()
+ if (video.available()) {
+ video.read();
+ video.loadPixels();
+ image(video, video.width*column, video.height*lastRow);
+ column++;
+ if (column == columnCount) {
+ loadPixels();
+
+ // Scoot everybody up one row
+ arrayCopy(pixels, video.height*width, scoot, 0, scoot.length);
+ arrayCopy(scoot, 0, pixels, 0, scoot.length);
+
+ // Set the moved row to black
+ for (int i = scoot.length; i < width*height; i++) {
+ pixels[i] = #000000;
+ }
+ column = 0;
+ updatePixels();
+ }
+ }
+}
View
40 libraries/processing/video/examples/Capture/GettingStartedCapture/GettingStartedCapture.pde
@@ -0,0 +1,40 @@
+/**
+ * Getting Started with Capture.
+ *
+ * Reading and displaying an image from an attached Capture device.
+ */
+
+import processing.video.*;
+
+Capture cam;
+
+void setup() {
+ size(640, 480, P2D);
+
+ String[] cameras = Capture.list();
+
+ if (cameras.length == 0) {
+ println("There are no cameras available for capture.");
+ exit();
+ } else {
+ println("Available cameras:");
+ for (int i = 0; i < cameras.length; i++) {
+ println(cameras[i]);
+ }
+
+ // The camera can be initialized directly using an element
+ // from the array returned by list():
+ cam = new Capture(this, cameras[0]);
+ cam.start();
+ }
+}
+
+void draw() {
+ if (cam.available() == true) {
+ cam.read();
+ }
+ image(cam, 0, 0);
+ // The following does the same, and is faster when just drawing the image
+ // without any additional resizing, transformations, or tint.
+ //set(0, 0, cam);
+}
View
205 libraries/processing/video/examples/Capture/HsvSpace/HsvSpace.pde
@@ -0,0 +1,205 @@
+/**
+ * HSV Space
+ * by Ben Fry.
+ *
+ * Arrange the pixels from live video into the HSV Color Cone.
+ */
+
+import processing.video.*;
+import java.awt.Color;
+
+Capture video;
+int count;
+boolean cheatScreen = true;
+
+static final float BOX_SIZE = 0.75;
+static final float CONE_HEIGHT = 1.2;
+static final float MAX_RADIUS = 10;
+static final float ROT_INCREMENT = 3.0;
+static final float TRANS_INCREMENT = 1;
+static final float STEP_AMOUNT = 0.1;
+
+Tuple[] farbe;
+Tuple[] trans;
+
+float[] hsb = new float[3];
+
+float leftRightAngle;
+float upDownAngle;
+float fwdBackTrans;
+float upDownTrans;
+float leftRightTrans;
+boolean motion;
+
+boolean blobby = false;
+
+
+void setup() {
+ size(640, 480, P3D);
+
+ video = new Capture(this, 160, 120);
+ video.start();
+ count = video.width * video.height;
+
+ sphereDetail(60);
+
+ upDownTrans = 0;
+ leftRightTrans = 0;
+ motion = false;
+
+ leftRightAngle = 101.501297;
+ upDownAngle = -180.098694;
+ fwdBackTrans = 14.800003;
+
+ farbe = new Tuple[count];
+ trans = new Tuple[count];
+ for (int i = 0; i < count; i++) {
+ farbe[i] = new Tuple();
+ trans[i] = new Tuple();
+ }
+}
+
+
+void draw() {
+ background(0);
+
+ if (!blobby) lights();
+
+ pushMatrix();
+ translate(width/2, height/2);
+ scale(min(width, height) / 10.0);
+
+ translate(0, 0, -20 + fwdBackTrans);
+ rotateY(radians(36 + leftRightAngle)); //, 0, 1, 0);
+ rotateX(radians(-228 + upDownAngle)); //, 1, 0, 0);
+
+ if (blobby) {
+ stroke(0.35, 0.35, 0.25, 0.15);
+ wireCone(MAX_RADIUS, MAX_RADIUS * CONE_HEIGHT, 18, 18);
+ }
+ else {
+ stroke(0.35, 0.35, 0.25, 0.25);
+ wireCone(MAX_RADIUS, MAX_RADIUS * CONE_HEIGHT, 180, 18);
+ }
+
+ noStroke();
+ video.loadPixels();
+ for (int i = 0; i < count; i++) {
+ int pixelColor = video.pixels[i];
+ int r = (pixelColor >> 16) & 0xff;
+ int g = (pixelColor >> 8) & 0xff;
+ int b = pixelColor & 0xff;
+ Color.RGBtoHSB(r, g, b, hsb);
+
+ float radius = hsb[1] * hsb[2];
+ float angle = hsb[0] * 360.0 * DEG_TO_RAD;
+ float nx = MAX_RADIUS * radius * cos(angle);
+ float ny = MAX_RADIUS * radius * sin(angle);
+ float nz = hsb[2] * MAX_RADIUS * CONE_HEIGHT;
+
+ trans[i].set(trans[i].x - (trans[i].x - nx)*STEP_AMOUNT,
+ trans[i].y - (trans[i].y - ny)*STEP_AMOUNT,
+ trans[i].z - (trans[i].z - nz)*STEP_AMOUNT);
+
+ farbe[i].set(farbe[i].x - (farbe[i].x - r)*STEP_AMOUNT,
+ farbe[i].y - (farbe[i].y - g)*STEP_AMOUNT,
+ farbe[i].z - (farbe[i].z - b)*STEP_AMOUNT);
+
+ pushMatrix();
+ farbe[i].phil();
+ trans[i].tran();
+
+ rotate(radians(45), 1, 1, 0);
+ if (blobby) {
+ sphere(BOX_SIZE * 2); //, 20, 20);
+ } else {
+ box(BOX_SIZE);
+ }
+
+ popMatrix();
+ }
+ popMatrix();
+
+ if (motion) {
+ upDownAngle--;
+ leftRightAngle--;
+ }
+
+ if (cheatScreen) {
+ image(video, 0, height - video.height);
+ }
+}
+
+
+void captureEvent(Capture c) {
+ c.read();
+}
+
+
+void keyPressed() {
+ switch (key) {
+ case 'g':
+ saveFrame();
+ break;
+ case 'c':
+ cheatScreen = !cheatScreen;
+ break;
+
+ case 'm':
+ motion = !motion;
+ break;
+ case '=':
+ fwdBackTrans += TRANS_INCREMENT;
+ break;
+ case '-':
+ fwdBackTrans -= TRANS_INCREMENT;
+ break;
+ case 'b':
+ blobby = !blobby;
+ break;
+ }
+}
+
+
+void mouseDragged() {
+ float dX, dY;
+
+ switch (mouseButton) {
+ case LEFT: // left right up down
+ dX = pmouseX - mouseX;
+ dY = pmouseY - mouseY;
+ leftRightAngle -= dX * 0.2;
+ upDownAngle += dY * 0.4;
+ break;
+
+ case CENTER:
+ dX = pmouseX - mouseX;
+ dY = pmouseY - mouseY;
+ leftRightTrans -= TRANS_INCREMENT * dX;
+ upDownTrans -= TRANS_INCREMENT * dY;
+ break;
+
+ case RIGHT: // in and out
+ dY = (float) (pmouseY - mouseY);
+ fwdBackTrans -= TRANS_INCREMENT * dY;
+ break;
+ }
+}
+
+
+void wireCone(float radius, float height, int stepX, int stepY) {
+ int steps = 10;
+ stroke(40);
+ for (int i = 0; i < steps; i++) {
+ float angle = map(i, 0, steps, 0, TWO_PI);
+ float x = radius * cos(angle);
+ float y = radius * sin(angle);
+ line(x, y, height, 0, 0, 0);
+ }
+ noFill();
+ pushMatrix();
+ translate(0, 0, height);
+ ellipseMode(CENTER);
+ ellipse(0, 0, radius, radius);
+ popMatrix();
+}
View
33 libraries/processing/video/examples/Capture/HsvSpace/Tuple.pde
@@ -0,0 +1,33 @@
+// Simple vector class that holds an x,y,z position.
+
+class Tuple {
+ float x, y, z;
+
+ Tuple() { }
+
+ Tuple(float x, float y, float z) {
+ set(x, y, z);
+ }
+
+ void set(float x, float y, float z) {
+ this.x = x;
+ this.y = y;
+ this.z = z;
+ }
+
+ void target(Tuple another, float amount) {
+ float amount1 = 1.0 - amount;
+ x = x*amount1 + another.x*amount;
+ y = y*amount1 + another.y*amount;
+ z = z*amount1 + another.z*amount;
+ }
+
+ void phil() {
+ fill(x, y, z);
+ }
+
+ void tran() {
+ translate(x, y, z);
+ }
+}
+
View
55 libraries/processing/video/examples/Capture/LivePocky/LivePocky.pde
@@ -0,0 +1,55 @@
+/**
+ * Live Pocky
+ * by Ben Fry.
+ *
+ * Unwrap each frame of live video into a single line of pixels.
+ */
+
+import processing.video.*;
+
+Capture video;
+int count;
+int writeRow;
+int maxRows;
+int topRow;
+int buffer[];
+
+
+void setup() {
+ size(600, 400, P2D);
+
+ // Uses the default video input, see the reference if this causes an error
+ video = new Capture(this, 320, 240);
+ video.start();
+
+ maxRows = height * 2;
+ buffer = new int[width * maxRows];
+ writeRow = height - 1;
+ topRow = 0;
+
+ //frameRate(10);
+ background(0);
+ loadPixels();
+}
+
+
+void draw() {
+ video.loadPixels();
+ arraycopy(video.pixels, 0, buffer, writeRow * width, width);
+ writeRow++;
+ if (writeRow == maxRows) {
+ writeRow = 0;
+ }
+ topRow++;
+
+ for (int y = 0; y < height; y++) {
+ int row = (topRow + y) % maxRows;
+ arraycopy(buffer, row * width, g.pixels, y*width, width);
+ }
+ updatePixels();
+}
+
+
+void captureEvent(Capture c) {
+ c.read();
+}
View
73 libraries/processing/video/examples/Capture/Mirror/Mirror.pde
@@ -0,0 +1,73 @@
+/**
+ * Mirror
+ * by Daniel Shiffman.
+ *
+ * Each pixel from the video source is drawn as a rectangle with rotation based on brightness.
+ */
+
+import processing.video.*;
+
+
+// Size of each cell in the grid
+int cellSize = 20;
+// Number of columns and rows in our system
+int cols, rows;
+// Variable for capture device
+Capture video;
+
+
+void setup() {
+ size(640, 480, P2D);
+ frameRate(30);
+ cols = width / cellSize;
+ rows = height / cellSize;
+ colorMode(RGB, 255, 255, 255, 100);
+
+ // Uses the default video input, see the reference if this causes an error
+ video = new Capture(this, width, height);
+ video.start();
+
+ background(0);
+}
+
+
+void draw() {
+ if (video.available()) {
+ video.read();
+ video.loadPixels();
+
+ // Not bothering to clear background
+ // background(0);
+
+ // Begin loop for columns
+ for (int i = 0; i < cols; i++) {
+ // Begin loop for rows
+ for (int j = 0; j < rows; j++) {
+
+ // Where are we, pixel-wise?
+ int x = i*cellSize;
+ int y = j*cellSize;
+ int loc = (video.width - x - 1) + y*video.width; // Reversing x to mirror the image
+
+ float r = red(video.pixels[loc]);
+ float g = green(video.pixels[loc]);
+ float b = blue(video.pixels[loc]);
+ // Make a new color with an alpha component
+ color c = color(r, g, b, 75);
+
+ // Code for drawing a single rect
+ // Using translate in order for rotation to work properly
+ pushMatrix();
+ translate(x+cellSize/2, y+cellSize/2);
+ // Rotation formula based on brightness
+ rotate((2 * PI * brightness(c) / 255.0));
+ rectMode(CENTER);
+ fill(c);
+ noStroke();
+ // Rects are larger than the cell for some overlap
+ rect(0, 0, cellSize+6, cellSize+6);
+ popMatrix();
+ }
+ }
+ }
+}
View
60 libraries/processing/video/examples/Capture/Mirror2/Mirror2.pde
@@ -0,0 +1,60 @@
+/**
+ * Mirror 2
+ * by Daniel Shiffman.
+ *
+ * Each pixel from the video source is drawn as a rectangle with size based on brightness.
+ */
+
+import processing.video.*;
+
+// Size of each cell in the grid
+int cellSize = 15;
+// Number of columns and rows in our system
+int cols, rows;
+// Variable for capture device
+Capture video;
+
+
+void setup() {
+ size(640, 480, P2D);
+ //set up columns and rows
+ cols = width / cellSize;
+ rows = height / cellSize;
+ colorMode(RGB, 255, 255, 255, 100);
+ rectMode(CENTER);
+
+ // Uses the default video input, see the reference if this causes an error
+ video = new Capture(this, width, height);
+ video.start();
+
+ background(0);
+}
+
+
+void draw() {
+ if (video.available()) {
+ video.read();
+ video.loadPixels();
+
+ background(0, 0, 255);
+
+ // Begin loop for columns
+ for (int i = 0; i < cols;i++) {
+ // Begin loop for rows
+ for (int j = 0; j < rows;j++) {
+
+ // Where are we, pixel-wise?
+ int x = i * cellSize;
+ int y = j * cellSize;
+ int loc = (video.width - x - 1) + y*video.width; // Reversing x to mirror the image
+
+ // Each rect is colored white with a size determined by brightness
+ color c = video.pixels[loc];
+ float sz = (brightness(c) / 255.0) * cellSize;
+ fill(255);
+ noStroke();
+ rect(x + cellSize/2, y + cellSize/2, sz, sz);
+ }
+ }
+ }
+}
View
75 libraries/processing/video/examples/Capture/RadialPocky/RadialPocky.pde
@@ -0,0 +1,75 @@
+/**
+ * Radial Pocky
+ * by Ben Fry.
+ *
+ * Unwrap each frame of live video into a single line of pixels along a circle
+ */
+
+import processing.video.*;
+
+Capture video;
+int videoCount;
+int currentAngle;
+int pixelCount;
+int angleCount = 200; // how many divisions
+
+int radii[];
+int angles[];
+
+
+void setup() {
+ // size must be set to video.width*video.height*2 in both directions
+ size(600, 600, P2D);
+
+ // Uses the default video input, see the reference if this causes an error
+ video = new Capture(this, 160, 120);
+ video.start();
+ videoCount = video.width * video.height;
+
+ pixelCount = width*height;
+ int centerX = width / 2;
+ int centerY = height / 2;
+ radii = new int[pixelCount];
+ angles = new int[pixelCount];
+
+ int offset = 0;
+ for (int y = 0; y < height; y++) {
+ for (int x = 0; x < width; x++) {
+ int dx = centerX - x;
+ int dy = centerY - y;
+
+ float angle = atan2(dy, dx);
+ if (angle < 0) angle += TWO_PI;
+ angles[offset] = (int) (angleCount * (angle / TWO_PI));
+
+ int radius = (int) mag(dx, dy);
+ if (radius >= videoCount) {
+ radius = -1;
+ angles[offset] = -1;
+ }
+ radii[offset] = radius;
+
+ offset++;
+ }
+ }
+ background(0);
+}
+
+
+void draw() {
+ if (video.available()) {
+ video.read();
+ video.loadPixels();
+
+ loadPixels();
+ for (int i = 0; i < pixelCount; i++) {
+ if (angles[i] == currentAngle) {
+ pixels[i] = video.pixels[radii[i]];
+ }
+ }
+ updatePixels();
+
+ currentAngle++;
+ if (currentAngle == angleCount) currentAngle = 0;
+ }
+}
View
54 libraries/processing/video/examples/Capture/SlitScan/SlitScan.pde
@@ -0,0 +1,54 @@
+/**
+ * Simple Real-Time Slit-Scan Program.
+ * By Golan Levin.
+ *
+ * This demonstration depends on the canvas height being equal
+ * to the video capture height. If you would prefer otherwise,
+ * consider using the image copy() function rather than the
+ * direct pixel-accessing approach I have used here.
+ *
+ * Created December 2006.
+ * Updated June 2007 by fry.
+ */
+import processing.video.*;
+
+Capture video;
+
+int videoSliceX;
+int drawPositionX;
+
+void setup() {
+ size(600, 240, P2D);
+
+ // Uses the default video input, see the reference if this causes an error
+ video = new Capture(this, 320, 240);
+ video.start();
+
+ videoSliceX = video.width / 2;
+ drawPositionX = width - 1;
+ background(0);
+}
+
+
+void draw() {
+ if (video.available()) {