Combined positioning method and device of camera and electronic equipment

By precalculating the coordinate ratio relationship of camera pixel points, the calculation process of camera combination positioning is simplified, and high-precision target positioning is achieved. It is suitable for multi-camera collaborative positioning scenarios, and supports fast response and efficient target tracking.

CN120259275APending Publication Date: 2025-07-04XIAMEN JIUHUA COMM EQUIP FACTORY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510483738.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-17
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

The existing camera visual target positioning algorithm is complex and has a large amount of calculations, especially in multi-camera collaborative positioning scenarios, which makes it difficult to achieve rapid response.

Method used

The coordinate ratio relationship of each pixel point on the photo taken by each camera is pre-calculated, the position coordinates of the camera are calculated using the field of view and resolution, and the position coordinates of the pixel point after the posture changes are calculated using the Rodriguez rotation formula. The target position is queried through the coordinate ratio relationship, which simplifies the calculation process and reduces the calculation amount.

Benefits of technology

It realizes high-precision calculation of camera combination positioning, simplifies the calculation process, reduces system resource occupation, and supports fast response and efficient target tracking of multi-camera collaborative positioning scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120259275A_ABST
    Figure CN120259275A_ABST
Patent Text Reader

Abstract

The invention discloses a camera combined positioning method and device and electronic equipment. The method comprises the following steps: calculating a coordinate ratio relationship of each pixel point on a picture shot by each camera in advance; when the position or posture of at least one camera is adjusted, performing the following calculation: setting the position coordinate of one camera as an original point, and performing calculation to obtain a displacement vector of the other camera; respectively acquiring a first pixel coordinate P1 of the target and a second pixel coordinate P2 of the target in the photos with the to-be-positioned target shot by the two cameras, and querying according to a coordinate ratio relationship of pixel points of the photos shot by the corresponding cameras to obtain a position coordinate ratio relationship corresponding to the first pixel coordinate P1 and the second pixel coordinate P2; and calculating the position coordinate of the target according to the displacement vector and the position coordinate ratio relation corresponding to the first pixel coordinate P1 and the second pixel coordinate P2. According to the invention, the calculation difficulty and the calculation amount are reduced, and the positioning precision is high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of visual intelligence, and particularly to a combined positioning method, device, and electronic device for a camera. Background Art

[0002] In the field of visual intelligence, the visual target positioning of a camera is an important observable quantity of machine intelligence. Currently, the positioning algorithms for camera visual targets are as follows: ① Estimate the direction and distance of the target using the camera, and then perform target positioning based on the estimated distance and direction; ② Detect and position the target using a deep neural network; ③ Based on feature matching, detect the feature points of the image target, and then calculate the target position using the midpoint of the perpendicular bisector of the intersection vector according to the image positions of the feature points.

[0003] The main problems of the prior art are as follows: The calculation is relatively complex. For example, the methods of artificial intelligence often require relatively large parameters, and complex model training is required in the early stage. The calculation amount is also relatively large after the model is fixed. Summary of the Invention

[0004] The main purpose of the present invention is to overcome the defect that the calculation of the target positioning method in the prior art is relatively complex or the calculation amount is large, and to propose a combined positioning method, device, and electronic device for a camera, which uses the position of the visual target at the pixel points of the camera for positioning calculation, reduces the calculation difficulty and calculation amount, and has high positioning accuracy.

[0005] The present invention adopts the following technical solutions:

[0006] A combined positioning method for a camera includes the following: Calculate the coordinate ratio relationship of each pixel point on the photo taken by each camera in advance; when the position or attitude of at least one of the cameras is adjusted, perform the following calculations:

[0007] Set the position coordinates of one of the cameras as the origin, and calculate the displacement vector of the other camera; respectively obtain the first pixel coordinates P1 of the target and the second pixel coordinates P2 of the target in the photos with the target to be positioned taken by the two cameras, and query the position coordinate ratio relationship corresponding to the first pixel coordinates P1 and the second pixel coordinates P2 according to the coordinate ratio relationship of the pixel points on the photos taken by the corresponding cameras;

[0008] Calculate the position coordinates of the target according to the displacement vector and the position coordinate ratio relationship corresponding to the first pixel coordinates P1 and the second pixel coordinates P2.

[0009] Calculating the coordinate ratio relationship of each pixel point on the photo taken by the camera specifically includes:

[0010] Calculate the first position coordinates and the first position coordinate vectors of the four vertices on the first photo taken by the camera when the camera is in a preset pose according to the field of view angle and resolution of the camera;

[0011] Using the Rodriguez rotation formula, calculate the second position coordinate vectors of the four vertices on the second photo taken by the camera when the camera is in a second pose after rotating relative to the preset pose according to the first position coordinate vectors;

[0012] Calculate the unit vector of the photo plane of the second photo according to the second position coordinate vectors and the resolution of the camera;

[0013] Obtain the position coordinate vectors of the pixel points on the second photo according to the pixel point coordinates on the second photo and the unit vector;

[0014] Calculate the coordinate ratio relationship of the pixel points on the second photo according to the position coordinate vectors of the pixel points;

[0015] Calculate the first position coordinates of the four vertices on the first photo taken by the camera when the camera is in a preset pose according to the field of view angle and resolution of the camera, specifically:

[0016] If the preset pose of the camera is that the camera coordinates are on the Z axis, then:

[0017] Xmax = Z * tan(ViewBoundary.X);

[0018] Ymax = Z * tan(ViewBoundary.Y);

[0019] Wherein, Xmax represents the distance between the side on the X axis and the Y axis of the first photo, Ymax represents the distance between the side on the Y axis and the X axis of the first photo, ViweBoundary.X represents the field of view angle of the camera in the X axis direction, ViweBoundary.X represents the field of view angle of the camera in the Y axis direction, and Z is the Z axis coordinate of the camera;

[0020] Then the first position coordinates of the four vertices of the first photo of the camera are respectively: (-Xmax, -Ymax, Z), (-Xmax, Ymax, Z), (Xmax, -Ymax, Z), (Xmax, Ymax, Z); the first position coordinate vectors are (-Xmax, -Ymax, Z), (Xmax, -Ymax, Z), (-Xmax, Ymax, Z), (Xmax, Ymax, Z).

[0021] Calculate the unit vector of the photo plane of the second photo according to the second position coordinate vector and the resolution of the camera, specifically:

[0022] Calculate the unit vector in the X-axis direction of the photo plane as:

[0023]

[0024] Calculate the unit vector in the Y-axis direction of the photo plane as:

[0025]

[0026] where Peak1, Peak2, Peak3, and Peak4 are the second position coordinate vectors of the four vertices of the second photo respectively; PixelBoundary.x and PixelBoundary.y are the X-axis resolution and Y-axis resolution of the camera respectively.

[0027] Obtain the position coordinate vector of the pixel point of the second photo according to the pixel point coordinate on the second photo and the unit vector, specifically:

[0028]

[0029] where (m, n) is the pixel point coordinate on the second photo.

[0030] Calculate the coordinate ratio relationship of the pixel point of the second photo according to the position coordinate vector of the pixel point, specifically including the following:

[0031] When the Z-axis coordinate of the position coordinate vector of the pixel point then there is:

[0032]

[0033] When the Z-axis coordinate of the position coordinate vector of the pixel point then there is:

[0034]

[0035] where Ratio m,n .x represents the ratio of the X-axis and Z-axis of the pixel point, Ratio m,n .y represents the ratio of the Y-axis and Z-axis of the pixel point, and are the X-axis coordinate, Y-axis coordinate, and Z-axis coordinate of the position coordinate vector of the pixel point respectively.

[0036] Calculate the position coordinates of the target according to the position coordinate ratio relationship corresponding to the displacement vector, the first pixel coordinate P1, and the second pixel coordinate P2, specifically as follows:

[0037] When the X-axis coordinate of the displacement vector satisfies mov.x = Ratio Pixel1 .x + Ratio Pixel2 .x, the position coordinates of the target are:

[0038] goal.z = 0;

[0039] goal.x = Ratio Pixel1 .x;

[0040] goal.y = Ratio Pixel1 .y;

[0041] Where mov.x is the X-axis coordinate of the displacement vector, (goal.x, goal.y, goal.z) are the position coordinates of the target; Ratio Pixel1 .x, and Ratio Pixel1 .y are the position coordinate ratio relationships of the first pixel P1, Ratio Pixel2 .x and Ratio Pixel2 .y are the position coordinate ratio relationships of the second pixel P2.

[0042] Calculate the position coordinates of the target according to the position coordinate ratio relationship corresponding to the displacement vector, the first pixel coordinate P1, and the second pixel coordinate P2, specifically as follows: When the X-axis coordinate of the displacement vector satisfies when mov.x ≠ Ratio Pixel1 .x + Ratio Pixel2 .x, the position coordinates of the target are:

[0043] goal.z = (mov.x + mov.z * Ratio Pixel2 .x / (Ratio Pixel1 .x + Ratio Pixel2 .x);

[0044] goal.x = goal.z * Ratio Pixel1 .x;

[0045] goal.y = goal.z * Ratio Pixel1 .y;

[0046] Where mov.x and mov.z are the X-axis coordinate and Z-axis coordinate of the displacement vector, (goal.x, goal.y, goal.z) are the position coordinates of the target; (RatioPixel1 .x, Ratio Pixel1 .y) is the position coordinate ratio relationship of the first pixel P1, (Ratio Pixel2 .x, Ratio Pixel2 .y) is the position coordinate ratio relationship of the second pixel P2.

[0047] A combined positioning device for a camera, characterized by comprising:

[0048] A coordinate ratio relationship calculation module that pre-calculates the coordinate ratio relationship of each pixel point on the photo taken by each camera;

[0049] A displacement vector calculation module that, when the position or attitude of at least one of the cameras is adjusted, sets the position coordinates of one of the cameras as the origin and calculates the displacement vector of the other camera;

[0050] A search module that respectively obtains the first pixel coordinate P1 of the target and the second pixel coordinate P2 of the target in the photos with the target to be located taken by the two cameras, and queries the corresponding position coordinate ratio relationship according to the coordinate ratio relationship of the pixel points on the photos taken by the corresponding cameras;

[0051] A positioning module that calculates the position coordinates of the target according to the displacement vector and the position coordinate ratio relationship corresponding to the first pixel coordinate P1 and the second pixel coordinate P2.

[0052] An electronic device, the electronic device includes a processor, and the processor is used to implement the combined positioning method of the camera when executing a computer program stored in a memory.

[0053] As can be seen from the above description of the present invention, compared with the prior art, the present invention has the following beneficial effects:

[0054] The solution of the present invention pre-calculates the coordinate ratio relationship of the pixel points on the photo taken by the camera; queries the corresponding position coordinate ratio relationship according to the first pixel coordinate P1 of the target and the second pixel coordinate P2 of the target in the photos taken by different cameras; calculates the position coordinates of the target based on the position coordinate ratio relationship, and the calculation method is simple, the calculation amount is small and the positioning accuracy is high.

[0055] The present invention pre - establishes the coordinate ratio relationship of pixel points in the captured images of different cameras to form a mapping rule library that can be quickly called. When performing target positioning, it directly queries and applies the pre - stored coordinate relationship based on the target pixel coordinates, avoiding the complex real - time coordinate conversion operations in traditional methods. This solution greatly simplifies the calculation process, reduces the system's computational resource occupancy rate, and is particularly suitable for multi - camera collaborative positioning scenarios, enabling rapid response and output of the target position.

[0056] The core mapping rule library of this solution can be flexibly updated through offline calibration, and can adapt to actual requirements such as different camera layouts, resolution changes, or installation angle adjustments, avoiding the problem of repeated parameter calibration caused by environmental changes in traditional methods. At the same time, this architecture supports parallel processing and fusion of multi - camera data, providing an efficient technical basis for large - scale monitoring networks or cross - view continuous tracking of dynamic targets. Brief Description of the Drawings

[0057] Figure 1 It is a schematic diagram of the non - rotated coordinate system of the camera;

[0058] Figure 2 It is a simulation result diagram.

[0059] The following further details the present invention in conjunction with the drawings and specific embodiments. Detailed Embodiment

[0060] The following further describes the present invention through specific embodiments.

[0061] Refer to Figure 1 and Figure 2 , a combined positioning method for cameras, which can use two or more cameras to perform combined positioning on a visual target. It assumes that the pose of the camera is a known quantity and uses the position of the visual target on the pixel points of the camera for positioning calculation.

[0062] In the present invention, the coordinate ratio relationship of each pixel point on the photo captured by each camera is pre - calculated to obtain the coordinate ratio relationship of the pixel points corresponding to each camera. The coordinate ratio relationship refers to the ratio relationship of the position coordinate vectors of each pixel point on the photo, such as the ratio of the X - axis position coordinate vector to the Y - axis position coordinate vector of the pixel point, the ratio of the Y - axis position coordinate vector to the Z - axis position coordinate vector of the pixel point, etc. The specific calculation is as follows:

[0063] 1) Calculate the first position coordinates and the first position coordinate vectors of the four vertices on the first photo captured by the camera in a preset pose according to the field - of - view angle and resolution of the camera. The preset pose can be the initial pose. As Figure 1 stated, the camera position coordinates are located on the Z - axis (the X - axis and Y - axis position coordinates are 0), and its orientation is the positive direction of the Y - axis. The specific calculation is as follows:

[0064] Assume Z = 100, the distances from the left and right sides of the first photo (i.e., both sides in the X-axis direction of the photo) to the Y-axis are:

[0065] Xmax = Z * tan ViweBoundary.X;

[0066] The distances from the top and bottom sides of the first photo (i.e., both sides in the Y-axis direction of the photo) to the X-axis are:

[0067] Ymax = Z * tan ViweBoundary.Y;

[0068] Among them, Xmax represents the distance between the side on the X-axis of the first photo and the Y-axis, Ymax represents the distance between the side on the Y-axis of the first photo and the X-axis, ViweBoundary.X represents the field of view angle of the camera in the X-axis direction, ViweBoundary.X represents the field of view angle of the camera in the Y-axis direction, and Z is the Z-axis coordinate of the camera;

[0069] Then the first position coordinates of the four vertices of the first photo of the camera are respectively: (-Xmax, -Ymax, Z), (-Xmax, Ymax, Z), (Xmax, -Ymax, Z), (Xmax, Ymax, Z); The first position coordinate vector is (-Xmax, -Ymax, Z), (Xmax, -Ymax, Z), (-Xmax, Ymax, Z), (Xmax, Ymax, Z).

[0070] 2) Adopt the Rodriguez rotation formula to calculate the second position coordinate vector of the four vertices on the second photo taken when the camera rotates to the second pose relative to the preset pose according to the first position coordinate vector.

[0071] In this step, assume that the camera rotates to the second pose relative to the preset pose, for example, rotates by θ around the Z-axis, β around the X-axis, and α around the Y-axis. The Rodriguez rotation formula is a calculation formula for calculating the new vector obtained by rotating a vector around the rotation axis by a given angle in three-dimensional space. Given the first position coordinate vector of the four vertices obtained in step 1), the second position coordinate vector after the camera rotates by θ around the Z-axis, β around the X-axis, and α around the Y-axis can be calculated through the Rodriguez rotation formula. Assume that the calculated second position coordinate vectors of the four vertices of the rotated second photo are Peak1, Peak2, Peak3, and Peak4 respectively, and each second position coordinate vector includes (x, y, z), where x represents the coordinate on the X-axis, y represents the coordinate on the Y-axis, and z represents the coordinate on the Z-axis.

[0072] 3) Calculate the unit vector of the photo plane of the second photo based on the second position coordinate vector and the resolution of the camera. Specifically:

[0073] Calculate the unit vector in the X-axis direction of the photo plane of the second photo as:

[0074]

[0075] Calculate the unit vector in the Y-axis direction of the photo plane of the second photo as:

[0076]

[0077] where Peak1, Peak2, Peak3, and Peak4 are the second position coordinate vectors of the four vertices of the second photo respectively; PixelBoundary.x and PixelBoundary.y are the X-axis resolution and Y-axis resolution of the camera respectively.

[0078] 4) Obtain the position coordinate vector of the pixel point of the second photo based on the pixel point coordinates on the second photo and the unit vector;

[0079] Assume that the coordinates of each pixel point on the second photo are (m, n), then according to the unit vector obtained in step 3), the three-dimensional position coordinate vector of the pixel point on the second photo can be obtained:

[0080]

[0081] The position coordinate vector of the pixel point of the second photo

[0082] 5) Calculate the coordinate ratio relationship of the pixel points of the second photo based on the position coordinate vector of the pixel points.

[0083] Set the coordinate ratio relationship of the three-dimensional pixel point position coordinate vector obtained in step 4) as Ratio m,n , which includes Ratio m,n .x represents the ratio of the pixel point's X-axis to the Z-axis, Ratio m,n .y represents the ratio of the pixel point's Y-axis to the Z-axis,

[0084]

[0085] Calculate the coordinate ratio relationship of the pixel points of the second photo based on the position coordinate vector of the pixel points, specifically including the following:

[0086] When the Z-axis coordinate of the position coordinate vector of the pixel point is, then there is:

[0087]

[0088] When the Z-axis coordinate of the position coordinate vector of the pixel point then there is:

[0089]

[0090] wherein, and are the X-axis coordinate and Y-axis coordinate of the position coordinate vector of the pixel point.

[0091] By traversing all the pixels in the second photo through the above steps 1)-5), the coordinate ratio relationship Ratio of all the pixel points in the second photo is calculated m,n .

[0092] In the method of the present invention, after obtaining the coordinate ratio relationship of all the pixel points of the pictures taken by each camera through the above method, combined positioning calculation can be performed, which specifically includes the following:

[0093] S1 When the position or attitude of at least one camera is adjusted, the position coordinate of one of the cameras is set to be at the origin of the three-dimensional coordinate, and the displacement vector of the other camera is calculated which includes mov.x, mov.y, and mov.z; respectively obtain the first pixel coordinate P1 of the target and the second pixel coordinate P2 of the target in the photos with the target to be located taken by the two cameras, and query the corresponding position coordinate ratio relationship according to the coordinate ratio relationship of the pixel points of the photos taken by the corresponding cameras.

[0094] In this step, the first pixel coordinate and the second pixel coordinate of the target in the two photos are obtained by eigenvalue matching. The corresponding position coordinate ratio relationship queried from the first pixel coordinate P1 of the target in the photo with the target to be located taken by one of the cameras is Ratio Pixel1 , and the corresponding position coordinate ratio relationship queried from the second pixel coordinate P2 of the target in the photo with the target to be located taken by the other camera is Ratio Pixel2 .

[0095] S2 Calculate the position coordinate of the target according to the displacement vector, the position coordinate ratio relationship corresponding to the first pixel coordinate P1 and the second pixel coordinate P2, specifically:

[0096] When the X-axis coordinate of the displacement vector satisfies mov.x = Ratio Pixel1 .x + Ratio Pixel2 .x, the position coordinate of the target is:

[0097] goal.z = 0;

[0098] goal.x = Ratio Pixel1 .x;

[0099] goal.y = Ratio Pixel1 .y;

[0100] Wherein, mov.x is the X-axis coordinate of the displacement vector, and (goal.x, goal.y, goal.z) are the position coordinates of the target; Ratio Pixel1 .x and Ratio Pixel1 .y are the ratio relationships of the position coordinates of the first pixel P1, and Ratio Pixel2 .x and Ratio Pixel2 .y are the ratio relationships of the position coordinates of the second pixel P2.

[0101] The position coordinates of the target are calculated based on the displacement vector and the ratio relationships of the position coordinates corresponding to the first pixel coordinate P1 and the second pixel coordinate P2. Specifically: when the X-axis coordinate of the displacement vector satisfies mov.x ≠ Ratio Pixel1 .x + Ratio Pixel2 .x, the position coordinates of the target are:

[0102] goal.z = (mov.x + mov.z * Ratio Pixel2 .x / (Ratio Pixel1 .x + Ratio Pixel2 .x);

[0103] goal.x = goal.z * Ratio Pixel1 .x;

[0104] goal.y = goal.z * Ratio Pixel1 .y;

[0105] Wherein, mov.x and mov.z are the X-axis coordinate and Z-axis coordinate of the displacement vector, and (goal.x, goal.y, goal.z) are the position coordinates of the target; (Ratio Pixel1 .x, Ratio Pixel1 .y) are the ratio relationships of the position coordinates of the first pixel P1,

[0106] (Ratio Pixel2 .x, Ratio pixel2 .y) are the ratio relationships of the position coordinates of the second pixel P2.

[0107] The present invention uses more than two cameras for combined positioning of visual targets. The algorithm assumes that the poses of the cameras are known quantities, and uses the positions of the visual targets at the pixel points of the cameras for positioning calculations. The calculation process is simple and the positioning accuracy is high. Refer to Figure 2 the simulation result diagram in

[0108] For the method of the present invention, when performing combined positioning for multiple cameras, for every two cameras, the method of steps S1 and S2 is used for combined positioning, and the multiple obtained positioning results are then arithmetically averaged to obtain the combined positioning result of the multiple cameras.

[0109] Based on this, the present invention also proposes a combined positioning device for cameras. This device uses the above-mentioned combined positioning method for cameras to achieve the positioning of the target, including:

[0110] A coordinate ratio relationship calculation module that pre-calculates the coordinate ratio relationship of each pixel point on the photos taken by each camera. This module is used to implement steps 1)-5) in the above method.

[0111] A displacement vector calculation module. When the position or pose of at least one camera is adjusted, the position coordinates of one of the cameras are set as the origin, and the displacement vector of the other camera is calculated. This module is used to implement the calculation of the displacement vector of the camera in step S1 of the above method.

[0112] A search module that respectively obtains the first pixel coordinate P1 of the target and the second pixel coordinate P2 of the target in the photos with the target to be positioned taken by two cameras, and queries the corresponding position coordinate ratio relationship of the first pixel coordinate P1 and the second pixel coordinate P2 according to the coordinate ratio relationship of the pixel points on the photos taken by the corresponding cameras. This module is used to execute the search for the position coordinate ratio relationship of the pixels in step S1 of the above method.

[0113] A positioning module that calculates the position coordinates of the target according to the displacement vector and the position coordinate ratio relationship corresponding to the first pixel coordinate P1 and the second pixel coordinate P2. This module is used to execute step S2 of the above method.

[0114] An electronic device, which includes a processor. The processor is used to implement the combined positioning method for cameras when executing the computer program stored in the memory.

[0115] The present invention also provides a computer-readable medium. This computer-readable medium can be included in the electronic device described in the above embodiments; or it can exist alone without being assembled into the electronic device.

[0116] The above computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to implement the method described in the above embodiments.

[0117] It should be noted that although several modules or units of a device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more of the above-described modules or units may be embodied in one module or unit. Conversely, the features and functions of one module or unit described above may be further divided and embodied by multiple modules or units.

[0118] Through the description of the above embodiments, those skilled in the art can easily understand that the example embodiments described herein can be implemented by software or by a combination of software and necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.

[0119] After considering the specification and practicing the invention disclosed herein, those skilled in the art will readily conceive of other embodiments of the present disclosure. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common general knowledge or conventional technical means in the technical field not disclosed by the present disclosure.

[0120] The above are only the specific embodiments of the present invention, but the design concept of the present invention is not limited thereto. Any non-substantive modification made to the present invention using this concept shall fall within the scope of infringement of the protection of the present invention.

Claims

1. A combined positioning method for a camera, characterized in that, The following are included: pre-calculating the coordinate ratio relationship of each pixel point on the photos taken by each camera; when the position or attitude of at least one of the cameras is adjusted, the following calculations are performed: Set the position coordinates of one of the cameras as the origin, and calculate the displacement vector of the other camera; respectively obtain the first pixel coordinates P1 of the target and the second pixel coordinates P2 of the target in the photos with the target to be located taken by the two cameras, and query the position coordinate ratio relationship corresponding to the first pixel coordinates P1 and the second pixel coordinates P2 according to the coordinate ratio relationship of the pixel points on the photos taken by the corresponding cameras; Calculate the position coordinates of the target according to the displacement vector and the position coordinate ratio relationship corresponding to the first pixel coordinates P1 and the second pixel coordinates P2.

2. The combined positioning method of a camera according to claim 1, characterized in that, Calculate the coordinate ratio relationship of each pixel point on the photo taken by the camera, specifically: Calculate the first position coordinates and the first position coordinate vectors of the four vertices on the first photo taken by the camera in the preset attitude according to the field of view angle and resolution of the camera; Adopt the Rodriguez rotation formula to calculate the second position coordinate vectors of the four vertices on the second photo taken by the camera in the second attitude after rotating relative to the preset attitude according to the first position coordinate vectors; Calculate the unit vector of the photo plane of the second photo according to the second position coordinate vectors and the resolution of the camera; Obtain the position coordinate vectors of the pixel points of the second photo according to the pixel point coordinates on the second photo and the unit vector; Calculate the coordinate ratio relationship of the pixel points of the second photo according to the position coordinate vectors of the pixel points.

3. The combined positioning method of a camera according to claim 2, characterized in that, Calculate the first position coordinates of the four vertices on the first photo taken by the camera in the preset attitude according to the field of view angle and resolution of the camera, specifically: If the preset attitude of the camera is that the camera coordinates are on the Z axis, then: Xmax = Z * tan(ViewBoundary.X); Ymax = Z * tan(ViewBoundary.Y); Where, Xmax represents the distance between the side on the X axis of the first photo and the Y axis, Ymax represents the distance between the side on the Y axis of the first photo and the X axis, ViweBoundary.X represents the field of view angle of the camera in the X axis direction, ViweBoundary.X represents the field of view angle of the camera in the Y axis direction, and Z is the Z axis coordinate of the camera; Then the first position coordinates of the four vertices of the first photo of the camera are respectively: (-Xmax, -Ymax, Z), (-Xmax, Ymax, Z), (Xmax, -Ymax, Z), (Xmax, Ymax, Z); the first position coordinate vectors are (-Xmax, -Ymax, Z), (Xmax, -Ymax, Z), (-Xmax, Ymax, Z), (Xmax, Ymax, Z).

4. The combined positioning method of a camera according to claim 2, wherein, Calculate the unit vector of the photo plane of the second photo according to the second position coordinate vector and the resolution of the camera, specifically: Calculate the unit vector in the X-axis direction of the photo plane as: Calculate the unit vector in the Y-axis direction of the photo plane as: Where Peak1, Peak2, Peak3, and Peak4 are the second position coordinate vectors of the four vertices of the second photo respectively; PixelBoundary.x and PixelBoundary.y are the X-axis resolution and Y-axis resolution of the camera respectively.

5. The combined positioning method of a camera according to claim 4, wherein, Obtain the position coordinate vector of the pixel point of the second photo according to the pixel point coordinate on the second photo and the unit vector, specifically: Where (m, n) is the pixel point coordinate on the second photo.

6. The combined positioning method of a camera according to claim 2, characterized in that, Calculate the coordinate ratio relationship of the pixel point of the second photo according to the position coordinate vector of the pixel point, specifically including the following: When the Z-axis coordinate of the position coordinate vector of the pixel point then there is: When the Z-axis coordinate of the position coordinate vector of the pixel point then there is: Among them, Ratio m,n .x represents the ratio of the X-axis to the Z-axis of the pixel point, Ratio m,n .y represents the ratio of the Y-axis to the Z-axis of the pixel point, and are respectively the X-axis coordinate, Y-axis coordinate and Z-axis coordinate of the position coordinate vector of the pixel point.

7. The combined positioning method of a camera according to claim 1, wherein, Calculate the position coordinates of the target according to the displacement vector and the position coordinate ratio relationship corresponding to the first pixel coordinate P1 and the second pixel coordinate P2, specifically: When the X-axis coordinate of the displacement vector satisfies mov.x = Ratio Pixel1 .x + Ratio Pixel2 .x, the position coordinates of the target are: goal.z = 0; goal.x = Ratio Pixel1 .x; goal.y = Ratio Pixel1 .y; where mov.x is the X-axis coordinate of the displacement vector, and (goal.x, goal.y, goal.z) are the position coordinates of the target; Ratio Pixel1 .x, and Ratio Pixel1 .y are the ratio relationships of the position coordinates of the first pixel P1, Ratio Pixel2 .x and Ratio Pixel2 .y are the ratio relationships of the position coordinates of the second pixel P2.

8. The combined positioning method of a camera according to claim 1, characterized in that, The position coordinates of the target are calculated according to the ratio relationship of the position coordinates corresponding to the displacement vector, the first pixel coordinate P1, and the second pixel coordinate P2. Specifically, when the X-axis coordinate of the displacement vector satisfies mov.x≠Ratio Pixel1 .x+Ratio Pixel2 .x, the position coordinates of the target are: goal.z = (mov.x + mov.z * Ratio Pixel2 .x / (Ratio Pixel1 .x + Ratio Pixel2 .x); goal.x = goal.z * Ratio Pixel1 .x; goal.y = goal.z * Ratio Pixel1 .y; where mov.x and mov.z are the X-axis coordinate and Z-axis coordinate of the displacement vector, and (goal.x, goal.y, goal.z) are the position coordinates of the target; (Ratio Pixel1 .x, Ratio Pixel1 .y) is the ratio relationship of the position coordinates of the first pixel P1, and (Ratio Pixel2 .x, Ratio Pixel2 .y) is the ratio relationship of the position coordinates of the second pixel P2.

9. A combined positioning device for a camera, characterized in that, Including: A coordinate ratio relationship calculation module that pre-calculates the coordinate ratio relationship of each pixel point on the photo taken by each camera; A displacement vector calculation module that, when the position or attitude of at least one of the cameras is adjusted, sets the position coordinates of one of the cameras as the origin and calculates the displacement vector of the other camera; A search module that respectively obtains the first pixel coordinate P1 of the target and the second pixel coordinate P2 of the target in the photos with the target to be located taken by the two cameras, and queries the position coordinate ratio relationship corresponding to the first pixel coordinate P1 and the second pixel coordinate P2 according to the coordinate ratio relationship of the pixel points of the photo taken by the corresponding camera; A positioning module that calculates the position coordinates of the target according to the displacement vector and the position coordinate ratio relationship corresponding to the first pixel coordinate P1 and the second pixel coordinate P2.

10. An electronic device, the electronic device includes a processor, and the processor is used to implement the combined positioning method of the camera as described in any one of claims 1-8 when executing the computer program stored in the memory.