## 4 Methodology
### Vision-Based Localization Information Acquisition
#### 4.2.3 Step-Length-Based Feature Matching Search Region Constraint  
During image feature matching within each gait interval, an adaptive step length estimation is used to constrain the search region for feature point pairs, improving both efficiency and accuracy compared to traditional ORB feature matching. In this paper, the matched feature points are searched within a rectangular region centered on the predicted point. As shown in Figure 12, a feature point \(\mathbf{M}(u,v)\) in the \(i\)-th keyframe \(\text{Fs}(i)\) will appear in the red rectangular region in the next keyframe \(\text{Fs}(i+1)\). During feature matching, only points within this region (green dots in Figure 12) are considered. \(f\) denotes the camera focal length; \(l_{\text{s}}\) represents the step length; \(\Delta u^{\prime\prime}\) and \(\Delta v^{\prime\prime}\) are the width and height of the red rectangular region, respectively. After one gait motion, the predicted pixel coordinates \(\mathbf{M}^{{}^{\prime}}(u^{\prime},v^{\prime})\) of the corresponding feature point in the new frame \(\text{Fs}(i+1)\) can be estimated from the pixel coordinates \(\mathbf{M}(u,v)\) in the old frame \(\text{Fs}(i)\), using the step length \(l_{\text{s}}\), rotation matrix \(\mathbf{R}^{{}^{\prime}}\), and camera parameters such as focal length \(f\). Assuming a point \(\mathbf{P}(X_{\text{w}},Y_{\text{w}},Z_{\text{w}})\) in the world coordinate system has camera coordinates \(\mathbf{P}_{\text{c}}(X,Y,Z)\) with initial orientation matrix \(\mathbf{R}_{0}\) (pitch angle \(\varphi_{0}\), yaw angle \(\varphi_{0}\), and roll angle \(\theta_{0}\)), and the camera moves along direction \(\mathbf{d}_{\text{w}}=(d_{x},d_{y},d_{z})\) by distance \(l_{\text{s}}\) with rotation matrix \(\mathbf{R}^{{}^{\prime}}\), then the coordinates \(\mathbf{P}^{{}^{\prime}}_{\text{c}}\) of point \(\mathbf{P}_{\text{w}}\) in the camera coordinate system after the movement are:  
\[\mathbf{P}^{{}^{\prime}}_{\text{c}}=(X^{\prime},Y^{\prime},Z^{\prime})=\mathbf{R}^{{ }^{\prime}}(\mathbf{P}_{\text{c}}-\mathbf{R}_{0}\cdot\mathbf{d}_{\text{w}}\cdot l_{\text{ s}}) \tag{15}\]  
Figure 12: Schematic diagram of feature matching search region constrained by step length. Taking forward motion as an example, where the heading aligns with the translation direction, the initial rotation matrix is identity \(\mathbf{I}\), and the movement direction is \((0,0,1)\). After moving \(l_{\text{s}}\), the predicted pixel coordinates \(\mathbf{M}^{\prime}\) of feature point \(\mathbf{P^{\prime}}\) are given by:  
\[u^{\prime}=f\frac{X^{\prime}}{Z^{\prime}}=\frac{uZ}{Z-l_{\text{s}}} \tag{16}\]  
\[v^{\prime}=f\frac{Y^{\prime}}{Z^{\prime}}=\frac{vZ}{Z-l_{\text{s}}} \tag{17}\]  
To validate the effectiveness of the search region constraint strategy described in the above, we evaluated the proposed Step-length-Based Feature Matching Search Region Constraint (SL-FSRC) algorithm using scenes containing repetitive structures or objects (e.g., chairs, ceiling corners, stairs, and markers), which are commonly found in real-world environments. In this approach, an appropriate search area is defined around the predicted pixel coordinates based on the step length. This limits the feature matching search and avoids exhaustive global searches typically used in traditional methods, thereby significantly reducing computational load. Furthermore, searching within a constrained region prevents erroneous matches caused by repetitive structures. The traditional ORB algorithm was employed to detect feature points and perform feature matching based on Hamming distance. The matching results are illustrated in the first and third rows of Figure 13, where the red-dotted pairs indicate mismatches identified by the proposed constraint method when applied to the conventional matching results.