Quantcast
Channel: Processing Forum
Viewing all articles
Browse latest Browse all 1768

Re : save a single frame from Webcam

$
0
0
how about something like this function appended to the gettingStartedCapture from the 1.5.1 examples:


void mouseReleased(){
  
  save("/Users/yourhomedir/desktop/capture"+(capCount+1)+".jpg");
  capCount++;
  
}

Add the capCount variable as a global for taking multiple captures without overwriting, otherwise skip the capCount+1 part:

void mouseReleased(){
  
  save("/Users/yourhomedir/desktop/capture.jpg");
  capCount++;
  
}

also need to change the path to your desktop depending on your os.

hope this helps!
Tim

Viewing all articles
Browse latest Browse all 1768

Trending Articles