User Tools

Site Tools


processing:video_capture

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
processing:video_capture [2013/08/03 04:44] – [Video capture examples] mithatprocessing:video_capture [2013/08/04 03:53] mithat
Line 4: Line 4:
  
 ===== List available capture devices ===== ===== List available capture devices =====
-The following sketch will print out a list of available capture devices to the console. You'll need at least one entry to do video capture. On Linux (the only platform I tested) different resolutions show up as different devices.+You'll need at least one available device to do video capture. The following sketch will print out a list of available capture devices to the console. On Linux (the only platform I tested) different resolutions show up as different devices.
  
 <file java list_capture_devices.pde> <file java list_capture_devices.pde>
Line 31: Line 31:
  
 ===== Show video ===== ===== Show video =====
 +There are two ways you can set up video capture: by requesting capture parameters or specifying the device.
 +
 ==== By requesting capture parameters ==== ==== By requesting capture parameters ====
 <file java show_capture_by_parameters.pde> <file java show_capture_by_parameters.pde>
Line 66: Line 68:
  
 ==== By specifying device ==== ==== By specifying device ====
-Note that Processing will crop the capture to the canvas size if it doesn't fit.+Processing will crop the capture to the canvas size if it doesn't fit.
  
 <file java show_capture_by_devnum.pde> <file java show_capture_by_devnum.pde>
Line 112: Line 114:
 </file> </file>
  
-<WRAP center round info 80%>+ 
 +<WRAP center round tip 80%>
 ===== Capture is a PImage ===== ===== Capture is a PImage =====
  
-Something the [[http://processing.org/reference/libraries/video/Capture.html|documentation]] on the ''Capture'' class doesn’t mention is that ''Capture'' is derived from ''[[http://processing.org/reference/PImage.html|PImage]]''. You need to dig into the ''Capture'' source code to figure that out:+Something the [[http://processing.org/reference/libraries/video/Capture.html|documentation]] on the Capture class doesn’t mention is that Capture is derived from [[http://processing.org/reference/PImage.html|PImage]]. This is the key to manipulating Capture output. You need to dig into the Capture source code to figure that out:
  
 <code java>public class Capture extends PImage implements PConstants { ...</code> <code java>public class Capture extends PImage implements PConstants { ...</code>
  
-This means all the methods and fields available to ''PImage'' objects should also be available to ''Capture'' objects. This is the key to manipulating ''Capture'' output.+This means all the methods and fields available to PImage objects should also be available to Capture objects.
 </WRAP> </WRAP>
  
processing/video_capture.txt · Last modified: 2013/08/23 04:10 by mithat

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki