Skip to main content
. 2013 Dec 12;13(12):17130–17155. doi: 10.3390/s131217130

Algorithm 1: Visual abnormal event detection via online least squares one-class support vector machine (LS-OC-SVM) and sparse online LS-OC-SVM.

Require
n training frames {Ii}i=1nand the corresponding optical flow {OPi}i=1n.
Compute the covariance matrix of each frame.
{OP1,OP2,,OPn}{C1,C2,,Cn} (46)
  • (a)

    Online strategy: Applying LS-OC-SVM on the small subset of training samples to calculate the coefficient matrix.

    {C1,C2,,Cm},1mnonlinecoefficient matrix[K][αρ] (47)
  • (b)

    Sparse online strategy: Applying LS-OC-SVM to train the initial dictionary, CInline graphic, offline.

    CD={C1,C2,,Cm},1mnofflinecoefficient matrix[K][βρ] (48)
  • (a)

    Online strategy: Applying online LS-OC-SVM on the remaining samples to calculate the coefficient matrix.

    {Cm+1,Cm+2,,Cn},[K]onlinecoefficient matrix[K][αρ] (49)
  • (b)

    Sparse online strategy: Applying sparse online LS-OC-SVM on the remaining samples to calculate the coefficient matrix and to update the dictionary.

    {CD,CK},m<knsparse onlinecoefficient matrix[βρ]{CD:=CDCk,ifϵtμ0CD:=CD,ifϵt<μ0 (50)
Each frame Cn+l is classified via LS-OC-SVM.