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.

VLIB background subtraction problem

Hi, all

I have been working as a background subtraction in VLIB v2.2.
I am using VLIB_updateEWRMean16 () and VLIB_updateEWRVarianceS16 ().

I tried to change the update rate. However, there is no change in the background.

I would like to update the background a little faster.

What can I do the update should be the background?

My work is as follows.

- Variable Settings
#define MINBLOBAREA 16
#define MAXIMUM_BLOB 16

Int16 thresholdFactor = THRESHOLD_FACTOR_S16 / 2;
Int16 thresholdGlobal = CAMERA_NOISE_S16 / 32;

#pragma DATA_ALIGN (fgMask, 256);
#pragma DATA_ALIGN (foreground, 256);
#pragma DATA_ALIGN (CCMap, 256);
#pragma DATA_ALIGN (currentMeans, 256);
#pragma DATA_ALIGN (currentVars, 256);

Uint32 fgMask [IMAGESIZE / 32];
Uint8 foreground [IMAGESIZE];
Uint8 CCMap [IMAGESIZE * 3];
Int16 currentMeans [IMAGESIZE * 3];
Int16 currentVars [IMAGESIZE * 3];
Int16 * pCurrentMean = & currentMeans [0];
Int16 * pCurrentVars = & currentVars [0];
Uint32 * pFgMask = & fgMask [0];
Uint8 * pForeground = & foreground [0];
Int16 bgAdaptRate = IIR_ALPHA_S16;

- The first initialization tasks:
// Initialize the running mean "image"
VLIB_initMeanWithLumaS16 (pCurrentMean, pImgLuma, frame_size);
// Initialize the running variance "image"
VLIB_initVarWithConstS16 (pCurrentVars, thresholdGlobal, frame_size);

- The second consecutive iterations:
// Call the subtraction background function
VLIB_subtractBackgroundS16 (pFgMask, pCurImgLuma, pCurrentMean, pCurrentVars, thresholdGlobal, thresholdFactor, frame_size);
// Update Background Mean
VLIB_updateEWRMeanS16 (pCurrentMean, pCurImgLuma, pFgMask, bgAdaptRate, frame_size);
// Update Background Variance
VLIB_updateEWRVarianceS16 (pCurrentVars, pCurrentMean, pCurImgLuma, pFgMask, bgAdaptRate, frame_size);
VLIB_unpackMask32 (pFgMask, pForeground, frame_size);
VLIB_createConnectedComponentsList (gHandle, (short) width, (short) height, (int *) pFgMask, MINBLOBAREA, 1);
IMG_thr_gt2max_8 (pForeground, pImgDst, width, height, 0);

Why does not the background update?
How to tell if my fault is different.

Raise the images resulted in here.

Background image during initialization (pCurrentMean on initialization task)

Current Luminance after 3 minutes (pCurImgLuma)

Current Background after 3 minutes (pCurrentMean)

Current foreground after 3 minutes (pForeground)

Thanks & Best Regards