Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Step 1. Import the video library.
- import processing video.
- //Step 2. Declare a capture object.
- Capture video;
- void setup() {
- size(320, 240);
- // Step 3. Initialize Capture object.
- video = new Capture(this, 320, 240);
- // Step 4. Start the capturing process.
- video.start();
- }
- // Step 6. Display the image.
- void draw() {
- image(video, 0, 0);
- }
- // Step 5. Read from the camera when a new image is available!
- void captureEvent(Capture video) {
- video.read();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement