Skip to main content
. 2021 Feb 15;21(4):1365. doi: 10.3390/s21041365
Algorithm 1 Labeling room areas and corridors areas with “winner-take-all” principle
Input: Pre-processed map(PPM), Pre-segmented map(PSM), classification results of sampling points;
Output: The map with room labels and corridors labels;
 1: The classification results of sampling points in each area were counted. m is the number of sampling points identified as rooms in each area, and n is the number of sampling points identified as corridors;
 2: for each area of the binarized map do
 3:   if m >= n then
 4:     Classify this area as room;
 5:   else
 6:     Classify this area as corridors;
 7:   end if
 8: end for