I use Gaussain mixture model VLIB_mixtureOfGaussiansS32 to segment moving objects. For improving speed, I also use pyrimid fuction VLIB_imagePyramid8 so that processing image size is only a quarter of original image. Ceterainly, processing speed has been greatly improved, but disappeared moving object do not disappear for a long time in the screen. Why?
As can be seen on the picture, a moving object has a long trailing . some paremeters are as follow:
Int16 updateRate1 = 0.1 * MAX_S16/MAX_0p16;
Int32 updateRate2 = 0.001 * 2147483648;
Int32 mdThreshold = (1.5*1.5) * 134217728; //(2.5*2.5) * 134217728
Int16 bsThreshold = 0.7 * MAX_S16/MAX_0p16; //0.5 * MAX_S16/MAX_0p16
Int16 initialWt = (MAX_S16/MAX_0p16)/100;
Int32 initialVar =320 * 32768; //320 * 32768
Int32 pixNum;
//==================================
pixNum = width * height;
VLIB_mixtureOfGaussiansS32(inputImage,currentWgts,currentMeans,currentVars,compIndex,intBuffer,fgMask,pixNum,updateRate1,updateRate2,mdThreshold,bsThreshold,initialWt,initialVar);