Indoor positioning method and device, equipment and storage medium

Through the combination of panoramic camera and electronic compass, three-dimensional house type information is determined based on the neural network model and the orientation is corrected, and the preset house type information is directly compared, which solves the cumbersome problems of data collection and perspective transformation in the existing technology and improves indoor positioning. accuracy and efficiency.

CN118816818APending Publication Date: 2024-10-22CHINA MOBILE COMM LTD RES INST +1
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202311189921.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-14
Publication Date
2024-10-22

AI Technical Summary

Technical Problem

Existing indoor positioning technology based on computer vision requires collecting a large amount of data as a comparison database and performing tedious perspective transformation calculations, resulting in large position information errors, high computing power consumption, and low efficiency.

Method used

Using a method that combines a panoramic camera and an electronic compass, by acquiring panoramic image data and orientation data, the three-dimensional house type information is determined based on the neural network model, and the orientation is corrected. It is directly compared with the preset indoor house type information of the whole house to generate the terminal equipment. Current indoor location.

Benefits of technology

It eliminates the traditional image library collection and perspective transformation steps, saves computing resources, improves positioning efficiency and accuracy, and reduces position information errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118816818A_ABST
    Figure CN118816818A_ABST
Patent Text Reader

Abstract

The invention discloses an indoor positioning method and device, equipment and a storage medium. The method comprises the following steps: acquiring panoramic image data of a target indoor environment acquired by a panoramic camera and orientation data generated by an electronic compass; determining three-dimensional house type information corresponding to the target indoor environment based on the panoramic image data; performing orientation correction on the three-dimensional house type information based on the orientation data to obtain corrected house type information; and comparing the corrected house type information with preset whole house indoor house type information, and generating a current indoor position of the terminal equipment. Traditional tedious steps of image library acquisition, perspective transformation, three-dimensional point cloud data processing and the like are omitted, three-dimensional house type information of a target indoor environment is determined based on panoramic image data, corrected house type information is obtained through orientation correction, the corrected house type information is compared with preset whole-house indoor house type information, and the house type information of the target indoor environment is obtained. The current indoor positioning of the terminal equipment is realized, the computing power resource can be saved, the positioning efficiency is improved, and the indoor positioning precision can also be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of positioning technology, and in particular to an indoor positioning method, device, equipment and storage medium. Background Art

[0002] Indoor positioning refers to the realization of position positioning in an indoor environment. It mainly uses wireless communication, base station positioning, inertial navigation positioning, motion capture and other technologies to integrate into an indoor positioning system, so as to realize the position monitoring of people and objects in indoor space. Indoor positioning and navigation technology is a popular research technology at present. With the increasing number of large buildings, this technology is becoming more and more important. Indoor positioning is different from the commonly used outdoor positioning technology through GPS (Global Positioning System) or Beidou satellite positioning. Due to the obstruction and refraction of the wall, the indoor satellite signal will have a large deviation. In order to obtain more accurate positioning, it is necessary to use indoor sensor positioning.

[0003] In the related art, there is an indoor positioning technology based on computer vision. Indoor positioning is performed by establishing an image library for comparison. It is necessary to collect images or visual data at different locations indoors. This method requires the collection of a large amount of data as a comparison benchmark. After the terminal collects and processes the data, it is necessary to compare (retrieve) the features of the collected image with the features in the image library. The steps are cumbersome and the workload is heavy. For example, data processing for the collected three-dimensional point cloud data will consume a lot of computing power. In addition, due to the differences in the terminal orientation and pitch angle of the collected image library, after the comparison is completed, it is still necessary to calculate the actual position and orientation based on the perspective principle. This method not only requires the collection of a large amount of data as a comparison library, but also requires the calculation of perspective transformation of the actual position. The perspective transformation is related to the orientation and pitch angle of the camera, resulting in a large error in the position information obtained by this method. Summary of the invention

[0004] In view of this, the embodiments of the present application provide an indoor positioning method, apparatus, device and storage medium, aiming to optimize the positioning effect of indoor positioning based on image processing technology.

[0005] The technical solution of the embodiment of the present application is implemented as follows:

[0006] In a first aspect, an embodiment of the present application provides an indoor positioning method for performing indoor positioning on a terminal device equipped with a panoramic camera and an electronic compass, the method comprising:

[0007] Acquire panoramic image data of the target indoor environment captured by the panoramic camera and orientation data generated by the electronic compass;

[0008] Determining three-dimensional apartment information corresponding to the target indoor environment based on the panoramic image data;

[0009] Performing orientation correction on the three-dimensional apartment type information based on the orientation data to obtain corrected apartment type information;

[0010] The corrected apartment type information is compared with the preset indoor apartment type information of the whole house to generate the current indoor position of the terminal device.

[0011] In the above solution, the step of determining the three-dimensional apartment type information corresponding to the target indoor environment based on the panoramic image data includes:

[0012] Preprocessing the panoramic image data to obtain a Manhattan line segment graph of the panoramic image data;

[0013] Inputting the panoramic image data and the Manhattan line segment graph into a neural network model to obtain intersection lines in the target indoor environment;

[0014] The intersection lines in the target indoor environment are spliced ​​to obtain three-dimensional apartment type information corresponding to the target indoor environment.

[0015] In the above scheme, the intersection lines in the target indoor environment include: wall-top lines, wall-wall lines and wall-ground lines. The intersection lines in the target indoor environment are spliced ​​to obtain the three-dimensional apartment type information corresponding to the target indoor environment, including:

[0016] splicing the wall top lines to obtain the upper layer contour line;

[0017] splicing the wall and ground lines to obtain a lower layer contour line;

[0018] The upper contour line and the lower contour line are spliced ​​based on the wall-to-wall line to obtain three-dimensional apartment type information corresponding to the target indoor environment.

[0019] In the above solution, the azimuth correction of the three-dimensional apartment type information based on the orientation data to obtain the corrected apartment type information includes:

[0020] Performing a top-down projection on the three-dimensional apartment type represented by the three-dimensional apartment type information to obtain two-dimensional apartment type information from a top-down perspective;

[0021] Determining a correction angle based on the orientation data, the correction angle being a rotation angle used to rotate the orientation of the two-dimensional apartment type information to the same orientation as the orientation of the indoor apartment type information of the entire house;

[0022] The position of the terminal device in the two-dimensional apartment information is used as a reference point, and the apartment plan corresponding to the two-dimensional apartment information is rotated according to the correction angle to obtain the corrected apartment information.

[0023] In the above scheme, the whole house indoor apartment type information includes: the scale of the whole house indoor apartment type, the outline shape of each apartment type area and the outline size of each apartment type area, and the corrected apartment type information is compared with the preset whole house indoor apartment type information to generate the current indoor position of the terminal device, including:

[0024] Comparing the corrected apartment type information with the preset whole-house indoor apartment type information to obtain a target area in the whole-house indoor apartment type information corresponding to the target indoor environment;

[0025] Based on the position of the terminal device in the two-dimensional apartment information, the outline size of the target area and the scale, the current indoor position of the terminal device is generated.

[0026] In the above scheme, the corrected apartment type information is compared with the preset whole-house indoor apartment type information to obtain the target area in the whole-house indoor apartment type information corresponding to the target indoor environment, including:

[0027] For each apartment area in the preset whole-house indoor apartment information, compare the contour shape with the corrected apartment information in sequence according to the set order;

[0028] If it is determined that the corner directions and the number of corners in the two contour shapes are the same, the corresponding apartment area is used as the target area corresponding to the target indoor environment.

[0029] In the above solution, the whole house indoor apartment information also includes: first identification information of a preset target for each apartment area; the method also includes:

[0030] Performing target detection of the preset target on the panoramic image data to obtain position information of the preset target;

[0031] Update the three-dimensional apartment information based on the location information of the preset target;

[0032] Wherein, the corrected apartment type information carries second identification information identifying the preset target, and before taking the corresponding apartment type area as the target area corresponding to the target indoor environment, the method further includes:

[0033] The first identification information of the corresponding apartment type area is compared with the second identification information in the corrected apartment type information. If they are determined to be the same, the corresponding apartment type area is used as the target area corresponding to the target indoor environment.

[0034] In a second aspect, an embodiment of the present application provides an indoor positioning device for indoor positioning of a terminal device equipped with a panoramic camera and an electronic compass, the device comprising:

[0035] An acquisition module, used to acquire panoramic image data of the target indoor environment captured by the panoramic camera and orientation data generated by the electronic compass;

[0036] A housing type generation module, used to determine three-dimensional housing type information corresponding to the target indoor environment based on the panoramic image data;

[0037] A housing type correction module, used for performing orientation correction on the three-dimensional housing type information based on the orientation data to obtain corrected housing type information;

[0038] The positioning module is used to compare the corrected apartment type information with the preset indoor apartment type information of the whole house to generate the current indoor position of the terminal device.

[0039] In a third aspect, an embodiment of the present application provides an electronic device for indoor positioning of a terminal device configured with a panoramic camera and an electronic compass, the electronic device comprising: a processor and a memory for storing a computer program that can be run on the processor, wherein the processor, when used to run the computer program, executes the steps of the method described in the first aspect of the embodiment of the present application.

[0040] In a fourth aspect, an embodiment of the present application provides a computer storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described in the first aspect of the embodiment of the present application are implemented.

[0041] The technical solution provided by the embodiment of the present application is used for indoor positioning of a terminal device equipped with a panoramic camera and an electronic compass, which includes: obtaining panoramic image data of the target indoor environment collected by the panoramic camera and orientation data generated by the electronic compass; determining the three-dimensional apartment type information corresponding to the target indoor environment based on the panoramic image data; performing orientation correction on the three-dimensional apartment type information based on the orientation data to obtain the corrected apartment type information; comparing the corrected apartment type information with the preset indoor apartment type information of the whole house to generate the current indoor position of the terminal device. In this way, the cumbersome steps of traditional image acquisition library, perspective transformation and three-dimensional point cloud data processing are omitted, the three-dimensional apartment type information of the target indoor environment is determined based on the panoramic image data, and the corrected apartment type information is obtained through orientation correction, and the corrected apartment type information is compared with the preset indoor apartment type information of the whole house to achieve the current indoor positioning of the terminal device, which can save computing resources, improve positioning efficiency, and improve indoor positioning accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 This is a flow chart of the indoor positioning method according to an embodiment of the present application;

[0043] Figure 2This is a schematic diagram of the network structure of the LayoutNet model in the embodiment of the present application;

[0044] Figure 3 A schematic diagram of a panoramic image in an application example of the present application;

[0045] Figure 4 for Figure 3 A schematic diagram of a three-dimensional apartment in the panoramic image shown;

[0046] Figure 5A A schematic diagram of a floor plan of two-dimensional floor plan information in an application example of the present application from a top-down perspective;

[0047] Figure 5B This is a schematic diagram of a floor plan after orientation correction in an application example of this application;

[0048] Figure 6 This is a schematic diagram of the principle of recording the location of a terminal device in two-dimensional apartment information in an application example of this application;

[0049] Figure 7 This is a schematic diagram of the principle of apartment type comparison in an application example of this application;

[0050] Figure 8 This is a schematic diagram of the principle of indoor positioning in a whole house indoor apartment in an application example of this application;

[0051] Fig. 9 This is a schematic diagram of the structure of an indoor positioning device according to an embodiment of the present application;

[0052] Fig.10 It is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0053] The present application is further described in detail below in conjunction with the accompanying drawings and embodiments.

[0054] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application.

[0055] In the related technologies, indoor positioning technologies mainly include: Wireless Fidelity (Wi-Fi) positioning technology, Ultra Wide Band (UWB) positioning technology, Bluetooth (BT) positioning technology, ultrasonic positioning technology, infrared positioning technology, Radio Frequency Identification (RFID) positioning technology, Micro-Electro-Mechanical System (MEMS) positioning technology, etc. The above positioning technologies are based on the communication mode to transmit electronic waves to achieve indoor positioning. In addition, indoor positioning technology can also be divided into single positioning technology and hybrid positioning technology, among which single positioning technology includes computer vision-based positioning technology, light tracking-based positioning technology, and magnetic field-based positioning technology; hybrid positioning technology includes Wi-Fi / geomagnetic hybrid positioning technology, Wi-Fi / MEMS / BT / RFID positioning technology, sensor / optical sensor hybrid positioning technology, etc. Hybrid positioning technology is mainly a positioning method that combines the above positioning technologies.

[0056] Among them, computer vision positioning technology is a technology that uses image processing technology to locate the position of objects in the camera. It can be used to track objects, detect objects, identify objects, and locate objects. Since this computer vision positioning technology not only needs to collect a large amount of data as a comparison library, but also needs to perform perspective transformation calculation on the actual position, and the perspective transformation is related to the camera's orientation and pitch angle, the position information obtained by this method has a large error.

[0057] Based on this, an embodiment of the present application provides an indoor positioning method for indoor positioning of a terminal device equipped with a panoramic camera and an electronic compass. It should be noted that the terminal device can be a terminal device such as a household robot that moves in a home indoor environment, and can also be a terminal device such as a mobile phone, a wearable helmet, etc. carried by a person. Among them, a panoramic camera refers to a camera that performs wide-angle photography when the camera optical axis scans from one side to the other side in the vertical route direction, which can achieve 360-degree shooting without dead angles and can collect panoramic image data of the indoor environment; an electronic compass can be understood as an electronic sensor that can detect direction.

[0058] Exemplarily, the panoramic camera installed on the terminal device should meet the requirement of unobstructed shooting. For example, the installation plane of the panoramic camera is convex so that the side wall of the terminal device does not block the shooting of the panoramic camera. The electronic compass can detect the shooting direction of the panoramic camera. For example, the electronic compass can be consistent with the front direction of the panoramic camera or have a set deviation angle. This embodiment of the application does not limit this.

[0059] It is understandable that the indoor positioning method of the embodiment of the present application can be executed by the terminal device or an external electronic device that is communicatively connected to the terminal device. Figure 1 As shown, the indoor positioning method includes:

[0060] Step 101: Obtain panoramic image data of a target indoor environment captured by the panoramic camera and orientation data generated by the electronic compass.

[0061] Exemplarily, the terminal device can store the panoramic image data captured by the panoramic camera and the orientation data generated by the electronic compass based on the timestamp, thereby realizing the association between the panoramic image data and the orientation data, and can obtain the associated panoramic image data and orientation data, so as to facilitate the subsequent generation of three-dimensional house type information and orientation correction.

[0062] In one application example, the terminal device can use timestamps as names to store panoramic image data captured by a panoramic camera and orientation data generated by an electronic compass, and then associate panoramic image data and orientation data with the same or similar time (for example, within the accuracy range of the timestamp).

[0063] Step 102: Determine three-dimensional apartment type information corresponding to the target indoor environment based on the panoramic image data.

[0064] Here, a neural network model can be used to process the panoramic image data to obtain three-dimensional apartment information corresponding to the target indoor environment.

[0065] Step 103: perform orientation correction on the three-dimensional apartment type information based on the orientation data to obtain corrected apartment type information.

[0066] Here, considering that the 3D house type information is associated with the orientation of the panoramic camera, it is necessary to perform orientation correction on the 3D house type information based on the orientation of the panoramic camera to obtain corrected house type information facing the set direction, for example, corrected house type information facing due north.

[0067] Step 104, comparing the corrected apartment type information with the preset indoor apartment type information of the whole house to generate the current indoor position of the terminal device.

[0068] Here, the preset whole-house indoor apartment type information is the pre-constructed apartment type area information for indoor positioning. By comparing the corrected apartment type information with the preset whole-house indoor apartment type information, the target indoor environment where the terminal device is located can be matched with the apartment type area in the whole-house indoor apartment type information, and then the current indoor position of the terminal device is generated based on the matching result.

[0069] It can be understood that the indoor positioning method of the embodiment of the present application omits the tedious steps of traditional image library acquisition, perspective transformation and three-dimensional point cloud data processing, determines the three-dimensional apartment type information of the target indoor environment based on the panoramic image data, and obtains the corrected apartment type information through orientation correction, and compares the corrected apartment type information with the preset indoor apartment type information of the whole house to realize the current indoor positioning of the terminal device, which can save computing power resources and improve positioning efficiency, and can also improve the indoor positioning accuracy.

[0070] Exemplarily, determining the three-dimensional apartment type information corresponding to the target indoor environment based on the panoramic image data includes:

[0071] Preprocessing the panoramic image data to obtain a Manhattan line segment graph of the panoramic image data;

[0072] Inputting the panoramic image data and the Manhattan line segment graph into a neural network model to obtain intersection lines in the target indoor environment;

[0073] The intersection lines in the target indoor environment are spliced ​​to obtain three-dimensional apartment type information corresponding to the target indoor environment.

[0074] Here, preprocessing the panoramic image data may include: image filtering and Manhattan line segment feature map extraction, wherein image filtering refers to suppressing the noise of the target image while retaining the image detail features as much as possible. For example, filtering may be performed using at least one of, but not limited to, mean filtering, box filtering, Gaussian filtering, and median filtering. Manhattan line segment feature map extraction performs feature map extraction based on the geometric constraints satisfied by the target indoor environment, wherein the geometric constraints may be the Manhattan hypothesis, which assumes that there is a vertical or orthogonal relationship between the ground, ceiling, and wall in the target physical space. For example, in the target physical space, the ground and ceiling are perpendicular to each wall, and each adjacent wall is also perpendicular to each other. In other words, each edge of the outline of each unit space in the target physical space is a straight line. In this way, a Manhattan line segment map of the panoramic image data can be obtained based on the Manhattan line segment feature map extraction.

[0075] Exemplarily, the neural network model may be a LayoutNet model (a model that can recognize the outline of a panoramic image), such as Figure 2As shown in the figure, the collected panoramic image data and the Manhattan line segment graph obtained by preprocessing are input into the LayoutNet model for house type restoration. The LayoutNet model uses a convolutional neural network with an encoder-decoder structure and jump connections to directly predict the corner map (Corner Map) and boundary map (BoundaryMap) on the panoramic image, where the corner points include: wall-top intersection points and wall-ground intersection points in the panoramic image, and the boundaries are the intersection lines in the target indoor environment, for example, including: wall-top line, wall-wall line and wall-ground line.

[0076] It should be noted that the intersection lines in the target indoor environment are used to indicate the boundaries of the physical space in the target indoor environment, wherein the wall-top line is used to indicate the boundary formed between the wall and the ceiling, the wall-wall line is used to indicate the boundary formed between adjacent walls, and the wall-ground line is used to indicate the boundary formed between the wall and the ground.

[0077] Exemplarily, the intersection lines in the target indoor environment include: a wall-top line, a wall-wall line, and a wall-ground line. The intersection lines in the target indoor environment are spliced ​​to obtain the three-dimensional apartment type information corresponding to the target indoor environment, including:

[0078] splicing the wall top lines to obtain the upper layer contour line;

[0079] splicing the wall and ground lines to obtain a lower layer contour line;

[0080] The upper contour line and the lower contour line are spliced ​​based on the wall-to-wall line to obtain three-dimensional apartment type information corresponding to the target indoor environment.

[0081] It can be understood that the collected panoramic image data and the Manhattan line segment diagram obtained by preprocessing are input into the LayoutNet model for house type restoration to obtain the wall-top line, wall-wall line and wall-ground line, and then the wall-top line is spliced ​​to obtain the upper contour line; the wall-ground line is spliced ​​to obtain the lower contour line; the upper contour line and the lower contour line are spliced ​​based on the wall-wall line, that is, the upper contour line and the lower contour line are aligned based on the wall-wall line and then superimposed to obtain the three-dimensional house type information corresponding to the target indoor environment.

[0082] In an application example, a panoramic image of a target indoor environment is Figure 3 As shown, the corresponding three-dimensional apartment is as follows Figure 4 shown.

[0083] Exemplarily, performing orientation correction on the three-dimensional apartment type information based on the orientation data to obtain the corrected apartment type information includes:

[0084] Performing a top-down projection on the three-dimensional apartment type represented by the three-dimensional apartment type information to obtain two-dimensional apartment type information from a top-down perspective;

[0085] Determining a correction angle based on the orientation data, the correction angle being a rotation angle used to rotate the orientation of the two-dimensional apartment type information to the same orientation as the orientation of the indoor apartment type information of the entire house;

[0086] The position of the terminal device in the two-dimensional apartment information is used as a reference point, and the apartment plan corresponding to the two-dimensional apartment information is rotated according to the correction angle to obtain the corrected apartment information.

[0087] In an application example, a floor plan of two-dimensional floor plan information from a bird's-eye view is shown in FIG. Figure 5A As shown, the location of the terminal device is as follows Figure 5A As shown by the circle in the figure. For example, the electronic compass is in the same direction as the front of the panoramic camera. Assuming that the direction of the indoor apartment information of the whole house is due north, and the direction generated by the electronic compass when the panoramic camera collects the panoramic image is due east, the correction angle is 90° in the counterclockwise direction. The corrected apartment information is shown in the figure below. Figure 5B As shown, in this way, the orientation of the two-dimensional apartment type information corresponding to the restored three-dimensional apartment type information is rotated to be the same as the orientation of the indoor apartment type information of the whole house, which is beneficial to the subsequent apartment type comparison.

[0088] It should be noted that the location of the terminal device also needs to be recorded in the two-dimensional apartment information, for example Figure 6 As shown, the first pixel point x1 on the east-west x-axis and the second pixel point y1 on the north-south y-axis of the projection point of the terminal device in the two-dimensional apartment information can be counted, and the position of the terminal device in the east-west direction is determined based on the ratio of the first pixel point x1 to the total pixel points of the x-axis, and the position of the terminal device in the north-south direction is determined based on the ratio of the second pixel point y1 to the total pixel points of the y-axis.

[0089] Exemplarily, the whole house indoor apartment type information includes: the scale of the whole house indoor apartment type, the outline shape of each apartment type area and the outline size of each apartment type area, and the corrected apartment type information is compared with the preset whole house indoor apartment type information to generate the current indoor position of the terminal device, including:

[0090] Comparing the corrected apartment type information with the preset whole-house indoor apartment type information to obtain a target area in the whole-house indoor apartment type information corresponding to the target indoor environment;

[0091] Based on the position of the terminal device in the two-dimensional apartment information, the outline size of the target area and the scale, the current indoor position of the terminal device is generated.

[0092] It is understandable that after obtaining the target area corresponding to the target indoor environment through contour shape comparison, the actual space size of the target area can be determined based on the contour size and scale of the target area, wherein the scale is the ratio of the distance on the map to the actual distance, that is, the ratio of the length of the integrated line segment on the map to the actual length of the corresponding line segment in the physical space. After obtaining the actual space size of the target area, based on the position ratio relationship of the terminal device in the east-west direction and the south direction in the aforementioned two-dimensional apartment information, the current indoor position of the terminal device can be generated through position conversion.

[0093] Exemplarily, the step of comparing the corrected apartment type information with preset whole-house indoor apartment type information to obtain a target area in the whole-house indoor apartment type information corresponding to the target indoor environment includes:

[0094] For each apartment area in the preset whole-house indoor apartment information, compare the contour shape with the corrected apartment information in sequence according to the set order;

[0095] If it is determined that the corner directions and the number of corners in the two contour shapes are the same, the corresponding apartment area is used as the target area corresponding to the target indoor environment.

[0096] It can be understood that if the floor plan of the corrected floor plan information is the same as the outline shape of the floor plan area in the indoor floor plan information of the whole house, then the corner direction and number of corners of the outline shape are the same from the starting point to the end point, so that automatic matching of the target area can be achieved.

[0097] In some embodiments, multiple apartment types in the whole house may have the same outline shape, for example, all of them are square outlines, which may result in the problem of being unable to accurately identify the target area corresponding to the target indoor environment. Based on this, the whole house indoor apartment type information further includes: first identification information identifying the preset target of each apartment type area; the method further includes:

[0098] Performing target detection of the preset target on the panoramic image data to obtain position information of the preset target;

[0099] Update the three-dimensional apartment information based on the location information of the preset target;

[0100] Wherein, the corrected apartment type information carries second identification information identifying the preset target, and before taking the corresponding apartment type area as the target area corresponding to the target indoor environment, the method further includes:

[0101] The first identification information of the corresponding apartment type area is compared with the second identification information in the corrected apartment type information. If they are determined to be the same, the corresponding apartment type area is used as the target area corresponding to the target indoor environment.

[0102] Here, the preset target may be at least one of a door or a window in the apartment area.

[0103] It is understandable that the corrected apartment type information carries the second identification information for identifying doors and / or windows. Specifically, doors and / or windows can be identified based on the target detection algorithm based on the panoramic image information, and their locations can be determined, and then identifications can be added to the three-dimensional apartment type information, so that the corrected apartment type information after the top-view projection and rotation correction carries the second identification information for identifying doors and / or windows.

[0104] In an application example, Figure 7 As shown, the process of comparing the obtained corrected apartment type information with the indoor apartment type information of the whole house is as follows:

[0105] Extract the lines (i.e. walls) in the whole house layout, and compare the lines of the corrected layout with the lines of the whole house layout from the upper left corner to the right, mainly comparing whether the right-angle (turning) parts can match. If both the right-angle position and direction can match, it is considered that the two are successfully compared.

[0106] For example, Figure 7 As shown, first compare the upper left corner of the whole house type with the corrected type, starting from the corner point 1 in the upper left corner, and go clockwise to the next corner point 2, all the way to corner point 3, all of which are rotated 90° clockwise. Both can be matched. There are windows from corner point 3 to corner point 4 in the corrected type, but there are no windows in the compared part of the whole house type. If there are no windows in the corrected type, keep matching to corner point 5, the compared part of the whole house type returns to the corner point 1 corresponding to the starting point, while the corrected type has not returned to the starting point, and the next edge of corner point 5 is rotated 90° counterclockwise, which is considered a match failure. If you can always return to the corner point 1 corresponding to the starting point according to the above steps, it is considered a match. In this way, the target area in the whole house type that matches the corrected type can be determined, that is Figure 8 The area of ​​the apartment where the middle black dot falls.

[0107] Since the indoor layout information of the whole house includes: the scale of the indoor layout of the whole house, the outline shape of each layout area and the outline size of each layout area, the outline size corresponding to the specific position of the corrected layout in the whole house layout (i.e. Figure 8 The outline size of the apartment area where the black dot falls is calculated, and the proportional relationship of the terminal device in the corrected apartment is calculated according to the first pixel point x1 and the second pixel point y1 in the two-dimensional apartment information. Combined with the scale of the indoor apartment of the whole house, the current indoor position of the terminal device in the whole house can be calculated.

[0108] It should be noted that the indoor positioning method of the embodiment of the present application performs indoor positioning based on the combination of a panoramic camera and an electronic compass on a terminal device. It only needs to collect panoramic image data and corresponding orientation data to achieve indoor positioning, without the need for tedious preliminary calibration and subsequent perspective transformation processes; in addition, the orientation correction of the three-dimensional apartment type information restored by the neural network model is performed based on the orientation data, which can improve the speed and accuracy of comparing the corrected apartment type with the entire house type; thirdly, based on the apartment type projection under an upward perspective, and marking the preset target in the projected corrected apartment type information, the method of proportionally positioning the position of the terminal device using the horizontal and vertical pixel point quantity statistics method can improve the accuracy of indoor positioning, with small calculation amount and high positioning accuracy.

[0109] In order to implement the method of the embodiment of the present application, the embodiment of the present application also provides an indoor positioning device, which corresponds to the above-mentioned indoor positioning method, and each step in the above-mentioned indoor positioning method embodiment is also fully applicable to the embodiment of the indoor positioning device.

[0110] like Fig. 9 As shown, the indoor positioning device includes: an acquisition module 901, a housing type generation module 902, a housing type correction module 903 and a positioning module 904. The acquisition module 901 is used to acquire the panoramic image data of the target indoor environment collected by the panoramic camera and the orientation data generated by the electronic compass; the housing type generation module 902 is used to determine the three-dimensional housing type information corresponding to the target indoor environment based on the panoramic image data; the housing type correction module 903 is used to perform orientation correction on the three-dimensional housing type information based on the orientation data to obtain the corrected housing type information; the positioning module 904 is used to compare the corrected housing type information with the preset whole-house indoor housing type information to generate the current indoor position of the terminal device.

[0111] Exemplarily, the apartment type generation module 902 is specifically used for:

[0112] Preprocessing the panoramic image data to obtain a Manhattan line segment graph of the panoramic image data;

[0113] Inputting the panoramic image data and the Manhattan line segment graph into a neural network model to obtain intersection lines in the target indoor environment;

[0114] The intersection lines in the target indoor environment are spliced ​​to obtain three-dimensional apartment type information corresponding to the target indoor environment.

[0115] Exemplarily, the intersection lines in the target indoor environment include: a wall-top line, a wall-wall line, and a wall-ground line. The intersection lines in the target indoor environment are spliced ​​to obtain the three-dimensional apartment type information corresponding to the target indoor environment, including:

[0116] splicing the wall top lines to obtain the upper layer contour line;

[0117] splicing the wall and ground lines to obtain a lower layer contour line;

[0118] The upper contour line and the lower contour line are spliced ​​based on the wall-to-wall line to obtain three-dimensional apartment type information corresponding to the target indoor environment.

[0119] Exemplarily, the apartment type correction module 903 is specifically used for:

[0120] Performing a top-down projection on the three-dimensional apartment type represented by the three-dimensional apartment type information to obtain two-dimensional apartment type information from a top-down perspective;

[0121] Determining a correction angle based on the orientation data, the correction angle being a rotation angle used to rotate the orientation of the two-dimensional apartment type information to the same orientation as the orientation of the indoor apartment type information of the entire house;

[0122] The position of the terminal device in the two-dimensional apartment information is used as a reference point, and the apartment plan corresponding to the two-dimensional apartment information is rotated according to the correction angle to obtain the corrected apartment information.

[0123] Exemplarily, the whole house indoor layout information includes: the scale of the whole house indoor layout, the outline shape of each layout area and the outline size of each layout area. The positioning module 904 is specifically used to:

[0124] Comparing the corrected apartment type information with the preset whole-house indoor apartment type information to obtain a target area in the whole-house indoor apartment type information corresponding to the target indoor environment;

[0125] Based on the position of the terminal device in the two-dimensional apartment information, the outline size of the target area and the scale, the current indoor position of the terminal device is generated.

[0126] Exemplarily, the step of comparing the corrected apartment type information with preset whole-house indoor apartment type information to obtain a target area in the whole-house indoor apartment type information corresponding to the target indoor environment includes:

[0127] For each apartment area in the preset whole-house indoor apartment information, compare the contour shape with the corrected apartment information in sequence according to the set order;

[0128] If it is determined that the corner directions and the number of corners in the two contour shapes are the same, the corresponding apartment area is used as the target area corresponding to the target indoor environment.

[0129] Exemplarily, the whole house indoor apartment information also includes: first identification information of a preset target for each apartment area; the indoor positioning device also includes: a marking module 905, which is used to perform target detection of the preset target on the panoramic image data to obtain the position information of the preset target; update the three-dimensional apartment information based on the position information of the preset target; wherein the corrected apartment information carries the second identification information identifying the preset target, and before the positioning module 904 uses the corresponding apartment area as the target area corresponding to the target indoor environment, it is also used to:

[0130] The first identification information of the corresponding apartment type area is compared with the second identification information in the corrected apartment type information. If they are determined to be the same, the corresponding apartment type area is used as the target area corresponding to the target indoor environment.

[0131] In actual application, the acquisition module 901, the apartment type generation module 902, the apartment type correction module 903, the positioning module 904 and the marking module 905 can be implemented by a processor in the indoor positioning device. Of course, the processor needs to run the computer program in the memory to realize its function.

[0132] It should be noted that: the indoor positioning device provided in the above embodiment only uses the division of the above program modules as an example when performing indoor positioning. In actual applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device is divided into different program modules to complete all or part of the processing described above. In addition, the indoor positioning device provided in the above embodiment and the indoor positioning method embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0133] Based on the hardware implementation of the above program modules and in order to implement the method of the embodiment of the present application, the embodiment of the present application also provides an electronic device. Fig.10 Only an exemplary structure of the electronic device is shown, not all structures, and it can be implemented as needed. Fig.10 The electronic device may be a terminal device equipped with a panoramic camera and an electronic compass, or an electronic device with data processing capability that is communicatively connected to the terminal device, and the present application embodiment does not limit this.

[0134] like Fig.10As shown, the electronic device 1000 provided in the embodiment of the present application includes: at least one processor 1001, a memory 1002, a user interface 1003 and at least one network interface 1004. The various components in the electronic device 1000 are coupled together through a bus system 1005. It can be understood that the bus system 1005 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 1005 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, in Fig.10 Various buses are labeled as bus system 1005 .

[0135] The user interface 1003 may include a display, a keyboard, a mouse, a trackball, a click wheel, keys, buttons, a touch pad or a touch screen.

[0136] The memory 1002 in the embodiment of the present application is used to store various types of data to support the operation of the electronic device. Examples of such data include: any computer program used to operate on the electronic device.

[0137] The indoor positioning method disclosed in the embodiment of the present application can be applied to the processor 1001, or implemented by the processor 1001. The processor 1001 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the indoor positioning method can be completed by the hardware integrated logic circuit or software instructions in the processor 1001. The above-mentioned processor 1001 can be a general-purpose processor, a digital signal processor (DSP, Digital Signal Processor), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor 1001 can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiment of the present application. The general-purpose processor can be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiment of the present application, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium, which is located in the memory 1002. The processor 1001 reads the information in the memory 1002 and completes the steps of the indoor positioning method provided in the embodiment of the present application in combination with its hardware.

[0138] In an exemplary embodiment, the electronic device may be implemented by one or more application specific integrated circuits (ASIC), DSP, programmable logic device (PLD), complex programmable logic device (CPLD), field programmable gate array (FPGA), general processor, controller, microcontroller (MCU), microprocessor, or other electronic components to execute the aforementioned method.

[0139] It can be understood that the memory 1002 can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disk, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus random access memory (DRRAM).The memories described in the embodiments of the present application are intended to include, but are not limited to, these and any other suitable types of memories.

[0140] In an exemplary embodiment, the present application also provides a computer storage medium, which can be a computer-readable storage medium, for example, a memory 1002 storing a computer program, and the computer program can be executed by a processor 1001 of an electronic device to complete the steps described in the method of the present application embodiment. The computer-readable storage medium can be a memory such as a ROM, a PROM, an EPROM, an EEPROM, a Flash Memory, a magnetic surface memory, an optical disk, or a CD-ROM.

[0141] It should be noted that: "first", "second", etc. are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0142] In addition, the technical solutions described in the embodiments of the present application can be combined arbitrarily without conflict.

[0143] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. An indoor positioning method, It is characterized in that For performing indoor positioning on a terminal device equipped with a panoramic camera and an electronic compass, the method comprises: Acquire panoramic image data of the target indoor environment captured by the panoramic camera and orientation data generated by the electronic compass; Determining three-dimensional apartment information corresponding to the target indoor environment based on the panoramic image data; Performing orientation correction on the three-dimensional apartment type information based on the orientation data to obtain corrected apartment type information; The corrected apartment type information is compared with the preset indoor apartment type information of the whole house to generate the current indoor position of the terminal device.

2. The method according to claim 1, It is characterized in that The determining the three-dimensional apartment type information corresponding to the target indoor environment based on the panoramic image data includes: Preprocessing the panoramic image data to obtain a Manhattan line segment graph of the panoramic image data; Inputting the panoramic image data and the Manhattan line segment graph into a neural network model to obtain intersection lines in the target indoor environment; The intersection lines in the target indoor environment are spliced ​​to obtain three-dimensional apartment type information corresponding to the target indoor environment.

3. The method according to claim 2, It is characterized in that The intersection lines in the target indoor environment include: a wall-top line, a wall-wall line, and a wall-to-ground line. The intersection lines in the target indoor environment are spliced ​​to obtain the three-dimensional apartment type information corresponding to the target indoor environment, including: splicing the wall top lines to obtain the upper layer contour line; splicing the wall and ground lines to obtain a lower layer contour line; The upper contour line and the lower contour line are spliced ​​based on the wall-to-wall line to obtain three-dimensional apartment type information corresponding to the target indoor environment.

4. The method according to claim 1, It is characterized in that The performing orientation correction on the three-dimensional apartment type information based on the orientation data to obtain the corrected apartment type information includes: Performing a top-down projection on the three-dimensional apartment type represented by the three-dimensional apartment type information to obtain two-dimensional apartment type information from a top-down perspective; Determining a correction angle based on the orientation data, the correction angle being a rotation angle used to rotate the orientation of the two-dimensional apartment type information to the same orientation as the orientation of the indoor apartment type information of the entire house; The position of the terminal device in the two-dimensional apartment information is used as a reference point, and the apartment plan corresponding to the two-dimensional apartment information is rotated according to the correction angle to obtain the corrected apartment information.

5. The method according to claim 4, It is characterized in that The whole-house indoor apartment type information includes: the scale of the whole-house indoor apartment type, the outline shape of each apartment type area, and the outline size of each apartment type area. The corrected apartment type information is compared with the preset whole-house indoor apartment type information to generate the current indoor position of the terminal device, including: Comparing the corrected apartment type information with the preset whole-house indoor apartment type information to obtain a target area in the whole-house indoor apartment type information corresponding to the target indoor environment; Based on the position of the terminal device in the two-dimensional apartment information, the outline size of the target area and the scale, the current indoor position of the terminal device is generated.

6. The method according to claim 5, It is characterized in that The step of comparing the corrected apartment type information with preset whole-house indoor apartment type information to obtain a target area in the whole-house indoor apartment type information corresponding to the target indoor environment includes: For each apartment area in the preset whole-house indoor apartment information, compare the contour shape with the corrected apartment information in sequence according to the set order; If it is determined that the corner directions and the number of corners in the two contour shapes are the same, the corresponding apartment area is used as the target area corresponding to the target indoor environment.

7. The method according to claim 6, It is characterized in that The whole house indoor apartment type information also includes: first identification information of preset targets for identifying each apartment type area; the method also includes: Performing target detection of the preset target on the panoramic image data to obtain position information of the preset target; Update the three-dimensional apartment information based on the location information of the preset target; Wherein, the corrected apartment type information carries second identification information identifying the preset target, and before taking the corresponding apartment type area as the target area corresponding to the target indoor environment, the method further includes: The first identification information of the corresponding apartment type area is compared with the second identification information in the corrected apartment type information. If they are determined to be the same, the corresponding apartment type area is used as the target area corresponding to the target indoor environment.

8. An indoor positioning device, It is characterized in that The device is used for performing indoor positioning on a terminal device equipped with a panoramic camera and an electronic compass, and comprises: An acquisition module, used to acquire panoramic image data of the target indoor environment captured by the panoramic camera and orientation data generated by the electronic compass; A housing type generation module, used to determine three-dimensional housing type information corresponding to the target indoor environment based on the panoramic image data; A housing type correction module, used for performing orientation correction on the three-dimensional housing type information based on the orientation data to obtain corrected housing type information; The positioning module is used to compare the corrected apartment type information with the preset indoor apartment type information of the whole house to generate the current indoor position of the terminal device.

9. An electronic device, It is characterized in that The device is used for indoor positioning of a terminal device equipped with a panoramic camera and an electronic compass, the electronic device comprising: a processor and a memory for storing a computer program that can be run on the processor, wherein: The processor is used to execute the steps of the method according to any one of claims 1 to 7 when running a computer program.

10. A computer storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • House plan diffusion generation method and device, equipment and medium

    CN122336186A

  • House type diagram diffusion generation method and device, equipment and medium

    CN122336186B