Positioning method and device

By combining the city's three-dimensional model with contour matching technology and adjusting the camera's zoom ratio and orientation, the problem of inaccurate surveillance camera positioning is solved, achieving high-precision target tracking and prediction.

CN120672836APending Publication Date: 2025-09-19HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410323563.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-18
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

The current installation and positioning of surveillance cameras is not accurate enough, resulting in large errors in the monitoring range and affecting the accuracy of target tracking.

Method used

By obtaining the camera's initial position and the image within its field of view, combined with the city's three-dimensional model within a preset distance from the initial position, the camera's target position is determined using contour matching technology. The zoom ratio and orientation are adjusted to improve positioning accuracy, and the city GIS model is used to predict the position and motion information of the target object.

Benefits of technology

It achieves high-precision positioning of the camera and accurate positioning of the target object, can track the position, speed and direction of the target object in real time, and predict the time and location of the target object's appearance, realizing target tracking across cameras.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120672836A_ABST
    Figure CN120672836A_ABST
Patent Text Reader

Abstract

The invention provides a positioning method and equipment. In the technical scheme, the first device can determine the target pose of the first device according to the urban three-dimensional model and the picture in the visual angle under the initial pose, and can track the target object in the visual angle. According to the technical scheme, the monitoring camera can be accurately positioned, and when the monitoring camera is used for tracking the target object, information such as the position, the moving speed and the direction of the target object can be obtained in real time; according to the technical scheme, the position and time of the target object appearing in the adjacent monitoring camera can be predicted, so that cross-monitoring-camera target tracking can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electronic technology, and more particularly, to a positioning method and device. Background Art

[0002] Today, people are increasingly reliant on surveillance cameras. For example, in public security management, people can track target objects (such as people and vehicles) based on images captured by surveillance cameras. Typically, when installing a surveillance camera, the installer uses a tool to roughly locate the camera to determine its location. This location information can then be used to roughly determine the camera's monitoring range.

[0003] However, current installation personnel are not accurate enough in positioning surveillance cameras, resulting in large errors in the range that the surveillance cameras can monitor. When tracking targets, the surveillance cameras have large positioning errors for the positions of target objects in the surveillance images. Summary of the Invention

[0004] This application provides a positioning method and device. This technical solution can accurately locate a surveillance camera and, when using the surveillance camera to track a target object, can obtain the target object's position, movement speed, direction, and other information in real time. This technical solution can also predict the location and time when the target object appears in adjacent surveillance cameras, thereby enabling target tracking across surveillance cameras.

[0005] In a first aspect, a positioning method is provided, which is applied to a first device, and the method includes: when installing the first device, obtaining an initial posture of the first device, the initial posture including an initial position and an orientation posture; obtaining a picture of the first device within a viewing angle in the initial posture; obtaining a three-dimensional city model within a preset distance range from the initial position; and determining a target posture of the first device based on the three-dimensional city model and the picture within the viewing angle, the target posture including a target position and a target orientation posture of the first device.

[0006] Exemplarily, the posture in this application includes position and orientation posture, wherein the position can be represented by three-dimensional coordinates, and the orientation posture can also be referred to as the direction or orientation of the first device, etc., for example, it can be represented by a rotation angle (α, β, γ).

[0007] According to the embodiments of the present application, when the first device is installed, an initial position of the first device can be obtained, and an image within the viewing angle of the first device in the initial position and a three-dimensional city model within a preset distance from the initial position can be obtained. The target position of the first device can be determined based on the three-dimensional city model and the image within the viewing angle. The target position is the final and accurate position of the first device.

[0008] In this way, since the positioning when installing the first device may be inaccurate, the first device can combine the accurate three-dimensional model of the city and the picture of the first device within a certain perspective to determine the final posture. This technical solution can make the positioning of the first device more accurate.

[0009] In addition, by using a city 3D model close to the initial position for matching, there is no need to calculate the entire city 3D model, thereby reducing the amount of positioning calculations.

[0010] In combination with the first aspect, in an implementation of the first aspect, determining the target posture of the first device based on the three-dimensional city model and the picture within the perspective includes: performing contour line extraction on the three-dimensional city model obtained from the perspective of the first posture to obtain a first contour line, and performing contour line extraction on the picture to obtain a second contour line; if the difference between the first contour line and the second contour line is less than or equal to a preset threshold, determining the first posture as the target posture; or,

[0011] If the difference between the first contour line and the second contour line is greater than a preset threshold, the urban three-dimensional model obtained from the perspective of the second posture is subjected to contour extraction to obtain the first contour line corresponding to the perspective of the second posture, wherein the second posture is different from the first posture; if the difference between the first contour line corresponding to the perspective of the second posture and the second contour line is less than or equal to a preset threshold, the second posture is determined as the target posture.

[0012] For example, the first posture may be any posture, or the first posture may be a default posture, which is not limited in the present embodiment.

[0013] It is understandable that this technical solution can also use a contour map containing contour lines for comparison.

[0014] Based on the embodiments of the present application, by extracting the contour lines under the camera perspective and the contour lines of the urban three-dimensional model under the first pose, and comparing the two, the difference between the first pose and the target pose can be determined. If the difference is less than or equal to the preset threshold, it can be determined that the target pose is the first pose; if the difference is greater than the preset threshold, it can be determined that the first pose is not the target pose, and the first pose can be adjusted to the second pose, and the comparison can be continued until the difference is less than or equal to the preset threshold.

[0015] In this way, through multiple iterations, the target pose can be obtained, and the accuracy of the target pose is relatively high.

[0016] In combination with the first aspect, in an implementation of the first aspect, the method further includes: determining whether the target posture of the first device is accurate; if it is determined that the target posture is inaccurate, adjusting the picture within the perspective of the first device; and re-determining the target posture of the first device based on the three-dimensional city model and the adjusted picture within the perspective.

[0017] It should be understood that the first device re-determines the target posture of the first device based on the three-dimensional city model and the image within the adjusted viewing angle, which may be the same as the process of determining the target posture in the above text.

[0018] Based on the embodiment of the present application, the first device can also determine whether its own positioning is accurate. If it is determined to be inaccurate, it can also adjust the picture within the acquired viewing angle and re-determine the target position of the first device based on the three-dimensional model of the city and the picture within the adjusted viewing angle. This technical solution can re-position the first device when the positioning is inaccurate, thereby making the positioning more accurate.

[0019] In combination with the first aspect, in an implementation of the first aspect, determining whether the target posture of the first device is accurate includes: determining a first distance between an initial position of the first device and an initial position of other devices, wherein the number of the other devices is one or more; determining a second distance between the target position of the first device and the target position of the other devices; if the difference between the first distance and the second distance is greater than a first preset value, determining that the target posture of the first device is inaccurate; if the difference between the first distance and the second distance is less than or equal to a first preset value, determining that the target posture of the first device is accurate.

[0020] Based on the embodiments of the present application, the accuracy of the target pose can be determined by comparing the initial position of the first device with the initial positions of other devices, and the relative positions of the determined target position of the first device with the target positions of other devices. This technical solution can jointly locate the target position of the first device with other cameras, thereby making the positioning of the first device more accurate.

[0021] In combination with the first aspect, in an implementation of the first aspect, adjusting the picture within the viewing angle of the first device includes: adjusting the zoom ratio of the first device; or adjusting the orientation posture of the first device.

[0022] For example, the zoom ratio of the first device may be increased so that the acquired image contains more details.

[0023] Based on the embodiments of the present application, the image within the viewing angle of the first device can be adjusted by adjusting the zoom ratio or orientation posture of the first device, thereby facilitating the repositioning of the first device.

[0024] In combination with the first aspect, in an implementation manner of the first aspect, the method further includes: determining a position of a target object appearing in the viewing angle of the first device, the position being the three-dimensional coordinates of the target object.

[0025] Based on the embodiment of the present application, the first device can also determine the position of the target object appearing in the viewing angle, thereby facilitating tracking of the target object.

[0026] In combination with the first aspect, in an implementation of the first aspect, determining the position of the target object appearing in the perspective of the first device includes: determining the position of the target object appearing in the perspective of the first device based on the target posture of the first device and the three-dimensional model of the city.

[0027] Based on the embodiment of the present application, since the position and orientation of the first device are determined, and combined with the three-dimensional model of the city, the position of the target object appearing in the perspective of the first device can be determined, which is conducive to tracking the target object.

[0028] In combination with the first aspect, in an implementation manner of the first aspect, if the target object is in motion, the method further includes: determining the motion speed and motion direction of the target object.

[0029] Based on the embodiment of the present application, the first device can also track the target object to determine the movement speed and direction of the target object, so that the target object can be tracked smoothly.

[0030] In combination with the first aspect, in an implementation of the first aspect, the method further includes: estimating the time and position when the target object appears from the perspective of a second device, wherein the second device is a device adjacent to the first device in the direction of movement of the target object.

[0031] It should be understood that the first device can obtain the target posture of the second device from the server or the second device, so as to determine the viewing angle of the second device.

[0032] Based on the embodiments of the present application, the first device can also estimate the time and position of the target object appearing in the perspective of the adjacent second device, thereby facilitating the second device to effectively track the target object.

[0033] Optionally, the first device may also send the time and location to the second device, so that the second device can predetermine the location and time at which the target object appears in its viewing angle.

[0034] In combination with the first aspect, in an implementation method of the first aspect, estimating the time and position when the target object appears in the perspective of the second device includes: estimating the time and position when the target object appears in the perspective of the second device based on the position of the target object, the movement speed of the target object and the movement direction.

[0035] Based on the embodiments of the present application, the first device can successfully estimate the time and position at which the target object appears from the perspective of the second device.

[0036] In combination with the first aspect, in an implementation of the first aspect, if there is a visual blind spot between the second device and the first device, estimating the time and position when the target object appears in the perspective of the second device includes: estimating the time and position when the target object appears in the perspective of the second device based on the position, movement speed and movement direction when the target object leaves the perspective of the first device.

[0037] Based on the embodiments of the present application, even if there is a visual blind spot between the first device and the second device, the first device can still estimate the time and position of the target object from the perspective of the second device. This technical solution improves the application scenarios of target object tracking.

[0038] In combination with the first aspect, in an implementation manner of the first aspect, the method further includes: sending the time and location to the second device.

[0039] This technical solution enables the second device to predetermine the appearance position and time of the target object in its field of view.

[0040] In other examples, the appearance position and time of the target object in the viewing angle of the device may also be displayed on the display device.

[0041] In combination with the first aspect, in an implementation of the first aspect, the three-dimensional city model is a city geographic information system (GIS) model.

[0042] In other examples, the city three-dimensional model may also be other three-dimensional models.

[0043] In a second aspect, a device is provided, comprising: one or more processors; one or more memories; the one or more memories storing one or more programs, which, when executed by one or more processors, enable the positioning method described in the first aspect and any possible implementation thereof to be executed.

[0044] In a third aspect, a positioning device is provided, comprising a module for implementing the positioning method as described in the first aspect and any possible implementation thereof.

[0045] In a fourth aspect, a chip is provided, comprising a processor and a communication interface, wherein the communication interface is used to receive a signal and transmit the signal to the processor, and the processor processes the signal so that the positioning method described in the first aspect and any possible implementation thereof is executed.

[0046] In a fifth aspect, a readable storage medium is provided, wherein instructions are stored in the readable storage medium. When the instructions are executed on an electronic device, the positioning method described in the first aspect and any possible implementation thereof is executed.

[0047] In a sixth aspect, a program product is provided, comprising a program code. When the program code is run on an electronic device, the positioning method as described in the first aspect and any possible implementation thereof is executed. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 It is a schematic diagram of a system scenario to which the embodiments of the present application can be adapted.

[0049] Figure 2 This is a schematic flow chart of a positioning method provided in an embodiment of the present application.

[0050] Figure 3 This is a schematic diagram of determining the camera position provided in an embodiment of the present application.

[0051] Figure 4 This is a schematic flowchart of a multi-camera joint optimization position provided in an embodiment of the present application.

[0052] Figure 5 This is a schematic diagram of using a camera to track a target provided in an embodiment of the present application.

[0053] Figure 6 This is another schematic diagram of using a camera to track a target provided in an embodiment of the present application.

[0054] Figure 7 This is a schematic diagram of using a camera to track a target provided in an embodiment of the present application.

[0055] Figure 8 This is a schematic flow chart of a positioning method provided in an embodiment of the present application.

[0056] Figure 9 This is a schematic block diagram of a device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0057] The technical solution in this application will be described below with reference to the accompanying drawings.

[0058] The positioning method in the embodiments of the present application can be applied to devices such as urban surveillance cameras and vehicle-mounted cameras.

[0059] Before introducing the technical solutions of the embodiments of the present application, we first briefly introduce some professional terms that may be involved in the embodiments of the present application.

[0060] Field of view (FOV): Also known as the field of view, in optical instruments, the angle between the two edges of the maximum range through which the image of the object can pass through the lens, with the lens as the vertex, is called the angle of view. In the present application, the angle of view can be understood as the range that the camera can cover. Objects beyond this angle will not appear in the camera's image.

[0061] A geographic information system (GIS) is a technical system, supported by computer hardware and software, that collects, stores, manages, computes, analyzes, displays, and describes geographic distribution data for all or part of the Earth's surface (including the atmosphere). In this embodiment of the present application, the city GIS model can be used to represent a three-dimensional model of the city.

[0062] Today, people are increasingly reliant on surveillance cameras. For example, in public security management, people can track target objects (such as people and vehicles) based on images captured by surveillance cameras. Typically, when installing a surveillance camera, the installer uses a tool to roughly locate the camera to determine its location. This location information can then be used to roughly determine the camera's monitoring range.

[0063] However, current installation personnel are not accurate enough in positioning surveillance cameras, resulting in large errors in the range that the surveillance cameras can monitor. When tracking targets, the surveillance cameras have large positioning errors for the positions of target objects in the surveillance images.

[0064] In view of this, embodiments of the present application provide a positioning method and device. This technical solution can accurately locate a surveillance camera and, when using the surveillance camera to track a target object, can obtain information such as the target object's position, movement speed, and direction in real time. This technical solution can also predict the location and time at which the target object appears in adjacent surveillance cameras, thereby enabling target tracking across multiple surveillance cameras.

[0065] The following will be combined Figure 1-8 Introduce the technical solutions in the embodiments of this application.

[0066] For example, Figure 1This is a schematic diagram of a system scenario that the embodiment of the present application can adapt to. Figure 1 As shown, the system 100 may include a monitoring device 110 and a display device 120 .

[0067] The monitoring device 110 may include multiple monitoring devices, such as a monitoring device 111 , a monitoring device 112 , a monitoring device 113 , and the like.

[0068] For example, the monitoring device 100 may be a city monitoring camera, a park security camera, etc.

[0069] The monitoring device 110 can be used to acquire monitoring images, track target objects, etc. The display device 120 can be used to display the monitoring images acquired by the monitoring device 110 and can also be used to display the target objects tracked by the user.

[0070] For example, for the vehicle 1 tracked by the user, the display device 120 can highlight it or display it in the form of a block diagram, etc. The embodiment of the present application does not limit the specific form of the display.

[0071] In some embodiments, the system 100 may further include a server 130. The server 130 may be used to analyze images acquired by the monitoring device 110 to perform target tracking; or the server 130 may be used to store images acquired by the monitoring device 110.

[0072] After the monitoring device 110 is installed, the server 130 can also be used to locate the monitoring device 110 to determine the exact location of the monitoring device 110. When the system 100 does not include the server 130, the monitoring device 110 can also locate itself, which is not limited in the embodiment of the present application.

[0073] It should be understood that the server 130 may also be a cloud server. The system 100 may also include multiple display devices 120.

[0074] The following will be combined Figure 2-4 The present invention introduces a technical solution for positioning monitoring equipment according to an embodiment of the present application.

[0075] For example, Figure 2 This is a schematic flow chart of a positioning method provided in an embodiment of the present application. Figure 2 As shown, the method 200 may include steps 210 to 250 .

[0076] The method 200 can be applied to a camera or a server, which is not limited in the present embodiment. The present embodiment takes the method 200 applied to a camera as an example for explanation.

[0077] 210, the camera obtains the initial position of the camera.

[0078] For example, the initial position may include an initial position and an initial orientation of the camera. The initial position may be represented by three-dimensional coordinates (x, y, z), and the orientation may be referred to as a direction and may be represented by a rotation angle (α, β, γ), where α, β, and γ are rotation angles relative to the spatial coordinate axes, respectively.

[0079] In one embodiment, the initial position of the camera can be measured by the installer using positioning technology. For example, the installer can use real-time kinematic (RTK) positioning technology to perform three-dimensional positioning of the camera to determine the initial position of the camera, and input the initial position into the camera information, so that the camera can obtain its own initial position. Alternatively, the installer can also use the Global Positioning System (GPS) or the Beidou satellite navigation system to determine the initial position of the camera.

[0080] In another embodiment, the initial position of the camera can also be determined by the camera itself. For example, the camera may include various sensors, and after the camera is installed, the camera can determine its initial position based on the various sensors. For example, the camera can determine longitude and latitude using longitude and latitude sensors, and determine altitude using an air pressure sensor.

[0081] The initial orientation posture may be estimated by the installer or a default value, or may be determined by the camera itself through a sensor, which is not limited in the embodiments of the present application.

[0082] 220, the camera obtains the image within the viewing angle.

[0083] After the camera is fixedly installed, it has a fixed posture, in which the camera can capture images within the viewing angle. The images can be images captured by the camera at a fixed zoom factor.

[0084] It should be understood that the picture can also be a picture obtained by the camera in a certain direction. In other examples, the camera can also obtain pictures in other directions.

[0085] 230 , the camera determines the camera's position and posture through a city geographic information system (GIS) model at a preset distance from the camera's initial position and an image within the camera's field of view.

[0086] Because the city GIS model includes a 3D model of the entire city, matching the entire city GIS model with the image within the camera's field of view would require a large amount of computation and result in low computational efficiency. To improve computational efficiency, the camera can determine its position using the city GIS model at a preset distance from its initial position and the image within the camera's field of view. This reduces the amount of computation required and improves computational efficiency.

[0087] It should be understood that the embodiment of the present application does not limit the specific value of the preset distance. For example, the preset distance can be 200 meters, or 400 meters, etc.

[0088] See also Figure 3 , Figure 3 This is a schematic diagram of determining the camera position provided by an embodiment of the present application. Figure 3 As shown, the camera can obtain the GIS model at its initial position P0 from the complete GIS model of the city. The coordinates of the initial position P0 can be (x0, y0, z0) and the orientation posture can be (α0, β0, γ0). The camera can extract the contour line of the GIS model at P0 to obtain a contour map A including the contour line A0; similarly, the camera can extract the contour line of the image under the obtained perspective to obtain a contour map B including the contour line B; then, the camera can extract the contour line A0 (i.e. Figure 3 The dotted line in the figure) and the contour line B (i.e. Figure 3 When the matching error is small and meets the error threshold, it can be determined that the initial pose P0 is the final pose of the camera.

[0089] In one example, when the matching error is large (i.e. Figure 3 , the camera can obtain GIS models under other postures. For example, the camera adjusts the GIS model under P0 to the GIS model under P1 (x1, y1, z1), (α1, β1, γ1), and extracts the contour line of the GIS model under P1 to obtain a contour map including contour line A1, and matches contour line A1 with contour line B. When the matching error is small and meets the error threshold, it can be determined that the initial position P1 is the final posture of the camera; when the matching error is large, the camera can continue to adjust until the error between the contour line An of the GIS model under position Pn (xn, yn, zn), (αn, βn, γn) and the contour line B meets the error threshold (i.e. Figure 3 The solid line and the dotted line in are basically coincident), so the pose of the camera can be determined to be pose Pn.

[0090] It should be understood that the camera can also use a contour map or a picture under the camera's perspective for matching, which is not limited in the embodiments of the present application.

[0091] The GIS model under P0 can be a part of the city GIS model at a preset distance from the initial position of the camera.

[0092] In this way, the camera can determine the three-dimensional coordinates and rotation angle of the specific location of the camera through multiple matching processes, that is, the final position of the camera can be determined with high accuracy.

[0093] It should be understood that Figure 3 The execution entity in the process can also be a server. In this case, the server can store the city GIS model, or the server can obtain the city GIS model from the cloud or a website. The camera can upload the captured image to the server, which then calculates the camera's position and posture.

[0094] It should be understood that for each installed camera, the above method can be used to determine its accurate installation posture.

[0095] In some cases, after determining the accurate position of the camera, the user can use the camera to identify the target object in the image and track the target object. Therefore, the method 200 may further include steps 240-250.

[0096] At 240 , the camera determines the position, speed, and / or direction of movement of the target object.

[0097] The target object may be a person, an animal, a vehicle, etc. The camera can distinguish the target object by its appearance information in the image.

[0098] For example, vehicle A has information such as body color, license plate number, vehicle logo, and outline, so that the camera can distinguish vehicle A from other vehicles through this information.

[0099] For example, person B has information such as height, body shape, facial features, hairstyle, hair length and color, skin color, clothing color, shoes, etc., so that the camera can distinguish person B from other people through this information.

[0100] For target objects that appear in the camera's field of view, since the camera's position is known, the camera's field of view is also fixed, and the camera can also obtain the corresponding city GIS model, the specific location of the target object in the field of view can be determined.

[0101] For a moving target object, the camera can also determine its corresponding speed, direction of movement, etc. based on the above information and the moving time. The following will be combined with specific embodiments to introduce this technical solution in detail, which will not be described in detail here.

[0102] 250, the camera estimates the time and location of the target object appearing in the neighboring cameras.

[0103] For example, if the target object is a vehicle, the camera can determine the current position, moving speed and direction of the vehicle in step 240. The neighboring camera is a camera in the direction of movement of the vehicle. As the vehicle moves, the vehicle will appear in the field of view of the neighboring camera.

[0104] In some embodiments, if the perspectives of two cameras partially overlap, the camera can estimate the time and location of the target object in the overlapping portion. The camera can then send the estimated time and location of the target object in the overlapping portion to a neighboring camera, allowing the neighboring camera to continue tracking the target object.

[0105] In some embodiments, assuming that the perspectives of the two cameras do not overlap, a camera can estimate the time and location of the target object in the perspective of the adjacent camera. The camera can then send the estimated time and location of the target object in the perspective of the adjacent camera to the adjacent camera, so that the adjacent camera can continue to track the target object.

[0106] In some cases, cameras can also obtain traffic information on urban roads, such as congestion and traffic lights, and use this information to determine the time and location of the target object in the view of a neighboring camera. The camera can then send the estimated time and location of the target object in the view of the neighboring camera to the neighboring camera, allowing the neighboring camera to continue tracking the target object. This can make the camera's estimate of the target object's appearance in the view of the neighboring camera more accurate.

[0107] Based on the embodiments of this application, the camera can determine its position and orientation based on the city GIS model and the image from the camera's perspective. Compared to traditional positioning methods, the camera's position and orientation determined in this application are more accurate. In addition, the camera can further determine the exact position, speed, and direction of movement of the target object from its perspective, and based on this, estimate the time and position of the target object when it appears near the camera, thereby facilitating the camera's tracking of the target object.

[0108] It should be understood that the embodiment of the present application does not limit the specific execution order of the above steps 210-250. In other examples, some steps of the steps 210-250 may not be executed or may be replaced by other steps.

[0109] In some cases, in order to further improve the accuracy of camera positioning, a technical solution combining multiple cameras can be used to locate the position of the camera. Figure 4 Introduce the technical solution.

[0110] For example, Figure 4 This is a schematic flow chart of a multi-camera joint optimization position provided by an embodiment of the present application. Figure 4 As shown, the method 300 may include steps 310 to 360 .

[0111] It should be understood that the method 300 can be applied to a server. Alternatively, the method 300 can also be applied to a camera among cameras 1 to n.

[0112] In the embodiments of the present application, the server is used as an example for explanation.

[0113] 310. The server determines the positions of cameras 1 to n.

[0114] It should be understood that the server can determine the positions of cameras 1 to n respectively through steps 210-230 in the method 200 described above. The positions can be the three-dimensional coordinates and orientation postures of the camera installation positions. For the sake of brevity, they will not be repeated here.

[0115] At 320 , the server determines whether the relative positions of the target camera and other cameras are accurate.

[0116] It should be understood that the target camera can be any one of the above-mentioned cameras 1 to n, and the target camera can also traverse cameras 1 to n, so that the server can determine whether the position of each camera in cameras 1 to n is accurate.

[0117] Among them, the server can use the following technical solutions to determine whether the relative position of the target camera and other cameras is accurate.

[0118] For example, the target camera is camera 1. Through step 310, it can be determined that the position of camera 1 is position A1, the position of camera 2 is position A2, ..., the position of camera n is position An. In addition, the initial position of the camera is position B1, the initial position of camera 2 is position B2, ..., and the initial position of camera n is position Bn.

[0119] In some embodiments, the server can calculate the distance 1 between the position A1 of camera 1 and the position Ax of one of cameras x among cameras 2 to n, and the distance 2 between the initial position B1 of camera 1 and the initial position Bx of camera x. If the difference between the distance 1 and the distance 2 is less than or equal to the preset difference, it can be determined that the position A1 of camera 1 is accurate. If the difference between the distance 1 and the distance 2 is greater than the preset difference, it can be determined that the position A1 of camera 1 is inaccurate.

[0120] Furthermore, the server can also calculate the distance 1 between camera 1's position A1 and the position of each camera in cameras 2-n, as well as the distance 2 between camera 1's initial position B1 and the initial position Bx of cameras 2-n. The distances 1 and 2 between camera 1 and the same camera can be a group. If the difference between each group of distances 1 and 2 is less than or equal to a preset difference, then the position A1 of camera 1 can be determined to be accurate. If there is one or more groups of distances 1 and 2 whose difference is greater than the preset difference, then the position A1 of camera 1 can be determined to be inaccurate. In this way, by verifying the accuracy of the relative position of camera 1 and multiple other cameras, the accuracy of the determined target camera position can be improved.

[0121] It should be understood that the embodiment of the present application does not limit the specific value of the preset difference. For example, the preset difference may be 1 meter or 2 meters.

[0122] It is understandable that the above method can be used to verify each camera 1 to n. Alternatively, the server can also use the above method to verify each camera 1 to n at the same time.

[0123] In other examples, the server may also verify the orientation of the camera. The specific process may be similar to the position verification, and for the sake of brevity, it will not be repeated here.

[0124] In one embodiment, if the server determines that the relative position of the target camera and the other cameras is inaccurate, step 330 may be continued.

[0125] In another embodiment, if the server determines that the relative positions of the target camera and other cameras are accurate, step 350 may be continued.

[0126] 330, the server adjusts the zoom ratio of the target camera.

[0127] When the relative position of the target camera and other cameras is inaccurate, the server can adjust the zoom factor of the target camera to change the geographic range of the image captured by the target camera. For example, the server can increase the zoom factor of the target camera to reduce the geographic range of the image captured by the target camera, making objects in the image larger and capturing more details.

[0128] When the server determines that the position of the target camera is inaccurate, the possible reason is that there are multiple scenes in the city GIS model that are similar to the scenes included in the picture under the perspective obtained by the camera, resulting in inaccurate positioning of the target camera.

[0129] In other examples, the server may also adjust the direction (or orientation) of the target camera to change the image captured by the target camera. For example, when positioning the target camera in step 310, if the image captured by the target camera is when the target camera is facing east, the target camera may be adjusted from facing east to facing south, thereby changing the image captured by the target camera.

[0130] At 340 , the server re-determines the position and posture of the target camera.

[0131] After the target camera adjusts the zoom magnification, the image under the viewing angle obtained by the target camera may be changed, so that the target camera can be repositioned to re-determine the position and posture of the target camera.

[0132] It should be understood that the method of re-determining the position of the target camera can refer to the above steps 230 and Figure 3 For the sake of brevity, the relevant descriptions in [1] are not repeated here.

[0133] In some cases, after determining the accurate position of the camera, the user can use the camera to identify the target object in the image and track the target object. Therefore, the method 300 may further include steps 350-360.

[0134] 350, determining the position, velocity and / or direction of movement of the target object.

[0135] 360,estimate the time and position of target objects appearing in adjacent cameras.

[0136] It should be understood that steps 350-360 can refer to the relevant description of steps 340-350 in the previous text, and for the sake of brevity, they are not repeated here.

[0137] Based on the embodiments of the present application, after determining the postures of multiple cameras, the server can verify the positions of multiple cameras based on the relative positions between the multiple cameras to determine whether the positioning of the cameras is accurate; and when it is determined that the positioning of the camera is inaccurate, the position of the camera is repositioned, so as to determine which cameras are inaccurately positioned, and the accuracy of camera positioning is improved through the technical solution of multi-camera combination.

[0138] In addition, the camera can further determine the exact position, speed, movement direction, etc. of the target object under the field of view, and based on this, estimate the time and position of its appearance near the camera, which is conducive to the camera's tracking of the target object.

[0139] Combined with the above Figure 2-4 This paper introduces the technical solution for positioning the camera. Figure 5-7This paper introduces the technical solution of tracking target objects through cameras.

[0140] For example, Figure 5 This is a schematic diagram of using a camera to track a target object provided in an embodiment of the present application.

[0141] like Figure 5 As shown, it is assumed that cameras 1, 2, and 3 are distributed on road 1. The cameras 1, 2, and 3 have been accurately positioned using the positioning method described above.

[0142] It is understandable that the position of the camera is known, and the camera can calculate the position of the target object appearing in its perspective based on its own position and the city GIS model to obtain the position of the target object.

[0143] Assume that at time T0, the target object appears in the field of view of camera 1, and its position is X0 (x0, y0, z0). At time T1, the target object moves to position X1 (x1, y2, z3). The movement speed of the target object can be expressed as v1 = |X1-X0| / (T1-T0), and the movement direction of the target object d1 = (X1-X0) / |X1-X0|, that is, the object moves to the right in the picture, so it can be determined that its movement direction is eastward.

[0144] It is understood that the camera 1 can sample the position of the target object once every preset time interval to determine the position, movement speed and direction of the target object in real time to achieve tracking of the target object. The specific value of the preset time is not limited in the embodiment of the present application.

[0145] Continue to see Figure 5 , the viewing angles of camera 1 and camera 2 have an overlapping position point X2 (x1, y2, z3), then camera 1 can determine the time T2 when the target object arrives at position point X2 based on the determined position, movement direction and movement speed of the target object.

[0146] In some examples, camera 1 can send the arrival position X2 and time T2 to camera 2, so that camera 2 continues to track the target object. When the target object reaches position X2, camera 1 and camera 2 can observe the target object together.

[0147] Continue to see Figure 5, there is no overlapping part between the perspective of camera 2 and the perspective of camera 3, that is, there is a blind spot between camera 2 and camera 3. After the target object appears in the perspective of camera 2, camera 2 starts to track the target object. Similarly, camera 2 can determine the position, movement speed and movement direction of the target object. When the target object is about to leave the perspective of camera 2, camera 2 can estimate the position Xn (xn, yn, zn) and time Tn at which it appears in the perspective of camera 3 based on the position, movement speed and movement direction of the target object at this time. Afterwards, camera 2 can send the position Xn and time Tn to camera 3 so that camera 3 continues to track the target object.

[0148] For example, camera 2 can obtain information such as the installation position and viewing angle of camera 3, so that camera 2 can determine the distance of the blind spot between camera 2 and camera 3, and further estimate the position Xn and time Tn at which the target object appears in the viewing angle of camera 3 based on the position, movement speed and movement direction of the target object.

[0149] It is understandable that camera 2 can also send the appearance information of the target object to camera 3 so that camera 3 can determine which target object is being tracked. For the appearance information, please refer to the relevant description in step 240 above.

[0150] It should be understood that the estimation of the position Xn and time Tn of the target object can also be performed by the server. In this case, camera 2 can upload the acquired real-time monitoring image to the server, and the server determines the movement speed and direction of the target object, and estimates the position Xn and time Tn at which it appears in the perspective of camera 3.

[0151] In some embodiments, camera 2 or the server can also combine traffic information, such as road congestion, traffic light information, etc., to further estimate the time Tn when it appears in the field of view of camera 3. Since this technical solution takes into account real-time traffic information, the estimated time Tn can be more accurate.

[0152] In this way, according to the distribution of cameras in the city, multiple cameras can track the target object in relay mode and estimate the position and time when the target object appears in the perspective of the next camera, thereby providing more convenience for tracking the target object.

[0153] For example, Figure 6 This is another schematic diagram of using a camera to track a target object provided in an embodiment of the present application.

[0154] like Figure 6 As shown, cameras 1, 2, and 3 are distributed on road 1. Camera 4 is distributed on road 2.

[0155] The camera 2's view can cover part of road 1 and part of road 2. Figure 5 The difference between the scheme in FIG and FIG is that the target object turns from road 1 to road 2 during the movement.

[0156] For example, from the perspective of camera 2, assuming that at time T3, the position of the target object is X3 (x3, y3, z3), and at time T4, the position of the target object is X4 (x4, y4, z4), then the direction of object movement v2 = |X4-X3| / (T4-T3), and the direction of movement of the target object d2 = (X4-X3) / |X4-X3|, that is, the object moves downward in the picture, so it can be determined that its movement direction is southward.

[0157] Based on the target object's position, direction of movement, and road information in the GIS model, Camera 2 can determine that the target object will appear in the field of view of Camera 4. Camera 2 can then estimate the location and time of its appearance in the field of view of Camera 4 based on the target object's current position, speed, and direction of movement. Camera 2 can then send this location and time to Camera 4, allowing Camera 4 to continue tracking the target object.

[0158] It is understood that camera 2 can also send the appearance information of the target object to camera 4 so that camera 4 can determine which target object is being tracked. For the appearance information, please refer to the relevant description in step 240 above.

[0159] It should be understood that the estimation of the position and time of the target object can also be performed by the server. In this case, camera 2 can upload the acquired real-time monitoring image to the server, and the server will determine the movement speed and direction of the target object, and estimate the position and time when it appears in the perspective of camera 4.

[0160] In some embodiments, camera 2 or the server can also combine traffic information, such as road congestion, traffic light information, etc., to further estimate the time when it appears in the field of view of camera 4. Since this technical solution takes into account real-time traffic information, the estimated time can be more accurate.

[0161] In some embodiments, after estimating the position and time at which the target object appears in camera 4, camera 2 may upload the position and time to a server, and camera 4 may obtain the information from the server to continue tracking the target object.

[0162] In this way, according to the distribution of cameras in the city, multiple cameras can track the target object in relay mode and estimate the position and time when the target object appears in the perspective of the next camera, thereby providing more convenience for tracking the target object.

[0163] For example, Figure 7 This is a schematic diagram of using a camera to track a target object provided in an embodiment of the present application.

[0164] like Figure 7 As shown, cameras 1 , 2 and 3 are distributed on road 1 , and camera 4 is distributed on road 2 .

[0165] Camera 2's field of view covers parts of both Road 1 and Road 2. After detecting a target object turning from Road 1 onto Road 2, Camera 2 can determine that the target object will appear in Camera 4's field of view based on the target object's position, direction of movement, and road information in the GIS model. Camera 2 can then estimate the location and time of the target object's appearance in Camera 4's field of view based on the target object's current position, speed, and direction of movement. Camera 2 can then send the location and time of the target object's appearance in Camera 4 to Camera 4 and Camera 3, enabling Camera 4 to continue tracking the target object.

[0166] Similarly, after receiving the position and time at which the target object appears in the field of view of camera 4, camera 3 can determine that the target object will not appear in the field of view of camera 3, thereby preventing camera 3 from mistaking other target objects with similar appearance for the target object and tracking them.

[0167] It is understood that camera 2 can also send the appearance information of the target object to camera 4 and camera 3, so that camera 4 can determine which target object is being tracked and prevent camera 3 from continuing to track the target object. The appearance information can be found in the relevant description of step 240 above.

[0168] Figure 8 This is a schematic flow chart of a positioning method provided in an embodiment of the present application. Figure 8 As shown, the method 800 may be applied to a first device, and the method 800 may include steps 810 to 840.

[0169] Exemplarily, the first device may be the monitoring device, camera, etc. mentioned above.

[0170] 810. When installing the first device, the first device obtains an initial posture of the first device, where the initial posture includes an initial position and an orientation posture.

[0171] It should be understood that the initial posture can refer to the relevant description of obtaining the initial posture of the camera in step 210 in the previous text, which will not be repeated here.

[0172] Exemplarily, the posture in the present application includes position and orientation posture, wherein the position can be represented by three-dimensional coordinates, and the orientation posture can also be referred to as the direction or orientation of the first device, etc., which can be represented by a rotation angle (α, β, γ).

[0173] 820. The first device obtains a picture within the viewing angle of the first device in the initial position.

[0174] After the first device is installed, its initial posture is fixed, and the first device can obtain images within its field of view.

[0175] 830. The first device obtains a three-dimensional model of a city within a preset distance range from the initial position.

[0176] For example, the embodiment of the present application does not limit the specific value of the preset distance. For example, the preset distance can be 200 meters, or 400 meters, etc.

[0177] The three-dimensional city model may be a geographic information system (GIS) model or other three-dimensional models, which is not limited in the embodiments of the present application.

[0178] 840. The first device determines a target posture of the first device according to the three-dimensional city model and the image within the viewing angle. The target posture includes a target position and a target orientation posture of the first device.

[0179] It should be understood that since the initial position of the first device is determined during installation, its initial position may not be accurate. The target position is determined by the first device based on the 3D city model and the image within the perspective of the first device in the initial position. Therefore, the target position is more accurate than the existing initial position.

[0180] The target position may be a finally determined position, which may be represented by three-dimensional coordinates, and the target orientation posture may be a finally determined orientation direction.

[0181] According to the embodiments of the present application, when the first device is installed, an initial position of the first device can be obtained, and an image within the viewing angle of the first device in the initial position and a three-dimensional city model within a preset distance from the initial position can be obtained. The target position of the first device can be determined based on the three-dimensional city model and the image within the viewing angle. The target position is the final and accurate position of the first device.

[0182] In this way, since the positioning when installing the first device may be inaccurate, the first device can determine the final posture based on the three-dimensional model of the city and the picture within the perspective. This technical solution can make the positioning of the first device more accurate.

[0183] In addition, by using a city 3D model close to the initial position for matching, there is no need to calculate the entire city 3D model, thereby reducing the amount of positioning calculations.

[0184] In some embodiments, the first device determines a target position of the first device based on the three-dimensional city model and the image within the viewing angle, including: performing contour line extraction on the three-dimensional city model obtained from the viewing angle of the first pose to obtain a first contour line, and performing contour line extraction on the image to obtain a second contour line;

[0185] If the difference between the first contour line and the second contour line is less than or equal to a preset threshold, the first pose is determined as the target pose; or,

[0186] If the difference between the first contour line and the second contour line is greater than a preset threshold, performing contour extraction on the three-dimensional urban model obtained from the perspective of the second posture to obtain the first contour line corresponding to the perspective of the second posture, wherein the second posture is different from the first posture;

[0187] If the difference between the first contour line and the second contour line corresponding to the viewing angle of the second posture is less than or equal to a preset threshold, the second posture is determined as the target posture.

[0188] For example, the first posture may be any posture, or the first posture may be a default posture, which is not limited in the present embodiment.

[0189] It is understandable that this technical solution can also use a contour map containing contour lines for comparison.

[0190] Based on the embodiments of the present application, by extracting the contour lines under the camera perspective and the contour lines of the urban three-dimensional model under the first pose, and comparing the two, the difference between the first pose and the target pose can be determined. If the difference is less than or equal to the preset threshold, it can be determined that the target pose is the first pose; if the difference is greater than the preset threshold, it can be determined that the first pose is not the target pose, and the first pose can be adjusted to the second pose, and the comparison can be continued until the difference is less than or equal to the preset threshold.

[0191] In this way, through multiple iterations, the target pose can be obtained, and the accuracy of the target pose is relatively high.

[0192] In some embodiments, the method 800 further includes:

[0193] Determining whether the target pose of the first device is accurate;

[0194] If the target pose is determined to be inaccurate, adjusting the image within the viewing angle of the first device;

[0195] The target position of the first device is re-determined based on the three-dimensional city model and the image within the adjusted viewing angle.

[0196] It should be understood that the first device re-determines the target posture of the first device based on the three-dimensional city model and the image within the adjusted viewing angle, which may be the same as the process of determining the target posture in the above text.

[0197] Based on the embodiment of the present application, the first device can also determine whether its own positioning is accurate. If it is determined to be inaccurate, it can also adjust the picture within the acquired viewing angle and re-determine the target position of the first device based on the three-dimensional model of the city and the picture within the adjusted viewing angle. This technical solution can re-position the first device when the positioning is inaccurate, thereby making the positioning more accurate.

[0198] In some embodiments, determining whether the target pose of the first device is accurate includes:

[0199] Determine a first distance between an initial position of the first device and initial positions of other devices, wherein the number of the other devices is one or more;

[0200] determining a second distance between the target location of the first device and the target location of the other device;

[0201] If the difference between the first distance and the second distance is greater than a first preset value, determining that the target posture of the first device is inaccurate;

[0202] If the difference between the first distance and the second distance is less than or equal to the first preset value, it is determined that the target posture of the first device is accurate.

[0203] When there are multiple other devices, the values ​​of the first distance and the second distance are also multiple.

[0204] It should be understood that the embodiment of the present application does not limit the specific value of the first preset value.

[0205] Based on the embodiments of the present application, the accuracy of the target pose can be determined by comparing the initial position of the first device with the initial positions of other devices, and the relative positions of the determined target position of the first device with the target positions of other devices. This technical solution can jointly locate the target position of the first device with other cameras, thereby making the positioning of the first device more accurate.

[0206] In some embodiments, adjusting the image within the viewing angle of the first device includes:

[0207] Adjust the zoom ratio of the first device; or adjust the orientation posture of the first device.

[0208] For example, the zoom ratio of the first device may be increased to allow the captured image to contain more details, or the orientation of the first device may be adjusted to change the image within the viewing angle of the first device.

[0209] Based on the embodiments of the present application, the image within the viewing angle of the first device can be adjusted by adjusting the zoom ratio or orientation posture of the first device, thereby facilitating the repositioning of the first device.

[0210] In some embodiments, the method 800 further includes:

[0211] A position of a target object appearing in the viewing angle of the first device is determined, where the position is a three-dimensional coordinate of the target object.

[0212] For example, see Figure 5 , the first device may be camera 1, and the position of the target object may be position X0, position X1, etc.

[0213] Based on the embodiment of the present application, the first device can also determine the position of the target object appearing in the viewing angle, thereby facilitating tracking of the target object.

[0214] In some embodiments, determining a position of a target object that appears in the viewing angle of the first device includes:

[0215] The position of the target object appearing in the viewing angle of the first device is determined according to the target posture of the first device and the three-dimensional city model.

[0216] Based on the embodiment of the present application, since the position and orientation of the first device are determined, and combined with the three-dimensional model of the city, the position of the target object appearing in the perspective of the first device can be determined, which is conducive to tracking the target object.

[0217] In some embodiments, if the target object is in motion, the method 800 further includes:

[0218] Determine the speed and direction of movement of the target object.

[0219] For example, see Figure 5 , the movement speed and direction of the target object can be determined through the positions of multiple target objects.

[0220] Based on the embodiment of the present application, the first device can also track the target object to determine the movement speed and direction of the target object, so that the target object can be tracked smoothly.

[0221] In some embodiments, the method 800 further includes:

[0222] The time and position at which the target object appears in the perspective of a second device are estimated, wherein the second device is a device adjacent to the first device in the direction of movement of the target object.

[0223] For example, see Figure 5 、 6 The first device may be camera 1, and the second device may be camera 2. The time when the target object appears in the viewing angle of the second device may be time T2, and the position may be position X2.

[0224] It should be understood that the first device can obtain the target posture of the second device from the server or the second device, so as to determine the viewing angle of the second device.

[0225] Based on the embodiments of the present application, the first device can also estimate the time and position of the target object appearing in the perspective of the adjacent second device, thereby facilitating the second device to effectively track the target object.

[0226] Optionally, the first device may also send the time and location to the second device, so that the second device can predetermine the location and time at which the target object appears in its viewing angle.

[0227] In some embodiments, estimating the time and location of the target object from the perspective of the second device includes:

[0228] The time and position at which the target object appears in the viewing angle of the second device are estimated according to the position, movement speed, and movement direction of the target object.

[0229] Based on the embodiments of the present application, the first device can successfully estimate the time and position at which the target object appears from the perspective of the second device.

[0230] In some embodiments, if there is a visual blind spot between the second device and the first device, estimating the time and location of the target object appearing in the perspective of the second device includes:

[0231] The time and position at which the target object appears in the perspective of the second device are estimated based on the position, movement speed, and movement direction of the target object when it leaves the perspective of the first device.

[0232] For example, see Figure 5 , the first device may be camera 2, the second device may be camera 3, and there is a visual blind spot between camera 2 and camera 3.

[0233] In other examples, the first device may further estimate the time and location of the target object appearing in the perspective of the second device in combination with traffic information. The traffic information can be described in the above text.

[0234] Based on the embodiments of the present application, even if there is a visual blind spot between the first device and the second device, the first device can still estimate the time and position of the target object from the perspective of the second device. This technical solution improves the application scenarios of target object tracking.

[0235] In some embodiments, the method 800 further includes:

[0236] The time and location are sent to the second device.

[0237] This technical solution enables the second device to predetermine the appearance position and time of the target object in its field of view.

[0238] In other examples, the appearance position and time of the target object in the viewing angle of the device may also be displayed on the display device.

[0239] Figure 9 This is a schematic block diagram of a device provided in an embodiment of the present application. Figure 9 As shown, the device 900 may include one or more processors 910; one or more memories 920; the one or more memories 920 store one or more instructions, and when the instructions are executed by the one or more processors 910, the positioning method described in any possible implementation method described above is executed.

[0240] Exemplarily, the device 900 may be the monitoring device, camera, server, etc. mentioned above.

[0241] The device 900 can be used to execute the positioning method and the method for tracking the target object described in the above embodiments.

[0242] An embodiment of the present application also provides a device, including a processor and a communication interface, the communication interface is used to receive a signal and transmit the signal to the processor, the processor processes the signal so that the positioning method described in any possible implementation method described above is executed.

[0243] The device may be a chip. For example, the chip may be a chip system or an independent chip.

[0244] An embodiment of the present application further provides a readable storage medium, which stores instructions. When the instructions are executed on a device, the device executes the above-mentioned related method steps to implement the positioning method in the above-mentioned embodiment.

[0245] The embodiment of the present application further provides a program product, which, when executed on a device, enables the device to execute the above-mentioned related steps to implement the positioning method in the above-mentioned embodiment.

[0246] An embodiment of the present application further provides a device for playing media, comprising a module for implementing the positioning method described in any of the above embodiments.

[0247] In addition, an embodiment of the present application also provides a device, which can specifically be a chip, component or module, and the device may include a connected processor and memory; wherein the memory is used to store instructions, and when the device is running, the processor can execute the instructions stored in the memory to enable the device to perform the positioning method in the above-mentioned method embodiments.

[0248] Among them, the equipment, readable storage medium, program product or device provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here.

[0249] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0250] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0251] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0252] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0253] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0254] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, 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 enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory, a random access memory, a magnetic disk, or an optical disk.

[0255] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A positioning method, characterized in that: The method is applied to a first device, and includes: When installing the first device, obtaining an initial posture of the first device, the initial posture including an initial position and an orientation posture; Acquire a picture of the first device within the viewing angle at the initial position; Acquire a three-dimensional model of a city within a preset distance range from the initial position; The target posture of the first device is determined according to the three-dimensional city model and the picture within the viewing angle, where the target posture includes a target position and a target orientation posture of the first device.

2. The method according to claim 1, characterized in that The determining the target position of the first device according to the three-dimensional city model and the picture within the viewing angle includes: Performing contour line extraction on the three-dimensional city model obtained from the perspective of the first pose to obtain a first contour line, and performing contour line extraction on the image to obtain a second contour line; If the difference between the first contour line and the second contour line is less than or equal to a preset threshold, determining the first posture as the target posture; or, If the difference between the first contour line and the second contour line is greater than a preset threshold, performing contour extraction on the three-dimensional city model obtained from the perspective of a second posture to obtain a first contour line corresponding to the perspective of the second posture, wherein the second posture is different from the first posture; If the difference between the first contour line corresponding to the second posture and the second contour line under the viewing angle is less than or equal to a preset threshold, the second posture is determined as the target posture.

3. The method according to claim 1 or 2, characterized in that The method further comprises: Determining whether the target posture of the first device is accurate; If it is determined that the target posture is inaccurate, adjusting the image within the viewing angle of the first device; The target position of the first device is re-determined according to the three-dimensional city model and the adjusted image within the viewing angle.

4. The method according to claim 3, characterized in that Determining whether the target posture of the first device is accurate includes: Determine a first distance between an initial position of the first device and initial positions of other devices, wherein the number of the other devices is one or more; determining a second distance between the target position of the first device and the target position of the other device; If the difference between the first distance and the second distance is greater than a first preset value, determining that the target posture of the first device is inaccurate; If the difference between the first distance and the second distance is less than or equal to a first preset value, it is determined that the target posture of the first device is accurate.

5. The method according to claim 3 or 4, characterized in that Adjusting the image within the viewing angle of the first device includes: adjusting the zoom ratio of the first device; or, Adjust the orientation posture of the first device.

6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: A position of a target object appearing in the viewing angle of the first device is determined, where the position is a three-dimensional coordinate of the target object.

7. The method according to claim 6, characterized in that The determining a position of a target object appearing in the viewing angle of the first device includes: The position of the target object appearing in the viewing angle of the first device is determined according to the target posture of the first device and the three-dimensional city model.

8. The method according to claim 6 or 7, characterized in that If the target object is in motion, the method further includes: Determine the speed and direction of movement of the target object.

9. The method according to any one of claims 6 to 8, characterized in that The method further comprises: The time and position at which the target object appears in the perspective of a second device are estimated, wherein the second device is a device adjacent to the first device in the direction of movement of the target object.

10. The method according to claim 9, characterized in that The estimating the time and position at which the target object appears from the perspective of the second device includes: The time and position at which the target object appears in the viewing angle of the second device are estimated according to the position of the target object, the moving speed of the target object, and the moving direction.

11. The method according to claim 9, characterized in that If there is a visual blind spot between the second device and the first device, estimating the time and position at which the target object appears in the perspective of the second device includes: The time and position at which the target object appears in the perspective of the second device are estimated based on the position, movement speed, and movement direction of the target object when it leaves the perspective of the first device.

12. The method according to claim 10 or 11, characterized in that The method further comprises: The time and location are sent to the second device.

13. The method according to any one of claims 1 to 12, characterized in that The three-dimensional city model is a city geographic information system (GIS) model.

14. A device, characterized in that include: one or more processors; One or more memories; the one or more memories store one or more programs, and when the one or more programs are executed by one or more processors, the positioning method according to any one of claims 1 to 13 is executed.

15. A chip, characterized in that: The chip includes a processor and a communication interface, wherein the communication interface is used to receive a signal and transmit the signal to the processor, and the processor processes the signal so that the positioning method according to any one of claims 1 to 13 is executed.

16. A readable storage medium, characterized in that The readable storage medium stores instructions, and when the instructions are executed on a device, the positioning method according to any one of claims 1 to 13 is executed.

17. A program product, characterized in that The program product includes program codes, and when the program codes are run on a device, the positioning method according to any one of claims 1 to 13 is executed.