Skip to main content
. 2018 Dec 4;18(12):4254. doi: 10.3390/s18124254
Algorithm 1. Feature pixel point screening based on eight-point scan path detection
Input: scene map and robot’s pose
Output: coordinates and pixel values of the set of feature pixels
Calculate the robot’s coordinate (j, i) based on the scene map and robot’s pose;
N←1;
Δ There are 11 rays in total in one area;
while N ≤ 11 do
for y←i to 0 by −1 do
  Calculate coordinate (x, y) according to the Nth ray’s slope and robot’s coordinate (j, i);
  if ((x, y) in the map) then
    if (pixel value of (x, y) = 100) then
      Record the coordinate and pixel value of feature pixel (x, y);
      exit;
    else
      Record the coordinate and pixel value of feature pixel (x, y);
    end if
  else
    exit;
  end if
end for
 N←N+1;
end while