Method and device for positioning target by photoelectric guide turntable and medium
By drawing crosslines in the center of the lens field of view and calculating the rotation angle of the turntable using the angle offset, the problem of the existing photoelectric guidance technology being too large or lost when the target is rapidly accelerated or turned is solved, and target locking with higher accuracy and faster response speed is achieved.
Patent Information
- Application Number
- CN202411900024.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-04-18
AI Technical Summary
Existing photoelectric guidance technologies are prone to excessive deviation or loss of targets when targets are accelerated, decelerated or steering.
By drawing crosslines in the center of the lens field of view, the angle offset is used to calculate the angle required for the turntable, which achieves a positioning method with higher accuracy and faster response speed.
It improves the speed and accuracy of target locking, reduces the situation of target loss, and enhances the stability and reliability of turntable positioning.
Smart Images

Figure CN119850893A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of unmanned aerial vehicle countermeasures, and in particular to a method, a device and a medium for positioning a target with a photoelectric guidance turntable. Background Art
[0002] At present, optoelectronic target recognition and tracking has been widely used in drone countermeasures and ground defense systems. The target's coordinates are obtained through the detection algorithm, and the coordinate changes of the two frames before and after are used to calculate the moving pixel point of the target in the field of view. After obtaining the size of the field of view, the target acceleration can be calculated, and the turntable is controlled to have the same speed as the target to achieve tracking. This method will cause excessive offset or even target loss when the target accelerates, decelerates, or turns suddenly.
[0003] For example: if you lock a drone, the drone will first fly to the left at a constant speed, and then suddenly speed up. The target will first shift to the left in the field of view. At this time, the turntable will be accelerated to the left according to the speed of the target's movement, so that the target is in the center of the field of view. If the drone immediately flies to the right at this time, the target will shake greatly in the picture, or even deviate from the field of view, resulting in tracking failure. Summary of the invention
[0004] In view of the defects of the prior art, the present invention provides a method, device and medium for locating a target by a photoelectric guided turntable. After the target is identified through an image, the angle of rotation required for the turntable is calculated using the angle offset, thereby realizing a positioning method with higher accuracy and faster response speed.
[0005] In order to solve the above problem, the technical solution adopted by the present invention is: a method for positioning a target by a photoelectric guidance turntable, comprising the following steps: S01. Draw a crosshair with the center of the lens field of view as the origin of the coordinate axis, using the definition of positive at the top and negative at the bottom, negative on the left and positive on the right, with a total of four quadrants. Determine the number of scales according to the field of view angle transmitted back by the lens to achieve the required accuracy; S02, the lens monitors the target. When the target is detected by the image recognition algorithm inside the lens, the frame of the target is drawn and the target center coordinates are calculated. After the target center coordinates are obtained, the quadrant of the target is determined and the positive or negative offset angle of the target is determined. S03, the image frame where the target is detected is called the current frame, the target coordinates in the previous frame are subtracted from the target coordinates in the current frame to obtain the target position offset between the two frames, the target position offset is converted into a target offset angle, and the speed level of the turntable when rotating is determined according to the target offset angle; S04, controlling the turntable to rotate according to the determined speed level and target offset angle, and positioning the target position by the turntable so that the target center coincides with the center line of the crosshairs, that is, is located at the center of the field of view.
[0006] Furthermore, the process of converting the target position offset into the target offset angle is as follows: assuming the target position offset is (X0, Y0), the maximum coordinate point of the first quadrant of the scale line is (X1, Y1), the maximum coordinate of the second quadrant of the scale line is (X2, Y2), and the maximum coordinate of the third quadrant is (X3, Y3). The scale accuracy in the X direction is H1: H1=current field of view angle / (X1-X2), the scale accuracy in the Y direction is H2: H2=current field of view angle×aspect ratio / (Y1-Y3), the offset angle in the X direction is X1×H1, and the offset angle in the Y direction is Y1×H2.
[0007] Furthermore, the speed level of the turntable during rotation is determined according to the target offset angle: when the offset angle is 0°<offset angle<0.1°, the turntable speed level is L1, when 0.1°<offset angle<0.3°, the turntable speed level is L2, when 0.3°<offset angle<0.5°, the turntable speed level is L3, when 0.5°<offset angle, the turntable speed level is L4, L1<L2<L3<L4.
[0008] Furthermore, L1∈[1,10], L2∈[11,20], L3∈[21,30], L4∈[41,60].
[0009] Because the turntable is always monitoring the target, ideally, in the previous frame, the target is also located at the center of the image, that is, the origin of the crosshairs, so the target position offset is the target coordinates in the current frame.
[0010] Furthermore, after executing step S01, the lens is aimed at a target with a cross at a close distance of 10 meters, so that the cross marks in the picture coincide with the center of the target, and then the target is moved horizontally to 50 meters, and the turntable is only adjusted in the pitch direction for long-distance aiming, and the center of the cross marks is fine-tuned to make the center of the marks completely coincide with the center of the target, ensuring that the turntable and the lens are completely on the same axis.
[0011] Furthermore, in step S04, after the turntable locates the target position, if the deviation between the target center and the cross-line center is less than one scale, it is determined to be a refined locked target. If the deviation between the target center and the cross-line center is greater than one scale, the target offset angle continues to be sent to the turntable until the target is completely at the center scale of the field of view.
[0012] The present invention also discloses a device for positioning a target using a photoelectrically guided turntable, comprising a processor and a memory storing program instructions, wherein the processor is configured to execute the method for positioning a target using a photoelectrically guided turntable as described above when running the program instructions.
[0013] The present invention also discloses a storage medium storing program instructions, which, when running, execute the method for positioning a target by a photoelectrically guided turntable as described above.
[0014] Beneficial effects of the present invention: The present invention first draws a cross-marked line in the position of the lens, and calculates the angle value represented by each scale according to the return angle of the lens. By establishing a data set to train the target YOLOv5 model to be detected, when the target is detected, the current pixel is converted to the offset angle on the scale line. This angle is the offset angle of the photoelectric locking target from the center of the picture, and the required rotation angle is sent to the turntable to achieve target positioning. Compared with the target locking method that calculates the acceleration through two frames of pictures, this method locks the target faster and with higher accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 is a flow chart of the present invention; Figure 2 is a schematic diagram of a cross-marked line; Figure 3 Schematic diagram of locating the target for the crosshairs. DETAILED DESCRIPTION
[0016] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.
[0017] Example 1 This embodiment discloses a method for positioning a target by a photoelectrically guided turntable. Figure 1 As shown, the following steps are included: S01, such as Figure 2 As shown, draw crosshairs with the center of the lens field of view as the origin of the coordinate axis, using the definition of positive at the top and negative at the bottom, negative on the left and positive on the right, with a total of four quadrants, and the center of the crosshairs can be fine-tuned. Determine the number of scales based on the field of view angle transmitted back by the lens to achieve the required accuracy. For example: the horizontal field of view is 1.5°, the accuracy requirement is 0.01°, divided into 150 scales, each scale represents 0.01°, and measured by a parallel light tube, confirm that the error is less than 0.006° (0.1mrad).
[0018] The method for fine-tuning the center of the crosshairs is as follows: aim the lens at a target with a cross at a close distance of 10 meters, so that the crosshairs in the picture coincide with the center of the target, then move the target horizontally to 50 meters, and the turntable only adjusts the pitch direction for long-distance aiming, and fine-tunes the center of the crosshairs so that the center of the crosshairs completely coincides with the center of the target, ensuring that the turntable and the lens are completely on the same axis.
[0019] S02, the camera monitors the target, and the original video is recorded at a frequency of 25 frames per second. After the target is detected by the image recognition algorithm ( Figure 3The target is located at the position marked by the red rectangle in the figure. Draw the target’s border and calculate the target’s center coordinates. After obtaining the target’s center coordinates, determine the quadrant in which the target is located and determine whether the target’s offset angle is positive or negative.
[0020] S03. The image frame in which the target is detected is called the current frame. The target coordinates in the current frame are subtracted from the target coordinates in the previous frame to obtain the target position offset between the two frames. The target position offset is converted into a target offset angle, and the speed level of the turntable during rotation is determined based on the target offset angle.
[0021] The process of converting the target position offset into the target offset angle is as follows: suppose the target position offset is (X0, Y0), the maximum coordinate point of the first quadrant of the scale line is (X1, Y1), the maximum coordinate of the second quadrant of the scale line is (X2, Y2), and the maximum coordinate of the third quadrant is (X3, Y3). The scale accuracy in the X direction is H1: H1=current field of view angle / (X1-X2), the scale accuracy in the Y direction is H2: H2=current field of view angle×aspect ratio / (Y1-Y3), the offset angle in the X direction is X1×H1, and the offset angle in the Y direction is Y1×H2.
[0022] Because the turntable is always monitoring the target, ideally, in the previous frame, the target is also located at the center of the image, that is, the origin of the crosshairs, so the target position offset is the target coordinates in the current frame image. In other embodiments, in order to take into account the calculation speed, the target position offset can be directly the target coordinates in the current frame image.
[0023] The speed level of the turntable during rotation is determined according to the target offset angle: when the offset angle is 0°<offset angle<0.1°, the turntable speed level is L1, when 0.1°<offset angle<0.3°, the turntable speed level is L2, when 0.3°<offset angle<0.5°, the turntable speed level is L3, when 0.5°<offset angle, the turntable speed level is L4, L1<L2<L3<L4. This solves the problem of excessive turntable acceleration causing the target to be thrown out of the field of view when the target is rapidly accelerated or decelerated, and can improve the stability and reliability of turntable positioning.
[0024] Specifically, L1∈[1,10], L2∈[11,20], L3∈[21,30], L4∈[41,60].
[0025] S04, controlling the turntable to rotate according to the determined speed level and target offset angle, and positioning the target position by the turntable so that the target center coincides with the center line of the crosshairs, that is, is located at the center of the field of view.
[0026] After the turntable locates the target position, if the deviation between the target center and the cross-line center is less than one scale, it is judged as a precision locked target. If the deviation between the target center and the cross-line center is greater than one scale, the target offset angle continues to be sent to the turntable until the target is completely at the center scale of the field of view.
[0027] The method described in this embodiment calculates the offset angle of the target from the center of the screen by photoelectric calculation and directly sends it to the turntable angle to achieve target positioning. Compared with the positioning method of calculating acceleration and adjusting PID parameters, this method can lock the target faster.
[0028] Example 2 The embodiment of the present disclosure provides a device for a method of positioning a target by a photoelectrically guided turntable, including a processor and a memory. Optionally, the device may also include a communication interface and a bus. The processor, the communication interface, and the memory may communicate with each other through the bus. The communication interface may be used for information transmission. The processor may call the logic instructions in the memory to execute the method of positioning a target by a photoelectrically guided turntable in the above embodiment.
[0029] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product.
[0030] The memory, as a computer-readable storage medium, can be used to store software programs and computer executable programs, such as program instructions / modules corresponding to the method in the embodiment of the present disclosure. The processor executes the function application and data processing by running the program instructions / modules stored in the memory, that is, the method for positioning the target by the photoelectric guided turntable in the above embodiment is realized.
[0031] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory may include a high-speed random access memory and may also include a non-volatile memory.
[0032] Example 3 An embodiment of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured to execute the above-mentioned method for positioning a target using an optoelectronic-guided turntable.
[0033] The computer-readable storage medium mentioned above may be a transient computer-readable storage medium or a non-transitory computer-readable storage medium.
[0034] The technical solution of the embodiment of the present disclosure can be embodied in the form of a software product, which is stored in a storage medium and includes one or more instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in the embodiment of the present disclosure. The aforementioned storage medium may be a non-transient storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a disk or an optical disk, and other media that can store program codes, or a transient storage medium.
[0035] The above description and the accompanying drawings fully illustrate the embodiments of the present disclosure so that those skilled in the art can practice them. Other embodiments may include structural, logical, electrical, process and other changes. The embodiments represent only possible changes. Unless explicitly required, separate components and functions are optional, and the order of operation may vary. The parts and features of some embodiments may be included in or replace the parts and features of other embodiments. Moreover, the words used in this application are only used to describe the embodiments and are not used to limit the scope of protection. As used in the description in the text, unless the context clearly indicates, the singular forms of "a", "an" and "the" are intended to include plural forms as well. Similarly, the term "and / or" as used in this application refers to any and all possible combinations of one or more associated listings. In addition, when used in this application, the term "comprise" and its variants "comprises" and / or comprising refer to the presence of stated features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the presence of other identical elements in the process, method or device including the elements. In this article, each embodiment may focus on the differences from other embodiments, and the same and similar parts between the embodiments may refer to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, then the relevant parts can refer to the description of the method part.
[0036] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software may depend on the specific application and design constraints of the technical solution. The technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present disclosure. The technicians may clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.
Claims
1. A method for positioning a target using a photoelectric guidance turntable, characterized in that: The following steps are involved: S01. Draw a crosshair with the center of the lens field of view as the origin of the coordinate axis, using the definition of positive at the top and negative at the bottom, negative on the left and positive on the right, with a total of four quadrants. Determine the number of scales according to the field of view angle transmitted back by the lens to achieve the required accuracy; S02, the lens monitors the target. When the target is detected by the image recognition algorithm inside the lens, the frame of the target is drawn and the target center coordinates are calculated. After the target center coordinates are obtained, the quadrant of the target is determined and the positive or negative offset angle of the target is determined. S03, the image frame where the target is detected is called the current frame, the target coordinates in the previous frame are subtracted from the target coordinates in the current frame to obtain the target position offset between the two frames, the target position offset is converted into a target offset angle, and the speed level of the turntable when rotating is determined according to the target offset angle; S04, controlling the turntable to rotate according to the determined speed level and target offset angle, and positioning the target position by the turntable so that the target center coincides with the center line of the crosshairs, that is, is located at the center of the field of view.
2. The method for locating a target using a photoelectrically guided turntable according to claim 1, characterized in that: The process of converting the target position offset into the target offset angle is as follows: suppose the target position offset is (X0, Y0), the maximum coordinate point of the first quadrant of the scale line is (X1, Y1), the maximum coordinate of the second quadrant of the scale line is (X2, Y2), and the maximum coordinate of the third quadrant is (X3, Y3). The scale accuracy in the X direction is H1: H1=current field of view angle / (X1-X2), the scale accuracy in the Y direction is H2: H2=current field of view angle×aspect ratio / (Y1-Y3), the offset angle in the X direction is X1×H1, and the offset angle in the Y direction is Y1×H2.
3. The method for locating a target using a photoelectrically guided turntable according to claim 2, characterized in that: The speed level of the turntable during rotation is determined according to the target offset angle: when the offset angle is 0°<offset angle<0.1°, the turntable speed level is L1; when 0.1°<offset angle<0.3°, the turntable speed level is L2; when 0.3°<offset angle<0.5°, the turntable speed level is L3; when 0.5°<offset angle, the turntable speed level is L4, L1<L2<L3<L4.
4. The method for locating a target using a photoelectrically guided turntable according to claim 3, characterized in that: L1∈[1,10], L2∈[11,20], L3∈[21,30], L4∈[41,60].
5. The method for positioning a target using a photoelectric guidance turntable according to claim 1 or 2, characterized in that: The target position offset is the target coordinates in the current frame image.
6. The method for positioning a target using a photoelectric guidance turntable according to claim 1, characterized in that: After executing step S01, aim the lens at a target with a cross at a close distance of 10 meters, so that the cross marks in the picture coincide with the center of the target, and then move the target horizontally to 50 meters. The turntable is only adjusted in the pitch direction for long-distance aiming, and the center of the cross marks is fine-tuned to make the center of the marks completely coincide with the center of the target, ensuring that the turntable and the lens are completely on the same axis.
7. The method for locating a target using a photoelectrically guided turntable according to claim 1, characterized in that: In step S04, after the turntable locates the target position, if the deviation between the target center and the cross-line center is less than one scale, it is determined to be a precision locked target. If the deviation between the target center and the cross-line center is greater than one scale, the target offset angle continues to be sent to the turntable until the target is completely at the center scale of the field of view.
8. A device for positioning a target using a photoelectrically guided turntable, comprising a processor and a memory storing program instructions, characterized in that: The processor is configured to execute the method for positioning a target using an optoelectronic-guided turntable as described in any one of claims 1 to 7 when running the program instructions.
9. A storage medium storing program instructions, characterized in that: When the program instructions are executed, the method for positioning a target with a photoelectric-guided turntable as described in any one of claims 1 to 7 is executed.