This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Why disappeared moving object do not disappear for a long time?



      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);

The calling procedure are as following:
    FVID_exchange(hGioVpfeCcdc, &frameBuffPtr);
    src=frameBuffPtr->frame.frameBufferPtr;
    VLIB_extractLumaFromUYUV(src,width,width,height,imageData);
    VLIB_imagePyramid8(imageData,(Uint16) width,(Uint16) height,pyramidData);
    test_gaussian_mixture_models(pyramidData,currentMeans,currentVars,currentWgts,compIndex,intBuffer,height/2,width/2,fgMask);
    test_dilate_and_erode(fgMask,height/2,width/2,imageTempData,imageOutputData);
   test_connected_components_labeling(UartHandle,imageOutputData,height/2,width/2,primaryBuff1,primaryBuff2,overFlowBuff1,overFlowBuff2,handle,outData); 
   for(i=0;i<height/2;i++)
  {
       for(j=0;j<width/2;j++)
       {
              src[2*(i*width+j)+1]=(Uint8)*(outData+i*width/2+j); //pyramidData[i*width/2+j]; 
              src[2*(i*width+j)]=0x80;
       }
   }
   FVID_exchange(hGioVpbeVid0, &frameBuffPtr);