During the use of Codebook background modeling, there is always a problem with background updates for the model.
1 The objectives we require are:
- 1 when a person is stationary, one cannot be updated into a background (it must be ensured that the person is always the foreground);
- 2 but for moving books and so on to be able to be updated into the background
2 Proposed solution: 2.1 using two codebook background model,
A model: Main model M, used to split the foreground
Another model: Re-modeling model R, satisfying criteria for re-modeling success, R replacing M
R instead of M, release m and reinitialize a copy of R
temp = M;M = R;free(temp);R = Init();
How do I release the codebook model of the existing code?
voidint//len = width*height{ for(int0; j < len; j++) { if (T[j].cb) { for (int0; i < T[j].numEntries; i++) { delete T[j].cb[i]; } delete [] T[j].cb; } } if (T) delete [] T; T = NULL;}
2.2 Conditions for re-modeling (one can be met)
- The picture has no foreground, which means no one in the room at this time
- There are too many prospects when it means that the light has changed or the camera is moved, or the background model is not calculated accurately
3 Reference Papers
Smart Vision for Managed Home Care:
http://download.csdn.net/detail/quzhongxin/8671203
Codebook Background Modeling Update and code-based model how to free up memory