I've been asked to help create a code project that responds to a timelapse video of a building being constructed at my university. I showed my project team-mates my simple difference code and v3ga's edge detection code. They reckoned a combination of the two would be good.
So I've just quickly stitched the two together and modified v3ga's code for the new API as a start.
http://www.robotacid.com/misc/timetest.mov (4mb, a bit choppy owing to cheap cature software)
http://www.robotacid.com/misc/difference3.pde
If anyone could offer some constructive criticism I'd be glad to hear it. There's at least six weeks of timelapse photography to go yet.
For v3ga; just do this to your code for P85:
Code:
//find and replace BImage with PImage, plus:
// copyToImg()
// ------------------
void copyRenderTargetToImg(PImage imgToCopy)
{
System.arraycopy(imgToCopy.pixels, 0, img.pixels,0, imgToCopy.width*imgToCopy.height);
img.updatePixels();//Add this line
}
My problem is that I'm going to be working from a quicktime movie as opposed to web-cam. My initial tries with the movie object were exceedingly choppy and horrible. I'm going to need to export the frames to re-assemble a new movie. I'll want to step through the movie frame by frame and save the code-image-response for each frame.
The movie object doesn't seem to have a step by step, frame by frame method. Is there a trick I can employ to achieve this? It would make me feel a little more secure about rendering the new version of the movie frame by frame.
Update:
Bear with me, I'll post a piece of code illustrating that last question. I'll be likely for a more succinct answer. Any suggestions on the project would be welcome though.