Research Article

Research on a Fast Human-Detection Algorithm for Unmanned Surveillance Area in Bulk Ports

Algorithm 2

INPUT: ,  
OUTPUT: the matrix  
Begin Algorithm:
define function vote ();
for    to 16
for    to 16
  if    &  
   vote ();
  else if    &  
   vote ();
  else if    &  
   vote ();
  else if    &  
   vote ();
  else if    &  
   vote ();
   vote ();
  else if    &  
   vote ();
   vote ();
  else if    &  
   vote ();
   vote ();
  else if    &  
   vote ();
   vote ();
  else if    &  
   vote ();
   vote ();
   vote ();
   vote ();
  end if
end for
end for
;
for    to 2
for    to 2
  for    to 9
   ;
   ;
  end for
end for
end for
End Algorithm
function vote ( )
  (  −  10)∖;    (  −  10)∖20 + 1;
if    then
  ;  ;  ;
  if    &    then
   ;
  else  if    &  
   ;
  else if    &  
   ;
  else if    &  
   ;
  end if
else
  if    &    then
   ;
   ;
  else  if    &  
   ;
   ;
  else  if    &  
   ;
   ;
  else  if    &  
   ;
   ;
  end if
end if
end function