Pedestrian fingerprint localization method in large indoor scenes based on monocular vision
By establishing a fingerprint database and performing face recognition matching based on monocular camera shooting, the high cost and accuracy problems of pedestrian positioning in large scenes are solved, and low-cost, high-precision indoor pedestrian positioning is achieved, which is suitable for situations where the initial position is unknown. scene.
Patent Information
- Application Number
- CN202111140515.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-28
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2041-09-28
AI Technical Summary
Existing indoor positioning technology is difficult to achieve low-cost absolute position positioning of pedestrians in large scenarios, especially when satellite signals are weak or missing. Solutions based on Bluetooth, WIFI and binocular vision have problems of high cost and difficulty in application.
An indoor large-scene pedestrian fingerprint positioning method based on monocular vision is adopted. By establishing an offline fingerprint database, the fingerprint collection unit grid is divided and information is collected. The face recognition algorithm is used to obtain the pixel coordinates and area of the pedestrian, and fingerprint matching is performed to identify the pedestrian. The absolute position of , no initial a priori position information is required.
It achieves low-cost and high-precision pedestrian positioning in large scenes, improves the utilization of existing resources, reduces hardware layout density and maintenance costs, and directly obtains pedestrian location information.
Smart Images

Figure CN113870351B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of indoor positioning, and in particular relates to a pedestrian fingerprint positioning method in a large indoor scene based on monocular vision. Background Art
[0002] Due to the occlusion of buildings and the influence of internal structures, satellite signals will be weak or even missing in indoor environments, making GNSS-based positioning methods unusable for indoor positioning. Current solutions for indoor pedestrian positioning are mainly based on Bluetooth, WIFI, vision and other technical means.
[0003] In large scenes, positioning solutions based on Bluetooth and WIFI need to deploy a large number of hardware devices to divide the scene in order to obtain high-precision positioning information. High-density hardware distribution is used to obtain better positioning accuracy, but the cost of positioning and equipment maintenance costs also increase. Positioning solutions based on binocular vision have quite mature applications in the field of industrial inspection, but the positioning distance is short, with only a decimeter-level range of action. In large scenes, high-resolution lenses are required to recognize portraits, and there are extremely high requirements for the trigger synchronization of the camera, which makes it difficult to apply in practice. Positioning solutions based on monocular vision can calculate the continuous relative change information of pedestrians by taking images before and after the pedestrians, but the absolute position coordinates cannot be obtained. It is necessary to combine the known initial state information to complete the absolute positioning, which contradicts the randomness of pedestrians appearing in the camera's field of view. In summary, the current indoor positioning methods cannot complete the absolute position positioning of pedestrians in large-scale scenes at a low cost. Summary of the invention
[0004] In view of the shortcomings of the prior art, the present invention provides a fingerprint positioning method for pedestrians in large indoor scenes based on monocular vision. Through the pictures taken by a fixed-position monocular camera, the fingerprint matching algorithm is used to locate the person without the need for the pedestrian's initial prior position information, providing a new solution for pedestrian positioning in large scenes.
[0005] In order to achieve the above object, the technical solution provided by the present invention is a pedestrian fingerprint positioning method for indoor large scenes based on monocular vision, comprising the following steps:
[0006] Step 1: Establish an offline fingerprint database;
[0007] Step 1.1, fingerprint collection cell network division;
[0008] Step 1.2, fingerprint information collection;
[0009] Step 2: perform face detection and recognition on the image to obtain fingerprint information of the object to be tested;
[0010] Step 3, pedestrian positioning;
[0011] Step 3.1, rough fingerprint matching;
[0012] Step 3.2, fingerprint precise matching.
[0013] Moreover, the step 1.1 divides the positioning scene into a fingerprint collection cell network based on the accuracy requirement. Different positioning scenes have different requirements for accuracy. The density of fingerprint collection will directly determine the accuracy of positioning. The accuracy of pedestrian positioning in large scenes is at the meter level. When dividing the scene, the scene will be divided horizontally and vertically at intervals of one meter. Each point will be added to the fingerprint library as a collection point for positioning.
[0014] Moreover, after the positioning scene is divided in step 1.2, firstly, a photo of the pedestrian is collected at each grid point. After the collection is completed, the face recognition algorithm is used to identify the portrait, and the face position is marked with a rectangular frame, and the pixel coordinates of the upper left corner of the rectangular frame (u l ,v l ) and the lower right pixel coordinates (u r ,v r ), and calculate the pixel area S based on the coordinate values p , the pixel area calculation formula is as follows:
[0015] S p =(u l -u r )×(v l -v r ) (1)
[0016] Then, the real position information of pedestrians in the actual scene is collected, and a custom regional coordinate system is established for the measurement scene. The custom regional coordinate system is a rectangular coordinate system, with a corner of a building as the origin. If the corner is a right angle, the X-axis and Y-axis are established along the two sides connected to the corner of the building. If it is not a right angle, the side connected to the corner and parallel to the building is selected as the X-axis, and rotated 90° as the Y-axis; according to the established coordinate system, the position information of the fingerprint point is measured using the traditional measurement method, and the absolute position information (x i ,y i ); So far, the construction of the fingerprint library has been completed. The data in the fingerprint library contains the coordinates of the pedestrian in the established real coordinate system (x i ,y i ), and the facial image coordinates of the pedestrian in the camera imaging (u l ,v l ) and (u r ,v r ), Area S p,The data in the fingerprint library will be used for pedestrian positioning matching and comparison in the subsequent online stage, and the absolute position information in the database will be assigned to the object to be located.
[0017] Moreover, after the image of the object to be tested is obtained by the camera in step 2, the face recognition algorithm is used to detect and recognize the face in the image, and the position of the face on the image is marked with a rectangular frame to obtain the pixel coordinates of the upper left corner and the lower right corner of the face (u′ l ,v′ l )、(u′ r ,v′ r ) and pixel area S′ p .
[0018] Moreover, in step 3.1, the pedestrian face imaging coordinates (u′) are first obtained according to the face recognition algorithm. l ,v′ l )、(u′ r ,v′ r ), calculate the face pixel area S′ p :
[0019] S′ p =(u′ l -u′ r )×(v′ l -v′ r ) (2)
[0020] Then, the face pixel area calculated by the face coordinates collected in real time according to formula (2) is matched with the existing fingerprint data in the database established in step 1. The coordinates corresponding to the fingerprint with the highest matching degree are the coordinates of the point to be measured; let the face area of the person to be located be S′ p , the area storage information of the fingerprint database is S′ p and The Euclidean distance between them is used as the similarity judgment scale to search for the best matching fingerprint, and the coordinate value corresponding to the fingerprint with the smallest Euclidean distance is selected as the coordinate value of the point to be measured; S′ p and Euclidean distance d i The calculation method is:
[0021]
[0022] The coordinate values corresponding to the points to be measured are:
[0023] (x′ i ,y′ i )=Loc(mid(d i ))=(x i ,y i ) (4)
[0024] In the formula, (x′ i ,y′ i ) represents the coordinates of the person to be located, (x i ,y i ) indicates the matching area data The corresponding location coordinates in the fingerprint database;
[0025] Affected by the imaging law of the camera, the facial imaging area in the direction of the camera optical axis at the same depth is the largest, and the facial imaging area at both ends of the field of view is smaller. Therefore, there is a situation where the facial imaging area of a pedestrian with a larger depth in the optical axis direction is the same as the facial imaging area of a pedestrian with a smaller depth at both ends of the field of view, which affects the accuracy of fingerprint matching; if the calculated (x′1, y′1) is a unique value at this time, then this value is the coordinate of the person to be located; if it is not a unique value, further judgment is required.
[0026] Furthermore, in step 3.2, the candidate point coordinates (x1, y1), (x2, y2), ..., (x i ,y i ), the image pixel information associated with the candidate points in the fingerprint library is Select the pedestrian face imaging pixel (u′ l ,v′ l ) formula, assign its coordinate value to the current position; the distance d′ i The calculation formula is as follows:
[0027]
[0028] The final coordinates (x, y) of the point to be located are:
[0029] (x,y)=Loc(min(d′ i ))=(x i ,y i ) (6)
[0030] The coordinates of the person to be located are thus determined.
[0031] Compared with the prior art, the present invention has the following advantages:
[0032] (1) Currently, there are a large number of camera devices in indoor places. The present invention can be directly applied to existing hardware devices to fully improve the utilization rate of existing resources.
[0033] (2) The camera has a wide imaging field of view and rich image information. Compared with the dense hardware deployment of solutions such as Bluetooth and WIFI in large scenes, this method can meet the positioning needs of large scenes at a lower cost.
[0034] (3) When the fingerprint matching method is used for positioning, the difficulty of the method based on the pose solution between photo frames, which requires the initial information of the positioning object to be known, is eliminated, and the position information can be obtained directly. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 is a flow chart of an embodiment of the present invention.
[0036] Figure 2 This is a model diagram of camera pinhole imaging. DETAILED DESCRIPTION
[0037] The present invention provides a pedestrian fingerprint positioning method in a large indoor scene based on monocular vision. Firstly, when the position of a monocular camera is fixed, the positioning scene is divided based on the accuracy requirement and fingerprint information is collected. Then, the image to be positioned is collected by the camera, and the pixel coordinates of the upper left corner and the lower right corner of the face are obtained by face recognition. The area of the face is calculated according to the pixel coordinates of the upper left corner and the lower right corner of the face, and matching is performed to obtain the coordinate candidate points of the person. Finally, the distance value between the upper left corner coordinate of the face and the upper left corner coordinate in the database is calculated, and the coordinate corresponding to the minimum distance value is the person's position information.
[0038] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0039] like Figure 1 As shown, the process of the embodiment of the present invention includes the following steps:
[0040] Step 1: Create an offline fingerprint database.
[0041] Step 1.1, fingerprint collection cell network division.
[0042] The positioning scene is divided into a fingerprint collection cell network based on the accuracy requirements. Different positioning scenarios have different requirements for accuracy. The density of fingerprint collection will directly determine the accuracy of positioning. Taking the meter-level accuracy of pedestrian positioning in large scenes as an example, the scene is divided into horizontal and vertical sections at intervals of one meter when dividing the scene. Each point will be added to the fingerprint library as a collection point for positioning.
[0043] Step 1.2, fingerprint information collection.
[0044] After the positioning scene is divided, the pedestrians are photographed at each grid point. After the collection is completed, the face recognition algorithm is used to identify the portrait, and the face position is marked with a rectangular frame. The pixel coordinates of the upper left corner of the rectangular frame (u l ,v l ) and the lower right pixel coordinates (u r ,v r ), and calculate the pixel area S based on the coordinate values pThe pixel area calculation formula is as follows:
[0045] S p =(u l -u r )×(v l -v r ) (1)
[0046] Collect the real position information of pedestrians in the actual scene, and establish a custom regional coordinate system for the measurement scene. The custom regional coordinate system is a rectangular coordinate system with a corner of a building as the origin. If the corner is a right angle, the X-axis and Y-axis are established along the two sides connected to the corner of the building. If it is not a right angle, the side connected to the corner and parallel to the building is selected as the X-axis, and rotated 90° as the Y-axis. According to the established coordinate system, the traditional measurement method is used to measure the position information of the fingerprint point, and the absolute position information (x i ,y i ).
[0047] The fingerprint database is constructed through the above data collection steps. The data in the fingerprint database contains the coordinates (x i ,y i ), and the facial image coordinates of the pedestrian in the camera imaging (u l ,v l ) and (u r ,v r ), Area S p ,The data in the fingerprint library will be used for pedestrian positioning matching and comparison in the subsequent online stage, and the absolute position information in the database will be assigned to the object to be located.
[0048] Step 2: perform face detection and recognition on the image to obtain the fingerprint information of the object to be tested.
[0049] After the offline database is established, in order to complete the positioning in the online positioning stage, it is necessary to obtain the fingerprint information of the corresponding object to be tested, so as to perform fingerprint matching. The acquisition of fingerprint information requires face detection and recognition of the image. After obtaining the image of the object to be tested through the camera, the face recognition algorithm is used to detect and recognize the face of the image, and the position of the face on the image is marked with a rectangular frame to obtain the pixel coordinates of the upper left corner and lower right corner of the face (u′ l ,v′ l )、(u′ r ,v′ r ) and pixel area S′ p .
[0050] Step 3: Pedestrian positioning.
[0051] Step 3.1, rough fingerprint matching.
[0052] According to the face recognition algorithm, the pedestrian face imaging coordinates (u′ l ,v′ l )、(u′ r ,v′ r ), calculate the face pixel area:
[0053] S′ p =(u′ l -u′ r )×(v′ l -v′ r ) (2)
[0054] The face pixel area calculated by the real-time collected face coordinates according to formula (2) is matched with the existing fingerprint data in the database established in step 1. The coordinates corresponding to the fingerprint with high matching degree are the coordinates of the point to be measured. Let the face area of the person to be located be S′ p , the area storage information of the fingerprint database is S′ p and The Euclidean distance between them is used as the similarity judgment scale to search for the best matching fingerprint, and the coordinate value corresponding to the fingerprint with the smallest Euclidean distance is selected as the coordinate value of the point to be tested. p and Euclidean distance d i The calculation method is:
[0055]
[0056] The coordinate values corresponding to the points to be measured are:
[0057] (x′ i ,y′ i )=Loc(mid(d i ))=(x i ,y i ) (4)
[0058] In the formula, (x′ i ,y′ i ) represents the coordinates of the person to be located, (x i ,y i ) indicates the matching area data Corresponding to the location coordinates in the fingerprint database.
[0059] Affected by the imaging law of the camera, the facial imaging area in the direction of the camera optical axis at the same depth is the largest, and the facial imaging area at both ends of the field of view is smaller. Therefore, the facial imaging area of pedestrians with a larger depth in the optical axis direction is the same as that of pedestrians with a smaller depth at both ends of the field of view, which affects the accuracy of fingerprint matching. If the calculated (x′1, y′1) value is unique at this time, then this value is the coordinate of the person to be located; if it is not a unique value, further judgment is required.
[0060] Step 3.2, fingerprint precise matching.
[0061] Suppose the candidate point coordinates (x1, y1), (x2, y2), ..., (x i ,y i ), the image pixel information associated with the candidate points in the fingerprint library is Select the pedestrian face imaging pixel (u′ l ,v′ l ) formula, assign its coordinate value to the current position. Distance d′ i The calculation formula is as follows:
[0062]
[0063] The final coordinates (x, y) of the point to be located are:
[0064] (x,y)=Loc(min(d′ i ))=(x i ,y i ) (6)
[0065] The coordinates of the person to be located are thus determined.
[0066] When the positioning scene is large, the positioning object is a pedestrian whose initial position is unknown, and the hardware procurement cost is limited, the method proposed in the present invention can provide a new solution and idea for the current indoor positioning needs, which has the requirements of positioning accuracy, speed and cost.
[0067] During specific implementation, the above process can be automatically operated using computer software technology.
[0068] The specific embodiments described herein are merely examples of the spirit of the present invention. Those skilled in the art may make various modifications or additions to the specific embodiments described or replace them in similar ways, but they will not deviate from the spirit of the present invention or exceed the scope defined by the appended claims.
Claims
1. A pedestrian fingerprint positioning method for indoor large scenes based on monocular vision, It is characterized in that The steps include: Step 1: Establish an offline fingerprint database; Step 1.1, fingerprint collection cell network division; Step 1.2, fingerprint information collection; Collect photos of pedestrians at each grid point, use face recognition algorithm to identify people in the photos, use rectangular frames to mark the position of faces on the photos, store the pixel coordinates of the upper left and right corners of the rectangular frames, and calculate the pixel area of the faces based on the coordinate values; establish a custom regional coordinate system, collect the absolute position information of the fingerprint points, and build a fingerprint library together with the pixel coordinates of the upper left and right corners of the rectangular frames and the pixel area of the faces; Step 2: perform face detection and recognition on the image to obtain fingerprint information of the object to be tested; Step 3, pedestrian positioning; Step 3.1, rough fingerprint matching; Use the face recognition algorithm to detect the face of the pedestrian to be tested, use a rectangular frame to mark the position of the face on the photo, obtain the pixel coordinates of the upper left corner and lower right corner of the face and the pixel area of the face, calculate the Euclidean distance between the face pixel area of the pedestrian to be tested and the face pixel area in the fingerprint database established in step 1.2, and select the regional coordinate system coordinates corresponding to the fingerprint with the smallest Euclidean distance as the coordinates of the pedestrian to be tested for rough matching screening. If the regional coordinate system coordinates selected at this time are unique, then the coordinates are used as the coordinates of the pedestrian to be tested; if they are not unique values, further judgment is required; Step 3.2, fingerprint precise matching; According to the regional coordinate system coordinates of the candidate points established by the rough matching in step 3.1, the pixel coordinates of the facial image associated with the candidate points in the fingerprint library are obtained, and the point with the smallest Euclidean distance to the pixel coordinates of the facial image of the pedestrian to be tested is selected, and its regional coordinate system coordinate value is assigned to the pedestrian to be tested to achieve accurate matching.
2. A pedestrian fingerprint positioning method based on monocular vision in indoor large scenes as claimed in claim 1, Features: Step 1.1 is to divide the positioning scene based on the accuracy requirements and collect fingerprint information. Different positioning scenes have different requirements for accuracy. The density of fingerprint collection will directly determine the accuracy of positioning. The accuracy of pedestrian positioning in large scenes is at the meter level. When dividing the scene, the scene will be divided horizontally and vertically at intervals of one meter. Each point will be added to the fingerprint library as a collection point for positioning.
3. A method for indoor large scene pedestrian fingerprint positioning based on monocular vision as claimed in claim 2, Features: After the positioning scene is divided in step 1.2, firstly, a photo of pedestrians is collected at each grid point. After the collection is completed, the face recognition algorithm is used to identify the portrait, and the face position is marked with a rectangular frame, and the pixel coordinates of the upper left corner of the rectangular frame (u l ,v l ) and the lower right pixel coordinates (u r ,v r ), and calculate the pixel area S based on the coordinate values p , the pixel area calculation formula is as follows: S p =(u l -u r )×(v l -v r ) (1) Then, the real position information of pedestrians in the actual scene is collected, and a custom regional coordinate system is established for the measurement scene. The custom regional coordinate system is a rectangular coordinate system, with a corner of a building as the origin. If the corner is a right angle, the X-axis and Y-axis are established along the two sides connected to the corner of the building. If it is not a right angle, the side connected to the corner and parallel to the building is selected as the X-axis, and rotated 90° as the Y-axis; according to the established coordinate system, the position information of the fingerprint point is measured using the traditional measurement method, and the absolute position information (x i ,y i ); So far, the construction of the fingerprint library has been completed. The data in the fingerprint library contains the coordinates of the pedestrian in the established real coordinate system (x i ,y i ), and the facial image coordinates of the pedestrian in the camera imaging (u l ,v l ) and (u r ,v r ), Area S p ,The data in the fingerprint library will be used for pedestrian positioning matching and comparison in the subsequent online stage, and the absolute position information in the database will be assigned to the object to be located.
4. A method for indoor large scene pedestrian fingerprint positioning based on monocular vision as claimed in claim 3, Features: After obtaining the image of the object to be tested through the camera in step 2, the face recognition algorithm is used to detect and recognize the face in the image, and the position of the face on the image is marked with a rectangular frame to obtain the pixel coordinates of the upper left corner and the lower right corner of the face (u l ′,v l ′)、(u r ′,v r ′) and pixel area S′ p .
5. A method for locating pedestrian fingerprints in a large indoor scene based on monocular vision as claimed in claim 4, Features: In step 3.1, the facial imaging coordinates (u l ′,v l ′)、(u r ′,v r ′), calculate the face pixel area S′ p : S′ p =(u l ′-u r ′)×(v l ′-v r ′) (2) Then, the face pixel area calculated by the face coordinates collected in real time according to formula (2) is matched with the existing fingerprint data in the database established in step 1. The coordinates corresponding to the fingerprint with the highest matching degree are the coordinates of the point to be measured; let the face area of the person to be located be S′ p , the area storage information of the fingerprint database is S′ p and The Euclidean distance between the two points is used as the similarity judgment scale to search for the best matching fingerprint, and the coordinate value corresponding to the fingerprint with the smallest Euclidean distance is selected as the coordinate value of the point to be tested; S′ p and Euclidean distance d i The calculation method is: The coordinate values corresponding to the points to be measured are: ( x i ',the i ′)=Loc(mid(d i ))=(x i ,the i ) (4) In the formula, (x i ′,y i ′) represents the coordinates of the person to be located, (x i ,y i ) indicates the matching area data The corresponding location coordinates in the fingerprint database; Affected by the imaging law of the camera, the facial imaging area in the direction of the camera optical axis is the largest at the same depth, and the facial imaging area at both ends of the field of view is smaller. Therefore, the facial imaging area of pedestrians with a larger depth in the optical axis direction is the same as that of pedestrians with a smaller depth at both ends of the field of view, which affects the accuracy of fingerprint matching. If the calculated (x 1 ′,y 1 ′) is a unique value, then the value is the coordinate of the person to be located; if it is not a unique value, further judgment is required.
6. A method for locating pedestrian fingerprints in a large indoor scene based on monocular vision as claimed in claim 5, Features: In step 3.2, the candidate point coordinates (x 1 ,y 1 )、(x 2 ,y 2 ),...,(x i ,y i ), the image pixel information associated with the candidate points in the fingerprint library is Select the pedestrian face imaging pixel (u l ′,v l ′) formula, assign its coordinate value to the current position; the distance d i The calculation formula of ′ is as follows: The final coordinates (x, y) of the point to be located are: (x,y)=Loc(min(d i ′))=(x i ,y i ) (6) The coordinates of the person to be located are thus determined.
