grabber.start();
BackgroundSubtractorMOG backsub = new BackgroundSubtractorMOG();
CvMemStorage storage = CvMemStorage.create();
while(true) {
IplImage img = grabber.grab();
IplImage fgmask = cvCreateImage(cvGetSize(img), IPL_DEPTH_8U, 1);
backsub.apply(img, fgmask, 0.01);
CvSeq contours = new CvSeq();
cvFindContours(fgmask, storage, contours, Loader.sizeof(CvContour.class), CV_RETR_EXTERNAL, CV_CHAIN_APPROX_NONE);