|
Algorithm 1. Gaussian mixture model-based moving target detection |
|
input: the enhanced image Rx, y and parameters of Gaussian mixture model μx,y,k, σx,y,k and ωx,y,k, where x ∈ [1,Width], y ∈ [1,Height], k ∈ [1,K] |
|
output: the foreground image Fx, y, where x ∈ [1,Width], y ∈ [1,Height] |
|
procedure GaussianMixtureModelDetection(R, μ, σ, w) |
| Step #1 Initialize the parameters of Gaussian mixture model |
| μx,y,k←rand(), σx,y,k←σ0, ωx,y,k←1/K |
| Step #2 Try to match the Gaussian mixture model with the n-th image |
| for
k = 1 to K do
|
| if
Rx,y,n
μx,y,k < d·σx,y,k
then
|
| matchk = 1 |
| ωx,y,k = (1 − α)·ωx,y,k + α
|
| μx,y,k = (1 − α/ωx,y,k)·μx,y,k + α/ωx,y,k·Rx,y,n
|
| σx,y,k =
|
| else
|
| ωx,y,k = (1 − α)·ωx,y,k
|
| end if
|
| end
|
| Step #3 Normalize the weight ωx,y,k and sort the model with ωx,y,k/σx,y,k
|
| Step #4 Reinitialize the model with minimum weight if there is no matched model, |
| if
then
|
| μx,y,0 = pixelx,y,n
|
| σx,y,k = σ0
|
| end if
|
| Step #5
|
| for
k = 1 to K do
|
| if
ωx,y,k > T and
Rx,y,n
μx,y,k < d·σx,y,k
then
|
| Fx, y = 0 |
| break
|
| else
|
| Fx, y = 255 |
| end if
|
| end
|
| Step #6 Execute 3 × 3 erode and dilate operations over R(x, y) |
| Step #7 Execute connected region analysis and list potential moving target |
| Step #8 Specify the object larger than AreaThresh as the target |
| end procedure |