Photoelectric pod data alignment method, unmanned aerial vehicle and readable storage medium

文档序号:1963352 发布日期:2021-12-14 浏览:16次 中文

阅读说明:本技术 光电吊舱数据对齐方法、无人机及可读存储介质 (Photoelectric pod data alignment method, unmanned aerial vehicle and readable storage medium ) 是由 高翔 郭亮 薛松柏 徐大勇 胥锋 于 2021-09-08 设计创作,主要内容包括:本发明公开了一种光电吊舱数据对齐方法、无人机及可读存储介质,所述光电吊舱数据对齐方法包括以下步骤:接收无人机的光电吊舱发送的图像帧以及第一通信帧,其中,所述第一通信帧包括光电吊舱的伺服数据;确定所述图像帧以及所述第一通信帧的帧号;根据帧号相同的图像帧中的图像数据以及第一通信帧中的伺服数据获取目标飞行参数;将所述目标飞行参数发送至飞控计算机,以供所述飞控计算机根据所述目标飞行参数控制无人机。本发明通过在光电吊舱的图像数据以及对应的伺服数据中加入相同的帧号,以便处理器根据帧号相同的图像数据以及伺服数据获取目标飞行参数,从而跟踪指定目标。(The invention discloses a photoelectric pod data alignment method, an unmanned aerial vehicle and a readable storage medium, wherein the photoelectric pod data alignment method comprises the following steps: receiving an image frame and a first communication frame sent by a photoelectric pod of an unmanned aerial vehicle, wherein the first communication frame comprises servo data of the photoelectric pod; determining a frame number of the image frame and the first communication frame; acquiring target flight parameters according to image data in image frames with the same frame number and servo data in a first communication frame; and sending the target flight parameters to a flight control computer, so that the flight control computer can control the unmanned aerial vehicle according to the target flight parameters. The same frame number is added into the image data of the photoelectric pod and the corresponding servo data, so that the processor can acquire the flight parameters of the target according to the image data and the servo data with the same frame number, and the specified target is tracked.)

1. A photoelectric pod data alignment method is applied to a processor of an unmanned aerial vehicle, and is characterized by comprising the following steps:

receiving an image frame and a first communication frame sent by a photoelectric pod of an unmanned aerial vehicle, wherein the first communication frame comprises servo data of the photoelectric pod;

determining a frame number of the image frame and the first communication frame;

acquiring target flight parameters according to image data in image frames with the same frame number and servo data in a first communication frame;

and sending the target flight parameters to a flight control computer, so that the flight control computer can control the unmanned aerial vehicle according to the target flight parameters.

2. The optoelectronic pod data alignment method of claim 1, wherein the step of receiving the image frame and the first communication frame sent by the optoelectronic pod of the drone further comprises:

decoding the image frame to obtain corresponding image data;

acquiring an image frame number in the image data, and storing the image frame number and the image data in a correlation manner;

decoding the first communication frame to obtain corresponding servo data and obtain a communication frame number in a frame header of the first communication frame;

and storing the servo data and the communication frame number in an associated manner.

3. The optoelectronic pod data alignment method as recited in claim 1, wherein the step of adjusting the flight parameters of the drone based on the image data in the image frame with the same frame number and the servo data in the first communication frame comprises:

and acquiring current flight parameters of the unmanned aerial vehicle in a second communication frame adjusted according to image data in the image frames with the same frame number and servo data of the first communication frame to acquire the target flight parameters, wherein the second communication frame is sent to the processor by the flight control computer.

4. A photoelectric pod data alignment method is applied to a photoelectric pod of an unmanned aerial vehicle, and is characterized by comprising the following steps:

acquiring image data and corresponding servo data;

adding an image frame number into the image data and coding to obtain a corresponding image frame;

adding a communication frame number which is the same as the image frame number of the corresponding image data into the servo data and coding to obtain a corresponding communication frame;

and sending the image frames to a processor of the unmanned aerial vehicle through a video interface, and sending the communication frames to the processor of the unmanned aerial vehicle through a serial port, so that the processor can obtain target flight parameters according to image data of the image frames with the same frame number and servo data in the communication frames.

5. The optoelectronic pod data alignment method of claim 4, wherein the step of including an image frame number in the image data comprises:

and adding an image frame number into the image pixel corresponding to the image data, wherein the image frame number can be added into the pixel for multiple times.

6. A photoelectric pod data alignment method is applied to a flight control computer of an unmanned aerial vehicle, and is characterized by comprising the following steps:

acquiring current flight parameters of the unmanned aerial vehicle, adding a communication frame number into the current flight parameters, and coding to obtain a communication frame;

sending the communication frame to a processor of the unmanned aerial vehicle, so that the processor of the unmanned aerial vehicle can obtain target flight parameters according to the current flight parameters in the communication frame and send the target flight parameters to a flight control computer of the unmanned aerial vehicle;

and receiving target flight parameters sent by a processor of the unmanned aerial vehicle, and controlling the unmanned aerial vehicle according to the target flight parameters.

7. An optoelectronic pod of a drone, comprising a memory, a processor, and an optoelectronic pod data alignment program stored on the memory and executable on the processor, the optoelectronic pod data alignment program when executed by the processor implementing the steps of the optoelectronic pod data alignment method as recited in any one of claims 1 to 3.

8. A processor of a drone, the processor comprising a memory, a processor, and an optoelectronic pod data alignment program stored on the memory and executable on the processor, the optoelectronic pod data alignment program when executed by the processor implementing the steps of the optoelectronic pod data alignment method as recited in any one of claims 4 to 5.

9. An flight control computer of an unmanned aerial vehicle, comprising a memory, a processor, and an optoelectronic pod data alignment program stored on the memory and executable on the processor, the optoelectronic pod data alignment program when executed by the processor implementing the steps of the optoelectronic pod data alignment method of any one of claims 1 to 6.

10. A readable storage medium, characterized in that the readable storage medium has stored thereon an optoelectronic pod data alignment program which, when executed by a processor, implements the steps of the optoelectronic pod data alignment method according to any one of claims 1 to 6.

Technical Field

The invention relates to the field of unmanned aerial vehicles, in particular to a photoelectric pod data alignment method, an unmanned aerial vehicle and a readable storage medium.

Background

Along with the use of unmanned aerial vehicles is more and more extensive, people are more and more high to the demand of the last photoelectricity nacelle of unmanned aerial vehicle tracking location target function. Because the motion state and the motion speed of the target have uncertainty, the frame angle of the photoelectric pod and the flight speed and the flight track of the unmanned aerial vehicle are manually controlled by the ground station to track the specified target, so that the workload is huge and the target is easy to lose. And a new task module is required to be introduced when the photoelectric pod is used for tracking the target, and the flying speed and flying attitude of the unmanned aerial vehicle are continuously adjusted according to the moving or static target observed by the photoelectric pod. Due to the fact that the video transmission path of the photoelectric pod is different from the transmission path of the servo data, the corresponding time of arriving at the task module is inconsistent, and certain delay is achieved. If the image and the servo data transmitted to the task module by the photoelectric pod are inconsistent with the current flight parameter data of the unmanned aerial vehicle, the flight trajectory of the unmanned aerial vehicle is guided by mistake, so that the tracking target is lost.

The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.

Disclosure of Invention

The invention mainly aims to provide a photoelectric pod data alignment method, aims to add the same frame number into image data and corresponding servo data of a photoelectric pod, so that a processor can acquire target flight parameters according to the image data and the servo data with the same frame number, thereby tracking a specified target, and solves the problem that when the transmission data are inconsistent, the flight trajectory of an unmanned aerial vehicle is guided by mistake, so that the tracked target is lost.

In order to achieve the above object, the present invention provides a photoelectric pod data alignment method applied to a processor of an unmanned aerial vehicle, the photoelectric pod data alignment method including the steps of:

receiving an image frame and a first communication frame sent by a photoelectric pod of an unmanned aerial vehicle, wherein the first communication frame comprises servo data of the photoelectric pod;

determining a frame number of the image frame and the first communication frame;

acquiring target flight parameters according to image data in image frames with the same frame number and servo data in a first communication frame;

and sending the target flight parameters to a flight control computer, so that the flight control computer can control the unmanned aerial vehicle according to the target flight parameters.

Further, after the step of receiving the image frame and the first communication frame sent by the optoelectronic pod of the unmanned aerial vehicle, the method further includes:

decoding the image frame to obtain corresponding image data;

acquiring an image frame number in the image data, and storing the image frame number and the image data in a correlation manner;

decoding the first communication frame to obtain corresponding servo data and obtain a communication frame number in a frame header of the first communication frame;

and storing the servo data and the communication frame number in an associated manner.

Further, the step of adjusting the flight parameters of the unmanned aerial vehicle according to the image data in the image frame with the same frame number and the servo data in the first communication frame includes:

and acquiring current flight parameters of the unmanned aerial vehicle in a second communication frame adjusted according to image data in the image frames with the same frame number and servo data of the first communication frame to acquire the target flight parameters, wherein the second communication frame is sent to the processor by the flight control computer.

In addition, in order to achieve the above object, the method provides an optoelectronic pod data alignment method applied to an optoelectronic pod of an unmanned aerial vehicle, the optoelectronic pod data alignment method including the steps of:

acquiring image data and corresponding servo data;

adding an image frame number into the image data and coding to obtain a corresponding image frame;

adding a communication frame number which is the same as the image frame number of the corresponding image data into the servo data and coding to obtain a corresponding communication frame;

and sending the image frames to a processor of the unmanned aerial vehicle through a video interface, and sending the communication frames to the processor of the unmanned aerial vehicle through a serial port, so that the processor can obtain target flight parameters according to image data of the image frames with the same frame number and servo data in the communication frames.

Further, the step of adding an image frame number to the image data comprises:

and adding an image frame number into the image pixel corresponding to the image data, wherein the image frame number can be added into the pixel for multiple times.

In addition, in order to achieve the above object, the method provides an optoelectronic pod data alignment method applied to a flight control computer of an unmanned aerial vehicle, the optoelectronic pod data alignment method including the steps of:

acquiring current flight parameters of the unmanned aerial vehicle, adding a communication frame number into the current flight parameters, and coding to obtain a communication frame;

sending the communication frame to a processor of the unmanned aerial vehicle, so that the processor of the unmanned aerial vehicle can obtain target flight parameters according to the current flight parameters in the communication frame and send the target flight parameters to a flight control computer of the unmanned aerial vehicle;

and receiving target flight parameters sent by a processor of the unmanned aerial vehicle, and controlling the unmanned aerial vehicle according to the target flight parameters.

In order to achieve the above object, the present invention further provides an optoelectronic pod of an unmanned aerial vehicle, the optoelectronic pod comprising a memory, a processor and an optoelectronic pod data alignment program stored on the memory and operable on the processor, the optoelectronic pod data alignment program when executed by the processor implementing the steps of the optoelectronic pod data alignment method as described above.

In order to achieve the above object, the present invention further provides a processor of a drone, the processor including a memory, a processor, and an optoelectronic pod data alignment program stored on the memory and executable on the processor, the optoelectronic pod data alignment program when executed by the processor implementing the steps of the optoelectronic pod data alignment method as described above.

In order to achieve the above object, the present invention further provides an unmanned aerial vehicle flight control computer, which includes a memory, a processor, and an optoelectronic pod data alignment program stored in the memory and operable on the processor, wherein the optoelectronic pod data alignment program, when executed by the processor, implements the steps of the optoelectronic pod data alignment method as described above.

In order to achieve the above object, the present invention further provides a readable storage medium, on which an optoelectronic pod data alignment program is stored, the optoelectronic pod data alignment program implementing any one of the steps of the optoelectronic pod data alignment method described above when executed by a processor.

According to the technical scheme, an image frame and a first communication frame sent by a photoelectric pod of an unmanned aerial vehicle are received, wherein the first communication frame comprises servo data of the photoelectric pod; determining a frame number of the image frame and the first communication frame; acquiring target flight parameters according to image data in image frames with the same frame number and servo data in a first communication frame; and sending the target flight parameters to a flight control computer, so that the flight control computer can control the unmanned aerial vehicle according to the target flight parameters. Therefore, the same frame number is added into the image data of the photoelectric pod and the corresponding servo data, so that the processor can obtain the target flight parameters according to the image data and the servo data with the same frame number, thereby tracking the designated target, and solving the problem that the unmanned aerial vehicle is guided by mistake to lose the tracked target when the transmission data are inconsistent.

Drawings

FIG. 1 is a schematic diagram of an apparatus in a hardware operating environment according to an embodiment of the present invention;

FIG. 2 is a schematic flow chart diagram illustrating an embodiment of the optoelectronic pod data alignment method of the present invention;

FIG. 3 is a schematic flow chart diagram illustrating an embodiment of the optoelectronic pod data alignment method of the present invention;

FIG. 4 is a schematic flow chart diagram illustrating an embodiment of the optoelectronic pod data alignment method of the present invention;

FIG. 5 is a multi-end data flow diagram of the photoelectric pod data alignment method of the present invention.

The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.

Detailed Description

It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

The main technical scheme of the invention is as follows:

receiving an image frame and a first communication frame sent by a photoelectric pod of an unmanned aerial vehicle, wherein the first communication frame comprises servo data of the photoelectric pod;

determining a frame number of the image frame and the first communication frame;

acquiring target flight parameters according to image data in image frames with the same frame number and servo data in a first communication frame;

and sending the target flight parameters to a flight control computer, so that the flight control computer can control the unmanned aerial vehicle according to the target flight parameters.

In the related art, since the video transmission path of the electro-optical pod is different from the transmission path of the servo data, the corresponding arrival time at the task module is inconsistent and has a certain delay. If the image and the servo data transmitted to the task module by the photoelectric pod are inconsistent with the current flight parameter data of the unmanned aerial vehicle, the flight trajectory of the unmanned aerial vehicle is guided by mistake, so that the tracking target is lost.

According to the technical scheme, an image frame and a first communication frame sent by a photoelectric pod of an unmanned aerial vehicle are received, wherein the first communication frame comprises servo data of the photoelectric pod; determining a frame number of the image frame and the first communication frame; acquiring target flight parameters according to image data in image frames with the same frame number and servo data in a first communication frame; and sending the target flight parameters to a flight control computer, so that the flight control computer can control the unmanned aerial vehicle according to the target flight parameters. Therefore, the same frame number is added into the image data of the photoelectric pod and the corresponding servo data, so that the processor can obtain the target flight parameters according to the image data and the servo data with the same frame number, thereby tracking the designated target, and solving the problem that the unmanned aerial vehicle is guided by mistake to lose the tracked target when the transmission data are inconsistent.

As shown in fig. 1, fig. 1 is a schematic diagram of a hardware operating environment of a terminal according to an embodiment of the present invention.

As shown in fig. 1, the terminal may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may comprise a touch screen and/or keys, etc., and the optional user interface 1003 may also comprise a standard wired interface, a wireless interface, etc. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., a non-volatile memory such as a disk memory), the memory 1005 may optionally also be a storage device separate from the processor 1001.

Those skilled in the art will appreciate that the configuration of the terminal shown in fig. 1 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.

As shown in fig. 1, a memory 1005, which is a type of computer storage medium, may include an operating system, a network communication module, a user interface module, and an optoelectronic pod data alignment program.

In the terminal shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be configured to invoke a control program of the processor of the drone stored in the memory 1005 and perform the following operations:

receiving an image frame and a first communication frame sent by a photoelectric pod of an unmanned aerial vehicle, wherein the first communication frame comprises servo data of the photoelectric pod;

determining a frame number of the image frame and the first communication frame;

acquiring target flight parameters according to image data in image frames with the same frame number and servo data in a first communication frame;

and sending the target flight parameters to a flight control computer, so that the flight control computer can control the unmanned aerial vehicle according to the target flight parameters.

Further, the processor 1001 may call a control program of the processor of the drone stored in the memory 1005, and also perform the following operations:

decoding the image frame to obtain corresponding image data;

acquiring an image frame number in the image data, and storing the image frame number and the image data in a correlation manner;

decoding the first communication frame to obtain corresponding servo data and obtain a communication frame number in a frame header of the first communication frame;

and storing the servo data and the communication frame number in an associated manner.

Further, the processor 1001 may call a control program of the processor of the drone stored in the memory 1005, and also perform the following operations:

and acquiring current flight parameters of the unmanned aerial vehicle in a second communication frame adjusted according to image data in the image frames with the same frame number and servo data of the first communication frame to acquire the target flight parameters, wherein the second communication frame is sent to the processor by the flight control computer.

Further, the processor 1001 may invoke a control program of the optoelectronic pod of the drone stored in the memory 1005, also performing the following operations:

acquiring image data and corresponding servo data;

adding an image frame number into the image data and coding to obtain a corresponding image frame;

adding a communication frame number which is the same as the image frame number of the corresponding image data into the servo data and coding to obtain a corresponding communication frame;

and sending the image frames to a processor of the unmanned aerial vehicle through a video interface, and sending the communication frames to the processor of the unmanned aerial vehicle through a serial port, so that the processor can obtain target flight parameters according to image data of the image frames with the same frame number and servo data in the communication frames.

Further, the processor 1001 may invoke a control program of the optoelectronic pod of the drone stored in the memory 1005, also performing the following operations:

and adding an image frame number into the image pixel corresponding to the image data, wherein the image frame number can be added into the pixel for multiple times.

Further, the processor 1001 may call a control program of a flight control computer of the drone stored in the memory 1005, and further perform the following operations:

acquiring current flight parameters of the unmanned aerial vehicle, adding a communication frame number into the current flight parameters, and coding to obtain a communication frame;

sending the communication frame to a processor of the unmanned aerial vehicle, so that the processor of the unmanned aerial vehicle can obtain target flight parameters according to the current flight parameters in the communication frame and send the target flight parameters to a flight control computer of the unmanned aerial vehicle;

and receiving target flight parameters sent by a processor of the unmanned aerial vehicle, and controlling the unmanned aerial vehicle according to the target flight parameters.

As shown in fig. 2, in an embodiment of the present invention, the optoelectronic pod data alignment method includes the following steps:

step S11, receiving an image frame and a first communication frame sent by a photoelectric pod of the unmanned aerial vehicle, wherein the first communication frame comprises servo data of the photoelectric pod;

in this embodiment, the processor of the drone, i.e. the task module, receives the image frames sent by the optoelectronic pod through a video interface, such as SDI, HDMI, etc., and decodes the image frames to obtain the image data of the optoelectronic pod and the corresponding frame number. The task module further comprises a serial port, for example: RS232, RS422, RS485 and the like, and the servo data and the corresponding frame number of the photoelectric pod are obtained by decoding a first communication frame sent by the photoelectric pod.

Step S12, determining the frame number of the image frame and the first communication frame;

in this embodiment, when an image frame is received through the video interface, the image frame is decoded, the image data of the electro-optical pod is acquired, and the frame number added to the image pixel is obtained. When a first communication frame sent by the photoelectric pod is received through a serial port, the first communication frame is decoded, servo data of the photoelectric pod is obtained, and a frame number corresponding to the communication frame is determined according to a frame header of the first communication frame. And determining a corresponding frame number after decoding the image frame and the first communication frame so as to search the same frame number, and determining a target flight parameter according to the image data and the servo data stored in association with the frame number.

Step S13, acquiring target flight parameters according to image data in the image frames with the same frame number and servo data in the first communication frame;

in this embodiment, when an image frame and a first communication frame having the same frame number are found, the position of the tracking target can be determined from the image data in the image frame and the servo data in the first communication frame. And searching a second communication frame with the same frame number according to the frame number, wherein the second communication frame is sent to the processor by a flight control computer of the unmanned aerial vehicle through a serial port. And acquiring the current flight parameter in the second communication frame, and adjusting the current flight parameter according to the image data in the image frame with the same frame number and the servo data in the first communication frame to obtain a target flight parameter so as to send the target flight parameter to a flight control computer.

And step S14, sending the target flight parameters to a flight control computer, so that the flight control computer can control the unmanned aerial vehicle according to the target flight parameters.

In this embodiment, after obtaining the target flight parameter, the target flight parameter is sent to a flight control computer, so that the flight control computer controls the unmanned aerial vehicle according to the target flight parameter, where the target flight parameter is obtained according to the image frame with the same frame number and the first communication frame. The position of the tracking target can be determined according to the image frame and the communication frame, so that the unmanned aerial vehicle is controlled according to the target flight parameters, the photoelectric pod can better track and shoot the image of the tracking target.

In summary, in the present embodiment, a processor of an unmanned aerial vehicle is used as an execution main body, and receives an image frame and a first communication frame sent by a photoelectric pod of the unmanned aerial vehicle, where the first communication frame includes servo data of the photoelectric pod; determining a frame number of the image frame and the first communication frame; acquiring target flight parameters according to image data in image frames with the same frame number and servo data in a first communication frame; and sending the target flight parameters to a flight control computer, so that the flight control computer can control the unmanned aerial vehicle according to the target flight parameters. Therefore, the same frame number is added into the image data of the photoelectric pod and the corresponding servo data, so that the processor can obtain the target flight parameters according to the image data and the servo data with the same frame number, thereby tracking the designated target, and solving the problem that the unmanned aerial vehicle is guided by mistake to lose the tracked target when the transmission data are inconsistent.

In an embodiment of the present invention, after the step of receiving the image frame and the first communication frame sent by the optoelectronic pod of the unmanned aerial vehicle, the method further includes:

decoding the image frame to obtain corresponding image data;

acquiring an image frame number in the image data, and storing the image frame number and the image data in a correlation manner;

decoding the first communication frame to obtain corresponding servo data and obtain a communication frame number in a frame header of the first communication frame;

and storing the servo data and the communication frame number in an associated manner.

In this embodiment, after receiving an image frame sent by a photoelectric pod through a video interface and a first communication frame sent by a serial port, decoding the image frame to obtain corresponding image data, and acquiring an image frame number in the image data, where the image frame number is in a pixel of the image data. And after determining the image frame number, storing the image frame number and the image data in a correlation manner. And decoding the first communication frame to obtain corresponding servo data, and acquiring a communication frame number in a frame header of the first communication frame. And after the communication frame number is determined, the servo data and the communication frame number are stored in a correlation mode. And storing the image frame number and the image data in a correlation manner, and storing the communication frame number and the servo data in a correlation manner, so as to determine the corresponding image data and the servo data after determining that the image frame number is the same as the communication frame number, and adjusting the flight parameters according to the image data and the servo data to obtain the target flight parameters. Therefore, the image data and the servo data are in one-to-one correspondence through the frame number, and the flight parameters are adjusted according to the image data and the servo data, so that the unmanned aerial vehicle can track the target better.

In an embodiment of the present invention, the step of adjusting the flight parameters of the unmanned aerial vehicle according to the image data in the image frames with the same frame number and the servo data in the first communication frame includes:

and acquiring current flight parameters of the unmanned aerial vehicle in a second communication frame adjusted according to image data in the image frames with the same frame number and servo data of the first communication frame to acquire the target flight parameters, wherein the second communication frame is sent to the processor by the flight control computer.

In this embodiment, the processor of the drone may receive, through the serial port, a second communication frame sent by the flight control computer of the drone in addition to the first communication frame sent by the optoelectronic pod. And decoding the second communication frame to obtain the flight parameters of the current unmanned aerial vehicle and the communication frame number in the communication frame header, and storing the communication frame number and the current flight parameters in a correlation manner. And taking the frame numbers of the image frame and the first communication frame as a target frame number, searching a frame number of a second communication frame which is the same as the target frame number, and acquiring the current flight parameter corresponding to the frame number. And adjusting the current flight parameter according to the image data in the image frame and the servo data of the first communication frame to obtain a target flight parameter, and sending the target flight parameter to a flight control computer so that the flight control computer can operate according to the target flight parameter. Therefore, the corresponding flight parameters are adjusted according to the image data and the servo data through the frame number, so that the unmanned aerial vehicle can track the target better.

As shown in fig. 3, in an embodiment of the present invention, the optoelectronic pod data alignment method applied to the unmanned aerial vehicle includes the following steps:

step S21, acquiring image data and corresponding servo data;

step S22, adding image frame numbers into the image data and coding to obtain corresponding image frames;

step S23, adding the communication frame number which is the same as the image frame number of the corresponding image data into the servo data and coding to obtain the corresponding communication frame;

and step S24, sending the image frames to a processor of the unmanned aerial vehicle through a video interface, and sending the communication frames to the processor of the unmanned aerial vehicle through a serial port, so that the processor can obtain target flight parameters according to the image data of the image frames with the same frame number and the servo data in the communication frames.

In this embodiment, the optoelectronic pod acquires current image data and corresponding servo data. Before the image data is not encoded and is still in YUV format, adding an image frame number to a byte in a pixel of the image, for example, assuming that the image frame number is two digits, embedding the image frame number to occupy two bytes at a time, when the image data is not encoded, still in YUV format, adding an image frame number to the first six bytes of the pixel in the first row of the corresponding image, as shown in table 1 below:

Y_0 U_0 V_0 Y_1 U_1 V_1

TABLE 1

For the stability of transmission and the consideration of the packet loss situation which may occur in the network, each byte is transmitted for a plurality of times. And after adding an image frame number into the image data, coding the image data to obtain a corresponding image frame. The photoelectric pod transmits servo data corresponding to the image data through another path, a communication frame number which is the same as the image frame number of the corresponding image data is added into the servo data, the servo data is encoded to obtain a corresponding first communication frame, a frame header of the first communication frame is added into the communication frame number, and a processor, namely a task module of the unmanned aerial vehicle obtains an image frame and the first communication frame which are corresponding to the same frame number, so that the purpose that a target flight parameter is determined according to the image data and the corresponding servo data at the same moment is achieved, and the flight attitude of the unmanned aerial vehicle is adjusted according to the target flight parameter. The method comprises the steps of sending an image frame obtained after coding to a processor of the unmanned aerial vehicle through a video interface, sending a first communication frame obtained after coding to the processor of the unmanned aerial vehicle through a serial port, enabling the processor of the unmanned aerial vehicle to decode the image frame and the first communication frame, adjusting current flight parameters sent by a flight control computer according to the image data and the servo data with the same frame number, obtaining target flight parameters, and achieving the purpose of tracking a specified target.

In an embodiment of the present invention, the step of adding an image frame number to the image data includes:

and adding an image frame number into the image pixel corresponding to the image data, wherein the image frame number can be added into the pixel for multiple times.

In this embodiment, before the image data of the optoelectronic pod is encoded and sent to the processor of the unmanned aerial vehicle, an image frame number needs to be added to the image pixel corresponding to the image data, and then the image data with the added image frame number is encoded to obtain an image frame and sent to the processor of the unmanned aerial vehicle through the video interface. The image data which is not coded is in YUV format, YUV of one pixel corresponds to 3 bytes, and the image frame number can be embedded in the pixel for many times in consideration of the stability of transmission and the packet loss condition which may occur in a network.

As shown in fig. 4, in an embodiment of the present invention, the method for aligning the optoelectronic pod data is applied to a flight control computer of an unmanned aerial vehicle, and includes the following steps:

step S31, acquiring the current flight parameters of the unmanned aerial vehicle, adding a communication frame number into the current flight parameters and coding to obtain a communication frame;

step S32, the communication frame is sent to a processor of the unmanned aerial vehicle, so that the processor of the unmanned aerial vehicle can obtain target flight parameters according to the current flight parameters in the communication frame and send the target flight parameters to a flight control computer of the unmanned aerial vehicle;

and step S33, receiving the target flight parameters sent by the processor of the unmanned aerial vehicle, and controlling the unmanned aerial vehicle according to the target flight parameters.

In this embodiment, the flight control computer obtains a current flight parameter of the unmanned aerial vehicle, and adds a communication frame number to the current flight parameter and encodes the communication frame number to obtain a communication frame, where the communication frame number is stored in a frame header of the communication frame. And sending the communication frame to a processor of the unmanned aerial vehicle, so that the processor of the unmanned aerial vehicle decodes the current flight parameter in the communication frame, adjusts the current flight parameter according to the image data of the image frames with the same frame number and the servo data in the communication frame to obtain a target flight parameter, and finally sends the target flight parameter to a flight control computer of the unmanned aerial vehicle. And the flight control computer receives the target flight parameters and controls the unmanned aerial vehicle according to the target flight parameters so that the photoelectric pod tracks the target. Therefore, the corresponding flight parameters are adjusted according to the image data and the servo data through the frame number, so that the unmanned aerial vehicle can track the target better.

As shown in fig. 5, an embodiment of the present invention includes the following steps:

the photoelectric pod of the unmanned aerial vehicle tracks a target object to obtain image data and servo data, adds an image frame number into image pixels of the image data, codes the image data to obtain an image frame, and sends the image frame to a processor of the unmanned aerial vehicle, namely a task module, through a video interface. Meanwhile, the photoelectric pod adds a communication frame number with the same frame number as the image frame number into the servo data and encodes the servo data to obtain a first communication frame, wherein the communication frame number is stored in a frame header of the first communication frame; and the photoelectric pod sends the first communication frame to a processor of the unmanned aerial vehicle through a serial port. The method comprises the steps that a flight control computer of the unmanned aerial vehicle obtains current flight parameters of the unmanned aerial vehicle, communication frame numbers are added into the current flight parameters, the current flight parameters are coded to obtain a second communication frame, and the communication frame numbers are stored in a frame header of the second communication frame; and the flight control computer sends the second communication frame to a processor of the unmanned aerial vehicle through a serial port. The processor, namely a task module, of the unmanned aerial vehicle receives an image frame and a first communication frame sent by the photoelectric pod, receives a second communication frame sent by the flight control computer, decodes the image frame to obtain an image frame number and corresponding image data, and stores the image frame number and the image data in a correlation manner; decoding the first communication frame to obtain servo data and a corresponding first communication frame number, and storing the servo data and the first communication frame number in a correlation manner; and decoding the second communication frame to obtain corresponding flight parameters and a second communication frame number, and storing the flight parameters and the second communication frame number in a correlation manner. When the image frame and the first communication frame with the same frame number are searched, corresponding image data and servo data are obtained, and the flight parameters corresponding to the second communication frame with the same frame number are adjusted according to the image data and the servo data, so that corresponding target flight parameters are obtained. And the processor of the unmanned aerial vehicle sends the target flight parameters to the flight control computer, so that the flight control computer can control the unmanned aerial vehicle according to the target flight parameters.

In order to achieve the above object, the present invention further provides an optoelectronic pod of an unmanned aerial vehicle, the optoelectronic pod comprising a memory, a processor and an optoelectronic pod data alignment program stored on the memory and operable on the processor, the optoelectronic pod data alignment program when executed by the processor implementing the steps of the optoelectronic pod data alignment method as described above.

In order to achieve the above object, the present invention further provides a processor of a drone, the processor including a memory, a processor, and an optoelectronic pod data alignment program stored on the memory and executable on the processor, the optoelectronic pod data alignment program when executed by the processor implementing the steps of the optoelectronic pod data alignment method as described above.

In order to achieve the above object, the present invention further provides an unmanned aerial vehicle flight control computer, which includes a memory, a processor, and an optoelectronic pod data alignment program stored in the memory and operable on the processor, wherein the optoelectronic pod data alignment program, when executed by the processor, implements the steps of the optoelectronic pod data alignment method as described above.

In order to achieve the above object, the present invention further provides a readable storage medium, on which an optoelectronic pod data alignment program is stored, the optoelectronic pod data alignment program implementing any one of the steps of the optoelectronic pod data alignment method described above when executed by a processor.

The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.

Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.

The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

15页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种图像获取方法、装置、飞行器和存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类