Save an image from webcam capture
in
Core Library Questions
•
1 year ago
Hello, I'm new here and not very experienced in Processing. But I hope someone will help me a bit.
I know how to capture a webcam and I know how to freeze the image when my mouse is pressed, like so:
import processing.video.*;
Capture myCapture;
int value = 0;
void setup ()
{
size (640, 480);
myCapture = new Capture(this, width, height, 30);
}
void captureEvent (Capture myCapture) {
myCapture.read ();
}
void draw() {
image (myCapture, 0, 0);
}
void mousePressed() {
myCapture.stop();
}
But I want that processing saves the freezed image and put it into the 'data' directory. Next I want to put that saved image back into processing with a blendmode.
So, first does anyone of you know how to save an image and put it into the data directory?
You will help me a lot! :D
Thanks anyway!
I know how to capture a webcam and I know how to freeze the image when my mouse is pressed, like so:
import processing.video.*;
Capture myCapture;
int value = 0;
void setup ()
{
size (640, 480);
myCapture = new Capture(this, width, height, 30);
}
void captureEvent (Capture myCapture) {
myCapture.read ();
}
void draw() {
image (myCapture, 0, 0);
}
void mousePressed() {
myCapture.stop();
}
But I want that processing saves the freezed image and put it into the 'data' directory. Next I want to put that saved image back into processing with a blendmode.
So, first does anyone of you know how to save an image and put it into the data directory?
You will help me a lot! :D
Thanks anyway!
1