B.ForegroundProbabilityDistribution
Theforegroundprobabilitydistributionon and axiscanbedirectlyestimatedfrom ( )and ( )bydividingtheentriesbythetotalnumberofforegroundpixels. ( )=
( )
,0< ≤ 1, ∈ ,(5)
( )= ( )
,0< ≤ 2, ∈ ,
(6)
Where isthetotalforegroundpixels.
C.CrowdEntropy
Inspiredbythede nitionofentropyfromtheinformationtheory[20],wede neforegroundentropybasedonfore-groundprobability.Foregroundentropyisde nedasfollows:
( ∑ 1)=
( )log(
1
( )
), ( )=0.(7) =1 ( )=∑
2 ( )log(1
), ( )=0(8)
=1
( ).
Foregroundentropydenotesthedispersionofforeground
onthehorizontalandverticaldirections.Forexample,iftheprobabilityis1atbin ,then ( )=1,sotheentropyofprobabilitydistributionis =1 log(1)=0.Iftheprobabilityisequallydistributedonallbins,weget = 1/ log(1/(1/ ))=log( ).Therefore,adistributionwithasinglesharppeakyieldstoalowentropyvalue,whereasadisperseddistributioncorrespondstoahighentropyvalue.D.CrowdDispersion
( ), ( )isthedispersionofforegroundonthehor-izontalandverticaldirectionrespectively.CrowdDispersionisusedtore ectthedispersionoftheframeglobally.CrowdDispersion( )isde nedasfollows:
= ( ) ( ).
(9)
E.CrowdDistributionIndex
Basedontheabovede nition,wecande neCrowdDistributionIndexasfollows:
= 2
3,
(10)Where isthecrowddensityand isCrowdDispersion.Equation(10)meansthatwhenpeoplegatherinalocalregion, willbelargewhile besmall,whichyieldstoalarge value.Basedonathreshold,wecandetectpedestraingathering.However,whenthepedestrainsmovinginthescenesarrangeinalineofhorizontalorverticaldirectionjustasFig.5(a), willbeverysmallwhile ismedium,whichmakes bealargevaluejustasthesituationwhenpeoplegatheringinalocalregion(Fig.5
(b)).
498
(a) =1.1, =4,
2 3
=
16(b) =2.22, =8,
2 3
=9
Fig.5.ThereasonwhyweusePiecewiseFunctiontode neCDI.
InFig.5(a),4peoplewalkinalineintheverticalnoabnormalactivitieshappen,however, 2
direction,
region 3=16.InFig.5(b),thepeoplegatheringinalocalindicatesome
accidentstakingplace,but 2
3=9.So(10)willleadtoafalsealarm.Toavoidthis
kindoffalsealarm,weuseaPiecewiseFunctiontomodifythede nition:
{
=
1.1 , ≤2, 2
3,
>2.(11)
Themodi ed caneffectivelysingleoutpeoplegath-eringandishelpfultodetectpedestrainrunning.
VI.KINETICENERGY
OF
CROWD
ThispaperadoptstheHarriscornerasfeatures.MotionvectorsareobtainedbytrackingfeaturesofaseriesofimagesthroughtheLucas-Kanadeoptical owapproach[21].Fig.6showtheresultoftheoptical ow
computation.
(a)Original
frame
(b)Motionvector
Fig.6.
Optical owcomputation.
Thekineticenergyofeachframeisde nedasfollows:
=
∑ 2
,
(12)
=1
Where isthekineticenergyofthe thframe, is
CrowdDistributionIndexand isthevelocity. providenotonlytheinformationofcrowddensitybutalsothatofcrowddistribution.Whenthepeoplegatherinalocalregion,occlusionswilloccur,whichmeansthatMotionFeaturestendtobesmallerthanthatinascenewherepersonsaresparselyscattered.However,intheabovesituation, willbelargerwhichcompensatesthein uenceofocclusions.

