Visual positioning method and device, electronic equipment and storage medium

By using panoramic image acquisition and the principle of resection to calculate 3D coordinates, the problem of insufficient visual positioning accuracy of mobile terminals is solved, achieving high-precision positioning and simplifying the algorithm, thus improving the user experience.

CN116823945BActive Publication Date: 2025-12-09齐鲁空天信息研究院
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310595399.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-23
Publication Date
2025-12-09
Estimated Expiration
2043-05-23

AI Technical Summary

Technical Problem

Mobile terminal visual positioning is limited by unstable camera intrinsic parameters and limited sensor field of view, resulting in poor positioning accuracy and poor user experience, especially in repetitive and similar scenarios where accurate positioning is difficult.

Method used

By employing a panoramic image acquisition method, the three-dimensional distance and planar angle between feature points are determined, and the three-dimensional coordinates of the target position are calculated using the resection principle. This avoids camera intrinsic parameter calibration and utilizes the rich perspective information of panoramic images for positioning.

Benefits of technology

It improves positioning accuracy, enhances positioning robustness, simplifies algorithm implementation, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116823945B_ABST
    Figure CN116823945B_ABST
Patent Text Reader

Abstract

The application provides a visual positioning method and device, electronic equipment and storage medium, and relates to the technical field of positioning. The method comprises the following steps: acquiring a panoramic image collected at a target position; determining a three-dimensional distance between a first feature point and a second feature point in the panoramic image, and determining a plane angle between the first feature point and the second feature point; and determining a three-dimensional coordinate value of the target position based on the three-dimensional distance and the plane angle and the principle of resection. The application can enrich the image scene, improve the positioning accuracy, and does not need to calibrate the camera internal parameter for collecting the panoramic image, so that the algorithm is simple and easy to implement.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the positioning field, and in particular to a visual positioning method and device, electronic equipment and storage medium. BACKGROUND

[0002] Currently, visual positioning includes two ways of prior map positioning and non-prior map positioning. When positioning is performed on a mobile terminal (such as a mobile phone terminal), due to the limitation of the computing power performance of the intelligent mobile terminal, a high-performance algorithm is usually not deployed on the mobile terminal, so prior map positioning becomes the first choice for visual positioning of the mobile terminal.

[0003] However, in the related art, prior map positioning needs to rely on stable and accurate camera intrinsic parameters, but the camera intrinsic parameters of the mobile terminal are not fixed values, so when the positioning position is calculated, high-precision camera intrinsic parameter calibration is required, and digital zoom cannot be performed, which has many constraints on the user and poor user experience. Moreover, due to the limitation of the camera sensor of the mobile terminal, the normal shooting angle of the camera of the mobile terminal is only about 90 degrees, many important targets cannot be fully shot, thereby affecting the positioning accuracy, and positioning based on a single angle image is easily affected by repeated scenes and similar scenes, and the positioning accuracy is poor.

[0004] Therefore, how to improve the positioning accuracy of visual positioning based on a prior map has become a problem to be solved in the industry. SUMMARY

[0005] In view of the problems in the prior art, the present application provides a visual positioning method, device, electronic equipment and storage medium.

[0006] In a first aspect, the present application provides a visual positioning method, comprising:

[0007] acquiring a panoramic image collected at a target position;

[0008] determining a three-dimensional distance between a first feature point and a second feature point in the panoramic image, and determining a plane angle between the first feature point and the second feature point;

[0009] determining a three-dimensional coordinate value of the target position based on the three-dimensional distance and the plane angle, and the principle of resection.

[0010] Optionally, according to the visual positioning method provided by the present application, the determination of the three-dimensional distance between the first feature point and the second feature point in the panoramic image comprises:

[0011] performing feature point matching on the panoramic image and a to-be-retrieved image in a pre-constructed image feature library to obtain matching feature points;

[0012] determine a first three-dimensional coordinate value corresponding to the first feature point in the matching feature points based on the three-dimensional coordinate value corresponding to each feature point in the image to be retrieved stored in the image feature library, and determine a second three-dimensional coordinate value corresponding to the second feature point in the matching feature points;

[0013] determine a three-dimensional distance between the first feature point and the second feature point based on the first three-dimensional coordinate value and the second three-dimensional coordinate value.

[0014] Optionally, according to the visual positioning method provided by the present application, before the three-dimensional distance between the first feature point and the second feature point in the panoramic image is determined, the method further comprises:

[0015] correct the panoramic image based on the principle of the equirectangular projection to obtain a corrected panoramic image.

[0016] Optionally, according to the visual positioning method provided by the present application, the determination of the plane angle between the first feature point and the second feature point comprises:

[0017] determine the plane angle between the first feature point and the second feature point based on the principle of the equirectangular projection.

[0018] Optionally, according to the visual positioning method provided by the present application, the determination of the plane angle between the first feature point and the second feature point based on the principle of the equirectangular projection comprises:

[0019] determine the plane distance between the first feature point and the second feature point, the pixel width of the panoramic image, and the collection angle of the panoramic image;

[0020] determine the plane angle between the first feature point and the second feature point based on the plane distance, the pixel width, and the collection angle.

[0021] Optionally, according to the visual positioning method provided by the present application, the determination of the plane angle between the first feature point and the second feature point based on the plane distance, the pixel width, and the collection angle comprises:

[0022] determine the plane angle between the first feature point and the second feature point through the following formula:

[0023]

[0024] wherein a represents the plane angle between the first feature point and the second feature point, s i represents the plane distance, sL represents the pixel width, and A represents the collection angle.

[0025] In a second aspect, the present application provides a visual positioning device, comprising:

[0026] an acquisition module configured to acquire a panoramic image collected at a target position;

[0027] a first determination module configured to determine a three-dimensional distance between a first feature point and a second feature point in the panoramic image, and determine a planar angle between the first feature point and the second feature point;

[0028] a second determination module configured to determine a three-dimensional coordinate value of the target position based on the three-dimensional distance and the planar angle, and a resection principle.

[0029] In a third aspect, the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the visual positioning method according to the first aspect.

[0030] In a fourth aspect, the present application provides a non-transitory computer readable storage medium, having a computer program stored thereon, wherein the computer program is executable on a processor to implement the visual positioning method according to the first aspect.

[0031] In a fifth aspect, the present application provides a computer program product, comprising a computer program, wherein the computer program is executable on a processor to implement the visual positioning method according to the first aspect.

[0032] The visual positioning method, device, electronic device, and storage medium provided by the present application first acquire a panoramic image collected at a target position, then determine a three-dimensional distance and a planar angle between a first feature point and a second feature point in the panoramic image, and further determine a three-dimensional coordinate value of the target position based on the three-dimensional distance and the planar angle between the first feature point and the second feature point, and a resection principle. Since the present application is based on the panoramic image collected at the target position to perform visual positioning on the target position, the panoramic image enriches the image scene, which can improve the positioning accuracy. Moreover, the positioning of the target position is realized based on the resection principle, without the need to calibrate the camera internal parameters for collecting the panoramic image, and the algorithm is simple and easy to implement. BRIEF DESCRIPTION OF DRAWINGS

[0033] In order to more clearly illustrate the technical solutions of the present application or the prior art, the following will briefly introduce the drawings needed in the embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor.

[0034] Figure 1is one of flow schematic diagrams of the visual positioning method provided by the present application;

[0035] Figure 2 is one of flow schematic diagrams of the visual positioning method provided by the present application;

[0036] Figure 3 is a structural schematic diagram of the visual positioning device provided by the present application;

[0037] Figure 4 is a structural schematic diagram of the electronic device provided by the present application. DETAILED DESCRIPTION

[0038] In order to make the objects, technical solutions and advantages of the present application clearer, the technical solutions in the present application will be described clearly and completely below with reference to the drawings in the present application. Obviously, the described embodiments are some embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all the other embodiments obtained by those skilled in the art without creative work fall within the protection scope of the present application.

[0039] It should be noted that, in the description of the present application, the terms "first", "second" and the like are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second" and the like are usually a class, and are not limited to the number of objects, for example, the first object can be one or more.

[0040] The visual positioning method, device, electronic device and storage medium provided by the present application will be described exemplarily below with reference to the drawings.

[0041] Figure 1 is one of flow schematic diagrams of the visual positioning method provided by the present application, as Figure 1 shown, the method comprises:

[0042] Step 100, acquiring a panoramic image collected at a target position;

[0043] Step 110, determining a three-dimensional distance between a first feature point and a second feature point in the panoramic image, and determining a plane angle between the first feature point and the second feature point;

[0044] Step 120, determining a three-dimensional coordinate value of the target position based on the three-dimensional distance and the plane angle, and the principle of resection.

[0045] It should be noted that the execution subject of the visual positioning method provided by the embodiment of the present application can be any mobile terminal or mobile electronic device with image acquisition function or image shooting function, such as a mobile phone, a tablet computer, a notebook computer, a palm computer, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc.

[0046] The following will take the mobile phone executing the visual positioning method provided by the present application as an example to illustrate the technical scheme of the embodiment of the present application in detail.

[0047] Specifically, in order to overcome the defects of the prior art, such as the need to rely on stable and accurate camera internal parameters, the positioning based on the image under a single view, the influence of repeated scenes and similar scenes, and poor positioning accuracy, the present application first acquires a panoramic image collected at the target position, then determines the three-dimensional distance and the plane angle between the first feature point and the second feature point in the panoramic image, and further determines the three-dimensional coordinate value of the target position based on the three-dimensional distance and the plane angle between the first feature point and the second feature point and the principle of resection. Since the present application is based on the panoramic image collected at the target position to perform visual positioning on the target position, the panoramic image enriches the image scene and can improve the positioning accuracy. Moreover, the positioning of the target position is realized based on the principle of resection, and there is no need to calibrate the camera internal parameters for collecting the panoramic image, so the algorithm is simple and easy to implement.

[0048] Optionally, the global image collected by the camera of the mobile phone at the target position can be acquired first.

[0049] It should be noted that, with the continuous development of visual image processing technology, the panoramic image stitching technology is becoming more and more mature. For example, a smart phone can realize 200-degree panoramic image shooting. The panoramic image can overcome the limitations of orthographic images, has more feature information and a wider view angle, and can provide more effective information for positioning the position in visual positioning.

[0050] Optionally, after the panoramic image collected at the target position is acquired, the three-dimensional distance between the first feature point and the second feature point in the acquired panoramic image, and the plane angle between the first feature point and the second feature point can be determined, wherein the first feature point and the second feature point are any two feature points in the panoramic image.

[0051] Optionally, after the three-dimensional distance and the plane angle between the first feature point and the second feature point are obtained, the three-dimensional coordinate value of the target position can be determined by using the principle of resection.

[0052] It should be noted that the resection principle refers to setting up an instrument at an unknown point, observing the included angle and distance of at least two known points, and then resecting the coordinates and elevation of the station point.

[0053] Optionally, in the embodiment of the present application, the first feature point and the second feature point can be connected, and the three-dimensional coordinate value of the target position is calculated based on the three-dimensional distance and the plane angle between the first feature point and the second feature point by using the resection principle.

[0054] It should be noted that in the embodiment of the present application, the three-dimensional coordinate value is the corresponding three-dimensional coordinate value in the geodetic coordinate system.

[0055] The visual positioning method provided by the present application first acquires the panoramic image collected at the target position, then determines the three-dimensional distance and the plane angle between the first feature point and the second feature point in the panoramic image, and then determines the three-dimensional coordinate value of the target position based on the three-dimensional distance and the plane angle between the first feature point and the second feature point and the resection principle.

[0056] Optionally, the determination of the three-dimensional distance between the first feature point and the second feature point in the panoramic image comprises:

[0057] The panoramic image is matched with the to-be-retrieved image in the pre-constructed image feature library to obtain matched feature points.

[0058] Based on the three-dimensional coordinate values corresponding to each feature point in the to-be-retrieved image stored in the image feature library, the first three-dimensional coordinate value corresponding to the first feature point in the matched feature points is determined, and the second three-dimensional coordinate value corresponding to the second feature point in the matched feature points is determined.

[0059] Based on the first three-dimensional coordinate value and the second three-dimensional coordinate value, the three-dimensional distance between the first feature point and the second feature point is determined.

[0060] Specifically, in the embodiment of the present application, in order to determine the three-dimensional distance between the first feature point and the second feature point in the panoramic image, firstly, the panoramic image can be matched with the image to be searched in the pre-constructed image feature library, so that the feature points that can be matched in the panoramic image, i.e. the matched feature points, can be obtained, and then the first three-dimensional coordinate value corresponding to the first feature point in the matched feature points can be determined based on the three-dimensional coordinate value corresponding to each feature point in the image to be searched stored in the image feature library, and the second three-dimensional coordinate value corresponding to the second feature point in the matched feature points can be determined, and then the three-dimensional distance between the first feature point and the second feature point can be determined based on the first three-dimensional coordinate value corresponding to the first feature point and the second three-dimensional coordinate value corresponding to the second feature point.

[0061] It can be understood that, in the embodiment of the present application, the image to be searched that is most similar to the panoramic image needs to be searched in the pre-constructed image feature library based on the panoramic image, and then the feature points in the panoramic image are matched with the feature points of the image to be searched, so that the feature points that can be matched in the panoramic image, i.e. the matched feature points, can be obtained; since a large number of images are stored in the pre-constructed image feature library, and the three-dimensional coordinate value corresponding to each feature point in each image is also stored, the three-dimensional coordinate value of the matched feature points can be obtained; and then the three-dimensional distance between any first feature point in the matched feature points and any second feature point in the matched feature points can be determined based on the first three-dimensional coordinate value corresponding to the first feature point and the second three-dimensional coordinate value corresponding to the second feature point.

[0062] It should be noted that, in the embodiment of the present application, the visual image feature library is used to store the prior map, and the three-dimensional coordinate value of the feature points in each image collected is stored in the visual image feature library.

[0063] Optionally, the visual image feature library can adopt any library construction and storage form, and the embodiment of the present application does not make a specific limitation in this regard.

[0064] Optionally, before the three-dimensional distance between the first feature point and the second feature point in the panoramic image is determined, the method further comprises:

[0065] The panoramic image is corrected based on the principle of the spherical central projection to obtain the corrected panoramic image.

[0066] Specifically, in the embodiment of the present application, before determining the three-dimensional distance between the first feature point and the second feature point in the panoramic image, or performing feature point matching based on the image to be retrieved in the image feature library to determine the three-dimensional distance between the first feature point and the second feature point in the panoramic image, the panoramic image is corrected based on the principle of the spherical center projection to obtain the corrected panoramic image, and then subsequent processing procedures are performed based on the corrected panoramic image.

[0067] It should be noted that the panoramic image is obtained by splicing images under different perspectives, and in the splicing process, image distortion phenomenon occurs, so in the embodiment of the present application, the positioning accuracy can be further improved by correcting the panoramic image with distortion and then positioning based on the corrected panoramic image.

[0068] It should be noted that the panoramic image is obtained by projecting multiple images onto a spherical surface, and then unfolding the spherical surface into a plane to complete the generation of the panoramic image, so in the embodiment of the present application, the spherical surface can be projected onto a plane based on the principle of the spherical center projection, and then the correction of the panoramic image can be realized in reverse.

[0069] Optionally, the determining of the plane angle between the first feature point and the second feature point comprises:

[0070] The plane angle between the first feature point and the second feature point is determined based on the principle of the spherical center projection.

[0071] Specifically, in the embodiment of the present application, in order to obtain the plane angle between the first feature point and the second feature point, the plane angle between the first feature point and the second feature point can be determined based on the principle of the spherical center projection, that is, the image coordinates of the first feature point and the second feature point are mapped into the spherical center projection to calculate the plane angle between the first feature point and the second feature point.

[0072] Optionally, the determining of the plane angle between the first feature point and the second feature point based on the principle of the spherical center projection comprises:

[0073] The plane distance between the first feature point and the second feature point, the pixel width of the panoramic image, and the collection angle of the panoramic image are determined.

[0074] The plane angle between the first feature point and the second feature point is determined based on the plane distance, the pixel width, and the collection angle.

[0075] Specifically, in the embodiment of the present application, in order to determine the plane angle between the first feature point and the second feature point based on the principle of gnomonic projection, the plane distance between the first feature point and the second feature point, the pixel width of the panoramic image and the collection angle of the panoramic image can be determined first, and then the plane angle between the first feature point and the second feature point can be determined based on the plane distance between the first feature point and the second feature point, the pixel width of the panoramic image and the collection angle of the panoramic image.

[0076] It should be noted that the collection angle of the panoramic image is generally 180 degrees or 200 degrees.

[0077] Optionally, the plane angle between the first feature point and the second feature point is determined based on the plane distance, the pixel width and the collection angle, comprising:

[0078] The plane angle between the first feature point and the second feature point is determined by the following formula:

[0079]

[0080] Wherein, a represents the plane angle between the first feature point and the second feature point, s i represents the plane distance, sL represents the pixel width, and A represents the collection angle.

[0081] Specifically, in the embodiment of the present application, after obtaining the plane distance between the first feature point and the second feature point, the pixel width of the panoramic image and the collection angle of the panoramic image, the plane angle between the first feature point and the second feature point can be calculated by the above formula.

[0082] Figure 2 is the second flowchart of the visual positioning method provided by the present application, as Figure 2 shown, the method comprises: after obtaining the panoramic image, correcting the panoramic image based on the principle of gnomonic projection to obtain the corrected panoramic image, and then performing image retrieval and feature point matching on the corrected panoramic image and the images in the image feature library to obtain the three-dimensional coordinate values of any two feature points in the panoramic image, simultaneously determining the plane angle of the any two feature points based on the principle of gnomonic projection, and finally performing position solving based on the three-dimensional coordinate values and the plane angle of the any two feature points by using the principle of resection to obtain the three-dimensional coordinates of the target position where the panoramic image is collected.

[0083] It should be noted that the embodiment of the present application can realize the position estimation of the camera without calibration by the principle of resection, and can realize the positioning of the target position by using the panoramic image, which has a large imaging angle and rich image features, and can improve the positioning accuracy compared with the image under the traditional single view.

[0084] The present application provides a visual positioning method, which comprises the following steps: acquiring a panoramic image collected at a target position; determining a three-dimensional distance between a first feature point and a second feature point in the panoramic image and a plane angle between the first feature point and the second feature point; and determining a three-dimensional coordinate value of the target position based on the three-dimensional distance and the plane angle between the first feature point and the second feature point and the principle of resection.

[0085] The present application provides a visual positioning device, which comprises the following steps: acquiring a panoramic image collected at a target position; determining a three-dimensional distance between a first feature point and a second feature point in the panoramic image and a plane angle between the first feature point and the second feature point; and determining a three-dimensional coordinate value of the target position based on the three-dimensional distance and the plane angle between the first feature point and the second feature point and the principle of resection.

[0086] Figure 3 The present application provides a visual positioning device, which comprises the following steps: acquiring a panoramic image collected at a target position; determining a three-dimensional distance between a first feature point and a second feature point in the panoramic image and a plane angle between the first feature point and the second feature point; and determining a three-dimensional coordinate value of the target position based on the three-dimensional distance and the plane angle between the first feature point and the second feature point and the principle of resection. Figure 3 The present application provides a visual positioning device, which comprises the following steps: acquiring a panoramic image collected at a target position; determining a three-dimensional distance between a first feature point and a second feature point in the panoramic image and a plane angle between the first feature point and the second feature point; and determining a three-dimensional coordinate value of the target position based on the three-dimensional distance and the plane angle between the first feature point and the second feature point and the principle of resection.

[0087] The present application provides a visual positioning device, which comprises the following steps: acquiring a panoramic image collected at a target position; determining a three-dimensional distance between a first feature point and a second feature point in the panoramic image and a plane angle between the first feature point and the second feature point; and determining a three-dimensional coordinate value of the target position based on the three-dimensional distance and the plane angle between the first feature point and the second feature point and the principle of resection.

[0088] The present application provides a visual positioning device, which comprises the following steps: acquiring a panoramic image collected at a target position; determining a three-dimensional distance between a first feature point and a second feature point in the panoramic image and a plane angle between the first feature point and the second feature point; and determining a three-dimensional coordinate value of the target position based on the three-dimensional distance and the plane angle between the first feature point and the second feature point and the principle of resection.

[0089] The present application provides a visual positioning device, which comprises the following steps: acquiring a panoramic image collected at a target position; determining a three-dimensional distance between a first feature point and a second feature point in the panoramic image and a plane angle between the first feature point and the second feature point; and determining a three-dimensional coordinate value of the target position based on the three-dimensional distance and the plane angle between the first feature point and the second feature point and the principle of resection.

[0090] The visual positioning device provided by the application determines the three-dimensional coordinate value of the target position by firstly acquiring the panoramic image collected at the target position, then determining the three-dimensional distance and the plane angle between the first feature point and the second feature point in the panoramic image, and further determining the three-dimensional coordinate value of the target position based on the three-dimensional distance and the plane angle between the first feature point and the second feature point and the principle of resection. Since the application is based on the panoramic image collected at the target position to perform visual positioning on the target position, the panoramic image enriches the image scene and can improve the positioning accuracy. Moreover, the positioning of the target position is realized based on the principle of resection, and the camera internal parameter for collecting the panoramic image does not need to be calibrated, so the algorithm is simple and easy to implement.

[0091] Optionally, the first determining module 320 is specifically configured to:

[0092] match the panoramic image with the image to be searched in the image feature library constructed in advance to obtain matching feature points;

[0093] determine the first three-dimensional coordinate value corresponding to the first feature point in the matching feature points and the second three-dimensional coordinate value corresponding to the second feature point in the matching feature points based on the three-dimensional coordinate values corresponding to each feature point in the image to be searched stored in the image feature library;

[0094] determine the three-dimensional distance between the first feature point and the second feature point based on the first three-dimensional coordinate value and the second three-dimensional coordinate value.

[0095] Optionally, the device further comprises a correction module, and the correction module is configured to:

[0096] correct the panoramic image based on the principle of gnomonic projection to obtain a corrected panoramic image.

[0097] Optionally, the first determining module 320 is further specifically configured to:

[0098] determine the plane angle between the first feature point and the second feature point based on the principle of gnomonic projection.

[0099] Optionally, the first determining module 320 is further specifically configured to:

[0100] determine the plane distance between the first feature point and the second feature point, the pixel width of the panoramic image, and the collection angle of the panoramic image;

[0101] determine the plane angle between the first feature point and the second feature point based on the plane distance, the pixel width, and the collection angle.

[0102] Optionally, the first determining module 320 is further specifically configured to:

[0103] The plane angle between the first feature point and the second feature point is determined by the following formula:

[0104]

[0105] Wherein, a represents the plane angle between the first feature point and the second feature point, s i represents the plane distance, sL represents the pixel width, and A represents the collection angle.

[0106] It should be noted that the above visual positioning device provided by the embodiment of the present application can realize all the method steps realized by the above visual positioning method embodiment and achieve the same technical effects, and the same parts and beneficial effects of the method embodiment in this embodiment will not be described in detail.

[0107] Figure 4 The electronic device provided by the present application is shown in the entity structure diagram of the electronic device, as Figure 4 The electronic device can include a processor 410, a communications interface 420, a memory 430 and a communications bus 440, wherein the processor 410, the communications interface 420 and the memory 430 complete mutual communication through the communications bus 440. The processor 410 can call the logical instructions in the memory 430 to execute the visual positioning method provided by the above method, and the method includes:

[0108] Obtaining a panoramic image collected at a target position;

[0109] Determining the three-dimensional distance between the first feature point and the second feature point in the panoramic image, and determining the plane angle between the first feature point and the second feature point;

[0110] Determining the three-dimensional coordinate value of the target position based on the three-dimensional distance and the plane angle and the principle of resection.

[0111] Moreover, the logic instructions in the memory 430 described above can be implemented in the form of software functional units and sold or used as independent products, and can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the parts that make contributions to the prior art or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.

[0112] In another aspect, the present application also provides a computer program product, which comprises a computer program stored on a non-transitory computer readable storage medium, and the computer program comprises program instructions, when the program instructions are executed by a computer, the computer can execute the visual positioning method provided by the above-mentioned methods, and the method comprises:

[0113] obtaining a panoramic image collected at a target position;

[0114] determining a three-dimensional distance between a first feature point and a second feature point in the panoramic image, and determining a plane angle between the first feature point and the second feature point;

[0115] determining a three-dimensional coordinate value of the target position based on the three-dimensional distance and the plane angle, and the principle of resection.

[0116] In another aspect, the present application also provides a non-transitory computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the visual positioning method provided by the above-mentioned methods, and the method comprises:

[0117] obtaining a panoramic image collected at a target position;

[0118] determining a three-dimensional distance between a first feature point and a second feature point in the panoramic image, and determining a plane angle between the first feature point and the second feature point;

[0119] determining a three-dimensional coordinate value of the target position based on the three-dimensional distance and the plane angle, and the principle of resection.

[0120] The device embodiments described above are merely illustrative, wherein the units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can be distributed to multiple network units. Part or all of the modules can be selected to achieve the purposes of the embodiments according to actual needs. Those skilled in the art can understand and implement without creative labor.

[0121] Through the description of the above embodiments, those skilled in the art can clearly understand that the embodiments can be realized by means of software and the necessary general hardware platform, and of course can also be realized by hardware. Based on such understanding, the above technical solutions can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods described in each embodiment or some parts of the embodiments.

[0122] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement to part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method of visual positioning, characterized by The method comprises: acquiring a panoramic image collected at a target position; determining a three-dimensional distance between a first feature point and a second feature point in the panoramic image, and determining a plane angle between the first feature point and the second feature point; determining a three-dimensional coordinate value of the target position based on the three-dimensional distance and the plane angle and a resection principle; the determination of the plane angle between the first feature point and the second feature point comprises: determining the plane angle between the first feature point and the second feature point based on a principle of gnomonic projection; the determination of the plane angle between the first feature point and the second feature point based on the principle of gnomonic projection comprises: determining a plane distance between the first feature point and the second feature point, a pixel width of the panoramic image, and a collection angle of the panoramic image; determining the plane angle between the first feature point and the second feature point based on the plane distance, the pixel width, and the collection angle.

2. The visual positioning method of claim 1, wherein, the determination of the three-dimensional distance between the first feature point and the second feature point in the panoramic image comprises: performing feature point matching between the panoramic image and a to-be-retrieved image in a pre-constructed image feature library to obtain matching feature points; determining a first three-dimensional coordinate value corresponding to the first feature point in the matching feature points and a second three-dimensional coordinate value corresponding to the second feature point in the matching feature points based on three-dimensional coordinate values corresponding to respective feature points in the to-be-retrieved image stored in the image feature library; determining the three-dimensional distance between the first feature point and the second feature point based on the first three-dimensional coordinate value and the second three-dimensional coordinate value.

3. The visual positioning method according to claim 1 or 2, characterized in that, Before the determination of the three-dimensional distance between the first feature point and the second feature point in the panoramic image, the method further comprises: correcting the panoramic image based on a principle of gnomonic projection to obtain a corrected panoramic image.

4. The visual positioning method of claim 1, wherein, the determination of the plane angle between the first feature point and the second feature point based on the plane distance, the pixel width, and the collection angle comprises: determining the plane angle between the first feature point and the second feature point through the following formula: wherein a represents a planar angle between the first feature point and the second feature point, s i represents the planar distance, sL represents the pixel width, and A represents the collection angle.

5. A visual positioning device, characterized by The method comprises: an acquisition module configured to acquire a panoramic image collected at a target position; a first determination module configured to determine a three-dimensional distance between a first feature point and a second feature point in the panoramic image, and determine a plane angle between the first feature point and the second feature point; a second determination module configured to determine a three-dimensional coordinate value of the target position based on the three-dimensional distance and the plane angle and a resection principle; the determination of the plane angle between the first feature point and the second feature point comprises: determining the plane angle between the first feature point and the second feature point based on a principle of gnomonic projection; the determination of the plane angle between the first feature point and the second feature point based on the principle of gnomonic projection comprises: determining a plane distance between the first feature point and the second feature point, a pixel width of the panoramic image, and a collection angle of the panoramic image; determining the plane angle between the first feature point and the second feature point based on the plane distance, the pixel width, and the collection angle. Based on the plane distance, the pixel width and the collection angle, a plane angle between the first feature point and the second feature point is determined.

6. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor implements the visual positioning method of any one of claims 1 to 4 when executing the program.

7. A non-transitory computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program implements the visual positioning method of any one of claims 1 to 4 when executed by the processor.

8. A computer program product comprising a computer program, characterized in that, The computer program implements the visual positioning method of any one of claims 1 to 4 when executed by the processor. The computer program implements the visual positioning method of any one of claims 1 to 4 when executed by the processor.

Citation Information

Patent Citations

  • Method for positioning large-size workshop with high precision

    CN108709558A

  • Indoor self-positioning method of panoramic camera for construction site

    CN114463427A