# A Hybrid Marker-Based Indoor Positioning System for Pedestrian Tracking in Subway Stations
## 3 The Proposed HMIPS
### Marker Generation
#### 3.2.2 Marker Detection Method for AR Applications  
The HMIPS recognizes the marker ID and passes the destination with the marker ID information to the database when the user selects a destination and places a marker on the camera, as shown in Figure 6. The AR-based navigation app provided to the user allows the user to enter a destination, as shown in Figure 6a. When the destination input is completed, the direction of progress is guided by arrows, as shown in Figure 6b, and the remaining distance to the destination is displayed along with the POI guide of the place to proceed to, via text. The database uses the received information to return the direction to the destination based on the front of the marker. At this point, each marker provides a direction for consecutive markers that are passed by the user approaching the destination. Each marker does not point in the direction of the destination but is indicative of another marker in the direction of the destination relative to itself. (Note that user tracking between markers uses PDR to indicate the direction of progress with arrows, but this points to the next marker.) This direction information is provided from the HMIPS to AR, and the direction of movement from the marker at the current position to the next marker is indicated by an arrow.  
Figure 5: Marker recognition process for positioning.  
In AR-based indoor navigation, two reference axes are required to display the moving direction of a user with a rotating arrow. One is the axis based on the marker, as shown in Figure 7a and the other is the axis based on the camera screen, as shown in Figure 7b. Because pedestrians do not always use the camera in front of the markers, dynamically calculating the direction of the next marker on a pedestrian basis is necessary. The direction calculation for navigation uses the angle information of the y-axis of the marker, direction of the next marker, \(y^{\prime}\) axis of the camera, and y-axis of the marker, as shown in Figure 7. When guiding to the destination, the angle of the marker is calculated clockwise to provide the direction of the next marker. If the \(y^{\prime}\) axis of the camera and the y-axis of the markers do not match, the angle difference is dynamically calculated to reset the destination direction. Without this resetting, the system will navigate in the direction of the red arrow on the marker, instead of the direction of the black dashed arrow, as shown in Figure 7c. The HMIPS calculates the angles of \(y\) and \(y^{\prime}\) using (3) to solve this misalignment problem. As shown in Figure 7d, the \(\alpha\) value is used for angle correction to provide moving directions.  
\[y^{\prime}=y+\alpha \tag{3}\]  
As previously described, the HMIPS extracts the inclination angle of the marker and corrects the direction angle between the stored markers. This provides the user with the correct direction to the destination based on AR, regardless of the recognition direction of the marker.  
Figure 6: AR-based navigation application of HMIPS: (**a**) destination setting; (**b**) destination guide.  
Figure 7: Direction re-calculation procedure of the HMIPS: (**a**) marker-based arrow; (**b**) camera screen-based arrow; (**c**) difference of the arrows; (**d**) angle correction.