vcapg;
gamen=vcapg;
gamen2=vcapg;
try
while(1)
gamen=vcapg;
diffdat=double(gamen(:,:,1))-double(gamen2(:,:,1));
absval=mean(abs(diffdat(:)))
if absval>10
    disp('captured');
    aa=sprintf('%f',now);
    save(['a' aa '.mat'],'gamen');
end
gamen2=gamen;
end
catch
clear vcapg;
end