Research Article

Efficient Active Sensing with Categorized Further Explorations for a Home Behavior-Monitoring Robot

Pseudocode 3: Change_DepthRange.

Codes
Begin_Change_DepthRange
 For i = 1: ConstSmooth
   BF = recogActivity (IF[t])) BF = 1~6
   ADSmooth[i] = calAD(IT[BF], IF[t])
minADSmooth = min(ADSmooth [i]){i = 1~ConstSmooth}
  σ = σrange[iDepthRange]
ADDepthRange[iDepthRange] = minADSmooth
 If minADSmooth ≥ ThAD
   minADDepthRange = min(ADDepthRange[i]) {i = 1~ iDepthRange}
   If minADDepthRange < ThAD
    iDepthRange = argmedian(AD[i] |AD[i] < ThAD)
             {i = 1~ iDepthRange}
   σ = σrange[iDepthRange]
   Goto Begin_Normal_Mode_Monitoring
iDepthRange + = 1
 If iDepthRange > ConstDepthRange
   σ = σinit
     iDepthRange = 0
   Goto Begin_ChangeViewpoint
 Else
   Goto Begin_Change_DepthRange
End_Change_DepthRange
Explanation of parameters and functions
BF: activity recognized,
IF[t]: image of frame t
IT[BF]:the templates of BF
ADSmooth: array to save AD values
σrange: sensing parameter range for exploring,
σ: current depth range
ADDepthRange: AD for each sensing parameter
minADDepthRange: minimal AD value among explored parameters
argmedian(): to get the id of the parameter with the median value among useful (AD[i] < ThAD) explored parameters
ConstDepthRange: the size of σrange
σinit: initial value of sensing parameter
Functions called recogActivity(): activity recognition (ref. [10])
calAD(): accumulated difference calculation
σrange[i] = 200-i10 mm, {i = 1~12}; σworks for probabilistic model to extract IF(t) from raw image data
ConstDepthRange = 12
ConstSmooth = 5
ConstAngle = 20 degrees
ConstMax_rotation = 4
Pseudocode 3: Change_DepthRange.