Aircraft speed monitoring method and aircraft

文档序号:1797442 发布日期:2021-11-05 浏览:21次 中文

阅读说明:本技术 一种飞行器速度监测方法、飞行器 (Aircraft speed monitoring method and aircraft ) 是由 涂广毅 郑磊 于 2021-08-05 设计创作,主要内容包括:本申请提供了一种飞行器速度监测方法、飞行器,涉及无人机领域。飞行器速度监测方法包括基于光流法获取飞行器当前飞行速度对应的光流速度;在确定所述光流速度在预设探测范围之外时,控制所述飞行器的摄像装置调整焦距;在确定所述摄像装置调整焦距后的所述光流速度处于所述预设探测范围内时,获取所述摄像装置调整后的焦距值;基于所述调整后的焦距值、所述飞行器的飞行高度及预设速度计算关系,获得所述飞行器的飞行速度。当飞行器处于光流法无法计算自身飞行速度的状态时,通过调整摄像机焦距使得飞行器在不同飞行状态都能获取自身的飞行速度,便于对飞行器进行精确控制。(The application provides an aircraft speed monitoring method and an aircraft, and relates to the field of unmanned aerial vehicles. The aircraft speed monitoring method comprises the steps of obtaining an optical flow speed corresponding to the current flying speed of the aircraft based on an optical flow method; when the optical flow velocity is determined to be out of a preset detection range, controlling a camera of the aircraft to adjust a focal length; when the optical flow velocity after the focal length of the camera device is adjusted is determined to be within the preset detection range, acquiring a focal length value after the camera device is adjusted; and obtaining the flying speed of the aircraft based on the adjusted focal length value, the flying height of the aircraft and a preset speed calculation relation. When the aircraft is in a state that the self flying speed cannot be calculated by an optical flow method, the self flying speed can be obtained by the aircraft in different flying states by adjusting the focal length of the camera, so that the aircraft can be accurately controlled.)

1. A method of monitoring aircraft speed, comprising:

acquiring an optical flow velocity corresponding to the current flying velocity of the aircraft based on an optical flow method;

when the optical flow velocity is determined to be out of a preset detection range, controlling a camera device of the aircraft to adjust a focal length, wherein the preset detection range is smaller than an actual detection range, the lower limit of the preset detection range is the lower limit of the calculation of the optical flow method, and the upper limit of the preset detection range is determined based on the resolution of an image acquired by the camera device;

when the optical flow velocity after the focal length of the camera device is adjusted is determined to be within the preset detection range, acquiring a focal length value after the camera device is adjusted;

and obtaining the flying speed of the aircraft based on the adjusted focal length value, the flying height of the aircraft and a preset speed calculation relation.

2. The method of claim 1, wherein said controlling a camera of the aerial vehicle to adjust a focal length upon determining that the optical flow velocity is outside a preset detection range comprises:

and controlling the camera device to reduce the focal length when the optical flow speed is determined to be greater than the upper limit of the preset detection range.

3. The method of claim 1, wherein said controlling a camera of the aerial vehicle to adjust a focal length upon determining that the optical flow velocity is outside a preset detection range comprises:

and when the optical flow speed is determined to be smaller than the lower limit of the preset detection range, controlling the camera device to increase the focal length.

4. The method according to claim 1, wherein before the obtaining of the optical flow velocity corresponding to the current flying velocity of the aircraft based on the optical flow method, the method comprises: controlling the image pickup device to set a focal length to a median value of a zoom range of the image pickup device.

5. The method of claim 1, further comprising:

when the optical flow velocity is determined to be out of a preset detection range, acquiring the flight state of the aircraft, wherein the flight state comprises an altitude change condition and a change condition of the flight velocity;

controlling a sensor in the camera device to adjust a frame rate based on the flight state;

when the optical flow velocity after the frame rate is adjusted by the sensor is determined to be within the preset detection range, obtaining a frame rate value after the frame rate is adjusted by the sensor;

and obtaining the flying speed of the aircraft based on the adjusted frame rate value, the flying height and the preset speed calculation relationship.

6. The method of claim 5, wherein controlling a sensor in the imaging device to adjust a frame rate based on the flight status comprises: when the aircraft is determined to be in a first flight state, controlling the camera device to increase the frame rate; wherein the first flight state is indicative of the current flying altitude of the aircraft being unchanged and the flying speed being increased.

7. The method of claim 5, wherein controlling a sensor in the imaging device to adjust a frame rate based on the flight status comprises: when the aircraft is determined to be in the second flight state, controlling the camera device to increase the frame rate; and the second flight state represents that the current flight speed of the aircraft is unchanged and the flight altitude is reduced.

8. An aircraft, characterized in that it comprises:

an aircraft body carrying a processor for executing the aircraft speed monitoring method according to any one of claims 1 to 7;

the camera device is arranged on the aircraft main body and used for acquiring images;

the processor is further used for controlling the aircraft body to enable the aircraft body to control the camera device to adjust the focal length;

the camera device is also connected with the processor and used for adjusting the frame rate based on the control instruction of the processor;

the camera device is also used for sending the adjusted focal length value to the processor.

9. The aircraft of claim 8, wherein the camera device comprises:

the zooming camera is connected with the aircraft body and used for adjusting the focal length based on the control of the aircraft body;

and the sensor is arranged in the zoom camera, is connected with the processor and is used for adjusting the frame rate of the sensor based on the control instruction.

10. The aircraft of claim 9, wherein the sensor is further configured to obtain an adjusted focal length value of the zoom camera; the processor is further configured to obtain the sensor adjusted frame rate value.

Technical Field

The invention relates to the technical field of unmanned aerial vehicles, in particular to an aircraft speed monitoring method and an aircraft.

Background

Currently, when calculating the flying speed of an unmanned aerial vehicle, the unmanned aerial vehicle usually adopts an optical flow technology to calculate, and when calculating the flying speed of the unmanned aerial vehicle, the optical flow technology generally involves image block matching, an LK optical flow algorithm, corner matching, or the like. And three conditions of the optical flow method need to be satisfied: constant brightness, consistent space, and small motion. Wherein, the change of the small motion means that the change of the time can not cause the violent change of the position, namely the displacement of the pixel points in the collected images of the front frame and the back frame is not large.

Due to the limitation of the optical flow method, if the flying speed of the unmanned aerial vehicle is calculated based on the optical flow method, the flying speed and the height of the unmanned aerial vehicle need to be within a certain range, and if the flying speed is out of the range, the problem that the flying speed cannot be calculated occurs. That is, when the unmanned aerial vehicle is at the same speed and the camera is relatively close to the object, the unmanned aerial vehicle feeds back the pixel of the collected image, the pixel movement is too large, so that the same pixel point does not exist in the two adjacent frames of images, and the flight speed cannot be calculated by an optical flow method; on the contrary, when the camera is far away from the object, the motion of the pixel point is smaller than the lower limit of the detection speed of the optical flow method, and the flight speed cannot be calculated. Similarly, the height is unchanged, and the problem that the flying speed of the unmanned aerial vehicle cannot be calculated may also occur when the flying speed is too fast or too slow. The problem that the unmanned aerial vehicle rocks or drifts fast back and forth by a wide margin can appear when the super low-altitude flight specifically, and in the high altitude flight, the problem of slow drift can appear.

Disclosure of Invention

In view of the above, the present invention aims to provide an aircraft speed monitoring method and an aircraft, which enable the aircraft to obtain its own accurate speed at different altitudes by using an optical flow method, thereby implementing precise control of the aircraft, in order to solve the problems that in the prior art, when the aircraft flight speeds in different altitude ranges are calculated by using the optical flow method, speed distortion occurs and the flight speeds cannot be obtained.

In order to achieve the above object, embodiments of the present application are implemented as follows:

in a first aspect, an embodiment of the present application provides an aircraft speed monitoring method, including: acquiring an optical flow velocity corresponding to the current flying velocity of the aircraft based on an optical flow method; when the optical flow velocity is determined to be out of a preset detection range, controlling a camera device of the aircraft to adjust a focal length, wherein the preset detection range is smaller than an actual detection range, the lower limit of the preset detection range is the lower limit of the calculation of the optical flow method, and the upper limit of the preset detection range is set based on the resolution of an image acquired by the camera device; after the focal length of the camera device is determined to be adjusted, when the optical flow velocity is within the preset detection range, acquiring a focal length value adjusted by the camera device; and obtaining the flying speed of the aircraft based on the adjusted focal length value, the flying height of the aircraft and a preset speed calculation relation.

In this embodiment, when the optical flow velocity is outside the actual detection range, it is described that the optical flow velocity or the flight velocity cannot be calculated by the optical flow method. Because the optical flow method calculates the optical flow velocity through the image acquired by the camera device, before the velocity distortion, the image acquired by the camera is changed by changing the focal length of the camera, so that the flying velocity of the aircraft can be reflected in the image, and the optical flow method can continuously calculate the optical flow velocity and the flying velocity. In addition, when the flight speed can be calculated by the optical flow method after the focal length is adjusted, the flight speed can be calculated more quickly and effectively by using the acquired data and the preset speed calculation formula. Therefore, the focal length of the camera is adjusted to enable the aircraft to obtain the self flying speed in different flying states through an optical flow method, and the aircraft can be accurately controlled conveniently.

In one embodiment, when it is determined that the optical flow velocity is outside the preset detection range, controlling the camera of the aircraft to adjust the focal length includes: and controlling the camera device to reduce the focal length when the optical flow speed is determined to be greater than the upper limit of the preset detection range.

In one embodiment, when it is determined that the optical flow velocity is outside the preset detection range, controlling the camera of the aircraft to adjust the focal length includes: and when the optical flow speed is determined to be smaller than the lower limit of the preset detection range, controlling the camera device to increase the focal length.

In this embodiment, different situations that can't calculate the airspeed are about to appear to the light stream method, and light stream speed is outside predetermineeing the detection range, and when not exceeding the maximum detection range yet, provide different focus control modes, according to different focus control modes, correspondingly quick adjustment camera device's focus obtains light stream speed and airspeed fast, realizes the accurate control to the aircraft.

In one embodiment, before the obtaining of the optical flow velocity corresponding to the current flying velocity of the aircraft based on the optical flow method, the method includes: controlling the image pickup device to set a focal length to a median value of a zoom range of the image pickup device.

In this embodiment, the focal length of the camera device is set to the middle value of the zoom range, so that the focal length can be adjusted more quickly and sensitively.

In one embodiment, the aircraft speed monitoring method further comprises: when the optical flow velocity is determined to be out of a preset detection range, acquiring the flight state of the aircraft, wherein the flight state comprises an altitude change condition and a change condition of the flight velocity; controlling a sensor in the camera device to adjust a frame rate based on the flight state; when the optical flow velocity is determined to be within the preset detection range after the frame rate is adjusted by the sensor, acquiring a frame rate value after the adjustment of the sensor; and obtaining the flying speed of the aircraft based on the adjusted frame rate value, the flying height and the preset speed calculation relationship.

In the present embodiment, a second adjustment method is provided when the flight velocity or the optical flow velocity cannot be calculated by the optical flow method, that is, when the optical flow method is outside the preset detection range and within the actual detection range. Since the calculation of the optical flow velocity by the optical flow method is also affected by the interval time between the acquisition of images of two adjacent frames, the interval time between the acquisition of images can be changed by adjusting the sensor frame rate of the image pickup device, thereby enabling the calculation of the flight velocity based on the optical flow method. When the flying speed can be calculated based on the optical flow method after the frame rate is adjusted, the acquired data and the preset speed calculation formula are used, the flying speed can be calculated more quickly and effectively, the corresponding flying speed can be calculated by the aircraft through the obtained optical flow speed without consuming more calculation resources, and the process of obtaining the flying speed is quicker.

In one embodiment, controlling a sensor in the imaging device to adjust a frame rate based on the flight status includes: when the aircraft is determined to be in a first flight state, controlling the camera device to increase the frame rate; wherein the first flight state is indicative of the current flying altitude of the aircraft being unchanged and the flying speed being increased.

In one embodiment, the controlling a sensor in the imaging device to adjust a frame rate based on the flight status includes: when the aircraft is determined to be in the second flight state, controlling the camera device to increase the frame rate; and the second flight state represents that the current flight speed of the aircraft is unchanged and the flight altitude is reduced.

In this embodiment, different frame rate adjustment modes are provided for different situations, and different flight states of the aircraft are quickly responded to, so that the aircraft can obtain flight speeds in different flight states, and accurate control is realized.

In a second aspect, an embodiment of the present application provides an aircraft, including: an aircraft body on which a processor is mounted, the processor being configured to perform the aircraft speed monitoring method according to any one of the first aspect; the camera device is arranged on the aircraft main body and used for acquiring images; the processor is further used for controlling the aircraft body to enable the aircraft body to control the camera device to adjust the focal length; the camera device is also connected with the processor and used for adjusting the frame rate based on the control instruction of the processor; the camera device is also used for sending the adjusted focal length value to the processor.

In one embodiment, the imaging apparatus includes: the zooming camera is connected with the aircraft main body and used for adjusting the focal length based on the control instruction; and the sensor is arranged in the zoom camera, is connected with the processor and is used for adjusting the frame rate of the sensor based on the control instruction.

In one embodiment, the sensor is further configured to obtain a focal length value of the zoom camera after adjustment; the processor is further configured to obtain the sensor adjusted frame rate value.

In this embodiment, the zoom camera is adopted to enable the camera device to change the focal length, change the image acquired by the camera device, change the frame rate through the sensor, and control the interval time of the image acquired by the camera device, so that the optical flow method can continue to calculate the flight speed.

Additional features and advantages of the disclosure will be set forth in the description which follows, or in part may be learned by the practice of the above-described techniques of the disclosure, or may be learned by practice of the disclosure.

In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.

Drawings

In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.

Fig. 1 is a block diagram of an aircraft according to an embodiment of the present disclosure;

FIG. 2 is a flow chart of a method for monitoring aircraft speed according to an embodiment of the present disclosure;

FIG. 3 is a flow chart of another method for monitoring aircraft speed provided by an embodiment of the present application;

fig. 4 is a schematic diagram of pinhole imaging provided in an embodiment of the present application.

Icon: an aircraft 300; an aircraft body 310; a processor 311; a drive device 312; an image pickup device 320; a sensor 322; the zoom camera 321.

Detailed Description

In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.

Referring to fig. 1, fig. 1 is a schematic diagram of an aircraft 300 according to an embodiment of the present disclosure. The aircraft 300 includes an aircraft body 310 and a camera 320.

In one embodiment, the aircraft body 310 is provided with a processor 311, and the processor 311 is configured to execute the two aircraft speed monitoring methods; the camera device 320 is arranged on the aircraft body 310 and used for acquiring images; the processor 311 is further configured to control the aircraft body 310, so that the aircraft body 310 controls the camera 320 to adjust the focal length; an image capturing device 320, further connected to the processor 311, for adjusting the frame rate based on a control instruction of the processor 311; the camera 320 is further configured to send the adjusted focal length value to the processor 311.

In this embodiment, the processor 311 is mounted inside the aircraft main body 310, and the process of calculating the aircraft speed is completed by the processor 311. The processor 311 controls the aircraft main body 310, so that the aircraft main body 310 controls the camera device 320 to adjust the focal length, where the specific process may be that the processor 311 sends a control instruction to a driving device 312 disposed in the aircraft, and the driving device 312 drives the camera device 320 to adjust the focal length.

In one embodiment, the camera 320 includes a zoom camera 321 connected to the aircraft body 310 for adjusting the focal length based on the control of the aircraft body 310; and a sensor 322, disposed in the zoom camera 321, connected to the processor, for adjusting a frame rate of the sensor based on the control instruction.

In this embodiment, since the focal length value of the camera 320 needs to be changed for monitoring the flying speed, the camera of the camera 320 needs to select a camera capable of adjusting the focal length, i.e., the zoom camera 321. The zoom camera 321 may be driven by the driving device 312 to change the focal length.

In this embodiment, the zoom camera 321 is mounted with a sensor 322, and the sensor 322 can accurately acquire a real-time focal length value of the zoom camera 321. The sensor 322 may be, for example, a capacitance-grid displacement sensor.

In this embodiment, the frame rate of the sensor 322 may be adjustable, and the adjustment of the frame rate may be controlled by the processor 311.

In one embodiment, the sensor 322 is further configured to obtain a focal length value adjusted by the zoom camera 321; the processor is also configured to obtain a sensor adjusted frame rate value.

In this embodiment, the sensor 322 may obtain a focal length value of the zoom camera, but the sensor 322 may not obtain a frame rate value of itself, and needs to be calculated and obtained by the processor.

Referring to fig. 2, based on the same inventive concept, fig. 2 is a flowchart of an aircraft speed monitoring method according to an embodiment of the present application, where the method includes the following steps:

and S100, acquiring an optical flow velocity corresponding to the current flying velocity of the aircraft based on an optical flow method.

In one embodiment, the LK optical flow algorithm in the optical flow method is used to obtain the optical flow velocity corresponding to the current flying velocity of the aircraft.

In the embodiment of the present application, an optical flow method is used to calculate the optical flow velocity, so the LK (Lucas-Kanade) optical flow algorithm referred to in the present application is briefly described here.

The LK optical flow algorithm, as one of the optical flow methods, is a two-frame differential optical flow estimation algorithm, which has three assumptions: constant brightness, small motion and spatial uniformity. The constant brightness refers to the change of a pixel point along with time, the brightness value of the pixel point is constant, which is the basic setting of the optical flow method, and all optical flow methods have to meet the constant brightness condition. The change of small motion refers to that the change of time can not cause the position of the selected pixel point to change violently, so that the change of gray value caused by the change of position between adjacent frames can be used to calculate the partial derivative of gray value to position. The spatial consistency means that adjacent pixel points in the previous frame of collected image are also adjacent in the next frame of collected image, which is a unique assumption of the LK optical flow algorithm. This is because to solve the speed in x and y directions, multiple equations need to be established for simultaneous solution, and the spatial consistency assumption can utilize n pixels in the neighborhood to establish n equations.

The LK optical flow algorithm calculates the optical flow velocity, which is obtained by the change of the same pixel point in two consecutive frames of images, specifically, the optical flow velocity is the displacement of the same pixel point in the movement of two consecutive frames of images/the interval time of two frames of images. Therefore, changes in the image content of the captured images of two consecutive frames, or changes in the interval time between the captured images, affect the calculated optical flow velocity. The LK optical flow algorithm is simply described here, and the specific content of the calculation method is the prior art, and is not described in this embodiment.

In this embodiment, an LK optical flow algorithm is used to calculate an optical flow velocity corresponding to the current flight velocity of the aircraft, which is denoted as v (x, y), where v (x) represents a lateral optical flow velocity, and v (y) represents a longitudinal optical flow velocity.

In one embodiment, before the optical flow velocity corresponding to the current flying velocity of the aircraft is acquired based on the optical flow method, the camera device is controlled to set the focal length to be the median value of the zoom range of the camera device.

In this embodiment, the camera device of the aircraft is equipped with a zoom camera, and when the camera device of the aircraft is started, the focal length of the camera device is set to the middle value of the zoom range. Illustratively, when the zoom range of the camera device is 3mm-16mm, the focal length of the camera is set to 9.5 mm.

And S110, controlling the camera device of the aircraft to adjust the focal length when the optical flow speed is determined to be out of the preset detection range.

In one embodiment, the predetermined detection range is smaller than the actual detection range.

In this embodiment, the optical flow velocity of the aircraft can be obtained when the optical flow velocity is within the actual detection range, and it can be understood that the optical flow velocity can be obtained by the optical flow method when the optical flow velocity is outside the detection range and within the actual detection range, but because the optical flow velocity continuously changes, if the optical flow velocity is not adjusted in time, the optical flow velocity exceeds the actual detection range, so that the optical flow velocity cannot be calculated, and therefore, the focal length needs to be adjusted in time when the optical flow velocity exceeds the preset detection range.

In one embodiment, the upper limit of the preset detection range is determined based on the resolution of the image captured by the camera device.

In this embodiment, the upper limit of the preset detection range is set to a threshold T, which is usually half of the smaller value in the image resolution. The focus of the camera is frequently adjusted due to the fact that the value of the threshold T is too small, the focus adjustment is insensitive due to the fact that the value of the threshold T is too large, and long time is needed for adjusting the focus. Through testing, T takes half of the resolution as the best. Illustratively, the T value is typically 240 in pixels at 640 x 480 image resolution. And the actual detection range is set according to the value of the image resolution, specifically, the upper limit may be 480, which is larger than the threshold T of the preset detection range.

In one embodiment, the lower limit of the predetermined detection range is a lower limit of calculation of an optical flow method.

In this embodiment, since the optical flow velocity is calculated by the LK optical flow algorithm, the preset detection range is limited by the LK optical flow algorithm. Specifically, the LK optical flow algorithm needs to calculate the optical flow velocity through the pixel variation, but the LK optical flow algorithm cannot calculate the variation smaller than 1 pixel, so the minimum detection velocity of the LK optical flow algorithm is 1 pixel, that is, the lower limit of the preset detection range is also 1 pixel. The actual detection range is also calculated by using an optical flow method to calculate the optical flow velocity, so that the lower limit of the physical detection range is the same as the lower limit of the preset detection range.

In one embodiment, the camera device is controlled to reduce the focal length when the optical flow velocity is determined to be greater than the upper limit of the preset detection range.

In this embodiment, when both the lateral optical flow velocity and the longitudinal optical flow velocity exceed the upper limit of the preset detection range, the imaging device is controlled to reduce the focal length. When v (x) is greater than T and v (y) is less than T, controlling the image pick-up device to reduce the focal length; in the case of v (y) > T and v (x) < -T, the imaging device may be controlled to decrease the focal length. Both cases can be considered as the optical flow velocity being greater than the upper limit of the preset detection range.

In this embodiment, when the camera device is controlled to reduce the focal length, the reduced lower limit is the lower limit of the zoom range of the camera device, that is, when the camera device is controlled to reduce the focal length, the adjustable range of the focal length is between the current focal length value and the lower limit of the zoom range of the camera device.

In one embodiment, when it is determined that the optical flow velocity is less than the preset detection range lower limit, the camera device is controlled to increase the focal length.

In this embodiment, when both the lateral optical flow velocity and the longitudinal optical flow velocity exceed the lower limit of the preset detection range, the imaging device is controlled to increase the focal length. Since the lower limit of the LK optical flow algorithm calculation is 1 pixel, the imaging device is controlled to increase the focal length when v (x) > -1 and v (x) <1, or when v (y) > -1 and v (y) < 1. Both cases can be considered as the optical flow velocity being less than the preset detection range lower limit.

In this embodiment, when the camera device is controlled to increase the focal length, the upper limit of the focal length increase is the upper limit of the zoom range of the camera device, that is, when the camera device is controlled to increase the focal length, the adjustable range of the focal length is between the current focal length value and the upper limit of the zoom range of the camera device.

In one embodiment, when the optical flow velocity is within the preset detection range, the current flight velocity of the aircraft can be directly calculated through an optical flow method.

And S120, when the optical flow velocity of the camera device after the focal length is adjusted is determined to be in a preset detection range, acquiring the focal length value of the camera device after the focal length is adjusted.

In one embodiment, the optical flow velocity is obtained based on an optical flow method.

In this embodiment, the optical flow velocity may be calculated in real time by an LK optical flow algorithm in the process of adjusting the focal length of the imaging device, and the focal length value is not adjusted until the calculated optical flow velocity is within the preset detection range.

In this embodiment, the aircraft may also calculate the optical flow velocity by using the current focal length each time the camera device completes the focal length adjustment, and the focal length value is not adjusted until the calculated optical flow velocity is within the preset detection range.

In one embodiment, when the calculated optical flow velocity is within the preset detection range, the focal length value is not adjusted any more, and the focal length value at that time is obtained. Illustratively, when v (x) < T and v (y) > -T, the focus adjustment is considered complete. The manner of acquiring the focal distance may be by a sensor inside the image pickup device.

And S130, calculating the relation based on the adjusted focal length value, the flying height of the aircraft and the preset speed, and obtaining the flying speed of the aircraft.

In one embodiment, the preset velocity calculation relationship is set based on the pinhole imaging principle, where the preset velocity calculation formula v ═ is (d × x × ps)/(t × f), where the pixel particle size (or length) of the camera is ps, that is, the length of each pixel particle is ps, which is a constant, and the pixel particle sizes of the same sensor are the same. The focal length of the camera is f, x in the formula is the optical flow length, d is the flight height, and t is the interval time for the camera device to acquire adjacent images.

Referring to fig. 4, in order to make the principle of the present embodiment easier to understand, fig. 4 provides a schematic diagram of pinhole imaging, and in the present embodiment, the predetermined velocity calculation formula is obtained based on the pinhole imaging principle. The pinhole imaging principle formula is as follows:

H1:L1=H2:L2

wherein H1 is the length of the object imaged in the image plane, L1 is the focal length of the camera, L2 is the distance between the camera and the object, and H2 is the length of the object.

The imaging of H2 at the image plane occupies x pixels, so the pinhole imaging principle can be converted into equation (1):

where L is the length of the object H2 and d is the object-to-camera distance L2.

In the optical flow method, assuming that the moving distance of an object is l, the generated optical flow is x, and it can be understood that the optical flow x is the number of pixels occupied by the object in the image plane. When the optical flow x exceeds the maximum resolution of the image pickup device, optical flow resolving distortion occurs. By calculating the formula v ═ l/t (where t is the movement time), formula (1) can be converted into formula (2):

wherein, the formula (2) is a preset speed calculation formula.

In this embodiment, the pixel x in the preset velocity calculation formula is calculated by an LK optical flow algorithm, and the final output result of the LK algorithm is an optical flow velocity speed _ flow (x, y), where x is the displacement of the lateral movement in unit time, and y is the displacement of the longitudinal movement in unit time.

In this embodiment, ps in the preset velocity calculation formula is the pixel particle size of the sensor, and t is the time taken by the image capturing device to capture two adjacent frames of images, i.e., the reciprocal of the frame rate of the sensor, where t is 1/fps, where fps is the frame rate of the sensor.

In one embodiment, the altitude of the aircraft is obtained by other means. For example, the detected altitude may be calculated by a barometer or an ultrasonic detector carried by the aircraft.

In this embodiment, after it is determined that all factors of the preset speed calculation formula can be obtained, the aircraft can obtain the current flight speed of the aircraft through the preset speed calculation formula. For example, when the flying speed of the aircraft is not changed but the flying speed cannot be calculated by the LK optical flow algorithm (i.e. x reaches the maximum value), if the flying height d of the aircraft is reduced, the focal length f can be synchronously reduced to maintain the preset speed calculation formula, and when the optical flow speed after the focal length is adjusted is determined to be within the preset detection range, the focal length at this time is considered to be adjusted. And acquiring the focal length value at the moment, acquiring the height d of the aircraft, the pixel particle size ps of the camera device, calculating the optical flow x by the optical flow velocity calculated by the optical flow method, and calculating the flight velocity of the aircraft at the moment by acquiring the image acquisition time t of two adjacent frames.

In this embodiment, since the acquired image is changed due to the change of the focal length, the image may be processed again by calculating the optical flow velocity using the optical flow method, and the flight velocity needs to be calculated by the optical flow velocity after the processing. Therefore, in the embodiment, after the focal length is adjusted, the accurate flying speed can be obtained by using the preset speed calculation formula compared with the method of calculating the flying speed by using the optical flow method again, but the flying speed can be calculated more quickly and efficiently by using the preset speed calculation formula, the flying speed does not need to be calculated by using the optical flow method, and the accurate control of the aircraft is facilitated.

In this embodiment, it can be understood that, in this embodiment of the application, the adjustment mode of the focal length is adjusted based on a preset calculation formula. Specifically, if the flying speed is not changed and the height is increased or decreased, the focal length of the camera device is correspondingly increased or decreased; if the flying height is not changed and the flying speed is increased or decreased, the focal length of the camera device is correspondingly decreased or increased; when the flight speed or the altitude is not changed, the optical flow x generated can be changed by changing the focal length, so that the optical flow velocity can be calculated, corresponding to the calculated flight speed.

Referring to fig. 3, fig. 3 is a flowchart of another aircraft speed monitoring method according to an embodiment of the present application, where the method may include the following steps:

s210, when the optical flow velocity is determined to be out of the preset detection range, acquiring the flight state of the aircraft.

In one embodiment, before determining whether the optical flow velocity is in the preset detection range, the optical flow velocity of the current flying velocity of the aircraft is obtained based on an optical flow method.

In this embodiment, the method of acquiring the optical flow velocity corresponding to the flying velocity is the same as that in the first aircraft velocity monitoring method S100, and the optical flow velocity corresponding to the current flying velocity of the aircraft is calculated by using the LK optical flow algorithm. In addition, the method for determining whether the optical flow velocity is outside the preset detection range is the same as that in the first aircraft velocity monitoring method S110, and therefore, the description thereof is omitted.

In one embodiment, the acquired flight state of the aircraft includes an altitude change and a change in the flight speed.

In this embodiment, the flying speed can be calculated in real time through a preset speed calculation formula, and therefore, the flying speed change condition is obtained through the flying speed change condition when the flying speed can be directly obtained.

In this embodiment, the flying speed is calculated and obtained by a preset speed calculation formula, and the control variable, namely, one of the control flying states (altitude or flying speed) is unchanged, and the other one is increased or decreased. Illustratively, the flying height is not changed, and the flying speed is increased or decreased, wherein the flying height can be directly obtained by other methods, the flying change condition can be obtained by the above method, and the specific flying speed value needs to be obtained by subsequent calculation.

And S220, controlling a sensor in the image pickup device to adjust the frame rate based on the flight state.

In one embodiment, a sensor is arranged inside the camera device, and the sensor is used for controlling the number of images shot by the camera device per unit time.

In this embodiment, the sensor may adjust the frame rate for setting the number of images taken by the imaging device per second. Illustratively, when the frame rate of the camera device is 25 frames, the camera device is characterized to be capable of taking 25 frames of images per second.

In this embodiment, the frame rate may reflect an interval time between two frames of images, where the interval time between two frames of images is equal to a reciprocal of the frame rate, i.e., t is 1/fps, where fps is the frame rate. Illustratively, the frame rate is 25 frames of images with an interval time of 1/25 seconds.

In this embodiment, the frame rate of the image capturing device needs to be adjusted, so the image capturing device capable of adjusting the frame rate is selected, and the specific adjustment range is set based on the performance of the image capturing device.

In one embodiment, the camera device is controlled to adjust the frame rate according to a preset speed calculation formula and a flight state. Specifically, t is 1/fps in the preset velocity calculation formula, that is, the frame rate adjustment feedback is represented as a change of time t in the formula, so that the preset velocity calculation formula can be kept unchanged by changing the frame rate while the flight state is unchanged.

In one embodiment, when the aircraft is determined to be in the first flight state, the camera device is controlled to increase the frame rate; wherein the first flight state represents that the current flight altitude of the aircraft is unchanged and the flight speed is increased. Specifically, when the flying height is unchanged and the flying speed is increased, the time t in the preset speed calculation formula can be reduced, so that other factors in the formula are maintained unchanged, the time t can be reduced by increasing the frame rate, that is, the time t can be reduced by increasing the frame rate, so that other factors in the preset speed calculation formula are unchanged, and the real-time size of the flying height is unchanged and the flying speed is increased.

In one embodiment, when the aircraft is determined to be in the second flight state, the camera device is controlled to increase the frame rate; and the second flight state represents that the current flight speed of the aircraft is unchanged and the flight altitude is reduced. Specifically, the flying height is reduced, and under the condition that other factors of the preset speed calculation formula are not changed, the time t needs to be increased, and the increase of the time t can be realized by increasing the frame rate of the camera device, so that the corresponding flying speed can be calculated through the preset speed calculation formula.

In one embodiment, when the aircraft is determined to be in the third flight state, the camera device is controlled to reduce the frame rate; and the third flight state represents that the current flight speed of the aircraft is unchanged and the flight altitude is increased.

In one embodiment, when the aircraft is determined to be in the fourth flight state, the camera device is controlled to reduce the frame rate; and the fourth flight state represents that the flight height of the aircraft is unchanged and the flight speed is reduced.

And S230, when the optical flow velocity after the frame rate is adjusted by the sensor is determined to be in a preset detection range, obtaining a frame rate value after the frame rate is adjusted by the sensor.

In this embodiment, due to the change of the frame rate, the time interval between the acquisition of the two adjacent frames of images also changes, and the result of calculating the optical flow velocity using the LK optical flow algorithm also changes. Specifically, when the frame rate is increased, the interval time for acquiring the two frame images is shortened, and the calculated optical flow velocity is larger than the optical flow velocity before the adjustment. Therefore, while changing the frame rate of the sensor, the optical flow velocity needs to be recalculated to ensure that the optical flow velocity is within the preset detection range.

S240, obtaining the flying speed of the aircraft based on the adjusted frame rate value, flying height and preset speed calculation relation.

In one embodiment, t is 1/fps, and the current flying speed of the aircraft is obtained through calculation by substituting the t into a preset speed calculation formula.

In this embodiment, the manner of acquiring other parameters is the same as that in S130, and is not described here again.

In the embodiments provided in the present application, it should be understood that the disclosed method and apparatus may be implemented in other ways. The above-described apparatus embodiments are merely illustrative. The functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

14页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种测温测速电路、具有该电路的装置及方法

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!