Bird positioning method, device, system and storage medium
By setting two cameras on the two-degree-of-freedom gimbal in a large space, judging and adjusting the intersection of the camera's viewing angle area, and obtaining the actual spatial position of the target, the problem of difficult to achieve automatic and accurate positioning of targets such as birds in a large space in the existing technology is solved, and efficient and accurate target positioning is achieved.
Patent Information
- Application Number
- CN202111471975.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-12-18
- Filing Date
- 2021-11-26
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2041-11-26
AI Technical Summary
The prior art is difficult to achieve automatic precise positioning of birds and other targets in large spaces. The traditional binocular visual positioning system cannot meet the precise positioning needs of outdoor large spaces due to the camera installation distance and the viewing angle is fixed.
By setting two cameras on the second degree of freedom gimbal, the initial parameters of the camera are obtained, and whether there is an intersection area in the camera's viewing angle area is judged. If there is no intersection, the camera is rotated to form an intersection area, obtain the position information of the target in each camera image, calculate the correspondence between the camera image position and the actual spatial position, and calculate the actual spatial position of the target.
Automatic and accurate positioning of targets such as flying birds is achieved, and can efficiently track and position moving targets in large spaces, improving positioning accuracy and efficiency.
Smart Images

Figure CN114650395B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer vision technology, and particularly to a bird positioning method, device, system, and storage medium. Background Art
[0002] In many scenarios, it is necessary to monitor and locate space. For example: at an airport, it is necessary to monitor the space to prevent birds or other flying objects from entering the space above the airport without permission, which may affect the normal takeoff and landing of airplanes. Another example is that in other specific areas, it is necessary to conduct real-time detection and warning of the space entering the specific area.
[0003] In the related art, in the above scenarios, generally, people observe on the tower or through a video monitoring system. The position of the space needs to be identified and judged by people, and automatic positioning of the target space position cannot be achieved. And due to the relatively close installation distance of the two cameras in the traditional binocular vision positioning system, and the fixed positions and viewing angles of the two cameras, only fixed directions can be observed, and accurate positioning in large outdoor space scales cannot be satisfied. Summary of the Invention
[0004] This application aims to solve at least one of the technical problems existing in the prior art. To this end, this application provides a bird positioning method, device, system, and storage medium, which can achieve automatic and accurate positioning of a target in space by automatically analyzing the image information of the target, such as a bird, in space.
[0005] In the first aspect of this application, a bird positioning method is provided, including:
[0006] Obtain the initial camera parameters corresponding to a preset first camera and a second camera respectively, where the first camera and the second camera are both set on a two-degree-of-freedom cloud platform, and the initial camera parameters include camera position information, camera resolution, camera viewing angle information, and camera initial angle information, and the camera initial angle information includes horizontal initial angle information and vertical initial angle information;
[0007] According to the initial camera parameters, determine whether there is an overlapping area between the viewing angle area of the first camera and the viewing angle area of the second camera, where the viewing angle area is the spatial area where the first camera or the second camera captures images;
[0008] If there is no overlapping area between the viewing angle area of the first camera and the viewing angle area of the second camera, according to the initial camera parameters, send a first rotation angle signal to the second camera, where the first rotation angle signal is used to drive the second camera to rotate by a first angle, and the first angle is the angle at which the second camera rotates to have an overlapping area with the viewing angle area of the first camera;
[0009] If there is an overlapping area between the viewing angle areas of the first camera and the second camera, respectively obtain the first image position information of the target in the image captured by the first camera and the second image position information of the target in the image captured by the second camera, where the target includes a flying bird.
[0010] According to the initial camera parameters, the first image position information, and the second image position information, obtain the first correspondence between the first image position of the target in the image captured by the first camera and the actual spatial position, and the second correspondence between the second image position of the target in the image captured by the second camera and the actual spatial position.
[0011] According to the initial camera parameters, the first correspondence, and the second correspondence, calculate the actual spatial position of the target.
[0012] According to the flying bird positioning method of the first aspect embodiment of the present application, it has at least the following beneficial effects: By arranging both cameras on a two-degree-of-freedom cloud platform, the directions of the first camera and the second camera can be freely adjusted. According to the initial camera parameters of the camera, the spatial area of the captured image can be determined. When there is an overlapping area between the viewing angle areas of the first camera and the second camera, according to the initial camera parameters, the first image position information, and the second image position information, the first correspondence between the first image position of the target and the actual spatial position, and the second correspondence between the second image position of the target and the actual spatial position can be obtained. There will be an intersection point between the first correspondence and the second correspondence, and this intersection point is the actual spatial position of the target. The position coordinates of the intersection point can be calculated through the initial camera parameters. Thus, by analyzing the image information of the target, the actual spatial position of the target in the overlapping area can be calculated, and automatic and accurate positioning of the target such as a flying bird can be achieved.
[0013] According to some embodiments of the present application, after calculating the actual spatial position of the target according to the initial camera parameters, the first correspondence, and the second correspondence, the following steps are further included:
[0014] After a predetermined time, obtain the third image position information of the target in the image captured by the first camera and the fourth image position information of the target in the image captured by the second camera after obtaining the moving position of the target.
[0015] Obtain the third correspondence between the third image position of the target in the image captured by the first camera and the actual spatial position after the moving position, and the fourth correspondence between the fourth image position of the target in the image captured by the second camera and the actual spatial position after the moving position.
[0016] Calculate the actual spatial position after the target movement position according to the initial camera parameters, the third corresponding relationship, and the fourth corresponding relationship.
[0017] According to some embodiments of the present application, after calculating the actual spatial position after the target movement position according to the initial camera parameters, the third corresponding relationship, and the fourth corresponding relationship, the following steps are further included:
[0018] Calculate the second angle information to be rotated corresponding to the first camera according to the first image position information and the third image position information;
[0019] Calculate the third angle information to be rotated corresponding to the second camera according to the second image position information and the fourth image position information;
[0020] Send a second rotation angle signal to the first camera and a third rotation angle signal to the second camera, where the second rotation angle signal is used to drive the first camera to rotate by a second angle according to the second angle information to be rotated, and the third rotation angle signal is used to drive the second camera to rotate by a third angle according to the third angle information to be rotated.
[0021] According to some embodiments of the present application, the obtaining of the first corresponding relationship between the first image position of the target in the image captured by the first camera and the actual spatial position, and the second corresponding relationship between the second image position of the target in the image captured by the second camera and the actual spatial position according to the initial camera parameters, the first image position information, and the second image position information includes:
[0022] Obtain a first ray connecting the first image position and the optical center of the first camera according to the initial camera parameters corresponding to the first camera and the first image position information, where the first ray is the first corresponding relationship;
[0023] Obtain a second ray connecting the second image position and the optical center of the second camera according to the initial camera parameters corresponding to the second camera and the second image position information, where the second ray is the second corresponding relationship.
[0024] According to some embodiments of the present application, the calculating of the actual spatial position of the target according to the initial camera parameters, the first corresponding relationship, and the second corresponding relationship includes:
[0025] Calculate the intersection point between the first ray and the second ray according to the initial camera parameters, where the intersection point is the actual spatial position of the target.
[0026] In a second aspect of the present application, a bird positioning device is provided, comprising:
[0027] A parameter acquisition module, configured to respectively acquire initial camera parameters corresponding to a preset first camera and a second camera, wherein both the first camera and the second camera are disposed on a two-degree-of-freedom cloud platform, and the initial camera parameters include camera position information, camera resolution, camera viewing angle information, and camera initial angle information, and the camera initial angle information includes horizontal initial angle information and vertical initial angle information;
[0028] A region determination module, configured to determine whether there is an overlapping region between the viewing angle regions of the first camera and the second camera according to the initial camera parameters, wherein the viewing angle region is the spatial region of the image captured by the first camera or the second camera;
[0029] An angle rotation module, configured to, if there is no overlapping region between the viewing angle regions of the first camera and the second camera, send a first rotation angle signal to the second camera according to the initial camera parameters, wherein the first rotation angle signal is used to drive the second camera to rotate by a first angle, and the first angle is the angle at which the second camera rotates to have an overlapping region with the viewing angle region of the first camera;
[0030] A position acquisition module, configured to, if there is an overlapping region between the viewing angle regions of the first camera and the second camera, respectively acquire first image position information of a target in the image captured by the first camera and second image position information of the target in the image captured by the second camera, wherein the target includes a bird;
[0031] A relationship acquisition module, configured to acquire a first correspondence relationship between the first image position of the target in the image captured by the first camera and the actual spatial position, and a second correspondence relationship between the second image position of the target in the image captured by the second camera and the actual spatial position according to the initial camera parameters, the first image position information, and the second image position information;
[0032] A position calculation module, configured to calculate the actual spatial position of the target according to the initial camera parameters, the first correspondence relationship, and the second correspondence relationship.
[0033] In a third aspect of the present application, a bird positioning device is provided, comprising: at least one memory, at least one processor, and at least one program instruction, the program instruction being stored on the memory and executable on the processor, and the processor being configured to execute the bird positioning method of the first aspect of the present application.
[0034] In a fourth aspect of the present application, a bird positioning system is provided, including the bird positioning device of the third aspect.
[0035] According to some embodiments of the present application, it further includes:
[0036] A photographing mechanism, including at least two cameras, where the cameras are used to obtain a viewing area;
[0037] A rotating mechanism, which includes a horizontal rotating structure and a vertical rotating structure. The lower end of the vertical rotating structure is rotatably connected to the upper end of the horizontal rotating structure. Each camera is rotatably arranged on the vertical rotating structure. The vertical rotating structure is used to adjust the pitching angle of the camera, and the horizontal rotating structure is used to adjust the horizontal angle of the camera;
[0038] A control mechanism, which is connected to the rotating mechanism, the photographing mechanism, and the bird positioning device. The control mechanism is used to control the rotation angle of the rotating mechanism so that the photographing mechanism obtains a corresponding viewing area. The bird positioning device is used to obtain the actual spatial position of the target according to the corresponding viewing area of the photographing mechanism. Among them, the rotation angle includes the pitching angle and the horizontal angle.
[0039] In a fifth aspect of the present application, a computer-readable storage medium is provided. Program instructions are stored on the computer-readable storage medium, and the program instructions are used to execute the bird positioning method of the first aspect of the present application.
[0040] Additional aspects and advantages of the present application will be given in part in the following description, will become apparent in part from the following description, or will be understood through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The above and / or additional aspects and advantages of the present application will become apparent and easy to understand from the description of the embodiments in conjunction with the following drawings, where:
[0042] Figure 1 is a schematic flowchart of the bird positioning method according to an embodiment of the present application;
[0043] Figure 2 is a schematic flowchart of the actual spatial position after the target moves;
[0044] Figure 3 is a schematic flowchart of the rotation angle signal according to an embodiment of the present application;
[0045] Figure 4 is a schematic flowchart of the first ray and the second ray according to an embodiment of the present application;
[0046] Figure 5Schematic flowchart of calculating intersection points according to an embodiment of the present application;
[0047] Figure 6 Schematic structural diagram of a bird positioning system according to an embodiment of the present application;
[0048] Figure 7 Schematic structural diagram of a bird positioning device according to an embodiment of the present application. Detailed implementation manners
[0049] The embodiments of the present application will be described in detail below. The examples of the embodiments are shown in the accompanying drawings, where the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the accompanying drawings are exemplary only for explaining the present application and should not be construed as limiting the present application.
[0050] In the description of the present application, it should be understood that the orientation descriptions, such as up, down, front, back, left, right, etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. It is only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus should not be construed as limiting the present application.
[0051] In the description of the present application, the meaning of "a number of" is one or more, the meaning of "a plurality of" is two or more, "greater than", "less than", "exceeding", etc. are understood as not including the recited number, and "above", "below", "within", etc. are understood as including the recited number. If the first and second are described only for the purpose of distinguishing technical features, they should not be understood as indicating or implying relative importance or implicitly indicating the quantity of the indicated technical features or implicitly indicating the sequence of the indicated technical features.
[0052] In the description of the present application, unless otherwise clearly defined, words such as "set", "installed", "connected", etc. should be understood in a broad sense. Those skilled in the art can reasonably determine the specific meanings of the above words in the present application in combination with the specific content of the technical solution. The above has described the embodiments of the present application in detail with reference to the accompanying drawings. However, the present application is not limited to the above embodiments, and various changes can be made without departing from the gist of the present application within the knowledge scope of those skilled in the art.
[0053] Referring to Figure 1 , in the first aspect of the present application, a bird positioning method is provided, including:
[0054] Step S100, obtain the initial camera parameters corresponding to a preset first camera and a second camera respectively. The first camera and the second camera are both set on a two-degree-of-freedom cloud platform. The initial camera parameters include camera position information, camera resolution, camera viewing angle information, and camera initial angle information. The camera initial angle information includes horizontal initial angle information and vertical initial angle information;
[0055] Step S200, according to the initial camera parameters, determine whether there is an overlapping area between the viewing angle area of the first camera and the viewing angle area of the second camera. The viewing angle area is the spatial area where the first camera or the second camera captures images;
[0056] Step S300, if there is no overlapping area between the viewing angle area of the first camera and the viewing angle area of the second camera, send a first rotation angle signal to the second camera according to the initial camera parameters. The first rotation angle signal is used to drive the second camera to rotate by a first angle. The first angle is the angle at which the second camera rotates to an overlapping area with the viewing angle area of the first camera;
[0057] Step S400, if there is an overlapping area between the viewing angle area of the first camera and the viewing angle area of the second camera, obtain the first image position information of the target in the image captured by the first camera and the second image position information of the target in the image captured by the second camera respectively. The target includes flying birds;
[0058] Step S500, according to the initial camera parameters, the first image position information, and the second image position information, obtain the first correspondence between the first image position of the target in the image captured by the first camera and the actual spatial position, and the second correspondence between the second image position of the target in the image captured by the second camera and the actual spatial position;
[0059] Step S600, calculate the actual spatial position of the target according to the initial camera parameters, the first correspondence, and the second correspondence.
[0060] It can be understood that in this embodiment, by setting two cameras, namely the first camera and the second camera, on a two-degree-of-freedom cloud platform, the directions of the first camera and the second camera can be freely adjusted. According to the viewing angle area of the above cameras and the initial camera parameters, such as camera position information, the spatial area where the camera captures images can be determined.
[0061] To calculate the actual spatial position of the target, it is necessary to determine whether there is an overlapping area between the viewing area of the first camera and the viewing area of the second camera. When there is no overlapping area between the viewing area of the first camera and the viewing area of the second camera, a first rotation angle signal is sent to the second camera according to the initial camera parameters. It can be understood that when there is no overlapping area between the above two cameras, it is impossible to accurately locate the target such as a flying bird through one camera. At this time, it is necessary to rotate the second camera to an angle where there is an overlapping area with the viewing area of the first camera, that is, drive the second camera to rotate by a first angle through the first rotation angle signal, so as to further obtain the overlapping area, and then locate the target within the overlapping area. It can be understood that the first camera can also be rotated to an angle where there is an overlapping area with the viewing area of the second camera, and then accurately locate the target within the overlapping area, that is, execute step S400 to step S600.
[0062] It can be understood that when there is an overlapping area between the viewing area of the first camera and the viewing area of the second camera, according to the initial camera parameters, the first image position information, and the second image position information, a first correspondence between the target's position in the first image and the actual spatial position, and a second correspondence between the target's position in the second image and the actual spatial position can be obtained. There will be an intersection point between the first correspondence and the second correspondence, and this intersection point is the actual spatial position of the target. In this embodiment, the position coordinates of the intersection point can be calculated through the initial camera parameters, and these position coordinates represent the actual spatial position of the target. By analyzing the image position information of the target, the actual spatial position of the target within the overlapping area can be calculated, thereby achieving accurate positioning of the target. It can be understood that the target in the embodiments of this application can be a flying bird.
[0063] Within the viewing area of the camera, that is, from the point where the camera captures the image, a set of points in the corresponding space can be obtained. The set of points is the ray connecting the point in the image position to the optical center of the corresponding camera. The intersection point in the image captured by the camera corresponds to the actual spatial position of the target. It can be understood that more than two cameras can be set in the embodiments of this application. Among multiple cameras, as long as there is an overlapping area between any two cameras, the target within the overlapping area can be located. Multiple cameras can cooperate with each other to capture a larger range of spatial areas, thereby obtaining a larger range of protected areas.
[0064] Referring to Figure 2 , it can be understood that after step S600, the following steps are further included:
[0065] Step S700, after a predetermined time, obtain the third image position information of the target's moving position in the image captured by the first camera and the fourth image position information of the target's moving position in the image captured by the second camera;
[0066] Step S800: Obtain the third correspondence between the third image position of the target in the image captured by the first camera and the actual spatial position after the movement position, and the fourth correspondence between the fourth image position of the target in the image captured by the second camera and the actual spatial position after the movement position;
[0067] Step S900: Calculate the actual spatial position of the target after the movement position according to the initial camera parameters, the third correspondence, and the fourth correspondence.
[0068] In the embodiment of the present invention, at every predetermined time, the first camera and the second camera are controlled to re-obtain the images corresponding to the target after the movement position in the intersection area, that is, obtain the third image position information and the fourth image position information respectively. According to the initial camera parameters, the third image position information, and the fourth image position information, the third correspondence between the actual spatial position of the target after the movement position and the third image position, and the fourth correspondence between the actual spatial position of the target after the movement position and the fourth image position can be calculated. It can be understood that the third image position is obtained from the third image position information, and the fourth image position is obtained from the fourth image position information. The intersection point corresponding to the third correspondence and the fourth correspondence is the actual spatial position of the target after the movement position. According to the initial camera parameters, the actual spatial position of the target after the movement position after a predetermined time interval can be obtained, realizing the tracking and positioning of the moving target.
[0069] It can be understood that steps S700 to S900 can be executed at a predetermined time interval, so that at every predetermined time, the two cameras are rotated simultaneously, so that during the rotation process of the two cameras, there is always an intersection area in the viewing angle areas corresponding to the two cameras. The rotation angle and speed can be calculated according to the camera position information, camera viewing angle information, camera initial angle information, etc. of the two cameras.
[0070] It can be understood that if the target is not captured in the intersection area at an angle, the two cameras are rotated simultaneously, and then it is checked whether the target enters the next intersection area until the two cameras rotate one week to determine whether the target enters within the automatic shooting protection range of the cameras. It can be understood that the target in this embodiment can be a flying bird, a drone, or other flying objects, etc., and is not specifically limited herein.
[0071] Refer to Figure 3 , it can be understood that after step S900, the following steps are further included:
[0072] Step S910: Calculate the second angle information to be rotated corresponding to the first camera according to the first image position information and the third image position information;
[0073] Step S920: Calculate the third angle information to be rotated corresponding to the second camera based on the second image position information and the fourth image position information;
[0074] Step S930: Send a second rotation angle signal to the first camera and a third rotation angle signal to the second camera. The second rotation angle signal is used to drive the first camera to rotate by a second angle according to the second angle information to be rotated, and the third rotation angle signal is used to drive the second camera to rotate by a third angle according to the third angle information to be rotated.
[0075] It can be understood that after a preset time (the preset time can be set differently from the above-mentioned predetermined time), when the target reaches the edge of the intersection area or approaches the edge after moving, it is necessary to rotate the first camera and the second camera in a timely manner to keep up with the moving speed of the target and avoid the problem that the target moves out of the intersection area range and cannot be effectively located. In this embodiment, the second angle information that the first camera needs to rotate is calculated to drive the first camera to rotate by the second angle, so that the first camera can continuously track the moving target; by calculating the third angle information that the second camera needs to rotate, the second camera is driven to rotate by the third angle, so that the second camera can continuously track the moving target. Thus, the tracking and positioning of the moving target can be realized.
[0076] Specifically, when there is a flying / moving target in the intersection area of the two cameras, the two cameras automatically analyze the position of the target in the image every preset time, and rotate the two cameras automatically according to the difference in the image positions before and after the movement, so that the intersection area of the two cameras can always track the target and realize the automatic tracking and positioning of the target.
[0077] Refer to Figure 4 , it can be understood that step S500 includes but is not limited to the following steps:
[0078] Step S510: Obtain a first ray connecting the first image position and the optical center of the first camera according to the initial camera parameters corresponding to the first camera and the first image position information, where the first ray is the first corresponding relationship;
[0079] Step S520: Obtain a second ray connecting the second image position and the optical center of the second camera according to the initial camera parameters corresponding to the second camera and the second image position information, where the second ray is the second corresponding relationship.
[0080] In the embodiment of the present invention, a first ray connecting the first image position and the optical center of the first camera is obtained through the first image position information, and the obtained first ray is the first corresponding relationship; then, a second ray connecting the second image position and the optical center of the second camera is obtained through the second image position information, and the obtained second ray is the second corresponding relationship.
[0081] Specifically, after the image position information of the target in the image captured by the corresponding camera is determined, the connection line between each point in the image captured by the camera and the optical center of the corresponding camera can be obtained, that is, each such connection line corresponds to a ray in space. Therefore, for the first image captured by the first camera and the second image captured by the second camera of the target, the first center point of the first image and the center point of the second image can be calculated. From the optical center of the first camera and the first center point, the first ray corresponding to the center point of the image can be obtained, and the first ray is the first corresponding relationship; in the same way, the second ray can be obtained, and the second ray is the second corresponding relationship. Since in the intersection area, there will be an intersection point between the first ray and the second ray, and the intersection point is the actual spatial position of the target. By capturing the images in the intersection area with two cameras and respectively obtaining the corresponding relationships of the actual spatial positions of the two images, the actual spatial position of the target can be accurately obtained, effectively improving the accuracy of positioning the target such as a flying bird.
[0082] Refer to Figure 5 It can be understood that step S600 includes, but is not limited to, the following steps:
[0083] Step S610, calculate the intersection point between the first ray and the second ray according to the initial camera parameters, where the intersection point is the actual spatial position of the target.
[0084] In the embodiment of the present invention, through the initial camera parameters, the intersection point between the first ray and the second ray can be calculated to obtain the actual spatial position of the target, effectively improving the accuracy of positioning the target such as a flying bird.
[0085] Next, refer to Figure 6 to describe in detail the method for positioning a flying bird according to the embodiment of the present application with a specific embodiment. It should be understood that the following description is only an exemplary illustration and not a specific limitation of the present application.
[0086] Taking the shooting mechanism including two cameras as an example, specifically the first camera and the second camera, the method for positioning a flying bird in the embodiment of the present application has the following specific calculation method:
[0087] 1. Obtain the camera position information, camera viewing angle information, and camera initial angle information of the two cameras. The camera position information is the coordinate position information corresponding to the two cameras in space, and the camera viewing angle information is the viewing angle information corresponding to the camera lens. Among them, the viewing angle area of the first camera is the area composed of two rays O1A1 and O1A2, and the viewing angle area of the second camera is the area composed of two rays O2B1 and O2B2. The camera initial angle information includes the horizontal initial angle information and the vertical initial angle information of the camera;
[0088] 2. Determine whether there is an overlapping area in the viewing areas of the two cameras based on the camera position information, camera viewing angle information, and camera initial angle information of the two cameras: If there is no overlapping area in the viewing area of the first camera and the viewing area of the second camera, send a first rotation angle signal to the second camera. It can be understood that the second camera is driven to rotate by the first rotation angle signal by a first angle so that the second camera rotates to an angle where the viewing area of the second camera and the viewing area of the first camera have an overlapping area; when there is an overlapping area, both cameras can obtain the corresponding captured images of the target in the overlapping area. Among them, the overlapping area in this embodiment is the area composed of the intersection points C1C2C3C4 between the four rays O1A1, O1A2, O2B1, and O2B2;
[0089] 3. Obtain the captured images by the two cameras to analyze the center points of the images of the two cameras, and the two rays connecting the optical centers of the corresponding cameras and the center points of the captured images, that is, ray OO1 and ray OO2. And in the overlapping area, there will be an intersection point O between the two rays, and this intersection point O is the location of the target;
[0090] 4. According to the image position information and rotation angle of the two cameras, the equations corresponding to ray OO1 and ray OO2 can be listed. By calculating the solutions of the above equations, the position coordinates corresponding to the intersection point O can be obtained, so that the actual spatial position of the target can be obtained to achieve automatic and accurate positioning of the target such as a flying bird. It can be understood that since the two cameras are set on the same straight line, therefore, a straight line can be obtained by connecting the two cameras, such as Figure 6 the line segment O1O2 in. Set an origin on the straight line where O1O2 is located, and establish a three-dimensional coordinate system with this origin. Thus, according to OO1, OO2, and O1O2, as well as the camera position information, camera viewing angle information, and camera initial angle information, the position coordinates corresponding to the intersection point O can be calculated. Those skilled in the art can calculate this position coordinate through spatial geometric relationships, and will not be elaborated here.
[0091] It should be noted that for the foregoing method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the present application. In the above embodiments, each embodiment is described with emphasis. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0092] Refer to Figure 7, in the second aspect of the embodiments of the present application, a bird positioning device is provided, including:
[0093] A parameter acquisition module 100, configured to respectively acquire initial camera parameters corresponding to a preset first camera and a second camera. The first camera and the second camera are both arranged on a two-degree-of-freedom cloud platform. The initial camera parameters include camera position information, camera resolution, camera viewing angle information, and camera initial angle information. The camera initial angle information includes horizontal initial angle information and vertical initial angle information;
[0094] A region determination module 200, configured to determine whether there is an overlapping region between the viewing angle regions of the first camera and the second camera according to the initial camera parameters, where the viewing angle region is the spatial region of the image captured by the first camera or the second camera;
[0095] An angle rotation module 300, configured to, if there is no overlapping region between the viewing angle regions of the first camera and the second camera, send a first rotation angle signal to the second camera according to the initial camera parameters. The first rotation angle signal is used to drive the second camera to rotate by a first angle, and the first angle is the angle at which the second camera rotates to have an overlapping region with the viewing angle region of the first camera;
[0096] A position acquisition module 400, configured to, if there is an overlapping region between the viewing angle regions of the first camera and the second camera, respectively acquire first image position information of the target in the image captured by the first camera and second image position information of the target in the image captured by the second camera;
[0097] A relationship acquisition module 500, configured to acquire a first correspondence between the first image position of the target in the image captured by the first camera and the actual spatial position, and a second correspondence between the second image position of the target in the image captured by the second camera and the actual spatial position according to the initial camera parameters, the first image position information, and the second image position information;
[0098] A position calculation module 600, configured to calculate the actual spatial position of the target according to the initial camera parameters, the first correspondence, and the second correspondence.
[0099] In the third aspect of the embodiments of the present application, a bird positioning device is provided, including: at least one memory, at least one processor, and at least one program instruction. The program instruction is stored on the memory and can run on the processor, and the processor is configured to execute the bird positioning method in the first aspect of the embodiments of the present application.
[0100] The program instruction includes computer program code, and the computer program code can be in the form of source code, object code, executable file, or some intermediate form, etc.
[0101] The processor and the memory can be connected via a bus or other means.
[0102] As a non-transitory computer-readable storage medium, the memory can be used to store non-transitory software programs and non-transitory computer-executable programs. In addition, the memory can include high-speed random access memory, and can also include non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some embodiments, the memory optionally includes a memory remotely located relative to the processor, and these remote memories can be connected to the processor through a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0103] The non-transitory software programs and instructions required to implement the bird positioning method of the above-mentioned first aspect embodiment are stored in the memory. When executed by the processor, the bird positioning method in the above-mentioned embodiment is executed. For example, the method steps S100 to S600 described above are executed. Figure 1 The method steps S700 to step S900 in Figure 2 The method steps S910 to step S930 in Figure 3 The method steps S910 to step S930 in Figure 4 The method steps S510 to step S520 in Figure 5 The method step S610 in
[0104] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0105] The embodiment of the present application also provides a bird positioning system, including the bird positioning device of the above-mentioned third aspect embodiment.
[0106] It can be understood that the bird positioning system further includes: a photographing mechanism, a rotating mechanism, and a control mechanism.
[0107] The photographing mechanism includes at least two cameras, which are used to obtain a viewing area, that is, the cameras can be used to take pictures; the rotating mechanism includes a horizontal rotating structure and a vertical rotating structure. The lower end of the vertical rotating structure is rotatably connected to the upper end of the horizontal rotating structure. Each camera is rotatably arranged on the vertical rotating structure. The vertical rotating structure is used to adjust the pitching angle of the camera, and the horizontal rotating structure is used to adjust the horizontal angle of the camera; the control mechanism is connected to the rotating mechanism, the photographing mechanism, and the bird positioning device. The control mechanism is used to control the rotation angle of the rotating mechanism so that the photographing mechanism obtains the corresponding viewing area. The bird positioning device is used to obtain the actual spatial position of the target according to the viewing area corresponding to the photographing mechanism, where the rotation angle includes the pitching angle and the horizontal angle.
[0108] In the embodiment of the present application, the control mechanism controls the rotation angle of the rotating mechanism, for example, controls the horizontal angle of the horizontal rotating structure in the rotating mechanism, and / or controls the pitching angle of the vertical rotating structure in the rotating mechanism, so that the photographing mechanism can obtain the photographed image information in real time, that is, obtain the viewing areas corresponding to at least two cameras, such as the first camera and the second camera. The bird positioning device is used to analyze and process the image information, that is, to obtain the actual spatial position of the target according to the viewing area corresponding to the photographing mechanism. For example, by arranging both cameras on a pan-tilt head (i.e., a two-degree-of-freedom pan-tilt head) that can freely rotate in the horizontal and vertical directions to control and adjust the rotation angles of the two cameras, so that the cameras can obtain the photographed images corresponding to the target. The control mechanism controls the bird positioning device to automatically calculate the actual spatial position of the target through the analysis and processing of the images photographed by the two cameras.
[0109] In addition, the embodiment of the present application also provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are executed by a processor or a controller, for example, executed by a processor in the above device embodiment, the above processor can execute the bird positioning method in the above embodiment. For example, execute the method steps S100 to S600 described above Figure 1 in the method steps S700 to step S900 Figure 2 in the method steps S910 to step S930 Figure 3 in the method steps S510 to step S520 Figure 4 in the method steps S510 to step S520 Figure 5 in the method step S610.
[0110] Those of ordinary skill in the art will understand that all or some of the steps and systems disclosed above can be implemented as software, firmware, hardware, and appropriate combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include a computer storage medium (or non-transitory medium) and a communication medium (or transitory medium). As is well known to those of ordinary skill in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable instructions, data structures, program modules, or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those of ordinary skill in the art that communication media typically includes computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and can include any information delivery media.
[0111] The embodiments of the present application have been described in detail above in conjunction with the accompanying drawings. However, the present application is not limited to the above embodiments, and various changes can be made without departing from the spirit of the present application within the scope of knowledge possessed by those of ordinary skill in the art.
Claims
1. A method for positioning flying birds, characterized in that, It includes the following steps: Obtain the initial camera parameters corresponding to a preset first camera and a second camera respectively. The first camera and the second camera are both arranged on a two-degree-of-freedom cloud platform. The initial camera parameters include camera position information, camera resolution, camera viewing angle information, and camera initial angle information. The camera initial angle information includes horizontal initial angle information and vertical initial angle information; According to the initial camera parameters, determine whether there is an overlapping area between the viewing angle area of the first camera and the viewing angle area of the second camera. The viewing angle area is the spatial area where the first camera or the second camera captures images; If there is no overlapping area between the viewing angle area of the first camera and the viewing angle area of the second camera, send a first rotation angle signal to the second camera according to the initial camera parameters. The first rotation angle signal is used to drive the second camera to rotate by a first angle. The first angle is the angle at which the second camera rotates to an overlapping area with the viewing angle area of the first camera; If there is an overlapping area between the viewing angle area of the first camera and the viewing angle area of the second camera, obtain the first image position information of the target in the image captured by the first camera and the second image position information of the target in the image captured by the second camera respectively. The target includes a flying bird; According to the initial camera parameters, the first image position information, and the second image position information, obtain the first correspondence between the first image position of the target in the image captured by the first camera and the actual spatial position, and the second correspondence between the second image position of the target in the image captured by the second camera and the actual spatial position; Calculate the actual spatial position of the target according to the initial camera parameters, the first correspondence, and the second correspondence; After a predetermined time, obtain the third image position information of the target in the image captured by the first camera and the fourth image position information of the target in the image captured by the second camera after obtaining the target's moving position; Obtain the third correspondence between the third image position of the target in the image captured by the first camera and the actual spatial position after the moving position, and the fourth correspondence between the fourth image position of the target in the image captured by the second camera and the actual spatial position after the moving position; Calculate the actual spatial position of the target after the moving position according to the initial camera parameters, the third correspondence, and the fourth correspondence.
2. The bird positioning method according to claim 1, wherein After calculating the actual spatial position of the target after the moving position according to the initial camera parameters, the third correspondence, and the fourth correspondence, it further includes the following steps: Calculate the second angle information to be rotated corresponding to the first camera according to the first image position information and the third image position information; Calculate the third angle information to be rotated corresponding to the second camera according to the second image position information and the fourth image position information; Send a second rotation angle signal to the first camera and a third rotation angle signal to the second camera, where the second rotation angle signal is used to drive the first camera to rotate by a second angle according to the second angle information to be rotated, and the third rotation angle signal is used to drive the second camera to rotate by a third angle according to the third angle information to be rotated.
3. The bird positioning method according to claim 1, wherein The obtaining of the first correspondence between the first image position of the target in the image captured by the first camera and the actual spatial position, and the second correspondence between the second image position of the target in the image captured by the second camera and the actual spatial position according to the initial camera parameters, the first image position information, and the second image position information includes: According to the initial camera parameters corresponding to the first camera and the first image position information, obtain a first ray connecting the first image position and the optical center of the first camera, where the first ray is the first correspondence; According to the initial camera parameters corresponding to the second camera and the second image position information, obtain a second ray connecting the second image position and the optical center of the second camera, where the second ray is the second correspondence.
4. The bird positioning method according to claim 3, wherein The calculating of the actual spatial position of the target according to the initial camera parameters, the first correspondence, and the second correspondence includes: According to the initial camera parameters, calculate the intersection point between the first ray and the second ray, where the intersection point is the actual spatial position of the target.
5. A bird positioning device, characterized in that, Includes: A parameter acquisition module, configured to respectively acquire the initial camera parameters corresponding to a preset first camera and a second camera, where the first camera and the second camera are both disposed on a two-degree-of-freedom cloud platform, and the initial camera parameters include camera position information, camera resolution, camera viewing angle information, and camera initial angle information, and the camera initial angle information includes horizontal initial angle information and vertical initial angle information; A region determination module, configured to determine whether there is an overlapping region between the viewing angle region of the first camera and the viewing angle region of the second camera according to the initial camera parameters, where the viewing angle region is the spatial region of the image captured by the first camera or the second camera; An angle rotation module, configured to, if there is no overlapping region between the viewing angle region of the first camera and the viewing angle region of the second camera, send a first rotation angle signal to the second camera according to the initial camera parameters, where the first rotation angle signal is used to drive the second camera to rotate by a first angle, and the first angle is the angle at which the second camera rotates to a position where there is an overlapping region between the viewing angle region of the second camera and the viewing angle region of the first camera; A position acquisition module, configured to, if there is an overlapping region between the viewing angle region of the first camera and the viewing angle region of the second camera, respectively acquire the first image position information of the target in the image captured by the first camera and the second image position information of the target in the image captured by the second camera, where the target includes a flying bird; A relationship acquisition module, configured to obtain a first correspondence relationship between the first image position of the target in the image captured by the first camera and the actual spatial position, and a second correspondence relationship between the second image position of the target in the image captured by the second camera and the actual spatial position according to the initial camera parameters, the first image position information, and the second image position information; A position calculation module, configured to calculate the actual spatial position of the target according to the initial camera parameters, the first correspondence relationship, and the second correspondence relationship; Wherein, the position calculation module is further configured to obtain third image position information of the target in the image captured by the first camera and fourth image position information of the target in the image captured by the second camera after a predetermined time when the target's moving position is obtained; Obtain a third correspondence relationship between the third image position of the target in the image captured by the first camera and the actual spatial position after the moving position, and a fourth correspondence relationship between the fourth image position of the target in the image captured by the second camera and the actual spatial position after the moving position; Calculate the actual spatial position of the target after the moving position according to the initial camera parameters, the third correspondence relationship, and the fourth correspondence relationship.
6. A bird positioning device, characterized in that, Comprising: At least one memory, at least one processor, and at least one program instruction, the program instruction is stored on the memory and can run on the processor, and the processor is configured to execute the bird positioning method according to any one of claims 1 to 4.
7. A bird positioning system, characterized in that, Comprising the bird positioning device according to claim 6.
8. The bird positioning system according to claim 7, characterized in that, Further comprising: A shooting mechanism, including at least two cameras, the cameras are configured to obtain a viewing area; A rotating mechanism, the rotating mechanism includes a horizontal rotating structure and a vertical rotating structure, the lower end of the vertical rotating structure is rotatably connected to the upper end of the horizontal rotating structure, each camera is rotatably arranged on the vertical rotating structure, the vertical rotating structure is configured to adjust the pitch angle of the camera, and the horizontal rotating structure is configured to adjust the horizontal angle of the camera; A control mechanism, the control mechanism is connected to the rotating mechanism, the shooting mechanism, and the bird positioning device, the control mechanism is configured to control the rotation angle of the rotating mechanism so that the shooting mechanism obtains a corresponding viewing area, and the bird positioning device is configured to obtain the actual spatial position of the target according to the viewing area corresponding to the shooting mechanism, wherein the rotation angle includes the pitch angle and the horizontal angle.
9. A computer-readable storage medium, characterized in that: The program instruction is stored on the computer-readable storage medium, and the program instruction is configured to execute the bird positioning method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Universally adjustable binocular panoramic camera and working method thereof
CN106791656A
Exterior target positioning method, exterior target positioning device and automobile
CN109579868A