-
1:
Initialize depth camera parameters (resolution) and RTLS system (OPC UA).
-
2:
Set , , , , , and as the known dimensions between the depth camera (C), robotic system (R), and the beginning of the RTLS coordinate system.
-
3:
Save the reference depth image into .
-
4:
while the robotic workplace is switched on do
-
5:
Save actual depth image into .
-
6:
Save actual image into .
-
7:
Search for the coordinates of potential human in the picture using function
.
-
8:
Assign coordinates to and .
-
9:
Determine .
-
10:
Convert to grayscale.
-
11:
Eliminate initial measurement errors.
-
12:
Scale the values using Equation (4).
-
13:
Convert into a binary image using the function .
-
14:
Perform contour search with the function .
-
15:
Assign contour coordinates to and .
-
16:
Verify that the contour corresponds to the identified person
-
.
-
17:
if
then
-
18:
Set .
-
19:
end if
-
20:
Calculate the distance between each value in the contour and the robotic system , for .
-
21:
Find the of each contour.
-
22:
Convert and coordinates to RTLS system coordinates.
-
23:
Find all contours where the RTLS system coordinates match with the contour coordinates and the RTLS tag ID is set to have an exception.
-
24:
if no other contours are found and
then
-
25:
Set .
-
else
-
26:
find of the remaining contours.
-
27:
if
≤
then
-
28:
Set for the danger zone.
-
29:
else if
≥>
then
-
30:
Set for the warning zone.
-
31:
else
-
32:
Set for the safe zone.
-
33:
end if
-
34:
end if