camera flicker with absDiff

I just want to do the abs diff between two frames. Here is the code:

if (vidGrabber.isFrameNew()){  
colorCurrentVideo.setFromPixels(vidGrabber.getPixels(), camWidth, camHeight);  
// update motion images  
greyMotionVideo.absDiff(greyCurrentVideo, greyPreviousVideo);  
 // store previous frame  
greyPreviousVideo = greyCurrentVideo;  

However, the threshold (greyMotionVideo) is flickering between the image you should see at zero.

Its not just my code, when I run theos i get the same problem:…

My feeling is that its looping quicker than the video can update, but isFramenew should solve this?

When I set the framerate of the app to 15 fps for example, it still flickers but at a much slower rate.

Any ideas? Thanks

is it related to this bug?…-isframenew

take care,

  • zach

Brill, thanks.

Is it on the svn? I didn’t see it on the rss feed for changes.