Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

How to Capture, Read, and Display a still image in a single program

$
0
0

Hello,

I'm currently writing a program that begins with taking a still image with the program, and then loads the still image in the same program for a sketch utilizing the still image as a background.

As a better overview, the concept is similar to the one in this program: https://www.openprocessing.org/sketch/117624 but instead of using a loaded image, the program will take a new image with the webcam each time it is run to use as the base.

Currently my method does so with a continuous live image as listed below, but I need it to work from a single still frame taken at the beginning of the program. Any help would be greatly appreciated!

import processing.video.*;

Capture myCam;

void setup() { myCam = new Capture(this); //Creating class, "this" uses live camera feed myCam.start(); fullScreen(); }

void draw() { //Draw when dragging if(myCam.available()){ myCam.read(); } }


Viewing all articles
Browse latest Browse all 2896

Trending Articles