Indoor positioning method, system and equipment based on 3D rendering
By using 3D rendering method in indoor positioning technology, the positioning target of a single camera is mapped into the 3D model, solving the problems of complex deployment and complex computing, achieving high-precision indoor positioning and multi-floor positioning, simplifying the communication environment.
Patent Information
- Application Number
- CN202410962651.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-18
- Publication Date
- 2024-11-08
AI Technical Summary
Existing indoor positioning technologies have problems such as complex deployment, complex communication environment and complex computing, especially the need to install a large number of equipment and are susceptible to environmental interference, and it is difficult to accurately locate floor height information.
Using an indoor positioning method based on 3D rendering, map the positioning target into a preset 3D model through a single camera, synchronizes the virtual camera with the real camera, generate reference objects to track two-dimensional coordinate points, reduce calculation complexity and reduce device deployment , realize absolute coordinate positioning.
It effectively reduces the computational complexity and the number of equipment deployments, simplifies the communication environment, realizes high-precision indoor positioning and precise positioning between multiple floors, and avoids the problem of inaccurate floor height information in traditional technology.
Smart Images

Figure CN118918186A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of indoor positioning technology, and in particular to a 3D rendering-based indoor positioning method, system, computer-readable storage medium, computer program product, and electronic device. Background Art
[0002] Indoor positioning technology is a technology that locates objects or people in indoor environments. Existing indoor positioning technologies mainly include: Wi-Fi positioning, Bluetooth positioning, Ultra Wide Band (UWB) positioning, optical camera positioning, and 3D vision positioning.
[0003] Wi-Fi positioning technology measures the signal strength of multiple Wi-Fi signal sources received by the device, and combines it with a signal propagation model or a pre-built signal fingerprint database for positioning. Bluetooth positioning technology uses multiple Bluetooth beacons to send signals. After the mobile device receives the signal, it locates based on the signal strength or arrival time difference. UWB positioning technology uses multiple UWB transmitters to periodically send signals. After the mobile device receives the UWB signal, it locates based on the signal transmission time or arrival time difference. Optical camera positioning technology deploys a large number of cameras to capture images or videos and analyzes the visual information therein to estimate the target position; 3D visual positioning technology uses multiple cameras or 3D cameras to obtain three-dimensional environmental information and uses depth perception algorithms for positioning. Obviously, the above positioning technologies have the following technical defects:
[0004] (1) Complex deployment: A large number of devices need to be installed, and sometimes the person being located is even required to carry the positioning device.
[0005] (2) Complex communication environment: In Wi-Fi positioning, Bluetooth positioning, and UWB positioning, the collaborative work of multiple devices makes the communication environment in which positioning is performed more complex. Positioning signals are easily interfered with by environmental factors, such as signal attenuation and multipath effects, which affect the positioning effect.
[0006] (3) Calculation complexity: Optical camera positioning and 3D vision positioning involve a large amount of data processing and complex calculation algorithms. Summary of the Invention
[0007] The purpose of the embodiments of the present invention is to provide an indoor positioning method, system, computer-readable storage medium, computer program product and electronic device based on 3D rendering. By mapping the positioning target in a single camera to a preset 3D model, the computational complexity can be effectively reduced, and the number of devices that need to be deployed can be greatly reduced to simplify the communication environment.
[0008] A first embodiment of the present invention provides an indoor positioning method based on 3D rendering, comprising:
[0009] Based on the coordinate system of the target building, determine the absolute coordinate interval of the real positioning space;
[0010] A 3D positioning space model is established according to the real positioning space in a 1:1 ratio; wherein the real positioning space is equipped with a real camera; and the 3D positioning space model is equipped with a virtual camera at the mapping position of the real camera;
[0011] Calibrate the virtual camera so that the virtual camera is synchronized with the real camera;
[0012] When a positioning target appears in the real positioning space, the real two-dimensional coordinates of the positioning target in the real camera are mapped in real time to the virtual picture generated by the virtual camera to obtain a virtual two-dimensional coordinate point;
[0013] Generating a reference object in the 3D positioning space model; wherein the reference object is used to track the virtual two-dimensional coordinate point in the virtual picture;
[0014] The positioning coordinate point of the positioning target is obtained according to the updated position coordinates of the reference object after movement in the 3D positioning space model.
[0015] Optionally, obtaining the positioning coordinate point of the positioning target according to the updated position coordinates of the reference object in the 3D positioning space model includes:
[0016] Calculating the position distance between the reference object and the virtual two-dimensional coordinate point in the virtual picture;
[0017] When the position distance is greater than a preset positioning accuracy coefficient, moving the reference object so that the updated position distance is less than the preset positioning accuracy coefficient;
[0018] Recording the relative coordinates of the reference object after each position update in the 3D positioning space model;
[0019] The relative coordinates are mapped to the absolute coordinate interval to obtain the positioning coordinate point of the positioning target.
[0020] Furthermore, mapping the relative coordinates to the absolute coordinate interval to obtain the positioning coordinate point of the positioning target includes:
[0021] Determining the absolute coordinates corresponding to the origin in the relative coordinate system of the real positioning space based on the absolute coordinate interval;
[0022] The relative coordinates are added to the absolute coordinates to obtain the positioning coordinate point of the positioning target.
[0023] Optionally, after obtaining the positioning coordinate point of the positioning target, the method further includes:
[0024] The positioning coordinate points are mapped to the 3D positioning space model and displayed in the form of a virtual character.
[0025] Optionally, calibrating the virtual camera so as to synchronize the virtual camera with the real camera includes:
[0026] Adjust the built-in parameters and external parameters of the virtual camera so that the views of the virtual camera and the real camera are exactly the same; wherein the built-in parameters include: focal length, principal point and distortion coefficient; the external parameters include the position coordinates and deflection angle of the virtual camera.
[0027] Optionally, the positioning target is determined by the following steps:
[0028] Based on a deep learning algorithm, objects in the image captured by the real camera are detected to identify the positioning target; wherein the deep learning algorithm is at least any one of a convolutional neural network, a YOLO detection algorithm, and a DETR detection algorithm.
[0029] A second aspect of the present invention provides an indoor positioning system based on 3D rendering, which is used to implement the indoor positioning method based on 3D rendering according to any one of the first aspects above. The system includes:
[0030] The positioning space coordinate setting module is used to determine the absolute coordinate interval of the real positioning space based on the coordinate system of the target building;
[0031] A 3D positioning space model establishment module is used to establish a 3D positioning space model according to the real positioning space at a 1:1 ratio; wherein the real positioning space is installed with a real camera; and the 3D positioning space model is provided with a virtual camera at the mapping position of the real camera;
[0032] A virtual camera calibration module, configured to calibrate the virtual camera so as to synchronize the virtual camera with the real camera;
[0033] A two-dimensional coordinate mapping module is used to map the real two-dimensional coordinates of the positioning target in the real camera to the virtual picture generated by the virtual camera in real time when the positioning target appears in the real positioning space, so as to obtain a virtual two-dimensional coordinate point;
[0034] A reference object generation module, configured to generate a reference object in the 3D positioning space model; wherein the reference object is used to track the virtual two-dimensional coordinate point in the virtual image;
[0035] The positioning coordinate point acquisition module is used to obtain the positioning coordinate point of the positioning target according to the updated position coordinates of the reference object in the 3D positioning space model.
[0036] An embodiment of the third aspect of the present invention provides a computer-readable storage medium, which includes a stored computer program; wherein, when the computer program is running, it controls the device where the computer-readable storage medium is located to execute the indoor positioning method based on 3D rendering as described in any one of the above-mentioned first aspects.
[0037] An embodiment of a fourth aspect of the present invention provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the indoor positioning method based on 3D rendering as described in any one of the first aspects above.
[0038] The fifth aspect embodiment of the present invention also provides an electronic device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the indoor positioning method based on 3D rendering as described in any one of the first aspects above when executing the computer program.
[0039] Compared with the prior art, the embodiments of the present invention provide a 3D rendering-based indoor positioning method, system, computer-readable storage medium, computer program product, and electronic device. The method includes: determining the absolute coordinate interval of a real positioning space based on the coordinate system of a target building; establishing a 3D positioning space model according to the real positioning space at a 1:1 ratio; wherein a real camera is installed in the real positioning space; a virtual camera is set at the mapping position of the real camera in the 3D positioning space model; the virtual camera is calibrated so that the virtual camera is synchronized with the real camera; when a positioning target appears in the real positioning space, the real two-dimensional coordinates of the positioning target in the real camera are mapped in real time to a virtual image generated by the virtual camera to obtain a virtual two-dimensional coordinate point; generating a reference object in the 3D positioning space model; wherein the reference object is used to track the virtual two-dimensional coordinate point in the virtual image; and obtaining the positioning coordinate point of the positioning target based on the updated position coordinates of the reference object after movement in the 3D positioning space model. The present invention can effectively reduce computational complexity and greatly reduce the number of devices required to be deployed, without considering the complexity of the communication environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 3D rendering is a flowchart of an embodiment of an indoor positioning method provided by the present invention;
[0041] Figure 2This is a schematic diagram of an embodiment of obtaining positioning coordinate points provided by the present invention;
[0042] Figure 3 1 is a flow chart of another embodiment of the indoor positioning method based on 3D rendering provided by the present invention;
[0043] Figure 4 3D rendering is a schematic diagram of an embodiment of an indoor positioning system provided by the present invention;
[0044] Figure 5 It is a structural diagram of an embodiment of an electronic device provided by the present invention. DETAILED DESCRIPTION
[0045] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this technical field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0046] See also Figure 1 , is a flow chart of an embodiment of an indoor positioning method based on 3D rendering provided by the present invention.
[0047] The first embodiment of the present invention provides an indoor positioning method based on 3D rendering, including steps S1 to S6, as follows:
[0048] Step S1: Based on the coordinate system of the target building, determine the absolute coordinate interval of the real positioning space.
[0049] Specifically, a three-dimensional coordinate system is constructed for the building that needs indoor positioning to represent the position of each point in the building. Starting from a certain corner of the building, it is set to (0,0,0), and then according to the construction drawings of the building, the diagonal points of the building are set to (x, y, z). Here, the appropriate scale and unit can be selected according to the actual size. In this way, every room / space that needs to be positioned in the building (even accurate to different floors or even mezzanines) has its own independent coordinate space / coordinate interval. Step S1 gives the absolute coordinate interval of the actual positioning space in the absolute coordinate system of the entire building. However, in actual indoor positioning, the positioning coordinate points generally calculated are relative coordinates in the relative coordinate system of the actual positioning space. In order to further obtain the absolute coordinates of the positioning coordinate points, it is necessary to record the absolute coordinate interval of each actual positioning space. This can provide accurate height information for subsequent positioning targets when they are accurately positioned on different floors.
[0050] For example, an office building that needs indoor positioning is 50 meters long, 30 meters wide, and 20 meters high. A corner of the office building is selected as the starting point (0, 0, 0), and an absolute coordinate system is constructed for the office building. Then the diagonal point of the office building is (50, 30, 20), and the absolute coordinate range of one office (real positioning space) is (10, 10, 0) to (15, 15, 3). Similarly, absolute coordinate ranges can be set for different floors or even mezzanines; among them, the absolute coordinate range of the real positioning space is (10, 10, 0) to (15, 15, 3) which needs to be recorded and saved for subsequent calculation of the absolute coordinates of the positioning coordinate points.
[0051] Step S2: Based on the real positioning space, a 3D positioning space model is established at a 1:1 ratio; wherein the real positioning space is installed with a real camera; and the 3D positioning space model is provided with a virtual camera at the mapping position of the real camera.
[0052] Specifically, an accurate 3D model (3D positioning space model) corresponding to the positioned space (real positioning space) is established. The model should reflect the shape, size and structure of the real indoor space as realistically as possible. In specific implementation, various 3D modeling tools and techniques can be used to create the model, such as 3D scanning, photogrammetry or 3D modeling software. A real camera is installed at a suitable position in the real positioning space. The position should ensure that the real camera can cover the area to be positioned; wherein the viewing angle and resolution of the real camera should be selected according to the size of the indoor space and the range of movement of the people. Similarly, a virtual camera corresponding to the real camera is placed at the same position in the 3D positioning space model.
[0053] Step S3: Calibrate the virtual camera so that the virtual camera is synchronized with the real camera.
[0054] Specifically, the parameters of the virtual camera are adjusted for calibration so that the images captured by the virtual camera in the 3D positioning space model are exactly the same as those captured by the real camera (i.e., the viewing angles of the two cameras cover the same area). In specific implementation, the images can be aligned by aligning the four corners of the video image.
[0055] Step S4: When a positioning target appears in the real positioning space, the real two-dimensional coordinates of the positioning target in the real camera are mapped to the virtual picture generated by the virtual camera in real time to obtain a virtual two-dimensional coordinate point.
[0056] Specifically, taking a pedestrian as an example, the foot position is used as the positioning point. In a real surveillance video, the position of a pedestrian (i.e., the foot positioning point) is recorded as the coordinates (x1, y1) in the real video image. This real 2D coordinate (x1, y1) is then transmitted to the image formed by the virtual camera to obtain the corresponding virtual 2D coordinate point.
[0057] Step S5: generating a reference object in the 3D positioning space model; wherein the reference object is used to track the virtual two-dimensional coordinate point in the virtual picture.
[0058] Specifically, while generating the virtual two-dimensional coordinate point, a reference object of appropriate size, which can be a spherical object, is also generated in the 3D positioning space model. Of course, this reference object will also appear in the virtual image generated by the virtual camera, so that there will be a virtual two-dimensional coordinate point and a reference object in the virtual image. In the virtual portrait, as the virtual two-dimensional coordinate point moves, the reference object will also move with the virtual two-dimensional coordinate point, such as approaching the virtual two-dimensional coordinate point along the direction of the line connecting the reference object and the virtual two-dimensional coordinate point, so that the reference object in the virtual image is always within the preset range of the virtual two-dimensional coordinate point.
[0059] Step S6: obtaining the positioning coordinate point of the positioning target according to the updated position coordinates of the reference object in the 3D positioning space model.
[0060] See also Figure 2 , is a schematic diagram of an embodiment of obtaining positioning coordinate points provided by the present invention. Figure 2 The reference object exists both in the 3D positioning space model and in the virtual image generated by the virtual camera. Since the reference object is used to track the virtual two-dimensional coordinate point in the virtual image, after each movement of the virtual two-dimensional coordinate point, the reference object will also move with the virtual two-dimensional coordinate point and will always be located within the preset range of the virtual two-dimensional coordinate point. Generally, the preset range is small, so that the updated position of the reference object can match the position of the positioning target, that is, the position of the reference object in the 3D positioning space model can represent the position of the positioning target in real space.
[0061] As can be seen from the above technical solutions, the 3D rendering-based indoor positioning method provided by the embodiments of the present invention effectively reduces computational complexity and the number of devices required for deployment by mapping the positioning target from a single camera to a preset 3D positioning space model, regardless of the complexity of the communication environment. Furthermore, because the final positioning coordinates of the positioning target are absolute coordinates within the building, the embodiments of the present invention can accurately achieve positioning between floors.
[0062] In an optional embodiment, the step S6 described above of obtaining the positioning coordinate point of the positioning target according to the updated position coordinates of the reference object in the 3D positioning space model includes:
[0063] Calculating the position distance between the reference object and the virtual two-dimensional coordinate point in the virtual picture;
[0064] When the position distance is greater than a preset positioning accuracy coefficient, moving the reference object so that the updated position distance is less than the preset positioning accuracy coefficient;
[0065] Recording the relative coordinates of the reference object after each position update in the 3D positioning space model;
[0066] The relative coordinates are mapped to the absolute coordinate interval to obtain the positioning coordinate point of the positioning target.
[0067] Specifically, after mapping the real-world two-dimensional coordinates (x1, y1) of the positioning target in the real image onto the virtual image formed by the virtual camera, the positional distance d between the virtual two-dimensional coordinate point (x1, y1) in the virtual image and the captured reference object is calculated. As the positioning target moves in the real-world positioning space, the virtual two-dimensional coordinate point (x1, y1) also moves accordingly, and the positional distance d also changes. When the positional distance d is greater than a preset positioning accuracy coefficient α, the position of the reference object in the 3D positioning space model is adjusted so that the positional distance d in the virtual image remains less than the preset value α. After each adjustment / update of the reference object's position, the reference object's positional coordinates (x2, y2, z2) at that moment in the 3D positioning space model are recorded. These positional coordinates represent the positioning target's positional coordinates in the real-world positioning space; the positional coordinates (x2, y2, z2) are relative coordinates within the relative coordinate system of the real-world positioning space. Based on this, the positional coordinates (x2, y2, z2) need to be further mapped to an absolute coordinate interval to obtain the actual positioning coordinate point of the positioning target in the building.
[0068] In an optional embodiment, mapping the relative coordinates to the absolute coordinate interval to obtain the positioning coordinate point of the positioning target includes:
[0069] Determining the absolute coordinates corresponding to the origin in the relative coordinate system of the real positioning space based on the absolute coordinate interval;
[0070] The relative coordinates are added to the absolute coordinates to obtain the positioning coordinate point of the positioning target.
[0071] For example, the absolute coordinate interval of the real positioning space is (10, 10, 0) to (15, 15, 3). This absolute coordinate interval is the coordinate interval of the real positioning space for the entire building. However, the reference objects in this real positioning space do not know their own absolute coordinates and only know their relative coordinates in the relative coordinate system of the real positioning space. In order to obtain the absolute coordinates of the reference object, first obtain the absolute coordinates (10, 10, 0) corresponding to the origin coordinates (0, 0, 0) in the relative coordinate system. Obviously, the relative coordinates (5, 5, 3) correspond to the absolute coordinates (15, 15, 3); then, based on the relative position coordinates of the reference object, such as (2, 2, 0), and the formula (relative position coordinates + absolute coordinates of the origin in the real positioning space), the absolute coordinates of the reference object are equal to (2, 2, 0) + (10, 10, 0) = (12, 12, 0). The position coordinates (12, 12, 0) are the positioning coordinate points of the positioning target.
[0072] Since the absolute coordinate intervals of each real positioning space (such as real positioning spaces on different floors) can be clearly obtained, the embodiment of the present invention can realize the precise positioning of the positioning target between multiple floors, and can accurately display the height information of the positioning target, thereby solving the problem of inaccurate positioning of height information such as floors by traditional indoor positioning technology. It should be noted that the positioning coordinate points given in the embodiment of the present invention are absolute coordinates relative to the interior of the building; in other words, the positioning coordinate points are used to identify and record the position of the positioning target in the indoor environment. Taking into account the application scenarios of indoor positioning, which are usually within a closed area, the focus of positioning is to identify the existence of objects and their movement trajectory, without requiring specific longitude and latitude information; based on this, there is no need to further load these positioning coordinates into the network map, nor is there a need to use them in conjunction with GPS, and it can be applied to various indoor positioning application scenarios.
[0073] In an optional embodiment, after obtaining the positioning coordinate point of the positioning target, the method further includes:
[0074] The positioning coordinate points are mapped to the 3D positioning space model and displayed in the form of a virtual character.
[0075] See also Figure 3 , is a flow chart of another embodiment of the indoor positioning method based on 3D rendering provided by the present invention. Figure 3 3D visualization maps the positioning coordinates of the positioning target to a 3D positioning space model and displays the positioning target as a virtual character within the model. Various 3D graphics libraries and rendering technologies can be used to achieve 3D visualization and display the movement trajectory of the positioning target.
[0076] In an optional embodiment, the step S3 of calibrating the virtual camera so as to synchronize the virtual camera with the real camera includes:
[0077] Adjust the built-in parameters and external parameters of the virtual camera so that the views of the virtual camera and the real camera are exactly the same; wherein the built-in parameters include: focal length, principal point and distortion coefficient; the external parameters include the position coordinates and deflection angle of the virtual camera.
[0078] Specifically, the virtual camera's built-in parameters are the camera's internal imaging characteristics, including focal length, principal point, and distortion coefficient. External parameters are the camera's position coordinates and deflection angle / direction parameters in the building's absolute coordinate system.
[0079] In an optional embodiment, the positioning target is determined by the following steps:
[0080] Based on a deep learning algorithm, objects in the image captured by the real camera are detected to identify the positioning target; wherein the deep learning algorithm is at least any one of a convolutional neural network, a YOLO detection algorithm, and a DETR detection algorithm.
[0081] Specifically, any target detection algorithm among deep learning algorithms such as convolutional neural networks, YOLO detection algorithm, DETR detection algorithm, etc. can be used to detect and identify positioning targets (such as pedestrians) in real surveillance video images.
[0082] In summary, the indoor positioning method based on 3D rendering provided by the embodiment of the present invention, based on an accurate 3D model and a virtual camera (that is, the ratio of the 3D positioning space model to the real positioning space is 1:1, and the view of the virtual camera completely matches that of the real camera), obtains real two-dimensional coordinate points by performing image recognition on the local 2D picture taken by the real camera; then, based on the 2D to 3D rendering, the photographed positioning target (real two-dimensional coordinate point) is mapped to the preset 3D modeling; finally, the absolute coordinate point of the positioning target relative to the entire building is obtained in the 3D model to achieve high-precision indoor positioning. This method not only achieves high-precision indoor positioning, but also does not rely on the 3D visualization display of an external high-precision map, making the positioning results intuitive and easy to understand. Compared with traditional positioning methods, since the final positioning coordinate point of the positioning target is the absolute coordinate within the building, the embodiment of the present invention can accurately achieve positioning between floors; and only a single camera is used to estimate the position of people or objects in the indoor environment, which greatly reduces the number of deployed devices and is suitable for most usage scenarios required for indoor positioning.
[0083] In addition, the embodiments of the present invention have the following advantages:
[0084] (1) Simplicity and ease of use: For small spaces or temporary application scenarios, single-camera positioning is more flexible, avoiding complex wiring or infrastructure modifications, and making installation and maintenance easier.
[0085] (2) Non-intrusiveness and security: In application scenarios where privacy protection or interference avoidance is required, such as hospitals, nursing homes, or museums, the embodiment of the present invention uses only a single camera device, which can effectively reduce the intrusion into the environment while ensuring data security.
[0086] (3) Flexibility and scalability: The embodiments of the present invention can be easily expanded to cover larger areas as needed by simply adding additional cameras. The camera installation position and angle can be flexibly adjusted to cover a wider area or specific points of interest. With the development of image recognition and deep learning technologies, the accuracy and robustness of single-camera positioning are constantly improving, which can meet the needs of more diverse applications.
[0087] (4) Information richness and versatility: In addition to providing positioning information, the camera can also extract other information from the image, such as the person’s posture, movement, and direction. This additional information makes the system more powerful and can be applied to more scenarios.
[0088] See also Figure 4 , is a structural diagram of an embodiment of an indoor positioning system based on 3D rendering provided by the present invention.
[0089] A second aspect of the present invention provides an indoor positioning system based on 3D rendering, which is used to implement the indoor positioning method based on 3D rendering described in any embodiment of the first aspect. The system includes:
[0090] The positioning space coordinate setting module 11 is used to determine the absolute coordinate interval of the real positioning space based on the coordinate system of the target building;
[0091] The 3D positioning space model building module 12 is used to build a 3D positioning space model according to the real positioning space at a 1:1 ratio; wherein the real positioning space is equipped with a real camera; and the 3D positioning space model is equipped with a virtual camera at the mapping position of the real camera;
[0092] A virtual camera calibration module 13 is used to calibrate the virtual camera so that the virtual camera is synchronized with the real camera;
[0093] A two-dimensional coordinate mapping module 14 is configured to map the real two-dimensional coordinates of the positioning target in the real camera to the virtual image generated by the virtual camera in real time when the positioning target appears in the real positioning space, thereby obtaining a virtual two-dimensional coordinate point;
[0094] A reference object generation module 15 is configured to generate a reference object in the 3D positioning space model; wherein the reference object is used to track the virtual two-dimensional coordinate point in the virtual image;
[0095] The positioning coordinate point acquisition module 16 is configured to obtain the positioning coordinate point of the positioning target according to the updated position coordinates of the reference object in the 3D positioning space model.
[0096] Optionally, the positioning coordinate point acquisition module 16 includes:
[0097] a position distance calculation unit, configured to calculate the position distance between the reference object and the virtual two-dimensional coordinate point in the virtual image;
[0098] a reference object moving unit, configured to move the reference object so that the updated position distance is less than the preset positioning accuracy coefficient when the position distance is greater than the preset positioning accuracy coefficient;
[0099] a reference object position recording unit, configured to record the relative coordinates of the reference object after each position update in the 3D positioning space model;
[0100] The relative coordinate mapping unit is used to map the relative coordinates into the absolute coordinate interval to obtain the positioning coordinate point of the positioning target.
[0101] Optionally, the relative coordinate mapping unit includes:
[0102] an origin absolute coordinate determining unit, configured to determine, based on the absolute coordinate interval, the absolute coordinates corresponding to the origin in the relative coordinate system of the real positioning space;
[0103] The positioning coordinate point calculation unit is used to add the relative coordinates to the absolute coordinates to obtain the positioning coordinate point of the positioning target.
[0104] Optionally, after obtaining the positioning coordinate point of the positioning target, the method further includes:
[0105] The 3D visualization module is used to map the positioning coordinate points into the 3D positioning space model and display them in the form of virtual characters.
[0106] Optionally, the virtual camera calibration module 13 includes:
[0107] A parameter adjustment unit is used to adjust the built-in parameters and external parameters of the virtual camera so that the views of the virtual camera and the real camera are exactly the same; wherein the built-in parameters include: focal length, principal point and distortion coefficient; the external parameters include the position coordinates and deflection angle of the virtual camera.
[0108] Optionally, the positioning target in the two-dimensional coordinate mapping module 14 is determined by the following steps:
[0109] Based on a deep learning algorithm, objects in the image captured by the real camera are detected to identify the positioning target; wherein the deep learning algorithm is at least any one of a convolutional neural network, a YOLO detection algorithm, and a DETR detection algorithm.
[0110] It should be noted that the indoor positioning system based on 3D rendering provided in the embodiment of the second aspect of the present invention can realize all the processes of the indoor positioning method based on 3D rendering described in any embodiment of the first aspect above. The functions of each module and unit in the system and the technical effects achieved are respectively the same as the functions and technical effects achieved by the indoor positioning method based on 3D rendering described in the embodiment of the first aspect above, and will not be repeated here.
[0111] An embodiment of the third aspect of the present invention provides a computer-readable storage medium, which includes a stored computer program; wherein, when the computer program is running, it controls the device where the computer-readable storage medium is located to execute the indoor positioning method based on 3D rendering as described in any embodiment of the first aspect above.
[0112] An embodiment of the fourth aspect of the present invention provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the indoor positioning method based on 3D rendering described in any embodiment of the first aspect above.
[0113] See also Figure 5 , is a structural diagram of an embodiment of an electronic device provided by the present invention.
[0114] An embodiment of the fifth aspect of the present invention also provides an electronic device, including a processor 21, a memory 22, and a computer program stored in the memory 22 and configured to be executed by the processor 21. When executing the computer program, the processor 21 implements the indoor positioning method based on 3D rendering described in any embodiment of the first aspect above.
[0115] Preferably, the computer program can be divided into one or more modules / units (e.g., computer program 1, computer program 2, ...), which are stored in the memory 22 and executed by the processor 21 to implement the present invention. The one or more modules / units can be a series of computer program instruction segments that can implement specific functions, and the instruction segments are used to describe the execution process of the computer program in the electronic device.
[0116] The processor 21 can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor, or the processor 21 can be any conventional processor. The processor 21 is the control center of the electronic device, and uses various interfaces and lines to connect various parts of the electronic device.
[0117] The memory 22 mainly includes a program storage area and a data storage area. The program storage area can store an operating system, at least one application required for a function, and the data storage area can store related data. In addition, the memory 22 can be a high-speed random access memory or a non-volatile memory, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, and a flash card. Alternatively, the memory 22 can be other volatile solid-state memory devices.
[0118] It should be noted that the above electronic device may include, but is not limited to, a processor and a memory. Those skilled in the art will understand that Figure 5 The structural diagram shown is only an example of the structure of the above-mentioned electronic device and does not constitute a structural limitation of the above-mentioned electronic device. The above-mentioned electronic device may include more or fewer components than shown in the figure, or combine certain components, or different components.
[0119] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. An indoor positioning method based on 3D rendering, characterized in that: include: Based on the coordinate system of the target building, determine the absolute coordinate interval of the real positioning space; According to the real positioning space, a 3D positioning space model is established at a 1:1 ratio; wherein a real camera is installed in the real positioning space; and a virtual camera is arranged at the mapping position of the real camera in the 3D positioning space model; Calibrate the virtual camera so that the virtual camera is synchronized with the real camera; When a positioning target appears in the real positioning space, the real two-dimensional coordinates of the positioning target in the real camera are mapped in real time to the virtual picture generated by the virtual camera to obtain a virtual two-dimensional coordinate point; Generating a reference object in the 3D positioning space model; wherein the reference object is used to track the virtual two-dimensional coordinate point in the virtual picture; The positioning coordinate point of the positioning target is obtained according to the updated position coordinates of the reference object after movement in the 3D positioning space model.
2. The indoor positioning method based on 3D rendering as described in claim 1, characterized in that: The step of obtaining the positioning coordinate point of the positioning target according to the updated position coordinate of the reference object in the 3D positioning space model comprises: Calculating the position distance between the reference object and the virtual two-dimensional coordinate point in the virtual picture; When the position distance is greater than a preset positioning accuracy coefficient, moving the reference object so that the updated position distance is less than the preset positioning accuracy coefficient; Recording the relative coordinates of the reference object after each position update in the 3D positioning space model; The relative coordinates are mapped into the absolute coordinate interval to obtain the positioning coordinate point of the positioning target.
3. The indoor positioning method based on 3D rendering as described in claim 2, characterized in that: Mapping the relative coordinates to the absolute coordinate interval to obtain the positioning coordinate point of the positioning target includes: Based on the absolute coordinate interval, determining the absolute coordinates corresponding to the origin in the relative coordinate system of the real positioning space; The relative coordinates are added to the absolute coordinates to obtain the positioning coordinate point of the positioning target.
4. The indoor positioning method based on 3D rendering as described in claim 1, characterized in that: After obtaining the positioning coordinate point of the positioning target, the method further includes: The positioning coordinate points are mapped to the 3D positioning space model and displayed in the form of a virtual character.
5. The indoor positioning method based on 3D rendering as described in claim 1, characterized in that: The calibrating the virtual camera so that the virtual camera is synchronized with the real camera includes: Adjust the built-in parameters and external parameters of the virtual camera so that the views of the virtual camera and the real camera are exactly the same; wherein the built-in parameters include: focal length, principal point and distortion coefficient; the external parameters include the position coordinates and deflection angle of the virtual camera.
6. The indoor positioning method based on 3D rendering as described in claim 1, characterized in that: The positioning target is determined by the following steps: Based on a deep learning algorithm, objects in the image taken by the real camera are detected to identify the positioning target; wherein the deep learning algorithm is at least any one of a convolutional neural network, a YOLO detection algorithm, and a DETR detection algorithm.
7. An indoor positioning system based on 3D rendering, characterized in that: include: A positioning space coordinate setting module is used to determine the absolute coordinate interval of the real positioning space based on the coordinate system of the target building; A 3D positioning space model building module is used to build a 3D positioning space model according to the real positioning space at a 1:1 ratio; wherein the real positioning space is equipped with a real camera; and the 3D positioning space model is provided with a virtual camera at the mapping position of the real camera; A virtual camera calibration module, used to calibrate the virtual camera so that the virtual camera is synchronized with the real camera; A two-dimensional coordinate mapping module is used to map the real two-dimensional coordinates of the positioning target in the real camera to the virtual picture generated by the virtual camera in real time when the positioning target appears in the real positioning space, so as to obtain a virtual two-dimensional coordinate point; A reference object generation module, used to generate a reference object in the 3D positioning space model; wherein the reference object is used to track the virtual two-dimensional coordinate point in the virtual picture; The positioning coordinate point acquisition module is used to obtain the positioning coordinate point of the positioning target according to the updated position coordinates of the reference object in the 3D positioning space model.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program; wherein, when the computer program is run, it controls the device where the computer-readable storage medium is located to execute the indoor positioning method based on 3D rendering as described in any one of claims 1 to 6.
9. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the indoor positioning method based on 3D rendering described in any one of claims 1 to 6 is implemented.
10. An electronic device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the indoor positioning method based on 3D rendering as claimed in any one of claims 1 to 6 when executing the computer program.
