# A Hybrid Marker-Based Indoor Positioning System for Pedestrian Tracking in Subway Stations
## 3 The Proposed HMIPS
### Marker Generation  
#### 3.2.1 QR Marker and Marker Recognition Method in HMIPS  
The markers used in the HMIPS are composed of squares, as shown in Figure 4, the structure of the marker including the border area, pattern area, and finder pattern in accordance with the QR code international standard. Compared to this standard, the cells inside the border area are simplified to \(8\times 8\) to augment the recognition rate with the pattern area, which contains the direction of the marker and the ID information of the marker. The inner area of the marker is composed of a display area that can provide visual information to pedestrians, an added circular border to improve aesthetics, and the same information as that of the current subway station. The proposed marker comprises a green square--containing various information--with a blue border. The marker is made in sticker form so that it can be easily installed, and it is coated with matt to reduce the influence of illumination in recognition. The marker color HSB is \(230^{\circ}/89\%/99\%\), and the material is LG-spc030/Im40000. The function of each area of the marker is summarized as follows:  
* Border area: The criteria by which the camera recognizes markers. * Pattern area: Marker-specific identification number display. * Finder pattern area: Located at the four corners of the pattern area. Contains marker rotation information. * Display area: Provide visual information to pedestrians. Smartphone applications with integrated marker recognition technology recognize the marker (shown in Figure 4) through the smartphone camera and then analyze it. The marker's unique ID is extracted, and the user's position is estimated using this information. Marker recognition technology uses an image processing library, which is essential for transforming and analyzing various camera screen images. The smartphone app drives the smartphone camera to recognize markers and captures the camera screen at approximately 1-3 fps. The captured image is used to estimate the user's location through image processing and analysis, as shown in Figure 5.  
Figure 4: Marker structure of the HMIPS. The first step in using a navigation service at a subway station is for a user to run the application on their smartphone and to select a destination. The selected destination is saved while the application is running. When the selected application screen is converted to the camera screen, the user scans the marker with the camera, and the marker recognition program recognizes it. Once the marker is recognized, the app captures an image of it, as shown in Figure 5a. As illustrated in Figure 5b, the captured image is converted into the HSV color model to reduce the influence of light and extract the outline of the marker. Here, a grayscale image of the marker is obtained when the marker boundary is first detected. The HMIPS uses well-known techniques to convert captured images to grayscale formats in RGB. Equation (2) depicts the relationship between the grayscale value and the RGB color component. \[Y=0.2126R+0.7152G+0.0722B \tag{2}\]  
Border area thresholds are used to find potential markers in binary images using the methods proposed by [36] and edge detection methods [37] are used to identify marker boundaries. The adaptive thresholding method was used to determine the changes in image illumination. This technique allows objects to be classified according to their likelihood of becoming a marker region after identifying changes in image illumination. To extract the unique ID of the marker, as shown in Figure 5c, the pattern area of the marker is divided into \(10\times 10\) cells and converted into a binary matrix. When the conversion is complete, the recognized marker ID and destination are passed to the database. The database stores the binary information of the analyzed marker ID along with the marker ID and marker location.