CN-115731288-B - Positioning method and device, electronic equipment and storage medium
Abstract
The present disclosure relates to a positioning method and device, an electronic device and a storage medium, wherein the method includes acquiring a multi-frame image of a target scene in real time; the method comprises the steps of establishing a three-dimensional map based on a target scene according to preset marks in multiple frames of images, determining first position information of an optical center of image acquisition equipment when each frame of image is acquired according to the three-dimensional map and the multiple frames of images, and determining relative position relation between the optical center and a rotating axis of a turntable according to the first position information. According to the positioning method of the embodiment of the disclosure, the three-dimensional map of the target scene can be obtained through the image shot by the image acquisition equipment in the rotation process, and then the position of the optical center in the three-dimensional map is determined, so that the target position information of the rotation axis of the turntable in the three-dimensional map is determined, and therefore the relative position relation between the optical center and the rotation axis of the turntable can be obtained, the installation precision is improved, and the splicing precision of the image is further improved.
Inventors
- BAO JIE
- LI WEIQI
- LIU YANG
Assignees
- 芯视界(北京)科技有限公司
- 清华大学
Dates
- Publication Date
- 20260508
- Application Date
- 20210831
Claims (6)
- 1. A positioning method, comprising: acquiring multi-frame images of a target scene in real time, wherein a turntable is arranged in the target scene, an image acquisition device is arranged on the turntable, the multi-frame images are acquired by the image acquisition device in the process of rotating along with the turntable, and a plurality of positions in the target scene are provided with preset marks; According to the preset marks shot in the multi-frame images, a three-dimensional map based on the target scene is established; determining first position information of an optical center of the image acquisition device in the three-dimensional map when each frame of image is acquired according to the three-dimensional map and the multi-frame image; determining a relative positional relationship between the optical center and a rotation axis of the turntable according to the first positional information; Establishing a three-dimensional map based on the target scene according to the preset marks shot in the multi-frame images, wherein the three-dimensional map comprises a first position relation among the preset marks according to second position information of the preset marks in each frame of images; In the rotating process, the image acquisition equipment passes through the same position at least twice, and obtains the three-dimensional map according to the first position relation, wherein the three-dimensional map comprises the steps of determining third position information of each preset mark in the three-dimensional map according to the first position relation; according to the three-dimensional map and the multi-frame images, determining first position information of an optical center of the image acquisition device in the three-dimensional map when each frame of image is acquired, wherein the first position information comprises: Determining a second position relation between fourth position information of a preset mark in each frame of image and the position of an optical center of the image acquisition equipment according to an internal reference of the preset image acquisition equipment; Determining first position information of the optical center in the three-dimensional map according to the position of the preset mark in the three-dimensional map and the second position relation; Determining a relative positional relationship between the optical center and the rotation axis of the turntable according to the first positional information, including: Fitting first position information of the optical center when the plurality of images are acquired to obtain target position information of a rotation axis; a relative positional relationship between the first positional information and the target positional information is determined.
- 2. The method according to claim 1, wherein the method further comprises: And adjusting the installation position of the image acquisition equipment according to the relative position relation so that the optical center of the image acquisition equipment coincides with the rotation axis.
- 3. The method according to claim 1, wherein the method further comprises: Correcting the image acquired by the image acquisition equipment according to the relative position relation, or And determining a third position relation between the target surface of the image acquisition equipment and the rotation axis according to the relative position information, and correcting the image acquired by the image acquisition equipment according to the third position relation.
- 4. A positioning device, comprising: The image acquisition module is used for acquiring multi-frame images of a target scene in real time, wherein a turntable is arranged in the target scene, an image acquisition device is arranged on the turntable, the multi-frame images are acquired by the image acquisition device in the process of rotating along with the turntable, and a plurality of positions in the target scene are provided with preset marks; the map acquisition module is used for establishing a three-dimensional map based on the target scene according to the preset marks shot in the multi-frame images; The optical center determining module is used for determining first position information of an optical center of the image acquisition device in the three-dimensional map when each frame of image is acquired according to the three-dimensional map and the multi-frame image; A position determining module for determining a relative positional relationship between the optical center and the rotation axis of the turntable according to the first position information; The map acquisition module is further used for determining a first position relation among the preset marks according to the second position information of the preset marks in each frame of image; The map acquisition module is further used for determining third position information of each preset mark in a three-dimensional map according to the first position relation, acquiring a three-dimensional relation map according to the third position information, correcting the three-dimensional relation map according to at least two frames of images acquired by the image acquisition device at the same position and the first position relation, and acquiring the three-dimensional map; The optical center determining module is further used for determining a second position relation between fourth position information of a preset mark in each frame of image and the position of the optical center of the image acquisition device according to internal parameters of the preset image acquisition device; The position determining module is further used for fitting first position information of the optical center when the plurality of images are acquired to obtain target position information of a rotation axis, and determining a relative position relation between the first position information and the target position information.
- 5. An electronic device, comprising: A processor; A memory for storing processor-executable instructions; Wherein the processor is configured to perform the method of any one of claims 1 to 3.
- 6. A computer readable storage medium having stored thereon computer program instructions, which when executed by a processor, implement the method of any of claims 1 to 3.
Description
Positioning method and device, electronic equipment and storage medium Technical Field The present disclosure relates to the field of image processing, and in particular, to a positioning method and apparatus, an electronic device, and a storage medium. Background The image stitching technology is a multidisciplinary cross processing technology integrating the fields of computer vision, image processing and the like, is mainly used for acquiring full-view images, plays an important role in a plurality of fields of medical minimally invasive surgery, geological survey, aerospace, security monitoring and the like, and has a very wide application prospect. The image acquisition mode can be divided into rotary table shooting, airborne platform shooting and handheld equipment shooting, wherein the image quality and stability of the rotary table shooting are good. The image stitching process can be divided into image registration and image fusion stages. The accuracy of image registration determines the quality of the image stitching. Image registration methods can be classified into pixel-based, transform domain-based, and feature-based isoregistration methods. The most widely applied method is a feature-based registration method, and the method is high in precision and good in robustness. Feature-based methods are based on finding feature matches of two images, such as feature points, feature regions, feature edges, etc., where feature points are most commonly composed of key points and descriptors, well-known point features are SIFT (Scale-INVARIANT FEATURE TRANSFORM ), SURF (Speeded Up Robust Features, acceleration robust features), ORB (Oriented Fast and Rotated Brief, guided fast and rotational brief features), etc. But the image stitching is performed based on the feature point matching method, and the assumption condition needs to be satisfied that the overlapping area of the images, i.e. the feature points in the two images are in the same plane, or the position of the optical center of the camera is not changed, i.e. the movement of the camera is a pure rotation movement. Due to the diversity of environmental scenes, it is not satisfied in many cases that the image overlapping areas are the same plane in the world coordinate system. The multi-region image stitching puts higher demands on the accuracy of image stitching alignment, and therefore, it is necessary to ensure that the camera motion is a pure rotational motion as much as possible. However, in actual installation, it is difficult to determine the positional relationship between the optical center of the camera and the rotation axis of the turntable, so that the installation accuracy of the camera is difficult to ensure, and in rotation, pure rotation movement is also difficult to perform. Disclosure of Invention The disclosure provides a positioning method and device, electronic equipment and a storage medium. According to one aspect of the disclosure, a positioning method is provided, which comprises the steps of acquiring multiple frame images of a target scene in real time, wherein a turntable is arranged in the target scene, an image acquisition device is arranged on the turntable, the multiple frame images are acquired by the image acquisition device in the rotating process along with the turntable, preset marks are arranged at multiple positions in the target scene, a three-dimensional map based on the target scene is built according to the preset marks shot in the multiple frame images, first position information of an optical center of the image acquisition device in the three-dimensional map is determined when each frame of image is acquired according to the three-dimensional map and the multiple frame images, and the relative position relation between the optical center and a rotation axis of the turntable is determined according to the first position information. In one possible implementation manner, the three-dimensional map based on the target scene is built according to the preset marks shot in the multi-frame images, and the three-dimensional map is obtained according to the first position relation, wherein the first position relation among the preset marks is determined according to the second position information of the preset marks in each frame of images. In a possible implementation manner, the image acquisition device passes through the same position at least twice in the rotating process, and obtains the three-dimensional map according to the first position relation, wherein the three-dimensional map comprises the steps of determining third position information of each preset mark in the three-dimensional map according to the first position relation, obtaining the three-dimensional relation map according to the third position information, and correcting the three-dimensional relation map according to at least two frames of images obtained by the image acquisition device at the same position and the first position relation