A method, device and storage medium for eye contact positioning

By using at least a pair of shooting devices to calculate the pixel coordinates and parameters of the target object in different camera images, combined with geometric relationships and trigonometric functions, the problems of complex equipment and high cost in the existing technology are solved, and a low-cost and repeatable positioning method is realized.

CN115690212BActive Publication Date: 2025-09-09BEIJING TEXT NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211317339.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-26
Publication Date
2025-09-09
Estimated Expiration
2042-10-26

AI Technical Summary

Technical Problem

In the existing technology, positioning equipment is complex, costly, and cannot perform repeated simulations, making it difficult to meet the demand for low-cost and repeatable positioning.

Method used

At least one pair of shooting devices is used to simultaneously shoot images of the target object. The position of the target object in space is calculated by calculating the pixel coordinates and camera parameters of the target object in different camera images, combining geometric relationships and trigonometric functions.

Benefits of technology

It achieves low cost, simple equipment structure, can perform repeated simulation positioning, and ensures positioning accuracy within a certain range.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115690212B_ABST
    Figure CN115690212B_ABST
Patent Text Reader

Abstract

The present application discloses a line-of-sight positioning method, device and storage medium, which belongs to the field of spatial positioning. It includes: using a pair of shooting devices to simultaneously shoot images of a target object, and obtaining a first image and a second image respectively; calculating a first angle and a second angle based on the first object pixel coordinates, the second camera image coordinates and the first camera parameters, the second object pixel coordinates, the first camera image coordinates and the second camera parameters; calculating a first length and a second length based on the first angle, the second angle and the offline length of the camera spacing; calculating a fourth angle based on a reference length, a reference angle, the first length, the second length, the third angle, and the distance between the post-selected camera and the reference object; obtaining the position of the target object in space based on the first length, the second length and the fourth angle. The present application can reduce positioning costs while ensuring positioning accuracy, can realize subsequent repeated simulations, and can form an array to cover a larger area.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of spatial positioning technology, and in particular to a line-of-sight positioning method, device, and storage medium. Background Art

[0002] In existing technology, determining an object's position in space typically involves using radar to emit a directional beam, including acoustic, electromagnetic, and laser waves. The time difference between the beam's reflection and the object's direction and distance from the source is used to determine the object's position. This technology is widely used in military, aerospace, transportation, and other fields. However, existing technology is characterized by high positioning accuracy, complex equipment, and high cost. It requires scanning of the detection space, high-precision mechanical devices and control systems, and is only capable of real-time positioning, with no ability for subsequent re-simulation.

[0003] In practical applications, we need a low-cost device to locate the position of an object in a fixed spatial area. The accuracy of the positioning device can be appropriately reduced, but it must be accurate enough and meet the requirements of repeated simulation. Summary of the Invention

[0004] In response to the problems of complex equipment, high cost and inability to perform repeatable post-simulation in the existing technology, this application mainly provides a line-of-sight positioning method, device and storage medium.

[0005] In order to achieve the above-mentioned purpose, a technical solution adopted in the present application is: to provide a line-of-sight positioning method, which includes: using at least a pair of shooting devices to simultaneously shoot images of the target object, and respectively obtaining a first image shot by a first camera and a second image shot by a second camera; respectively calculating the first angle formed by a first actual distance line and an offline camera spacing, and the second angle formed by a second actual distance line and an offline camera spacing according to the first object pixel coordinates of the target object in the first image, the second camera image coordinates of the second camera in the first image and the first camera parameters of the first camera, as well as the second object pixel coordinates of the target object in the second image, the first camera image coordinates and the second camera parameters of the first camera in the second image, wherein the first actual distance line is obtained by connecting the target object and the first camera, the offline camera spacing is obtained by connecting the first camera and the second camera, and the second actual distance line is obtained by connecting the first camera and the second camera. The target object is obtained by connecting the line with the second camera; the first length of the first actual distance line and the second length of the second actual distance line are calculated according to the value of the first angle, the value of the second angle and the length of the camera spacing line; the fourth angle composed of the first connecting line between the reference object and any one of the first and second cameras and the second connecting line is calculated using the reference length between the reference object and any one of the first and second cameras, the reference angle of the first camera, the first length, the second length, the third angle composed of the second selected reference distance line and the second selected target distance line, and the distance between the second selected camera and the reference object, wherein the second selected reference distance refers to the connecting line between the other second selected camera of the first and second cameras and the reference object, and the second selected target distance line refers to the connecting line between the second selected camera and the target object; and the positioning of the target object in space is obtained according to the first length, the second length and the fourth angle.

[0006] Optionally, a fifth angle between the third line and the shooting axis is obtained according to the camera parameters of the current camera, and a sixth angle between the fourth line and the shooting axis is obtained, wherein the third line refers to a line between the pixel point of the other viewing camera in the current image and the focal length, and the fourth line refers to a line between the pixel point of the target object in the current image and the focal length; according to the focal length between the focal length and the origin of the current image, and the fifth angle, a third length between the pixel point of the viewing camera and the focal length is obtained by using trigonometric functions, wherein the origin is the intersection of the shooting axis and the current image; according to the focal length and the sixth angle, a third length between the pixel point of the viewing camera and the focal length is obtained by using trigonometric functions. to a fourth length between the pixel point of the target object and the focal length; and, forming a seventh angle based on the line between the origin and the pixel point of the viewing camera and the line between the origin and the pixel point of the target object, and using the seventh angle, the distance between the pixel point of the viewing camera and the origin, and the distance between the pixel point of the target object and the origin, according to the trigonometric function, to obtain a fifth length between the pixel point of the viewing camera and the pixel point of the target object; using the third length, the fourth length and the fifth length, calculating the angle formed by the fifth line and the sixth line as the first angle or the second angle, wherein the fifth line refers to the line between the pixel point of the target object and the focal length, and the sixth line refers to the line between the pixel point of the viewing camera and the focal length.

[0007] Optionally, the perpendicular distance between the target object and the camera spacing line is calculated based on the value of the first angle, the value of the second angle and the length of the camera spacing line; and the positioning of the target object in space is obtained based on the perpendicular distance, the first length, the second length and the fourth angle.

[0008] Optionally, the first image and the second image are processed using a pixel correspondence function to obtain the first object pixel coordinates, the second camera image coordinates, the second object pixel coordinates, and the first camera image coordinates.

[0009] Optionally, the images captured by the first camera and the second camera are corrected using a correction function to obtain the first image and the second image.

[0010] Optionally, when the coordinates of the pixel points of the facing camera are not obtained using the current image, the coordinates of the pixel points of the facing camera are calculated using an extended positioning method and / or a crosshair method.

[0011] Another technical solution adopted in the present application is: to provide a visual positioning device, which includes: a shooting module, used to use at least a pair of shooting devices to simultaneously shoot images of the target object, and obtain a first image shot by a first camera and a second image shot by a second camera respectively; an angle calculation module, used to calculate the first angle formed by a first actual distance line and an offline camera spacing, and the second angle formed by a second actual distance line and an offline camera spacing according to the first object pixel coordinates of the target object in the first image, the second camera image coordinates of the second camera in the first image and the first camera parameters of the first camera, as well as the second object pixel coordinates of the target object in the second image, the first camera image coordinates and the second camera parameters of the first camera in the second image, wherein the first actual distance line is obtained by connecting the target object and the first camera, the offline camera spacing is obtained by connecting the first camera and the second camera, and the second actual distance line is obtained by connecting the target object and the second camera a length calculation module for calculating the first length of the first actual distance line and the second length of the second actual distance line according to the value of the first angle, the value of the second angle and the length of the camera spacing line; a relative position calculation module for calculating the fourth angle composed of the first connecting line between the reference object and the target object and the second connecting line between the target object and the first selected camera by using the reference length between the reference object and any one of the first and second cameras, the reference angle of the first camera, the first length, the second length, the third angle composed of the second selected reference distance line and the second selected target distance line, and the distance between the second selected camera and the reference object, wherein the second selected reference distance refers to the connecting line between the other second selected camera of the first and second cameras and the reference object, and the second selected target distance line refers to the connecting line between the second selected camera and the target object; and a positioning module for obtaining the positioning of the target object in space according to the first length, the second length and the fourth angle.

[0012] Another technical solution adopted in the present application is: providing a computer-readable storage medium storing computer instructions, which are operated to execute the eye contact positioning method in solution one.

[0013] The technical solution of the present application can achieve the following beneficial effects: simple equipment structure, low equipment deployment cost, ability to perform repeated post-simulation, and ability to ensure positioning accuracy within a certain range. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0015] Figure 1 This is a schematic diagram of a specific implementation of a line-of-sight positioning method of the present application;

[0016] Figure 2 It is a schematic diagram of a specific embodiment of the visual positioning range of the present application;

[0017] Figure 3 is a schematic diagram of a specific embodiment of the visual positioning system of the present application;

[0018] Figure 4 is a schematic diagram of a specific embodiment of the geometric relationship between the first angle or the second angle and the pixel point of the present application;

[0019] Figure 5 is a schematic diagram of a specific embodiment of the relative position between the target object and the camera of the present application;

[0020] Figure 6 is a schematic diagram of a specific embodiment of the relative positions of the target object, camera and reference object of the present application;

[0021] Figure 7 It is a schematic diagram of a specific implementation of a visual positioning device of the present application.

[0022] The above drawings illustrate specific embodiments of the present application, which will be described in more detail below. These drawings and the textual description are not intended to limit the scope of the present application in any way, but rather to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION

[0023] The preferred embodiments of the present application are described in detail below in conjunction with the accompanying drawings so that the advantages and features of the present application can be more easily understood by those skilled in the art, thereby making a clearer and more definite definition of the protection scope of the present application.

[0024] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, the elements defined by the phrase "comprising..." do not exclude the presence of other identical elements in the process, method, article, or device comprising the elements.

[0025] The existing technology has high positioning accuracy and high mechanical mechanism precision, but the equipment is complex and costly, and has high real-time performance, which is not suitable for scenarios with relatively low requirements for accuracy and real-time performance. This application discloses a line-of-sight positioning method, device and storage medium for applications with low real-time requirements and low accuracy requirements.

[0026] The following describes in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems using specific embodiments. The specific embodiments described below can be combined with each other to form new embodiments. The same or similar ideas or processes described in one embodiment may not be repeated in other embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0027] Figure 1 An embodiment of a line-of-sight positioning method of the present application is shown.

[0028] Figure 1 The eye contact positioning method shown includes: step S101, using at least a pair of shooting devices to simultaneously shoot images of a target object, and respectively obtaining a first image shot by a first camera and a second image shot by a second camera;

[0029] Step S102: Calculate a first angle between a first actual distance line and an offline camera spacing, and a second angle between a second actual distance line and an offline camera spacing based on the first object pixel coordinates of the target object in the first image, the second camera image coordinates of the second camera in the first image, and the first camera parameters of the first camera, as well as the second object pixel coordinates of the target object in the second image, the first camera image coordinates and the second camera parameters of the first camera in the second image, wherein the first actual distance line is obtained by connecting the target object and the first camera, the offline camera spacing is obtained by connecting the first camera and the second camera, and the second actual distance line is obtained by connecting the target object and the second camera.

[0030] Step S103, calculating a first length of the first actual distance line and a second length of the second actual distance line according to the value of the first angle, the value of the second angle, and the length of the camera separation line;

[0031] Step S104, calculating a fourth angle formed by a first connecting line between the reference object and the target object and a second connecting line between the target object and the first camera using a reference length between the reference object and any one of the first and second cameras, a reference angle of the first camera, the first length, the second length, a third angle formed by a second selected reference distance line and a second selected target distance line, and the distance between the second camera and the reference object, wherein the second selected reference distance refers to a connecting line between the other second camera among the first and second cameras and the reference object, and the second selected target distance line refers to a connecting line between the second camera and the target object; and

[0032] Step S105 , obtaining the position of the target object in space according to the first length, the second length and the fourth angle.

[0033] This specific implementation method has a simple device structure, low equipment deployment cost, can achieve delayed positioning so as to perform repeated later simulations, and can ensure positioning accuracy within a certain range.

[0034] exist Figure 1 In the illustrated embodiment, the line-of-sight positioning method includes step S101, where at least one pair of cameras simultaneously capture images of a target object, obtaining a first image captured by a first camera and a second image captured by a second camera. This step is fundamental to ensuring positioning accuracy. By using images captured by the line-of-sight cameras to locate the target object, positioning equipment can be simplified, reducing the manufacturing and deployment costs of positioning equipment. It also enables delayed positioning, ensuring the system is capable of performing subsequent simulations.

[0035] Specifically, the position of the target to be measured in the set area is located by using image processing technology and multi-center spatial geometry. That is, two cameras at a certain distance are used to simultaneously shoot the target object, where the target object needs to be in the following order: Figure 2 The shadow part is within the conical surface space formed by the intersection of the two camera shooting axes. The captured images are processed to obtain the first image and the second image. The target object mentioned above can be a person, an animal, or a fire somewhere in the forest, etc. This application does not limit the nature of the target object. The target object captured above is abstracted into pixel points in the image by using the geometric center method or the center of gravity method for subsequent calculations.

[0036] In actual application, Figure 3Utilizing multiple pairs of cameras to form a positioning system allows for more accurate object location and increases the system's range. Furthermore, multiple cameras can be installed in different orientations, allowing each camera to be paired with multiple other cameras to provide coverage of a specific area, enhancing the ability to locate obstacles within that area. During the deployment of the positioning system, the paired cameras must be within each other's field of view.

[0037] In a specific embodiment of the present application, step S101 includes correcting the images captured by the first camera and the second camera using a correction function to obtain the first image and the second image. This specific embodiment can further enhance positioning accuracy and reduce positioning accuracy errors caused by hardware errors.

[0038] Specifically, due to the influence of the manufacturing process, the camera lens and camera focal length will produce a certain degree of distortion during shooting. This will affect the coordinate position of the photographed object in the image, further affecting the accuracy of positioning using the image. To reduce the impact of the camera on positioning accuracy, during the positioning calculation process, the images captured by each camera used in the positioning system are corrected using the correction function corresponding to each camera to obtain linearized first and second images. Using the corresponding function Φ(x1, y1, x2, y2) between the corrected transmission angle after camera correction and the actual recorded pixels, the actual position of the photographed object can be accurately calculated based on the coordinates of the photographed object in the image.

[0039] exist Figure 1 In the illustrated embodiment, the line-of-sight positioning method further includes step S102, whereby a first angle between a first actual distance line and an offline camera distance is calculated, as well as a second angle between a second actual distance line and an offline camera distance, based on the first object pixel coordinates of the target object in the first image, the second camera image coordinates of the second camera in the first image, and the first camera parameters of the first camera; and a second angle between a first actual distance line and an offline camera distance is calculated, respectively. The first actual distance line is obtained by connecting the target object and the first camera, the offline camera distance is obtained by connecting the first camera and the second camera, and the second actual distance line is obtained by connecting the target object and the second camera. This step calculates the relative angle between the target object in real space and the first and second cameras based on the coordinate positions of the target object and the line-of-sight camera in the images, as well as parameters such as the focal lengths of the cameras, laying the foundation for using these angles to accurately locate the target object in space.

[0040] In one embodiment of the present application, step S102 includes processing the first image and the second image using a pixel correspondence function to obtain the first object pixel coordinates, the second camera image coordinates, the second object pixel coordinates, and the first camera image coordinates. In this embodiment, obtaining accurate pixel coordinates lays the foundation for calculating the accurate location of the target object in real space based on the accurate pixel coordinates.

[0041] Specifically, the content captured by the camera is presented as pixels on the imaging chip, and we usually use coordinates to represent pixel points. Depending on the focal length of the camera lens, the object falls on different pixel points on the imaging chip, that is, it falls on different pixel coordinate points on the corrected image. The pixel correspondence function is related to the camera lens and photosensitive chip and can be measured using specialized equipment. These camera-related parameters are determined when the camera leaves the factory. After obtaining the pixel correspondence function, the pixel correspondence function is used to process the first image and the second image to obtain the pixel coordinates of the first object, the coordinates of the second camera image, the pixel coordinates of the second object, and the coordinates of the first camera image. The pixel coordinates of the camera and the pixel coordinates of the target object are abstracted using the geometric center method.

[0042] Furthermore, when the coordinates of the pixels of the facing camera cannot be obtained using the current image, the coordinates of the pixels of the facing camera are calculated using the extended positioning method and / or the crosshair method. This specific embodiment solves the problem of being unable to obtain the image pixel coordinates of the camera when the facing camera is blocked, and expands the application scenarios of the facing positioning system.

[0043] For example, a laser device capable of simultaneously monitoring a pair of camera devices is used to measure the distances from the two camera devices to the laser device, as well as the angles and planes of the camera devices, and the pixel coordinates of the camera points facing each other of the two camera devices are calculated.

[0044] In a specific embodiment of the present application, step S102 includes obtaining a fifth angle between a third line and the shooting axis according to camera parameters of the current camera, and obtaining a sixth angle between a fourth line and the shooting axis, wherein the third line refers to a line between a pixel point of the other viewing camera in the current image and the focal length, and the fourth line refers to a line between a pixel point of the target object in the current image and the focal length; according to the focal length between the focal length and the origin of the current image, and the fifth angle, a third length between the pixel point of the viewing camera and the focal length is obtained by using a trigonometric function calculation, wherein the origin is the intersection of the shooting axis and the current image; according to the focal length and the sixth angle, The fourth length between the target object pixel and the focal length is calculated using trigonometric functions; and the seventh angle is formed based on the line between the origin and the pixel of the viewing camera, and the line between the origin and the pixel of the target object. The fifth length between the pixel of the viewing camera and the pixel of the target object is calculated using trigonometric functions using the seventh angle, the distance between the pixel of the viewing camera and the origin, and the distance between the pixel of the target object and the origin. The angle formed by the fifth and sixth lines is calculated using the third, fourth, and fifth lengths as the first or second angle, wherein the fifth line refers to the line between the pixel of the target object and the focal length, and the sixth line refers to the line between the pixel of the viewing camera and the focal length. This specific embodiment can accurately calculate the relative angle between the target object and the camera, which is the basis for subsequent precise positioning.

[0045] Specifically, such as Figure 4 , ∠CAB=θ1, ∠DAB=θ2, ∠CAD=Ψ, ∠CBD=Φ. According to the relevant parameters of the camera, it is possible to obtain the distance from the focal length of the camera to the origin on the image, that is, the length of AB, the pixel coordinates of C in the image, the pixel coordinates of D in the image, and the values ​​of θ1 and θ2. At the same time, from the principle of camera imaging, it can be known that ∠ABC=90°, ∠ABD=90°. The origin is the intersection of the shooting axis and the current image. The value of its coordinate point on the image is (0,0). The specific value of the coordinate point of the origin is not limited in this application.

[0046] Depend on Figure 4 The geometric relationship between the triangles and the known conditions are used to calculate the value of Ψ, that is, in triangle ABC, using Calculate the length of AC.

[0047] In triangle ABD, use Calculate the length of AD.

[0048] In triangle CBD, the lengths of BC and BD are calculated based on the pixel coordinates of point C, point D, and point B, and then the length of CD is calculated based on the angle Φ, that is, using the formula Alternatively, the length of CD can be calculated using the pixel coordinates of point C and point D through operations between coordinates.

[0049] In triangle ACD, according to CD 2 =AC 2 +AD 2 -2AC × ADcos(ψ) gives the value of Ψ, which is the first or second angle. Using trigonometric functions, the following formula can be used to deduce the value of Ψ.

[0050]

[0051]

[0052] exist Figure 1 In the illustrated embodiment, the line-of-sight positioning method further includes step S103, whereby a first length of the first actual distance line and a second length of the second actual distance line are calculated based on the values ​​of the first and second angles and the length of the camera separation line. This step determines the relative distances between the two cameras and the target object, thereby determining the range of the target object's position in space.

[0053] Specifically, the first angle and the second angle obtained by the above calculation are as follows: Figure 5 In Ψ1 and Ψ2, the length of the camera distance offline is known, and the length of R1 and the length of R2 are calculated through the geometric shapes between camera 1, camera 2 and the object, as well as the known angle values ​​of Ψ1 and Ψ2 and the length L of the camera distance offline, where the first actual distance line refers to R1 and the second actual distance line refers to R2.

[0054] The specific calculation process is: Figure 6 , draw a perpendicular line H through the object to separate the camera from the camera, and then use the formula and Calculate the length of L1 and the length of L2 using the formula and The length of R1 and the length of R2 are calculated.

[0055] exist Figure 1In the illustrated embodiment, the line-of-sight positioning method further includes, in step S104, calculating a fourth angle formed by a first line connecting the reference object and the target object and a second line connecting the target object and the first camera using the reference length between the reference object and either the first camera or the second camera, the reference angle of the first camera, the first length, the second length, the second reference distance line, and the second target distance line, as well as the distance between the second camera and the reference object. The second reference distance line refers to the line connecting the other second camera among the first camera and the second camera and the reference object, and the second target distance line refers to the line connecting the second camera and the target object. By introducing the reference object, this step enables more accurate spatial positioning of the target object.

[0056] Specifically, such as Figure 5 , taking camera 1 as the first selected camera and camera 2 as the second selected camera, with the reference length and reference angle known, use camera 2 to take a picture of the reference object, and use the above method to calculate the angle between the photographed target object and the camera using the picture to calculate the third angle, i.e., Ψ3. In the triangle formed by camera 2, the target object, and the reference object, using formula D1 2 =R2 2 +R3 2 -2R2×R3cos(ψ3) is used to calculate the distance D1 between the reference object and the target object. In the triangle formed by camera 1, the reference object and the target object, there is D1 2 =R1 2 +K 2 -2R1×Kcos(α1) equation, so the fourth angle α1 can be calculated to satisfy The fourth angle is calculated using the above formula.

[0057] In a specific embodiment of the present application, Figure 5 , set a reference object of known height in the vertical direction of the position of camera 1. Preferably, the reference object is an object with high color contrast. The distance between the reference object and the two cameras is known, that is, Figure 5 K and R3 are known. The relative orientation of the reference object and the camera is not restricted in this application. To facilitate calculation and subsequent stereoscopic transformation, the reference object is placed perpendicular to the camera. Furthermore, to improve positioning accuracy, a reference object is introduced perpendicular to each camera.

[0058] exist Figure 1In the illustrated embodiment, the line-of-sight positioning method further includes, in step S105, determining the position of the target object in space based on the first length, the second length, and the fourth angle. This step has a simple device structure, low equipment deployment costs, and enables delayed positioning, enabling repeated post-simulation, while also ensuring positioning accuracy within a certain range.

[0059] In one specific embodiment of the present application, step S105 includes calculating a perpendicular distance between the target object and the camera spacing line based on the first angle, the second angle, and the length of the camera spacing line; and determining the position of the target object in space based on the perpendicular distance, the first length, the second length, and the fourth angle. This specific embodiment can more accurately locate the target object in space.

[0060] Specifically, such as Figure 6 , using the formula The perpendicular distance between the target object and the camera separation line is calculated, where the values ​​of the first angle, the second angle, and the length of the camera separation line are all known quantities. If the position of the target object in space cannot be determined solely based on the first length, the second length, and the fourth angle, the position of the target object in space is determined based on the perpendicular distance, the first length, the second length, and the fourth angle.

[0061] Figure 7 A specific implementation of a visual positioning device of the present application is shown.

[0062] exist Figure 7 In the specific embodiment shown, the sight positioning device mainly includes: a shooting module 701, which is used to simultaneously shoot images of the target object using at least one pair of shooting devices to obtain a first image shot by a first camera and a second image shot by a second camera;

[0063] An angle calculation module 702 is configured to calculate a first angle between a first actual distance line and an offline camera distance, and a second angle between a second actual distance line and an offline camera distance, based on first object pixel coordinates of the target object in the first image, second camera image coordinates of the second camera in the first image, and first camera parameters of the first camera, as well as second object pixel coordinates of the target object in the second image, first camera image coordinates and second camera parameters of the first camera in the second image, wherein the first actual distance line is obtained by connecting the target object and the first camera, the offline camera distance is obtained by connecting the first camera and the second camera, and the second actual distance line is obtained by connecting the target object and the second camera;

[0064] A length calculation module 703 is configured to calculate a first length of the first actual distance line and a second length of the second actual distance line according to a value of the first angle, a value of the second angle, and a length of the camera separation line;

[0065] The relative position calculation module 704 is configured to calculate a fourth angle formed by a first connecting line between the reference object and the target object and a second connecting line between the target object and the first camera using a reference length between the reference object and any one of the first and second cameras, a reference angle of the first camera, the first length, the second length, a third angle formed by a second selected reference distance line and a second selected target distance line, and the distance between the second camera and the reference object, wherein the second selected reference distance is a connecting line between the other second camera among the first and second cameras and the reference object, and the second selected target distance line is a connecting line between the second camera and the target object; and

[0066] The positioning module 705 is configured to calculate the position of the target object in space according to the first length, the second length and the fourth angle.

[0067] The eye-to-eye positioning device provided in this application can be used to execute the eye-to-eye positioning method described in any of the above embodiments. Its implementation principles and technical effects are similar and will not be repeated here.

[0068] In a specific embodiment of the present application, each functional module in the line-of-sight positioning method of the present application can be directly in hardware, in a software module executed by a processor, or in a combination of the two.

[0069] The software modules may reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such that the processor can read information from and write information to the storage medium.

[0070] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic, discrete hardware components, or any combination thereof. A general-purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. The processor may also be implemented as a combination of computing devices, such as a combination of a DSP and a microprocessor, multiple microprocessors, one or more microprocessors combined with a DSP core, or any other such configuration. In the alternative, the storage medium may be integral to the processor. The processor and storage medium may reside in an ASIC. The ASIC may reside in a user terminal. In the alternative, the processor and storage medium may reside as discrete components in the user terminal.

[0071] In another specific embodiment of the present application, a computer-readable storage medium stores computer instructions, and the computer instructions are operated to execute the eye contact positioning method described in the above embodiment.

[0072] In the several embodiments provided in this application, it should be understood that the disclosed 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.

[0073] 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.

[0074] The above description is merely an embodiment of the present application and does not limit the patent scope of the present application. Any equivalent structural transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A line-of-sight positioning method, characterized in that: include: Using at least one pair of camera devices to simultaneously capture images of a target object, obtaining a first image captured by a first camera and a second image captured by a second camera respectively; Calculating a first angle between a first actual distance line and an offline camera spacing, and a second angle between a second actual distance line and the offline camera spacing, based on first object pixel coordinates of the target object in the first image, second camera image coordinates of the second camera in the first image, and first camera parameters of the first camera, and second object pixel coordinates of the target object in the second image, first camera image coordinates and second camera parameters of the first camera in the second image, respectively, wherein the first actual distance line is obtained by connecting the target object and the first camera, the offline camera spacing is obtained by connecting the first camera and the second camera, and the second actual distance line is obtained by connecting the target object and the second camera; Calculating a first length of the first actual distance line and a second length of the second actual distance line according to the value of the first angle, the value of the second angle, and the length of the camera spacing line; A fourth angle formed by a first connecting line between the reference object and the target object and a second connecting line between the target object and the first camera is calculated using a reference length between the reference object and any one of the first and second cameras, a reference angle of the first camera, the first length, the second length, a third angle formed by a second-selected reference distance line and a second-selected target distance line, and a distance between the second-selected camera and the reference object, wherein the second-selected reference distance refers to a connecting line between the other second-selected camera of the first and second cameras and the reference object, and the second-selected target distance line refers to a connecting line between the second-selected camera and the target object; and The positioning of the target object in space is obtained according to the first length, the second length and the fourth angle.

2. The eye contact positioning method according to claim 1, wherein: The calculation process of the first angle and the second angle includes: Obtaining a fifth angle between a third connecting line and the shooting axis, and obtaining a sixth angle between a fourth connecting line and the shooting axis according to camera parameters of the current camera, wherein the third connecting line refers to a connecting line between a pixel point of another corresponding camera in the current image and a focal length thereof, and the fourth connecting line refers to a connecting line between a pixel point of the target object in the current image and a focal length thereof; calculating a third length between the pixel point of the viewing camera and the focal length using a trigonometric function based on the focal length between the focal length and the origin of the current image and the fifth angle, wherein the origin is an intersection of the shooting axis and the current image; According to the focal length and the sixth angle, a fourth length between the pixel point of the target object and the focal length is calculated using trigonometric functions; and A seventh angle is formed based on a line connecting the origin and the pixel point of the viewing camera, and a line connecting the origin and the pixel point of the target object, and a fifth length between the pixel point of the viewing camera and the pixel point of the target object is calculated using a trigonometric function using the seventh angle, the distance between the pixel point of the viewing camera and the origin, and the distance between the pixel point of the target object and the origin; Using the third length, the fourth length, and the fifth length, an angle formed by a fifth line and a sixth line is calculated as the first angle or the second angle, wherein the fifth line refers to a line between a pixel point of the target object and the focal length, and the sixth line refers to a line between a pixel point of the viewing camera and the focal length.

3. The eye contact positioning method according to claim 1, wherein: Obtaining the position of the target object in space according to the first length, the second length, and the fourth angle includes: Calculating a perpendicular distance between the target object and the camera spacing line according to the value of the first angle, the value of the second angle, and the length of the camera spacing line; The positioning of the target object in space is obtained according to the perpendicular distance, the first length, the second length and the fourth angle.

4. The eye contact positioning method according to claim 1, wherein: The process of obtaining first object pixel coordinates of the target object in the first image, second camera image coordinates of the second camera in the first image, second object pixel coordinates of the target object in the second image, and first camera image coordinates of the first camera in the second image includes: The first image and the second image are processed using a pixel correspondence function to obtain the first object pixel coordinates, the second camera image coordinates, the second object pixel coordinates, and the first camera image coordinates.

5. The eye contact positioning method according to claim 1, wherein: The method of simultaneously capturing images of the target object using at least one pair of camera devices to obtain a first image captured by a first camera and a second image captured by a second camera, further comprising: The images captured by the first camera and the second camera are corrected using a correction function to obtain the first image and the second image.

6. The eye contact positioning method according to claim 4, characterized in that: The processing of the first image and the second image by using a pixel correspondence function to obtain the first object pixel coordinates, the second camera image coordinates, the second object pixel coordinates, and the first camera image coordinates includes: When the coordinates of the pixel points of the viewing camera are not obtained using the current image, the coordinates of the pixel points of the viewing camera are calculated using an extended positioning method and / or a crosshair method.

7. A visual positioning device, characterized in that: include: A shooting module, configured to simultaneously shoot images of a target object using at least a pair of shooting devices, to obtain a first image shot by a first camera and a second image shot by a second camera; an angle calculation module, configured to calculate a first angle formed by a first actual distance line and an offline camera spacing, and a second angle formed by a second actual distance line and the offline camera spacing, based on first object pixel coordinates of the target object in the first image, second camera image coordinates of the second camera in the first image, and first camera parameters of the first camera, and second object pixel coordinates of the target object in the second image, first camera image coordinates and second camera parameters of the first camera in the second image, respectively, wherein the first actual distance line is obtained by connecting the target object and the first camera, the offline camera spacing is obtained by connecting the first camera and the second camera, and the second actual distance line is obtained by connecting the target object and the second camera; a length calculation module, configured to calculate a first length of the first actual distance line and a second length of the second actual distance line according to a value of the first angle, a value of the second angle, and a length of the camera spacing line; a relative position calculation module, configured to calculate a fourth angle formed by a first connecting line between the reference object and the target object and a second connecting line between the target object and the first camera using a reference length between the reference object and any one of the first and second cameras, a reference angle of the first camera, the first length, the second length, a third angle formed by a second selected reference distance line and a second selected target distance line, and a distance between the second camera and the reference object, wherein the second selected reference distance refers to a connecting line between the other second camera of the first and second cameras and the reference object, and the second selected target distance line refers to a connecting line between the second camera and the target object; and A positioning module is used to obtain the position of the target object in space according to the first length, the second length and the fourth angle.

8. The eye-to-eye positioning device according to claim 7, characterized in that: The length calculation module includes: A module configured to obtain, based on camera parameters of the current camera, a fifth angle between a third connecting line and the shooting axis, and a sixth angle between a fourth connecting line and the shooting axis, wherein the third connecting line refers to a connecting line between a pixel point of another corresponding camera in the current image and a focal length thereof, and the fourth connecting line refers to a connecting line between a pixel point of a target object in the current image and a focal length thereof; a module configured to calculate, using a trigonometric function, a third length between the pixel point of the viewing camera and the focal length based on the focal length between the focal length and the origin of the current image and the fifth angle, wherein the origin is an intersection of the shooting axis and the current image; a module for calculating a fourth length between the pixel point of the target object and the focal length using a trigonometric function according to the focal length and the sixth angle; and a module configured to form a seventh angle based on a line between the origin and the pixel point of the viewing camera and a line between the origin and the pixel point of the target object, and to calculate a fifth length between the pixel point of the viewing camera and the pixel point of the target object according to a trigonometric function using the seventh angle, the distance between the pixel point of the viewing camera and the origin, and the distance between the pixel point of the target object and the origin; A module for calculating, using the third length, the fourth length, and the fifth length, an angle formed by a fifth line and a sixth line as the first angle or the second angle, wherein the fifth line refers to a line between a pixel point of the target object and the focal length, and the sixth line refers to a line between a pixel point of the facing camera and the focal length.

9. A computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are operated to execute the gaze positioning method according to any one of claims 1-6.

Citation Information

Patent Citations

  • Calibration method and system for three-dimensional imaging system based on rotating shaft and binocular camera

    CN109118545A

  • Target ranging method based on monocular vision

    CN111982072A