Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
manolodsp
manolodsp's Profile
1
Posts
0
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
Cannot for the life of me mirror the output images in this code
[1 Reply]
09-Mar-2013 09:31 PM
Forum:
Core Library Questions
I am just trying to mirror the images in this looped stopmotion. I tried using scale(-1,1), but it is not working for me, either it does nothing or the output is a black screen. Anyone know what I can do?
Thank you!!
code:
import processing.video.*;
String[] cameras = Capture.list();
Capture myCapture;
int captureFrame = 0;
int playbackFrame = 0;
int captureDelay = 0;
int stopMotionFrame = 0;
int totalFrames = 25;
PImage[] stopMotion = new PImage[totalFrames];
PImage emptyImage = createImage(1280, 480, RGB);
//boolean sketchFullScreen() {
// return true;
//}
void setup()
{
frameRate(30);
size(1280, 960);
println(Capture.list());
myCapture = new Capture(this, 640, 480, 30);
myCapture.start();
for (int i = 0; i < totalFrames; i++){
stopMotion[i] = emptyImage;
}
//myCapture.stop();
}
void captureEvent(Capture myCapture) {
myCapture.read();
}
void draw() {
background(0,0,0);
image(myCapture, 0, 0, 1280, 960);
// Captures a frame at a time interval.
captureDelay++;
if (captureDelay>15){
captureDelay=0;
captureFrame++;
if (captureFrame>=totalFrames){
captureFrame=0;
}
stopMotion[captureFrame] = get(0,0,1280,960);
}
stopMotionFrame++;
if (stopMotionFrame>=totalFrames){
stopMotionFrame=0;
}
image(stopMotion[stopMotionFrame], 0, 0, 1280, 960);
}
«Prev
Next »
Moderate user : manolodsp
Forum