There is an implementation of that algorithm in opencv version 1.0 the function is cvCreateFGDStatModel to create the background model. But I can't find it in latest versions. Does anybody knows if it was removed or renamed? And if you know other open source of that algorithm please tell me.
It's still there, just add the appropriate include:
#include "opencv2/video/background_segm.hpp" // on OpenCV 2.3, it's inside this header!
#include "cv.h"
#include "highgui.h"