We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
time-lapse trouble (Read 793 times)
time-lapse trouble
Aug 2nd, 2005, 2:07pm
 
Im having a bit of trouble with the timeDelay of my sketch
I want it to saveframe every 10-15 minutes, but it keeps saving every 1 minute!

heres the code:import processing.video.*;
Camera camera;

// how many seconds between each saveFrame
int timeDelay;

// total number of saved images
int imageCounter;

void setup(){
 size(800,600,P2D);
 
 // set the program to run at a framerate of once per second
 framerate(1);
 
 // new camera object, 800x600 resolution
 camera = new Camera(this, 800, 600);
 
 // 10 second delay between each saveFrame
 timeDelay = 10;
}


void draw(){
 if (second()%timeDelay == 0){
   background(0);
   camera.read();
   image(camera, 0, 0);
   saveFrame("screenGrabs/frames####.tif");

   println("saving image " + imageCounter + " :: " + (imageCounter * timeDelay) + " seconds");
   imageCounter ++;
 }
}

can someone figure this out?
Re: time-lapse trouble
Reply #1 - Aug 2nd, 2005, 2:09pm
 
by the way dont mention the capture/camera part!
I have changed it!
Page Index Toggle Pages: 1