An indoor positioning method, system, storage medium and electronic device
By using preset panoramic equipment to collect indoor panoramic images and construct indoor maps, and positioning images to be located, the problems of high cost, low efficiency and missing maps in the prior art are solved, and efficient and comprehensive indoor positioning is achieved.
Patent Information
- Application Number
- CN202210480399.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-05
- Publication Date
- 2025-06-17
- Estimated Expiration
- 2042-05-05
AI Technical Summary
In the existing indoor positioning technology, the cost and efficiency of collecting indoor images is high, and the maps built are prone to missing.
By using preset panoramic equipment to acquire panoramic images in the room, and construct a preset indoor map through keyframe poses and local feature points to locate the image to be positioned. This method reduces the acquisition cost, improves the acquisition efficiency, and ensures the comprehensiveness of the map.
It realizes the cost of collecting indoor images and improves efficiency, ensures that the built map is completely free of defects, and improves the flexibility of indoor maps.
Smart Images

Figure CN114792340B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of positioning processing, and more specifically, to an indoor positioning method, system, storage medium, and electronic device. Background Art
[0002] When a user is in an unfamiliar indoor environment and GPS positioning is inaccurate, it is very difficult to know which position in the room they are in and which direction the destination is. At this time, the application of visual navigation becomes very necessary.
[0003] The application of visual navigation is mainly realized through a tracking system on the mobile terminal for visual positioning. To achieve visual positioning, it is necessary to collect images of the indoor scene to construct a map of the indoor environment.
[0004] Currently, the main methods for collecting images of the indoor scene are collecting with a monocular camera plus an inertial sensor, lidar collection, etc. The above methods for collecting indoor images have the following disadvantages:
[0005] In the collection method of a monocular camera plus an inertial sensor, due to the relatively small viewing angle of the monocular camera, in order to take comprehensive pictures, the lens needs to be continuously turned around to ensure as many shooting angles and directions as possible, resulting in low efficiency, and there will be certain missing parts in the map constructed by the monocular camera shooting. In the lidar collection method, the cost of this method is relatively higher.
[0006] Therefore, in the process of constructing an indoor map, the method for collecting indoor images has high cost, low efficiency, and there will be missing parts in the constructed map. Summary of the Invention
[0007] In view of this, the present application discloses an indoor positioning method, system, storage medium, and electronic device, aiming to improve the efficiency of collecting indoor images, ensure the comprehensiveness of constructing an indoor map, avoid missing parts in the constructed map, and improve the flexibility of constructing an indoor map.
[0008] To achieve the above object, the disclosed technical solutions are as follows:
[0009] The first aspect of the present application discloses an indoor positioning method, and the method includes:
[0010] Obtain an image to be positioned, where the image to be positioned is collected indoors;
[0011] The to-be-localized image is localized using a pre-constructed preset indoor map to obtain a localization result; the preset indoor map is constructed using the key frame poses and local feature points of a pre-acquired original panoramic image; the original panoramic image is a panoramic image of the interior acquired using a preset panoramic device; the local feature points are extracted after splitting the original panoramic image; the localization result is used to represent the pose of the to-be-localized image in the preset indoor map.
[0012] Preferably, the process of constructing the preset indoor map includes:
[0013] Obtain the original panoramic image;
[0014] Estimate the poses of the key frames in the original panoramic image using a preset pose estimation method to obtain key frame poses;
[0015] Split the original panoramic image using a preset splitting method to obtain a plurality of split images;
[0016] Extract respective local feature points from the plurality of split images;
[0017] Recombine the plurality of split images to obtain a target panoramic image; the target panoramic image is used to represent the recombined panoramic image;
[0018] Determine the acquisition method of the to-be-localized image, and split the target panoramic image based on the acquisition method to obtain an image in a preset form corresponding to the acquisition method;
[0019] Assign the respective local feature points to the image in the preset form;
[0020] Construct a preset indoor map using the key frame poses and the image in the preset form after assignment.
[0021] Preferably, the acquisition method includes a landscape acquisition method and a portrait acquisition method, and the splitting the target panoramic image based on the acquisition method to obtain an image in a preset form corresponding to the acquisition method includes:
[0022] When the acquisition method is the landscape acquisition method, split the target panoramic image to obtain a landscape image corresponding to the landscape acquisition method;
[0023] When the acquisition method is the portrait acquisition method, split the target panoramic image to obtain a portrait image corresponding to the portrait acquisition method.
[0024] Preferably, the localizing the to-be-localized image using a pre-constructed preset indoor map to obtain a localization result includes:
[0025] Extract a query frame from the image to be located;
[0026] Extract a feature vector from the image to be located; the feature vector is used to obtain a set of preset candidate key frames from a preset image library;
[0027] Perform feature matching between the query frame of the image to be located and each candidate frame in the set of candidate key frames to obtain an initial matching result; the initial matching result is the result of feature matching between the query frame and each candidate frame;
[0028] Screen the initial matching result through a preset screening rule to obtain target feature points; the target feature points are two-dimensional feature points;
[0029] Match the target feature points with preset feature points to obtain a target matching result; the preset feature points are three-dimensional feature points in a preset feature library; the target matching result is used to give a prompt for the matching between the target feature points and the preset feature points;
[0030] Calculate the target matching result through a preset algorithm to obtain a positioning result; the positioning result is used to indicate the pose of the image to be located in the preset indoor map.
[0031] Preferably, after positioning the image to be located through a preset indoor map constructed in advance to obtain a positioning result, it further includes:
[0032] Display the positioning result in a preset device.
[0033] The second aspect of the present application discloses an indoor positioning system, and the system includes:
[0034] An acquisition unit, configured to acquire an image to be located, and the image to be located is acquired indoors;
[0035] A positioning unit, configured to position the image to be located through a preset indoor map constructed in advance to obtain a positioning result; the preset indoor map is constructed by using the key frame poses and local feature points of a pre-acquired original panoramic image; the original panoramic image is a panoramic image of the interior acquired by a preset panoramic device; the local feature points are extracted after splitting the original panoramic image; the positioning result is used to represent the pose of the image to be located in the preset indoor map.
[0036] Preferably, the positioning unit in the process of constructing the preset indoor map includes:
[0037] An acquisition module, configured to acquire an original panoramic image;
[0038] An estimation module, configured to estimate the poses of key frames in the original panoramic image through a preset pose estimation method to obtain key frame poses;
[0039] A first splitting module, configured to split the original panoramic image through a preset splitting method to obtain a plurality of split images;
[0040] A first extraction module, configured to extract respective local feature points from the plurality of split images;
[0041] A recombination module, configured to recombine the plurality of split images to obtain a target panoramic image; the target panoramic image is used to represent the recombined panoramic image;
[0042] A second splitting module, configured to determine the acquisition method of the image to be located, and based on the acquisition method, split the target panoramic image to obtain an image in a preset form corresponding to the acquisition method;
[0043] An allocation module, configured to allocate the respective local feature points to the images in the preset form;
[0044] A construction module, configured to construct a preset indoor map through the key frame poses and the images in the preset form after allocation.
[0045] Preferably, the second splitting module includes:
[0046] A first sub-splitting module, configured to split the target panoramic image to obtain a landscape image corresponding to the landscape acquisition method when the acquisition method is the landscape acquisition method;
[0047] A second sub-splitting module, configured to split the target panoramic image to obtain a portrait image corresponding to the portrait acquisition method when the acquisition method is the portrait acquisition method.
[0048] A third aspect of the present application discloses a storage medium, characterized in that the storage medium includes stored instructions, wherein when the instructions run, the device where the storage medium is located is controlled to execute the indoor positioning method according to any one of the first aspect.
[0049] A fourth aspect of the present application discloses an electronic device, including a memory, and one or more instructions, wherein one or more instructions are stored in the memory and are configured to be executed by one or more processors to execute the indoor positioning method according to any one of the first aspect.
[0050] As can be seen from the above technical solutions, the present application discloses an indoor positioning method, system, storage medium and electronic device. An image to be positioned is obtained, which is collected indoors. The image to be positioned is positioned through a pre-constructed preset indoor map to obtain a positioning result. The preset indoor map is constructed by using the key frame poses and local feature points of a pre-obtained original panoramic image. The original panoramic image is a panoramic image of the interior collected by a preset panoramic device, and the local feature points are extracted after splitting the original panoramic image. The positioning result is used to represent the pose of the image to be positioned in the preset indoor map. Through the above solution, a panoramic image of the interior is collected by using a preset panoramic device, and the preset panoramic device can be a device with a relatively low cost such as a panoramic camera, thereby reducing the cost of the method for collecting indoor images during the map construction process. Moreover, since the preset panoramic device can capture a 360-degree range of scenes, the efficiency of collecting indoor images is improved, and the comprehensiveness of the constructed indoor map is ensured, avoiding the phenomenon of missing parts in the constructed map. In addition, by splitting the panoramic image in different ways, images collected by cameras with different resolutions can be simulated, so as to construct different maps according to actual usage requirements, improving the flexibility of constructing indoor maps. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained according to the provided drawings without creative efforts.
[0052] Figure 1 It is a schematic flowchart of an indoor positioning method disclosed in an embodiment of the present application;
[0053] Figure 2 It is a schematic diagram of an original panoramic image disclosed in an embodiment of the present application;
[0054] Figure 3 It is a schematic diagram of splitting the original panoramic image disclosed in an embodiment of the present application;
[0055] Figure 4 It is a schematic diagram of a 3SFM map disclosed in an embodiment of the present application;
[0056] Figure 5 It is a schematic structural diagram of an indoor positioning system disclosed in an embodiment of the present application;
[0057] Figure 6 It is a schematic structural diagram of an electronic device disclosed in an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0058] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0059] In the present application, the term "including", "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including the said element.
[0060] As can be seen from the background art, in the existing map building process, the cost of collecting indoor images is high, the collection efficiency is low, and there will be missing phenomena in the constructed map.
[0061] To solve the above problems, the embodiments of the present application disclose an indoor positioning method, system, storage medium and electronic device, which use a preset panoramic device to collect panoramic images indoors. The preset panoramic device can be a device with a relatively low cost such as a panoramic camera, thereby reducing the cost of collecting indoor images in the map building process. And because the preset panoramic device can capture scenes in a 360-degree range, the efficiency of collecting indoor images is improved, and the comprehensiveness of the constructed indoor map is ensured, avoiding the missing phenomenon in the constructed map. In addition, by splitting the panoramic image in different ways, images collected by cameras with different resolutions can be simulated, so as to construct different maps according to actual usage requirements, improving the flexibility of constructing indoor maps. The specific implementation manners will be described in the following embodiments.
[0062] Refer to Figure 1 As shown, it is a schematic flowchart of an indoor positioning method disclosed in the embodiments of the present application. The indoor positioning method mainly includes the following steps:
[0063] S101: Obtain an image to be located, and the image to be located is collected indoors.
[0064] In S101, obtain the image to be located collected by the user indoors through a mobile device.
[0065] Among them, the mobile device can be a mobile phone, a tablet computer, etc.
[0066] S102: Locate the image to be located using a pre - constructed preset indoor map to obtain a positioning result; the preset indoor map is constructed using the key - frame poses and local feature points of the pre - obtained original panoramic image; the original panoramic image is a panoramic image of the interior collected by a preset panoramic device; the local feature points are extracted after splitting the original panoramic image; the positioning result is used to represent the pose of the image to be located in the preset indoor map.
[0067] To establish the association between the two - dimensional and three - dimensional worlds, it is first necessary to construct the three - dimensional indoor map. Generally, the three - dimensional construction method of the indoor map mainly adopts the method of Structure From Motion (SFM).
[0068] SFM is a photogrammetric sequence - image technology that predicts the three - dimensional structure from a sequence of two - dimensional images that may carry local motion signals, and it can recover the three - dimensional structure from the two - dimensional motion fields projected by a moving object or scene.
[0069] The specific process of constructing the preset indoor map is shown in A1 - A8.
[0070] A1: Obtain the original panoramic image.
[0071] Among them, during the acquisition process, the original panoramic image is collected by a preset panoramic device.
[0072] The original panoramic image uses wide - angle representation means and forms such as paintings, photos, videos, 3D models, etc. to show as much of the surrounding environment as possible. For the specific original panoramic image, please refer to Figure 2 as shown Figure 2 which shows a schematic diagram of the original global image.
[0073] The preset panoramic device can be a panoramic camera or other panoramic shooting devices, etc. The preset global device is not specifically limited in this application.
[0074] A2: Estimate the pose of the key frames in the original panoramic image using a preset pose - estimation method to obtain the key - frame poses.
[0075] Among them, the preset pose - estimation method can be Simultaneous Localization And Mapping (SLAM) or other pose - estimation methods. The determination of the preset pose - estimation method is set by technicians according to the actual situation and is not specifically limited in this application. The preferred preset pose - estimation method in this application is the SLAM method.
[0076] This application mainly uses the OpenVSlam method of the visual SLAM framework with high availability and scalability to track the feature points in the original panoramic image, calculate the poses of the key frames in the original panoramic image, and record them.
[0077] A3: Split the original panoramic image through a preset splitting method to obtain multiple split images.
[0078] Among them, since common map construction schemes do not accept panoramic images, the original panoramic image is split, and different splits can be performed according to the requirements of the mapping scenario here.
[0079] The common preset splitting method can be skybox splitting or other forms of splitting. The preset splitting method is set by technicians according to the actual situation, and this application does not make specific limitations. The preset splitting method of this application preferably uses skybox splitting.
[0080] When splitting the original panoramic image through the skybox splitting method, reference can be made to Figure 3 as shown Figure 3 which shows a schematic diagram of splitting the original panoramic image by the skybox splitting method.
[0081] A4: Extract local feature points from multiple split images.
[0082] Among them, local feature points are local expressions of image features. They can reflect the local particularities on the image. Local feature points are suitable for applications such as image matching and retrieval.
[0083] A5: Recombine multiple split images to obtain a target panoramic image; the target panoramic image is used to represent the recombined panoramic image.
[0084] A6: Determine the acquisition method of the image to be located, and split the target panoramic image based on the acquisition method to obtain an image in a preset form corresponding to the acquisition method.
[0085] Among them, the acquisition methods include landscape acquisition method and portrait acquisition method.
[0086] The images in the preset form include landscape images and portrait images.
[0087] When the acquisition method is the landscape acquisition method, split the target panoramic image to obtain a landscape image corresponding to the landscape acquisition method.
[0088] When the acquisition method is the portrait acquisition method, split the target panoramic image to obtain a portrait image corresponding to the portrait acquisition method.
[0089] Splitting into a landscape image or a portrait image can ensure the retrieval of the user's picture data (the image to be located). For example, if the captured image is in landscape mode, but when the user uses it, if it is taken in portrait mode, the image retrieval may very likely not be able to accurately retrieve it, resulting in a deviation in pose estimation.
[0090] A7: Assign each local feature point to an image in a preset form.
[0091] A8: Construct a preset indoor map through the key frame pose and the image in the preset form after assignment.
[0092] Among them, the preset indoor map can be a 3SFM map or other forms of maps. The determination of the preset indoor map is set by the technical personnel according to the actual situation, and this application does not make specific limitations. The preset indoor map of this application is preferably a 3SFM map.
[0093] For the specific structure of the 3SFM map, reference can be made to Figure 4 as shown Figure 4 which shows a schematic diagram of the 3SFM map.
[0094] Figure 4 In, p1(x, y), p2(x, y) and p3(x, y) are two-dimensional feature points.
[0095] p1(x, y, z), p2(x, y, z) and p3(x, y, z) are three-dimensional feature points.
[0096] C1, C2 and C3 are cameras.
[0097] By taking pictures of the same point with cameras (C1, C2 and C3) in different poses and triangulating the same point, the specific position of the three-dimensional feature point is obtained. For example, by cameras C1, C2 and C3 in different poses, all taking pictures of p1, p1 and p3 to obtain their positions (p1(x, y), p2(x, y) and p3(x, y)), the positions of p1, p1 and p3 in three-dimensional space are obtained, that is, p1(x, y, z), p2(x, y, z) and p3(x, y, z).
[0098] Specifically, the process of locating the image to be located through the pre-constructed preset indoor map to obtain the positioning result is as shown in B1 - B6.
[0099] B1: Extract a query frame from the image to be located.
[0100] Among them, when receiving the image to be located transmitted by the user, perform feature extraction on the image to be located to query the frame.
[0101] B2: Extract a feature vector from the image to be located; the feature vector is used to obtain a preset candidate key frame set from the preset image library.
[0102] Among them, according to the feature vector, a set of candidate key frames that is closest to the feature vector of the user picture data can be found in the collected image library.
[0103] B3: Perform feature matching between the query frame of the image to be located and each candidate frame in the set of candidate key frames to obtain an initial matching result; the initial matching result is the result of feature matching between the query frame and each candidate frame.
[0104] B4: Screen the initial matching result through a preset screening rule to obtain target feature points; the target feature points are two-dimensional feature points.
[0105] Among them, perform feature matching between each candidate frame in the set of candidate key frames and the query frame, and use the ratio of the optimal and sub-optimal to screen the feature points to obtain target feature points.
[0106] The preset screening rule can be a rule of the ratio of the optimal and sub-optimal, or other screening rules. The preset screening rule is set by the technical personnel according to the actual situation, and this application does not make specific limitations.
[0107] B5: Match the target feature points with preset feature points to obtain a target matching result; the preset feature points are three-dimensional feature points in a preset feature library; the target matching result is used for the prompt made by matching the target feature points with the preset feature points.
[0108] Among them, the target feature points are two-dimensional feature points retained after being screened by the preset screening rule.
[0109] B6: Calculate the target matching result through a preset algorithm to obtain a positioning result; the positioning result is used to indicate the pose of the image to be located in a preset indoor map.
[0110] Among them, the preset algorithm can be the RANSAC algorithm + PnP algorithm, or the RANSAC algorithm, etc. The preset algorithm is set by the technical personnel according to the actual situation, and this application does not make specific limitations. The preset algorithm of this application preferably uses the RANSAC algorithm + PnP algorithm.
[0111] Calculate the target matching result through the RANSAC algorithm + PnP algorithm to obtain the pose of the image to be located in a preset indoor map.
[0112] Display the positioning result on a preset device.
[0113] Among them, the preset device can be a mobile phone device, a tablet computer, etc. This application does not make specific limitations on the preset device.
[0114] In the embodiments of the present application, a preset panoramic device is used to collect panoramic images of an indoor environment. The preset panoramic device can be a device with relatively low cost, such as a panoramic camera, which reduces the cost of collecting indoor images during the mapping process. Moreover, since the preset panoramic device can capture scenes within a 360-degree range, the efficiency of collecting indoor images is improved, and the comprehensiveness of constructing an indoor map is ensured, avoiding the phenomenon of missing parts in the constructed map. In addition, by splitting the panoramic image in different ways, images collected by cameras with different resolutions can be simulated, so as to construct different maps according to actual usage requirements, improving the flexibility of constructing indoor maps.
[0115] Based on the above embodiments Figure 1 A disclosed indoor positioning method, the embodiments of the present application also correspondingly disclose an indoor positioning system, as Figure 5 shown. The indoor positioning system mainly includes an acquisition unit 501 and a positioning unit 502.
[0116] The acquisition unit 501 is used to acquire an image to be positioned, and the image to be positioned is collected indoors.
[0117] The positioning unit 502 is used to perform positioning on the image to be positioned through a pre-constructed preset indoor map to obtain a positioning result; the preset indoor map is constructed by using the key frame poses and local feature points of the pre-acquired original panoramic images; the original panoramic images are panoramic images of the indoor environment collected by a preset panoramic device; the local feature points are extracted after splitting the original panoramic images; the positioning result is used to represent the pose of the image to be positioned in the preset indoor map.
[0118] Further, the positioning unit 502 in the process of constructing the preset indoor map includes an acquisition module, an estimation module, a first splitting module, a first extraction module, a recombination module, a second splitting module, an allocation module, and a construction module.
[0119] The acquisition module is used to acquire the original panoramic image.
[0120] The estimation module is used to perform pose estimation on the key frames in the original panoramic image through a preset pose estimation method to obtain the key frame poses.
[0121] The first splitting module is used to split the original panoramic image through a preset splitting method to obtain a plurality of split images.
[0122] The first extraction module is used to extract each local feature point from the plurality of split images.
[0123] The recombination module is used to recombine the plurality of split images to obtain a target panoramic image; the target panoramic image is used to represent the recombined panoramic image.
[0124] The second splitting module is used to determine the acquisition method of the image to be located, and split the target panoramic image based on the acquisition method to obtain an image in a preset form corresponding to the acquisition method.
[0125] The allocation module is used to allocate each local feature point to the image in the preset form.
[0126] The construction module is used to construct a preset indoor map through the key frame poses and the images in the preset form after allocation.
[0127] Furthermore, the second splitting module includes a first sub-splitting module and a second sub-splitting module.
[0128] The first sub-splitting module is used to split the target panoramic image when the acquisition method is the landscape screen acquisition method to obtain a landscape screen image corresponding to the landscape screen acquisition method.
[0129] The second sub-splitting module is used to split the target panoramic image when the acquisition method is the portrait screen acquisition method to obtain a portrait screen image corresponding to the portrait screen acquisition method.
[0130] Furthermore, the positioning unit 502 includes a second extraction module, a third extraction module, a first matching module, a screening module, a second matching module and a calculation module.
[0131] The second extraction module is used to extract a query frame from the image to be located.
[0132] The third extraction module is used to extract a feature vector from the image to be located; the feature vector is used to obtain a preset candidate key frame set from the preset image library.
[0133] The first matching module is used to perform feature matching between the query frame of the image to be located and each candidate frame in the candidate key frame set to obtain an initial matching result; the initial matching result is the result of feature matching between the query frame and each candidate frame.
[0134] The screening module is used to screen the initial matching result through a preset screening rule to obtain target feature points; the target feature points are two-dimensional feature points.
[0135] The second matching module is used to match the target feature points with preset feature points to obtain a target matching result; the preset feature points are three-dimensional feature points in a preset feature library; the target matching result is used to give a prompt for the matching between the target feature points and the preset feature points.
[0136] The calculation module is used to calculate the target matching result through a preset algorithm to obtain a positioning result; the positioning result is used to indicate the pose of the image to be located in the preset indoor map.
[0137] Furthermore, the indoor positioning system further includes a display unit.
[0138] A display unit for displaying the positioning result in a preset device.
[0139] In the embodiment of the present application, a preset panoramic device is used to collect panoramic images of the interior. The preset panoramic device can be a device with relatively low cost such as a panoramic camera, thereby reducing the cost of the method for collecting indoor images during map construction. Moreover, since the preset panoramic device can capture scenes within a 360-degree range, the efficiency of collecting indoor images is improved, and the comprehensiveness of constructing the indoor map is ensured, avoiding the phenomenon of missing parts in the constructed map. In addition, by splitting the panoramic image in different ways, images collected by cameras with different resolutions can be simulated, so as to construct different maps according to actual usage requirements, improving the flexibility of constructing the indoor map.
[0140] The embodiment of the present application also provides a storage medium, which includes stored instructions. When the instructions run, the device where the storage medium is located is controlled to execute the above indoor positioning method.
[0141] The embodiment of the present application also provides an electronic device, and its structural schematic diagram is as Figure 6 shown, specifically including a memory 601 and one or more instructions 602. One or more instructions 602 are stored in the memory 601 and are configured to be executed by one or more processors 603 to execute the above indoor positioning method.
[0142] The specific implementation processes and their derivative methods of the above various embodiments are all within the protection scope of the present application.
[0143] Each embodiment in this specification is described in a progressive manner. The same or similar parts among the embodiments can be referred to each other, and the key points of each embodiment are the differences from other embodiments. In particular, for a system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The systems and system embodiments described above are only illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative efforts.
[0144] Those skilled in the art may further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of this application.
[0145] The above description of the disclosed embodiments enables those skilled in the art to implement or use this application. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application will not be limited to the embodiments shown herein, but rather to the broadest scope consistent with the principles and novel features disclosed herein.
[0146] The above are only the preferred embodiments of this application. It should be noted that for those of ordinary skill in the art, without departing from the principle of this application, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of this application.
Claims
1. An indoor positioning method, characterized in that, The method includes: Obtaining an image to be located, which is collected indoors; Locating the image to be located through a pre-constructed preset indoor map to obtain a positioning result; the preset indoor map is constructed by using the key frame poses and local feature points of a pre-obtained original panoramic image; the original panoramic image is a panoramic image of the interior collected by a preset panoramic device; the local feature points are extracted after splitting the original panoramic image; the positioning result is used to represent the pose of the image to be located in the preset indoor map; The process of constructing the preset indoor map includes: Obtaining an original panoramic image; Estimating the pose of key frames in the original panoramic image through a preset pose estimation method to obtain key frame poses; Splitting the original panoramic image through a preset splitting method to obtain a plurality of split images; Extracting respective local feature points from the plurality of split images; Recombining the plurality of split images to obtain a target panoramic image; the target panoramic image is used to represent the recombined panoramic image; Determining the acquisition method of the image to be located, and splitting the target panoramic image based on the acquisition method to obtain an image in a preset form corresponding to the acquisition method; Assigning the respective local feature points to the image in the preset form; Constructing a preset indoor map by using the key frame poses and the image in the preset form after assignment.
2. The method according to claim 1, characterized in that, The acquisition method includes a landscape acquisition method and a portrait acquisition method. The splitting of the target panoramic image based on the acquisition method to obtain an image in a preset form corresponding to the acquisition method includes: When the acquisition method is the landscape acquisition method, splitting the target panoramic image to obtain a landscape image corresponding to the landscape acquisition method; When the acquisition method is the portrait acquisition method, splitting the target panoramic image to obtain a portrait image corresponding to the portrait acquisition method.
3. The method according to claim 1, characterized in that, The locating of the image to be located through the pre-constructed preset indoor map to obtain a positioning result includes: Extracting a query frame from the image to be located; Extracting a feature vector from the image to be located; the feature vector is used to obtain a preset candidate key frame set from a preset image library; Performing feature matching on the query frame of the image to be located and each candidate frame in the candidate key frame set to obtain an initial matching result; the initial matching result is the result of feature matching between the query frame and each candidate frame; Screening the initial matching result through a preset screening rule to obtain target feature points; the target feature points are two-dimensional feature points; Matching the target feature points with preset feature points to obtain a target matching result; the preset feature points are three-dimensional feature points in a preset feature library; the target matching result is used to give a prompt for the matching of the target feature points and the preset feature points; Calculating the target matching result through a preset algorithm to obtain a positioning result; the positioning result is used to indicate the pose of the image to be located in the preset indoor map.
4. The method according to claim 1, characterized in that, After localizing the image to be localized using the pre-constructed preset indoor map to obtain a localization result, the following steps are further included: Display the localization result on a preset device.
5. An indoor positioning system, characterized in that, The system includes: An acquisition unit, configured to acquire an image to be localized, which is acquired indoors; A localization unit, configured to localize the image to be localized using the pre-constructed preset indoor map to obtain a localization result; the preset indoor map is constructed using the key frame poses and local feature points of the pre-acquired original panoramic image; the original panoramic image is a panoramic image of the indoor area acquired using a preset panoramic device; the local feature points are extracted after splitting the original panoramic image; the localization result is used to represent the pose of the image to be localized in the preset indoor map; The localization unit in the process of constructing the preset indoor map includes: An acquisition module, configured to acquire the original panoramic image; An estimation module, configured to estimate the poses of the key frames in the original panoramic image using a preset pose estimation method to obtain key frame poses; A first splitting module, configured to split the original panoramic image using a preset splitting method to obtain a plurality of split images; A first extraction module, configured to extract respective local feature points from the plurality of split images; A recombination module, configured to recombine the plurality of split images to obtain a target panoramic image; the target panoramic image is used to represent the recombined panoramic image; A second splitting module, configured to determine the acquisition method of the image to be localized and split the target panoramic image based on the acquisition method to obtain an image in a preset form corresponding to the acquisition method; An assignment module, configured to assign the respective local feature points to the image in the preset form; A construction module, configured to construct a preset indoor map using the key frame poses and the image in the preset form after assignment.
6. The system according to claim 5, wherein The acquisition method includes a landscape acquisition method and a portrait acquisition method. The second splitting module includes: A first sub-splitting module, configured to split the target panoramic image to obtain a landscape image corresponding to the landscape acquisition method when the acquisition method is the landscape acquisition method; A second sub-splitting module, configured to split the target panoramic image to obtain a portrait image corresponding to the portrait acquisition method when the acquisition method is the portrait acquisition method.
7. A storage medium, wherein The storage medium includes stored instructions, wherein when the instructions are running, they control the device where the storage medium is located to execute the indoor localization method according to any one of claims 1 to 4.
8. An electronic device, wherein It includes a memory, and one or more instructions, wherein one or more instructions are stored in the memory and are configured to be executed by one or more processors to execute the indoor localization method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Panoramic vision SLAM method based on multi-camera cooperation
CN110070615A
Indoor positioning method and device of intelligent mobile terminal and electronic equipment
CN111199564A