Indoor positioning method and device, medium and electronic equipment
Through the combination of similarity algorithm and structured light equipment, the problem of low efficiency in indoor AR scene positioning is solved, more accurate and real-time indoor positioning is achieved, and the user experience is improved.
Patent Information
- Application Number
- CN202410783824.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-17
- Publication Date
- 2024-10-11
AI Technical Summary
The indoor environment lacks the accuracy support of the global satellite positioning system, resulting in inefficient positioning of indoor AR scenes, and it is easy to make judgment errors due to multipath effects and signal obstruction.
A similarity algorithm is used to compare videos collected in indoor scenes, depth data is obtained through structured light equipment, and feature points are marked for comparison to improve positioning accuracy and real-time performance.
It improves the accuracy and real-time performance of indoor scene positioning, optimizes the user experience in the field of augmented reality, and enhances the reliability and efficiency of positioning.
Smart Images

Figure CN118758306A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure belongs to the field of augmented reality technology, and in particular, relates to an indoor positioning method, an indoor positioning device, a non-temporary computer-readable storage medium, and an electronic device. Background Art
[0002] With the rise of the concept of the metaverse, people's demand for augmented reality (AR) technology is increasing. Among them, small-scale AR scene positioning has become a key task in the field of technology, especially in closed spaces such as indoors and shopping malls. In terms of technology, the indoor environment lacks the accuracy support of the Global Positioning System (GPS) compared to the outdoor environment, so it is necessary to rely on a variety of sensors and technologies to achieve positioning. However, the structure of indoor scenes is complex, usually involving obstacles, floors of different heights, lighting changes and other factors, which puts higher requirements on AR scene positioning algorithms. At the same time, indoor scene positioning needs to deal with problems such as multipath effects and signal shielding, which are more significant in closed environments.
[0003] Usually, the location of the device is determined by comparing the image captured by the AR device with the images in the known database. However, this positioning method is very inefficient and is prone to misjudgment when there are few feature points in the image. Summary of the invention
[0004] In order to overcome the problems existing in the related art, the present disclosure provides an indoor positioning method, an indoor positioning device, a non-transitory computer-readable storage medium and an electronic device.
[0005] According to a first aspect of an embodiment of the present disclosure, there is provided an indoor positioning method, the method comprising:
[0006] Sampling the indoor scene to obtain a corresponding first video, and obtaining a second video of the current scene;
[0007] Comparing the first video and the second video using a similarity algorithm to obtain a first comparison result;
[0008] The indoor scene in which the current scene is located is determined according to the first comparison result.
[0009] Optionally, sampling the indoor scene to obtain the corresponding first video includes:
[0010] The indoor scene is sampled using a structured light device to obtain a corresponding first video.
[0011] Optionally, determining the indoor scene in which the current scene is located according to the first comparison result includes:
[0012] Based on the first comparison result, sampling the indoor scene to obtain first depth data in the first video;
[0013] Acquire second depth data in the second video, and calculate the first depth data and the second depth data to obtain a first calculation result;
[0014] The indoor scene in which the current scene is located is determined according to the first calculation result.
[0015] Optionally, sampling the indoor scene to obtain first depth data in the first video includes:
[0016] The indoor scene is sampled using the structured light device to obtain first depth data in the first video.
[0017] Optionally, the indoor scene includes: a target object;
[0018] After acquiring the second video of the current scene, the method further includes:
[0019] Marking the target object to obtain a first feature point;
[0020] Comparing the first feature point and the second feature point using a similarity algorithm to obtain a second comparison result, wherein the second video includes the second feature point;
[0021] The indoor scene in which the current scene is located is determined according to the second comparison result.
[0022] Optionally, determining the indoor scene in which the current scene is located according to the second comparison result includes:
[0023] Based on the second comparison result, sampling the indoor scene to obtain first depth data in the first video;
[0024] Acquire second depth data in the second video, and calculate the first depth data and the second depth data to obtain a second calculation result;
[0025] The indoor scene in which the current scene is located is determined according to the second calculation result.
[0026] Optionally, the similarity algorithm includes: a structural similarity algorithm.
[0027] According to a second aspect of an embodiment of the present disclosure, there is provided an indoor positioning device, comprising:
[0028] A video sampling module is configured to sample an indoor scene to obtain a corresponding first video and obtain a second video of the current scene;
[0029] a video comparison module, configured to compare the first video and the second video using a similarity algorithm to obtain a first comparison result;
[0030] The scene positioning module is configured to determine the indoor scene where the current scene is located according to the first comparison result.
[0031] Optionally, the video sampling module is configured as follows:
[0032] The indoor scene is sampled using a structured light device to obtain a corresponding first video.
[0033] Optionally, the scene positioning module is configured to:
[0034] Based on the first comparison result, sampling the indoor scene to obtain first depth data in the first video;
[0035] Acquire second depth data in the second video, and calculate the first depth data and the second depth data to obtain a first calculation result;
[0036] The indoor scene in which the current scene is located is determined according to the first calculation result.
[0037] Optionally, the scene positioning module is configured to:
[0038] The indoor scene is sampled using the structured light device to obtain first depth data in the first video.
[0039] Optionally, the indoor scene includes: a target object;
[0040] The indoor positioning device is further configured as follows:
[0041] Marking the target object to obtain a first feature point;
[0042] Comparing the first feature point and the second feature point using a similarity algorithm to obtain a second comparison result, wherein the second video includes the second feature point;
[0043] The indoor scene in which the current scene is located is determined according to the second comparison result.
[0044] Optionally, the indoor positioning device is further configured to:
[0045] Based on the second comparison result, sampling the indoor scene to obtain first depth data in the first video;
[0046] Acquire second depth data in the second video, and calculate the first depth data and the second depth data to obtain a second calculation result;
[0047] The indoor scene in which the current scene is located is determined according to the second calculation result.
[0048] Optionally, the similarity algorithm includes: a structural similarity algorithm.
[0049] According to a third aspect of an embodiment of the present disclosure, there is provided a non-temporary computer-readable storage medium on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of any one of the methods described in the first aspect of the present disclosure are implemented.
[0050] According to a fourth aspect of an embodiment of the present disclosure, there is provided an electronic device, including:
[0051] processor;
[0052] a memory for storing processor-executable instructions;
[0053] The processor is configured to: execute the executable instructions to implement the steps of any one of the methods described in the first aspect of the present disclosure.
[0054] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0055] In the method and device provided by the exemplary embodiment of the present disclosure, a similarity algorithm is used to compare the first video and the second video to determine the first comparison result, which can accurately capture the details of the indoor scene and the current scene, improve the efficiency and accuracy of video comparison, and provide a data basis and theoretical support for more refined scene judgment. Furthermore, the indoor scene where the current scene is located is determined based on the first comparison result, which improves the real-time and reliability of indoor scene positioning, and also improves the user experience in the fields of augmented reality, and to a certain extent, improves the user's return rate.
[0056] Other features and advantages of the present disclosure will be described in detail in the following detailed description.
[0057] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] The accompanying drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the following specific embodiments, they are used to explain the present disclosure but do not constitute a limitation of the present disclosure. In the accompanying drawings:
[0059] Figure 1 A schematic diagram of a process flow of an indoor positioning method in an exemplary embodiment of the present disclosure is schematically shown;
[0060] Figure 2 A schematic flow chart of a method for determining an indoor scene in which a current scene is located in an exemplary embodiment of the present disclosure is schematically shown;
[0061] Figure 3 A schematic diagram of a process of another method for determining an indoor scene in which a current scene is located in an exemplary embodiment of the present disclosure is schematically shown;
[0062] Figure 4 A schematic diagram of a process for further determining the indoor scene in which the current scene is located in an exemplary embodiment of the present disclosure is schematically shown;
[0063] Figure 5 The structure diagram of the indoor positioning system in the application scenario of the exemplary embodiment of the present disclosure is schematically shown;
[0064] Figure 6 The schematic diagram schematically shows the stages of the indoor positioning method in the application scenario of the exemplary embodiment of the present disclosure;
[0065] Figure 7 The flowchart of the indoor positioning method in the application scenario of the exemplary embodiment of the present disclosure is schematically shown;
[0066] Figure 8 A schematic diagram of the structure of an indoor positioning device in an exemplary embodiment of the present disclosure is schematically shown;
[0067] Fig. 9 An electronic device for implementing an indoor positioning method in an exemplary embodiment of the present disclosure is schematically shown;
[0068] Fig.10 Another electronic device for implementing an indoor positioning method in an exemplary embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0069] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0070] It should be noted that all actions of acquiring signals, information or data in the present disclosure are carried out in compliance with the relevant data protection laws and policies of the country where the device is located and with the authorization given by the owner of the corresponding device.
[0071] With the rise of the concept of the metaverse, people's demand for augmented reality technology is increasing.
[0072] The metaverse is defined as a complex of the virtual world and the real world, providing users with a more immersive and interactive experience.
[0073] Against this backdrop, small-scale AR scene positioning has become a key task in the technology field, especially in indoor enclosed spaces such as shopping malls.
[0074] In terms of technology, small-scale AR scene positioning faces multiple challenges.
[0075] First, compared with outdoor environments, indoor environments lack the precision support of global satellite positioning systems, so they need to rely on other sensors and technologies to achieve positioning. Sensors such as gyroscopes, accelerometers, and magnetometers play a key role in improving the accuracy and stability of positioning by fusing the data of these sensors.
[0076] Secondly, the structure of indoor scenes is complex, usually involving obstacles, floors of different heights, lighting changes and other factors, which puts higher requirements on AR scene positioning algorithms. At the same time, indoor scene positioning needs to deal with problems such as multipath effects and signal shielding, which are more significant in closed environments.
[0077] Usually, the location of the device is determined by comparing the image captured by the AR device with the images in the known database. However, this positioning method is very inefficient and is prone to misjudgment when there are few feature points in the image.
[0078] The present invention provides an indoor positioning method. Figure 1 is a flow chart of an indoor positioning method according to an exemplary embodiment. Figure 1 As shown, the method may at least include the following steps:
[0079] Step S110: Sample the indoor scene to obtain a corresponding first video, and obtain a second video of the current scene.
[0080] Step S120: Using a similarity algorithm to compare the first video and the second video to obtain a first comparison result.
[0081] Step S130: Determine the indoor scene where the current scene is located according to the first comparison result.
[0082] In the exemplary embodiment of the present disclosure, the first video and the second video are compared using a similarity algorithm to determine the first comparison result, which can accurately capture the details of the indoor scene and the current scene, improve the efficiency and accuracy of video comparison, and provide a data basis and theoretical support for more refined scene judgment. Furthermore, the indoor scene where the current scene is located is determined based on the first comparison result, which improves the real-time and reliability of indoor scene positioning, and also optimizes the user experience in the fields of augmented reality, and to a certain extent improves the user's return rate.
[0083] The following describes in detail the various steps of the indoor positioning method.
[0084] In step S110, the indoor scene is sampled to obtain a corresponding first video, and a second video of the current scene is obtained.
[0085] In the exemplary embodiments of the present disclosure, the indoor scene may be any one or more target scenes, and the exemplary embodiments do not specifically limit this.
[0086] In an optional embodiment, a structured light device is used to sample an indoor scene to obtain a corresponding first video.
[0087] Among them, structured light is a system structure composed of a projector and a camera. After the structured light device emits a structured light beam to the surface of the object and the background, it is collected by the camera in the structured light device. The shape, surface texture and spatial position of the object are calculated based on the changes in the light signal caused by the object, and then the entire three-dimensional space is restored to obtain the first video.
[0088] Therefore, when the first video is captured using the structured light device, the details of the indoor scene can be accurately captured, and the camera is used to record the information after the light beam is reflected, so that rich data can be obtained in the indoor scene.
[0089] After the AR software is running, the camera stream data acquired by the AR device in real time in the current scene can be transmitted to the cloud or the detection device for processing as the second video.
[0090] In step S120, the first video and the second video are compared using a similarity algorithm to obtain a first comparison result.
[0091] In an exemplary embodiment of the present disclosure, after the first video and the second video are acquired, a similarity algorithm may be used to compare the first video and the second video to obtain a first comparison result.
[0092] In an optional embodiment, the similarity algorithm includes: a structural similarity algorithm.
[0093] The structural similarity algorithm may be a SSIM (Structural Similarity) algorithm or other algorithms, which is not particularly limited in this exemplary embodiment.
[0094] The SSIM algorithm is an indicator for measuring the similarity between two images. It was proposed by the Laboratory for Image and Video Engineering at the University of Texas at Austin. The SSIM algorithm is mainly used to detect the similarity between two images of the same size, or to detect the degree of distortion of an image. In the original paper, the SSIM algorithm mainly compares the brightness (one is an uncompressed, distortion-free image, and the other is a distorted image), contrast, and structure of two images, and then weights these three factors and expresses them as a product.
[0095] In step S130, the indoor scene in which the current scene is located is determined according to the first comparison result.
[0096] In an exemplary embodiment of the present disclosure, after obtaining the first comparison result, the indoor scene in which the current scene is located can be determined according to the first comparison result.
[0097] In an alternative embodiment, Figure 2 A flow chart of a method for determining the indoor scene where the current scene is located is shown, such as Figure 2 As shown, the method may at least include the following steps: In step S210, based on the first comparison result, the indoor scene is sampled to obtain first depth data in the first video.
[0098] When the first comparison result is that the second video is identical to one or more videos in the first video, or when the first comparison result is not obtained, the indoor scene may be further sampled to obtain the first depth data in the first video.
[0099] In an optional embodiment, a structured light device is used to sample an indoor scene to obtain first depth data in the first video.
[0100] In addition to using the structured light device to sample the indoor scene to obtain the first video, the structured light device may also be used to sample to obtain first depth data in the first video.
[0101] The first depth data is used to characterize the environmental depth condition of the indoor scene where the first video is located.
[0102] Furthermore, in order to facilitate developers to view or other needs, the first depth data can also be converted into an image to obtain a corresponding depth map. The environmental depth map refers to a visual representation of depth data at different locations in an indoor scene. The depth map can provide three-dimensional information of the indoor scene, including the distance between objects, relative positions, and overall spatial structure.
[0103] By analyzing the first depth data or the depth map, the indoor scene can be understood more accurately, and an important reference can be provided for subsequent processing and application.
[0104] In step S220, second depth data in the second video is acquired, and the first depth data and the second depth data are calculated to obtain a first calculation result.
[0105] After the AR software is running, it is possible to detect whether the hardware structure of the AR device supports the function of acquiring depth data.
[0106] When the AR device has a depth sensor, for example, a ToF (Time of flight) sensor or a depth camera, it is considered that the AR device supports the collection of depth data, and therefore, the second depth data in the second video can also be acquired.
[0107] Further, when the first comparison result is that the second video is identical to one or more videos in the first video, subtraction or other calculations may be performed on the multiple second depth data corresponding to the second video and the first depth data in the first video to obtain the first calculation result.
[0108] When the first comparison result is not obtained, the first depth data in the first video and the second depth data of all the second videos may be subtracted or calculated in other ways to obtain a first calculation result.
[0109] In step S230, the indoor scene in which the current scene is located is determined according to the first calculation result.
[0110] When there are multiple first calculation results of the first depth data and the second depth data, the first calculation results may be compared to determine the indoor scene represented by the first video corresponding to the smallest first calculation result as the indoor scene where the current scene is located.
[0111] When there is a first calculation result of the first depth data and the second depth data, when the first calculation result meets a preset condition, for example, when the first calculation result is less than a preset threshold, the indoor scene corresponding to the first calculation result is determined to be the indoor scene where the current scene is located.
[0112] In addition, the indoor scene in which the current scene is located can be determined by using objects in the indoor scene.
[0113] In an optional embodiment, the indoor scene includes: a target object; Figure 3 A flow chart of another method for determining the indoor scene where the current scene is located is shown. Figure 3 As shown, the method may at least include the following steps: In step S310, the target object is marked to obtain a first feature point.
[0114] The target object may be an object at a fixed position in an indoor scene, or may be other objects with special characteristics, etc., and this exemplary embodiment does not specifically limit this.
[0115] Marking the visual feature points of the target object can help identify the key elements in the indoor scene, so as to better understand the structure and composition of the indoor scene. By cleverly combining image recognition and feature point marking technology, more refined scene judgment is achieved, providing users with highly reliable indoor positioning services.
[0116] In step S320, the first feature point and the second feature point are compared using a similarity algorithm to obtain a second comparison result, and the second video includes the second feature point.
[0117] After the first feature point and the second feature point are acquired, a similarity algorithm may be used to compare the first feature point and the second feature point to obtain a second comparison result.
[0118] The similarity algorithm may also be a structural similarity algorithm, such as a SSIM algorithm, etc., which is not particularly limited in this exemplary embodiment.
[0119] In step S330, the indoor scene in which the current scene is located is determined according to the second comparison result.
[0120] In an alternative embodiment, Figure 4 A flow chart of a method for further determining the indoor scene where the current scene is located is shown, such as Figure 4 As shown, the method may at least include the following steps: In step S410, based on the second comparison result, the indoor scene is sampled to obtain first depth data in the first video.
[0121] When the second comparison result is that the second feature point is the same as the first feature point of the target object in the multiple first videos, or when the second comparison result is not obtained, the indoor scene can be further sampled to obtain the first depth data in the first video.
[0122] Generally, a structured light device may be used to sample an indoor scene to obtain first depth data in the first video.
[0123] The first depth data is used to characterize the environmental depth situation in the indoor scene where the first video is located.
[0124] Furthermore, in order to facilitate developers to view or other needs, the first depth data can also be converted into an image to obtain a corresponding depth map. The environmental depth map refers to a visual representation of depth data at different locations in an indoor scene. The depth map can provide three-dimensional information of the indoor scene, including the distance between objects, relative positions, and overall spatial structure.
[0125] By analyzing the first depth data or the depth map, the indoor scene can be understood more accurately, and an important reference can be provided for subsequent processing and application.
[0126] In step S420, second depth data in the second video is acquired, and the first depth data and the second depth data are calculated to obtain a second calculation result.
[0127] After the AR software is running, it is possible to detect whether the hardware structure of the AR device supports the function of acquiring depth data.
[0128] When the AR device has a depth sensor, such as a ToF sensor or a depth camera, it is considered that the AR device supports the collection of depth data, and therefore, the second depth data in the second video can also be acquired.
[0129] Furthermore, when the second comparison result is that the second feature point is the same as the first feature point of the target object in multiple first videos, the multiple second depth data corresponding to the second video and the first depth data in the first video can be subtracted or otherwise calculated to obtain a second calculation result.
[0130] When the second comparison result is not obtained, the first depth data in the first video and the second depth data of all the second videos may be subtracted or calculated in other ways to obtain a second calculation result.
[0131] In step S430, the indoor scene in which the current scene is located is determined according to the second calculation result.
[0132] When there are multiple second calculation results of the first depth data and the second depth data, the second calculation results may be compared to determine the indoor scene represented by the first video corresponding to the smallest second calculation result as the indoor scene where the current scene is located.
[0133] When there is a second calculation result of the first depth data and the second depth data, when the second calculation result meets a preset condition, for example, when the second calculation result is less than a preset threshold, the indoor scene corresponding to the second calculation result is determined to be the indoor scene where the current scene is located.
[0134] After determining the indoor scene in which the current scene is located, the information can also be returned to the AR device.
[0135] The indoor positioning method in the embodiment of the present disclosure is described in detail below in conjunction with an application scenario.
[0136] Figure 5 The schematic diagram of the structure of the indoor positioning system in the application scenario is shown in FIG. Figure 5 As shown, the system may include: an environment sampling data storage unit 510, a data receiving unit 520, a data comparison unit 530 and a result returning unit 540.
[0137] The environment sampling data storage unit 510 will store the pre-sampled data when initializing the indoor positioning system, and can replace the new sampled data by updating.
[0138] The data receiving unit 520 will split the data upon receiving the data, and transmit the camera stream data and the depth data separately to the data comparing unit 530 .
[0139] The data comparison unit 530 provides two input ports and one output port for receiving the camera stream data and the depth data at the same time. Furthermore, after the comparison, the result will be transmitted to the result return unit 540 through the output port.
[0140] Figure 6 A schematic diagram of the stages of the indoor positioning method in the application scenario is shown, such as Figure 6 As shown, in step S610, device information is obtained.
[0141] In step S620, the device information is basically verified.
[0142] In order to improve the comparison speed and accuracy while reducing the performance loss of the comparison algorithm, a series of basic information judgment measures are taken when the device starts up, including detecting whether the hardware supports the deep data acquisition function.
[0143] Therefore, the basic check of the device information can be to detect whether the hardware structure of the AR device supports depth data.
[0144] Generally, when an AR device has a depth sensor, such as a ToF sensor or a depth camera, it is considered that the AR device supports the collection of depth data.
[0145] In step S630, SSIM comparison is performed.
[0146] Specifically, the SSIM structured comparison algorithm is used to process the device camera stream, which greatly improves the comparison speed. At the same time, previously marked visual feature points are also used for comparison to further improve positioning accuracy.
[0147] In step S640, depth information is compared.
[0148] When the device has depth information, the depth data will also be compared to obtain the final position.
[0149] The design of this process fully considers the balance between comparison speed, accuracy and performance loss, thereby ensuring that the system can run stably and efficiently in various environments and provide users with a seamless augmented reality experience.
[0150] In step S650, the location information is returned.
[0151] Figure 7 A schematic diagram of the process of indoor positioning method in an application scenario is shown, such as Figure 7 As shown, in step S710, a structured light projection device and a camera are used to pre-sample data of the scene, and visual feature points and an environment depth map are marked.
[0152] Use structured light projection equipment and cameras to sample scene data and mark visual feature points and environmental depth maps.
[0153] Structured light projection devices can accurately capture the details of a scene by emitting structured light beams, while cameras are used to record the information after these light beams are reflected.
[0154] This technology can obtain rich data in the scene, including the shape, surface texture and spatial position of objects. At the same time, marking visual feature points can help identify key elements in the scene, thereby better understanding the structure and composition of the scene.
[0155] The environmental depth map refers to the visual representation of the depth information at different locations in the scene. The depth data of each location in the scene can be obtained through structured light projection equipment and cameras, and converted into an image form to form a depth map. These depth maps can provide three-dimensional information of the scene, including the distance between objects, relative positions, and the overall spatial structure.
[0156] In step S720, after the AR software is running, it is first determined whether the hardware device supports the acquisition of depth data, and then the device camera stream data is transmitted to the cloud or the detection device.
[0157] After the AR software is running, the device camera stream data is transmitted to the cloud or detection device for processing. The system will first detect whether the hardware device supports the depth data acquisition function; if it does, it will also transmit the depth data to the cloud or detection device.
[0158] This process ensures that when adapting to devices that support depth perception, the depth information provided by them can be fully utilized to achieve a more accurate augmented reality experience.
[0159] In step S730, the camera stream data is subjected to a (SSIM) comparison algorithm, and the position of the current user in the scene is found using pre-marked visual feature points, and verified using depth data.
[0160] The camera stream data is processed using a structural similarity algorithm.
[0161] First, the system uses pre-marked visual feature points to accurately locate the current user's position in the scene. Then, the position is verified through depth data to ensure the accuracy and reliability of positioning.
[0162] This process combines the positioning of visual feature points and the verification of depth data to provide more stable and accurate positioning services for augmented reality applications.
[0163] In step S740, after successfully determining the location of the user, the user's most recent location data and the device's posture data are continuously returned to the device.
[0164] Once the user's location is successfully determined, the system will continuously transmit the most recent location data and the device's current posture data to the device. This continuous data transmission ensures that the user can always accurately perceive the environment and device status in the application, thus providing a smoother and more coherent augmented reality experience.
[0165] Specifically, a structured light projection device and a camera are used to sample the target indoor scene in advance to obtain sampling data and save it. When the AR software is running, it can determine whether the device supports obtaining depth data, and then transmit the device's camera stream to the cloud for comparison with the sampling data.
[0166] It should be clear that only camera data can determine the current position of the device in the target indoor scene, and depth data can be used as an auxiliary to speed up the judgment. Finally, the successful positioning information is returned to the caller. Among them, the location information of the device obtained by the call is the relative position in the pre-sampled information.
[0167] In an exemplary embodiment of the present disclosure, a similarity algorithm is used to compare the first video and the second video to determine a first comparison result, which can accurately capture the details of the indoor scene and the current scene, improve the efficiency and accuracy of video comparison, and provide a data basis and theoretical support for more refined scene judgment. Furthermore, the indoor scene in which the current scene is located is determined based on the first comparison result, which improves the real-time and reliability of indoor scene positioning, optimizes the user experience in the field of augmented reality, and improves the user's return rate to a certain extent. Not only that, this method can also be widely used in fields such as navigation and recommendation systems, realizing the intelligent integration of virtual and real space.
[0168] In addition, in an exemplary embodiment of the present disclosure, an indoor positioning device is also provided. Figure 8 FIG. 4 shows a schematic diagram of the structure of an indoor positioning device. Figure 8 As shown, the indoor positioning device 800 may include: a video sampling module 810, a video comparison module 820 and a scene positioning module 830. Among them:
[0169] The video sampling module 810 is configured to sample the indoor scene to obtain a corresponding first video and obtain a second video of the current scene;
[0170] The video comparison module 820 is configured to compare the first video and the second video using a similarity algorithm to obtain a first comparison result;
[0171] The scene positioning module 830 is configured to determine the indoor scene where the current scene is located according to the first comparison result.
[0172] In an exemplary embodiment of the present invention, the video sampling module 810 is configured to:
[0173] The indoor scene is sampled using a structured light device to obtain a corresponding first video.
[0174] In an exemplary embodiment of the present invention, the scene positioning module 830 is configured to:
[0175] Based on the first comparison result, sampling the indoor scene to obtain first depth data in the first video;
[0176] Acquire second depth data in the second video, and calculate the first depth data and the second depth data to obtain a first calculation result;
[0177] The indoor scene in which the current scene is located is determined according to the first calculation result.
[0178] In an exemplary embodiment of the present invention, the scene positioning module 830 is configured to:
[0179] The indoor scene is sampled using the structured light device to obtain first depth data in the first video.
[0180] In an exemplary embodiment of the present invention, the indoor scene includes: a target object;
[0181] The indoor positioning device 800 is further configured as follows:
[0182] Marking the target object to obtain a first feature point;
[0183] Comparing the first feature point and the second feature point using a similarity algorithm to obtain a second comparison result, wherein the second video includes the second feature point;
[0184] The indoor scene in which the current scene is located is determined according to the second comparison result.
[0185] In an exemplary embodiment of the present invention, the indoor positioning device 800 is further configured as follows:
[0186] Based on the second comparison result, sampling the indoor scene to obtain first depth data in the first video;
[0187] Acquire second depth data in the second video, and calculate the first depth data and the second depth data to obtain a second calculation result;
[0188] The indoor scene in which the current scene is located is determined according to the second calculation result.
[0189] In an exemplary embodiment of the present invention, the similarity algorithm includes: a structural similarity algorithm.
[0190] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0191] Fig. 9 FIG. 9 is a block diagram of an electronic device 900 according to an exemplary embodiment. Fig. 9 As shown, the electronic device 900 may include: a processor 901 and a memory 902. The electronic device 900 may also include one or more of a multimedia component 903, an input / output (I / O) interface 904, and a communication component 905.
[0192] The processor 901 is used to control the overall operation of the electronic device 900 to complete all or part of the steps in the indoor positioning method described above. The memory 902 is used to store various types of data to support the operation of the electronic device 900, and these data may include, for example, instructions for any application or method used to operate on the electronic device 900, and application-related data, such as contact data, sent and received messages, pictures, audio, video, etc. The memory 902 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random Access Memory, referred to as SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, referred to as EEPROM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, referred to as EPROM), programmable read-only memory (Programmable Read-Only Memory, referred to as PROM), read-only memory (Read-Only Memory, referred to as ROM), magnetic memory, flash memory, disk or optical disk. The multimedia component 903 may include a screen and an audio component. The screen may be, for example, a touch screen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may be further stored in the memory 902 or sent through the communication component 905. The audio component also includes at least one speaker for outputting audio signals. The I / O interface 904 provides an interface between the processor 901 and other interface modules, and the other interface modules may be keyboards, mice, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 905 is used for wired or wireless communication between the electronic device 900 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IOT, eMTC, or other 5G, etc., or a combination of one or more of them, is not limited here. Therefore, the corresponding communication component 905 may include: Wi-Fi module, Bluetooth module, NFC module, etc.
[0193] In an exemplary embodiment, the electronic device 900 can be implemented by one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), controllers, microcontrollers, microprocessors or other electronic components to execute the above-mentioned indoor positioning method.
[0194] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, and when the program instructions are executed by a processor, the steps of the indoor positioning method described above are implemented. For example, the computer-readable storage medium may be the memory 902 including the program instructions, and the program instructions may be executed by the processor 901 of the electronic device 900 to complete the indoor positioning method described above.
[0195] Fig.10 1 is a block diagram of an electronic device 1000 according to an exemplary embodiment. For example, the electronic device 1000 may be provided as a server. Fig.10 The electronic device 1000 includes a processor 1022, which may be one or more, and a memory 1032 for storing a computer program executable by the processor 1022. The computer program stored in the memory 1032 may include one or more modules each corresponding to a set of instructions. In addition, the processor 1022 may be configured to execute the computer program to perform the indoor positioning method described above.
[0196] In addition, the electronic device 1000 may further include a power supply component 1026 and a communication component 1050, wherein the power supply component 1026 may be configured to perform power management of the electronic device 1000, and the communication component 1050 may be configured to implement communication, for example, wired or wireless communication, of the electronic device 1000. In addition, the electronic device 1000 may further include an input / output (I / O) interface 1058. The electronic device 1000 may operate based on an operating system stored in the memory 1032.
[0197] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, and when the program instructions are executed by the processor, the steps of the indoor positioning method described above are implemented. For example, the non-transitory computer-readable storage medium can be the memory 1032 including the program instructions, and the program instructions can be executed by the processor 1022 of the electronic device 1000 to complete the indoor positioning method described above.
[0198] In another exemplary embodiment, a computer program product is further provided. The computer program product includes a computer program that can be executed by a programmable device. The computer program has a code portion for executing the above-mentioned indoor positioning method when executed by the programmable device.
[0199] The preferred embodiments of the present disclosure are described in detail above in conjunction with the accompanying drawings; however, the present disclosure is not limited to the specific details in the above embodiments. Within the technical concept of the present disclosure, a variety of simple modifications can be made to the technical solution of the present disclosure, and these simple modifications all fall within the protection scope of the present disclosure.
[0200] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present disclosure will not further describe various possible combinations.
[0201] In addition, various embodiments of the present disclosure may be arbitrarily combined, and as long as they do not violate the concept of the present disclosure, they should also be regarded as the contents disclosed by the present disclosure.
Claims
1. An indoor positioning method, characterized in that: The method comprises: Sampling the indoor scene to obtain a corresponding first video, and obtaining a second video of the current scene; Comparing the first video and the second video using a similarity algorithm to obtain a first comparison result; The indoor scene in which the current scene is located is determined according to the first comparison result.
2. The indoor positioning method according to claim 1, characterized in that: The sampling of the indoor scene to obtain the corresponding first video includes: The indoor scene is sampled using a structured light device to obtain a corresponding first video.
3. The indoor positioning method according to claim 2, characterized in that: The determining the indoor scene in which the current scene is located according to the first comparison result includes: Based on the first comparison result, sampling the indoor scene to obtain first depth data in the first video; Acquire second depth data in the second video, and calculate the first depth data and the second depth data to obtain a first calculation result; The indoor scene in which the current scene is located is determined according to the first calculation result.
4. The indoor positioning method according to claim 3, characterized in that: The sampling of the indoor scene to obtain first depth data in the first video includes: The indoor scene is sampled using the structured light device to obtain first depth data in the first video.
5. The indoor positioning method according to claim 1, characterized in that: The indoor scene includes: a target object; After acquiring the second video of the current scene, the method further includes: Marking the target object to obtain a first feature point; Comparing the first feature point and the second feature point using a similarity algorithm to obtain a second comparison result, wherein the second video includes the second feature point; The indoor scene in which the current scene is located is determined according to the second comparison result.
6. The indoor positioning method according to claim 5, characterized in that: The determining the indoor scene in which the current scene is located according to the second comparison result includes: Based on the second comparison result, sampling the indoor scene to obtain first depth data in the first video; Acquire second depth data in the second video, and calculate the first depth data and the second depth data to obtain a second calculation result; The indoor scene in which the current scene is located is determined according to the second calculation result.
7. The indoor positioning method according to claim 1, characterized in that: The similarity algorithm includes: a structural similarity algorithm.
8. An indoor positioning device, characterized in that: include: A video sampling module is configured to sample an indoor scene to obtain a corresponding first video and obtain a second video of the current scene; a video comparison module, configured to compare the first video and the second video using a similarity algorithm to obtain a first comparison result; The scene positioning module is configured to determine the indoor scene where the current scene is located according to the first comparison result.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method described in any one of claims 1 to 7 are implemented.
10. An electronic device, characterized in that: include: a memory having a computer program stored thereon; A processor, configured to execute the computer program in the memory to implement the steps of the method according to any one of claims 1 to 7.
