A flight test system
Through the improved deblurring algorithm, the overall blur index and noise index are used to deal with image blur caused by drone jitter, which solves the problem of poor Lucy-Richardson algorithm and improves the accuracy of flight test results.
Patent Information
- Application Number
- CN202410874992.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-02
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2044-07-02
AI Technical Summary
The existing Lucy-Richardson algorithm is less effective at handling image blur caused by drone jitter, resulting in low accuracy of flight test results.
A flight test system is proposed. Through an improved deblurring algorithm, the point spread function is weighted by the overall blur index, and the first and second blur indicators and the noise index are combined to calculate the overall blur degree of the grayscale image, and then deblurred Processing to improve the image deblurring effect.
The image deblurring effect and the accuracy of flight stability assessment are improved, ensuring the accuracy of flight test results.
Smart Images

Figure CN118429218B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing. The present invention relates to a flight test system. Background Art
[0002] Flight trainees can control the drone through a simulation chamber to achieve training purposes. The simulation chamber can be a model of a real aircraft.
[0003] If the flight trainees are trained directly by actually flying an airplane, it will not only be costly but also dangerous, so simulation training can be carried out. In order to obtain the training results of the flight trainees, it is necessary to evaluate the training process of the flight trainees.
[0004] The flight test system is used in the above-mentioned simulated flight process to evaluate the flight ability of the flight trainees. The results of the evaluation can provide a reference for the selection of pilots. Among them, the flight test system can evaluate the sensory motor ability of the flight trainees (that is, the flight trainees' perception of the dynamic balance and stability of the drone). Since the higher the flight stability of the drone, the greater the possibility that the corresponding flight trainees have better sensory motor ability, the sensory motor ability of the flight trainees can be indirectly evaluated through the flight stability of the drone.
[0005] When the drone is in motion, if the flight trainee's operation causes the drone to shake, the captured image will be blurred. The higher the blur of the image, the greater the possibility of poor flight stability. Therefore, the blur of the image can be used to evaluate flight stability and further assess the sensory motor ability of the flight trainee.
[0006] Related comparative documents, such as the patent application document with application publication number CN106204438A, disclose a super-resolution reconstruction optimization restoration method for under-sampled degraded images, which uses the Lucy-Richardson algorithm to deblur static images to obtain clear images. Among them, the Lucy-Richardson (LR) algorithm includes a point spread function.
[0007] However, the LR algorithm has a better deblurring effect on static images, but a poor deblurring effect on images blurred by shaking. The reason is that shaking blur is usually caused by camera shaking, which causes the image to be blurred when shooting. This type of blur is different from other types of blur (such as blur caused by lens or focal length problems), and the LR algorithm may not be able to adapt well to the characteristics of shaking blur.
[0008] Since the blur of the images taken by the drone is caused by camera shake, etc., the effect of deblurring the images taken by the drone using the LR algorithm is poor, and the accuracy of the blur degree of the obtained image is low, which in turn leads to low accuracy of the obtained flight stability, and then leads to low accuracy in evaluating the sensorimotor ability of flight trainees, that is, low accuracy of the flight test results. Summary of the invention
[0009] In order to solve the technical problem that the deblurring effect of the images taken by the UAV using the LR algorithm is poor, which leads to low accuracy of the flight test results, the present invention proposes a flight test system.
[0010] A flight test system, comprising:
[0011] A drone is used to collect multiple grayscale images at multiple consecutive moments containing reference points;
[0012] Deblurring module, used to take advantage of improved The algorithm performs deblurring processing on each frame image to obtain a corresponding deblurred image; the algorithm includes weighting the point spread function using an overall blur index to obtain an improved point spread function;
[0013] The overall fuzzy index is positively correlated with the first fuzzy index and the second fuzzy index, and negatively correlated with the noise index; the first fuzzy index is negatively correlated with the difference in gradient between the reference point and the pixel points in the preset neighborhood; the second fuzzy index M is: , is the positive correlation normalization function, D, E and F are weight values, is the grayscale variance of the reference point in all frame images, r is the mean of all angles, and the angle is the angle between the line connecting the reference points in two adjacent frame images and the column direction where the reference points are located, is the mean of the angles between the flight direction of the drone and the initial flight direction at all times, L is the sum of the distances between the reference points in all two adjacent frames of images, g is the sum of the horizontal flight distances of the drone between all two adjacent moments, is the proportional coefficient; the noise index is positively correlated with the grayscale difference of the reference point before and after denoising;
[0014] The flight test module is used to calculate the stability index of the UAV flight. The stability index is negatively correlated with the difference between the grayscale images before and after deblurring. When the stability index is greater than a preset threshold, the flight test is qualified.
[0015] The present invention determines the overall blur index of the grayscale image where the reference point is located through the first and second blur indexes and the noise index of the reference point, which reflects the blur degree of the grayscale image, wherein the reference point is a pixel point that refers to the same object in a continuous frame image. Among them: the smaller the gradient difference between the reference point and the pixel points in its neighborhood, the greater the blur degree of the area where the reference point is located. The first blur index reflects the blur degree of the area where the reference point is located from the "static" dimension. The larger the value is, the greater the blurriness of the area where the corresponding reference point is located. The bigger and The larger it is, the greater the difference in shape between the trajectory of the reference point in the image and the actual trajectory of the corresponding drone, which means that the probability that the corresponding grayscale image is blurred is greater. The second blur index reflects the degree of blur in the area where the reference point is located from the "dynamic" dimension. The greater the possibility that the reference point is noise, the less credible the first and second blur indicators of the reference point. From the above analysis, it can be seen that the overall blur index has a higher accuracy in reflecting the degree of blur of the corresponding grayscale image. The greater the blur of the grayscale image, the greater the difference between the grayscale image and the corresponding deblurred image, and the worse the flight stability, which means that the flight test results are worse. Since the overall blur index has a higher accuracy in reflecting the degree of blur of the corresponding grayscale image, it can be based on the overall blur index and The algorithm can obtain a deblurred image with a better deblurring effect, thereby making the obtained flight stability more accurate, and thus making the evaluation of the sensorimotor ability of flight trainees more accurate, that is, the flight test results are more accurate.
[0016] In one embodiment, the process of obtaining the improved point spread function includes:
[0017] renew The expression of the point spread function of the algorithm is:
[0018] ;
[0019] in, is the point spread function of the j-th grayscale image before updating, is the updated point spread function of the j-th frame grayscale image, is the overall blur index of the j-th grayscale image.
[0020] The point spread function is corrected based on the overall blur index, so that the deblurring effect of the grayscale image based on the corrected point spread function is better and the number of iterations is reduced.
[0021] In one embodiment, the overall fuzzy index is expressed as:
[0022] ;
[0023] in, is the overall blur index of the j-th grayscale image, k is the total number of pixels in any grayscale image, is the first fuzzy index of the i-th pixel in the j-th grayscale image. is the second fuzzy index of the i-th pixel in the j-th grayscale image. is the value after negative correlation normalization of the noise index of the i-th pixel in the j-th grayscale image.
[0024] The larger it is, the greater the probability that the i-th pixel is noise, and the less credible the corresponding first and second blur levels are. The role can be understood as The weight of . The larger the value is, the greater the probability that the corresponding grayscale image is more blurred. Based on this, considering the influence of noise on the deblurring process, the overall blur index can reflect the blurring degree of the corresponding image with higher accuracy, and then the deblurring effect of the image based on the overall blur index can be better.
[0025] In one embodiment, the expression of the first fuzzy index is:
[0026] ,in, is the first fuzzy index of the i-th pixel in the j-th grayscale image. is the value after negative correlation normalization of the difference V1, wherein the difference V1 is the difference between the gradient amplitude of the i-th pixel in the j-th frame grayscale image and the mean gradient amplitude of the pixels in its preset neighborhood, is a value obtained by negative correlation normalization of the first mean, where the first mean is the mean of the difference between the gradient direction of the ith pixel point in the jth frame grayscale image and the gradient direction of the pixel points in a preset neighborhood.
[0027] The smaller the difference V1, the greater the probability that the corresponding pixel point is located in a region with a greater degree of blur, and vice versa. The greater the first mean, the greater the probability that the corresponding pixel point is located in a region with a greater degree of blur, and vice versa. Based on this, the contribution of the pixel point to the blur of the grayscale image can be obtained from the "static" dimension.
[0028] In one embodiment, the expression of the first fuzzy index is:
[0029] ,in, is the first fuzzy index of the i-th pixel in the j-th grayscale image. is the value after negative correlation normalization of the difference mean, wherein the difference mean is the mean of the difference between the gradient amplitude of the i-th pixel point in the j-th frame grayscale image and the gradient amplitude of the pixel points in the preset neighborhood, is a value obtained by negative correlation normalization of the first mean, where the first mean is the mean of the difference between the gradient direction of the ith pixel point in the jth frame grayscale image and the gradient direction of the pixel points in a preset neighborhood.
[0030] In one embodiment, the stability index is expressed as: ;
[0031] Among them, W is the stability index, is the first reference stability indicator, is the second reference stability index; the process of obtaining the first reference stability index and the second reference stability index includes:
[0032] Calculate the difference between the grayscale mean of all grayscale images and the grayscale mean of all corresponding deblurred images, and record it as difference A1; perform negative correlation normalization on difference A1 to obtain the first reference stability index ;
[0033] Calculate the difference between the mean of the gradient amplitude of all pixels in the grayscale image and the mean of the gradient amplitude of all pixels in the corresponding deblurred image, and record it as the difference A2; perform negative correlation normalization on the difference A2 to obtain the second reference stability index .
[0034] The larger the value, the greater the difference between the deblurred image and the corresponding image before deblurring, which in turn indicates that the possibility of poor flight stability is greater.
[0035] In one embodiment, the expression of the noise index is:
[0036] ;
[0037] in, is the noise index of the i-th pixel in the j-th grayscale image, is the grayscale value of the i-th pixel in the j-th grayscale image before denoising, is the grayscale value of the i-th pixel after denoising the j-th grayscale image.
[0038] In one embodiment, the preset neighborhood is an 8-neighborhood.
[0039] In one embodiment, the denoising algorithm is a median filtering algorithm.
[0040] Beneficial effects of the present invention:
[0041] The present invention considers the contribution of the pixels in the image to the blur degree of the image in the "static" dimension, and also considers the contribution of the pixels in the image to the blur degree of the image in the "dynamic" dimension. It further considers the interference of the noise in the image on the calculation of the blur degree of the image, and obtains the overall blur index of the image. Based on this, the overall blur index reflects the blur degree of the corresponding image with a high accuracy. Combined with the overall blur index, the deblurred image is obtained. Finally, based on the difference between the images before and after deblurring, the stability index is determined. Based on the stability index, the accuracy of the flight test results obtained is high.
[0042] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] By reading the following detailed description with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:
[0044] Figure 1 is a block diagram schematically showing a flight test system according to an embodiment of the present invention;
[0045] Figure 2 is a flow chart schematically illustrating method steps performed by a flight test system according to an embodiment of the present invention;
[0046] Figure 3 is a schematic diagram schematically showing the relationship between a grayscale image and a coordinate system according to an embodiment of the present invention;
[0047] Figure 4 Schematic diagram schematically showing the angle between the line connecting the reference points and the direction of the column where the reference points are located according to an embodiment of the present invention. DETAILED DESCRIPTION
[0048] In some of the processes described in the specification and claims of the present invention and the above-mentioned figures, multiple operations appearing in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this article or executed in parallel, and the serial numbers of the operations, such as 101, 102, etc., are only used to distinguish different operations, and the serial numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", "A1", "B1", etc. in this article are used to distinguish different messages, devices, modules, etc., and do not represent the order of precedence, nor do they limit "A1", "B1", "first" and "second" to be different types; in other words, the serial numbers themselves for the components in this article, such as "A1", "B1", "first", "second", etc., are only used to distinguish the objects described, and do not have any order or technical meaning.
[0049] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0050] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0051] Figure 1 FIG. 1 is a block diagram schematically showing a flight test system according to an embodiment of the present invention. Figure 1 A flight test system includes: a drone, which is used to collect multiple grayscale images 101 at multiple consecutive moments including reference points, wherein each frame of the image corresponds to a moment. A deblurring module 102, which is used to utilize an improved The algorithm performs deblurring on each frame image to obtain a corresponding deblurred image. The flight test module 103 is used to calculate the stability index of the UAV flight, and the stability index is negatively correlated with the grayscale difference between the grayscale image and the deblurred image; in response to the stability index being greater than a preset threshold, the flight test is qualified.
[0052] Figure 2 FIG. 1 is a flow chart schematically illustrating the steps of a method performed by a flight test system according to an embodiment of the present invention. Figure 2 As shown:
[0053] In step S1, multiple frames of continuous grayscale images containing reference points are obtained. The description is as follows:
[0054] The flight trainee controls the drone (aircraft) to fly in the simulation chamber. The drone captures images of the surroundings during flight. The surrounding images are called field of view images. The field of view images are transmitted to the simulation chamber. The flight trainee can control the drone based on the field of view images transmitted to the simulation chamber to enable the drone to perform the intended operation.
[0055] The reference point is a pixel that refers to the same object. For example, there is a pixel corresponding to a mountain peak in multiple consecutive frames of images, and in one image, a mountain peak corresponds to only one pixel. The pixel corresponding to the mountain peak in multiple consecutive frames of images is called the reference point corresponding to the mountain peak.
[0056] For the sake of ease of description, the trainees mentioned below refer to flight trainees.
[0057] In one embodiment: the drone can only move up and down and horizontally, and two cameras are placed on the drone. Among them, the first camera is located below the drone, and the shooting direction is perpendicular to the ground, that is, the shooting direction is directly downward, and is used to capture images of the ground. The image captured by the first camera is mainly used in the subsequent flight test process. During the flight of the drone, the image captured by the first camera is grayed to obtain a grayscale image. The second camera is located at the front of the drone, and is used to capture images in front of the drone. The image captured by the second camera is mainly used to guide trainees to fly.
[0058] In another embodiment: the drone can also rotate horizontally. When the drone rotates horizontally, the first camera does not rotate horizontally with the drone. For example, when the drone only rotates horizontally, the image captured by the first camera remains unchanged. Exemplarily, when the drone only rotates horizontally to the right by a certain angle, the first camera simultaneously rotates horizontally to the left by the certain angle, so that the image captured by the first camera remains unchanged. The image captured by the first camera is grayed to obtain a grayscale image.
[0059] In one embodiment, the frame rate of the camera is 30 frames per second.
[0060] It should be noted that the time of the flight test may be limited, for example, the time of the flight test may be 1 minute.
[0061] For example, the process of collecting multiple continuous grayscale images containing reference points corresponding to mountain peaks is as follows: in the image, the frame in which the pixel points corresponding to the mountain peak begin to appear is taken as the first frame, and collection is stopped until the pixel points corresponding to the mountain peak begin to disappear. At this point, multiple continuous grayscale images containing reference points corresponding to the mountain peak are collected.
[0062] In one embodiment, the grayscale image may be preprocessed using histogram equalization, which is a prior art.
[0063] In step S2, any reference point is called a target point, and the first fuzzy index of the target point is calculated. The description is as follows:
[0064] The reference point can be any pixel in the grayscale image. In other words, the target point is any pixel in the grayscale image.
[0065] During the flight test, the trainee controls the drone. The trainee's control operation may be wrong or unskilled, which may cause the drone to shake to a certain extent during the flight, making the image taken by the camera blurry to a certain extent. It can be understood that the blurrier the grayscale image, the more likely it is that the drone shakes more during the flight, which in turn means that the drone's flight stability is lower, which in turn means that the corresponding trainee's sensory motor abilities are worse, and the trainee's flight test results should be worse. Therefore, the flight test results of the corresponding trainee can be obtained by the blurriness of the grayscale image.
[0066] For example, for a clear image, blurring it to a certain extent can produce a corresponding blurred image. In the process of image blurring, the detail information of the clear image spreads to other areas of the image. That is, the gradient in the blurred image is no longer concentrated on the edge or detail of the image. That is, the gradient value of the pixel points in the blurred image changes more smoothly and the gradient direction is more consistent.
[0067] Further explanation is that in a blurred image, the details and edges in the image are smoothed or blurred, making the details and edges less obvious, indicating that the grayscale value of the pixels in the image changes less drastically. Therefore, the gradient amplitude of the pixels in the blurred image is smaller and the difference between the gradient amplitudes is smaller. In a clear image, the gradient amplitude of the pixels in the clear image is more likely to be larger and the difference between the gradient amplitudes is more likely to be larger.
[0068] In a blurred image, the gradient direction of the blurred image is more consistent (not scattered). The reason is that in a blurred image, the edges and details are smoothed or blurred, resulting in a lower degree of change in pixel values in the image, and the gradient direction of the edge is relatively more consistent. In a clear image, the edges and details are more obvious, and edges at different positions may have different gradient directions. Therefore, overall, the gradient direction of pixels in a clear image is less consistent. It can be concluded that the difference between the gradient directions of pixels in a blurred image is smaller, and the difference between the gradient directions of pixels in a clear image is more likely to be larger.
[0069] Based on this, the first fuzzy index of the target point can be calculated according to the difference in gradient magnitude between the target point and the pixel points in a preset neighborhood centered on the target point, and the difference in gradient direction between the target point and the pixel points in the preset neighborhood. The first fuzzy index of the target point is negatively correlated with the difference in gradient magnitude and gradient direction between the target point and the pixel points in the preset neighborhood.
[0070] In one embodiment, the Prewitt operator is less sensitive to noise, so the Prewitt operator may be selected to obtain the gradient amplitude and gradient direction of the pixel points in the grayscale image.
[0071] Preferably, in one embodiment, the expression of the first fuzzy index is:
[0072] ,in: is the first fuzzy index of the i-th pixel in the j-th grayscale image. Calculate the difference between the gradient amplitude of the i-th pixel and the mean Y1, recorded as the difference V1, where the mean Y1 is the mean of the gradient amplitudes of all pixels in the preset neighborhood centered on the i-th pixel. Perform negative correlation normalization on the difference V1 to obtain Calculate the difference between the gradient direction of the i-th pixel and the gradient direction of each pixel in the preset neighborhood, record it as the difference V2, calculate the mean of all differences V2, record it as the first mean, and perform negative correlation normalization on the first mean to obtain .
[0073] In another embodiment, the expression of the first fuzzy index is:
[0074] ,in, is the value obtained by negative correlation normalization of the difference mean, where the difference mean is the mean of the difference between the gradient amplitude of the ith pixel and the gradient amplitudes of the pixels in its preset neighborhood.
[0075] In other embodiments, .
[0076] It should be noted that the gradient direction is expressed as an angle.
[0077] In one embodiment, the difference may be an absolute value of the difference. For example, the difference between two gradient magnitudes is an absolute value of the difference between the two gradient magnitudes.
[0078] The negative correlation normalization function in the context may be a negative correlation maximum and minimum normalization function. For example, the expression for negative correlation normalization of the difference V1 is: ,in, is the difference V1 corresponding to the i-th pixel in the j-th grayscale image, is the maximum difference V1 in the j-th frame grayscale image, is the minimum difference V1 in the j-th frame grayscale image.
[0079] In one embodiment, ,in is the natural exponential function, is the difference V1 corresponding to the i-th pixel in the j-th frame grayscale image. , is the first mean value corresponding to the i-th pixel in the j-th grayscale image.
[0080] The negative correlation normalization function in the context can be the sigmoid function of negative correlation (negative indicator), which is , where x is the independent variable, is the dependent variable.
[0081] The positive correlation normalization function in this context may be a positive correlation maximum-minimum normalization function or a positive correlation sigmoid function.
[0082] The negative correlation normalization function and the positive correlation normalization function in the context may be other functions in the prior art.
[0083] In one embodiment, the implementer can set the size of the preset neighborhood according to the specific scenario. The preset neighborhood can be selected as 8 neighborhoods.
[0084] From the above analysis, we can know that:
[0085] The first blur index reflects the blur degree of the area where the corresponding pixel point is located.
[0086] The smaller the difference V1 corresponding to the i-th pixel, The larger it is, the smoother the change in the gradient amplitude between the i-th pixel and the pixels in its preset neighborhood is, and the greater the possibility that the area formed by the i-th pixel and the pixels in its preset neighborhood is blurred.
[0087] The smaller the first mean value corresponding to the i-th pixel, The larger the value is, the smoother the change in the gradient direction between the i-th pixel and the pixels in its preset neighborhood is, and the greater the possibility that the area formed by the i-th pixel and the pixels in the preset neighborhood is blurred.
[0088] It can be understood that the first blur index reflects the blurriness of the area where the corresponding pixel point is located in the “static” dimension.
[0089] At this point, the first blur index of all pixels is obtained.
[0090] In step S3, the second fuzzy index of the target point is calculated. The description is as follows:
[0091] The target point may be a reference point corresponding to an object.
[0092] Figure 3 Schematic diagram showing the relationship between a grayscale image and a coordinate system according to an embodiment of the present invention. Figure 3 As shown, rectangle 301 is a frame of grayscale image; for any grayscale image, it is called the target image, the pixel point in the upper left corner of the target image is used as the coordinate origin, one side of the target image is used as the horizontal axis, the positive direction of the horizontal axis is horizontal to the right, and the other side of the target image is used as the vertical axis, the positive direction of the vertical axis is directly downward, to establish a rectangular coordinate system.
[0093] At this point, a coordinate system has been established for each grayscale image.
[0094] Taking the target point as an example, the optical flow method can be used to track the target point to obtain all the first grayscale images corresponding to the target point. All the first grayscale images are continuous frames, and all the first grayscale images have the object represented by the target point. For example, if the target point represents the first object, then all the first grayscale images have the pixel point P1 of the first object. The pixel point P1 is called the pixel point corresponding to the target point in the grayscale image of the continuous frame, and is recorded as the first pixel point; that is, all the grayscale images with the pixel point P1 of the first object are called the first grayscale images corresponding to the target point. At the same time, the coordinates of all the first pixel points corresponding to the target point can be obtained by the optical flow method. It should be noted that the first pixel point includes the target point.
[0095] The first pixel point is the reference point corresponding to the object indicated by the target point. All first grayscale images are continuous multi-frame grayscale images containing the reference point.
[0096] For example, the frame of the grayscale image where the target point is located is the 20th frame, and the first substance referred to by the target point appears in the continuous grayscale images from the 5th frame to the 100th frame. Then, the optical flow method can be used to obtain all grayscale images with the first substance, that is, the grayscale images from the 5th frame to the 100th frame, and the grayscale image is called the first grayscale image. The coordinates of the pixel point referring to the first substance in the grayscale images from the 5th frame to the 100th frame can also be obtained by the optical flow method, and the pixel point is called the first pixel point.
[0097] It should be noted that the adjacent frames in this context refer to grayscale images of two adjacent frames.
[0098] It is understandable that the clearer the grayscale image is, the smaller the grayscale variance of all first pixel points corresponding to the target point is. The reason is that the target point and all corresponding first pixel points refer to the same object, and the clearer the grayscale image is, the smaller the grayscale difference between the target point and all corresponding first pixel points is.
[0099] In other words, when the grayscale image is blurred due to the shaking of the drone, the discrete degree of the grayscale value of the first pixel point corresponding to the target point is large, and the grayscale variance of the first pixel point corresponding to the target point is large.
[0100] It is understandable that if the grayscale image is clearer, the drone will have less shaking during flight, the drone's flight stability will be better, and the trainee's sensory motor and other abilities will be better. If the drone has less shaking during flight, the difference in shape between the first track and the second track will be smaller, or in other words, the first track and the second track will be more similar, where the first track is the track of all first pixel points corresponding to the target point in the grayscale image, and the second track is: the actual track of the drone flying horizontally during the time corresponding to the continuous multiple frames of grayscale images corresponding to all first pixel points. In short, the difference in shape between the first track and the second track can reflect the blurriness of the grayscale image.
[0101] Preferably, in one embodiment, the second fuzzy index of the target point The expression is:
[0102] ;
[0103] in: is a positive correlation normalization function, which can be a positive correlation maximum and minimum normalization function. Where: For the convenience of explanation, It is called the first index of the target point. The first index corresponding to each pixel in the grayscale image where the target point is located is calculated. When the first index of the target point is positively normalized, the maximum value in the maximum and minimum normalization function is the maximum first index of the pixel in the grayscale image where the target point is located, and the minimum value is the minimum first index of the pixel in the grayscale image where the target point is located. It is called the second index of the target point. The second index corresponding to each pixel in the grayscale image where the target point is located is calculated. When the second index of the target point is positively normalized, the maximum value in the maximum and minimum normalization function is the maximum second index of the pixel in the grayscale image where the target point is located, and the minimum value is the minimum second index of the pixel in the grayscale image where the target point is located. It is called the third index of the target point. The third index corresponding to each pixel in the grayscale image where the target point is located is calculated. When the third index of the target point is positively correlated normalized, the maximum value in the maximum and minimum normalization functions is the maximum third index of the pixel in the grayscale image where the target point is located, and the minimum value is the minimum third index of the pixel in the grayscale image where the target point is located.
[0104] D, E and F are preset weight values. The implementer can set the values of D, E and F according to the specific implementation scenario, wherein the sum of the values of D, E and F is 1. In one embodiment, D is 0.2, E is 0.3, and F is 0.5. is the proportionality coefficient. The implementer can set the proportionality coefficient according to the specific implementation scenario. In one embodiment, the horizontal flight distance of the drone in a certain period of time is obtained, recorded as distance N1, and the Euclidean distance moved by a certain pixel point in the image in the certain period of time is obtained, recorded as distance N2, and the ratio of distance N2 to distance N1 is calculated, recorded as In one embodiment, the proportionality coefficient may be an empirical value. .
[0105] Calculate the variance of the grayscale values of all the first pixels corresponding to the target point, recorded as .
[0106] Figure 4 Schematic diagram schematically showing the angle between the line connecting the reference points and the direction of the column where the reference points are located according to an embodiment of the present invention.
[0107] It should be noted that Figure 3 and Figure 4 The horizontal and vertical coordinates of the coordinate system in represent length, and the unit can be centimeters.
[0108] In one embodiment, in a grayscale image, the angle between the line connecting two first pixel points of adjacent frames corresponding to the target point and the column direction where the reference point is located is calculated, where: Figure 4 As shown, the direction of the column where the reference point is located is the opposite direction of the y-axis. For example: the straight line corresponding to the direction of the column where the reference point is located is rotated clockwise by an angle G1 and coincides with the line connecting the first pixel point, then the angle corresponding to the line is angle G1, and the angle G1 is less than or equal to 180 degrees; the straight line corresponding to the direction of the column where the reference point is located is rotated counterclockwise by an angle G2 and coincides with the line connecting the first pixel point, then the angle corresponding to the line is a negative angle G2, and the angle G2 is less than 180 degrees. Traverse all adjacent frames corresponding to the target point to obtain the angle corresponding to every two adjacent frames corresponding to the target point. Calculate the mean of all angles corresponding to the target point, denoted as r.
[0109] For example: Figure 4 As shown, angle 401 is a positive value, and angle 402 is a negative value.
[0110] In one embodiment, when calculating the angle between the line connecting two first pixels of adjacent frames and the column direction where the reference point is located, it can be obtained based on the coordinates of the first pixels and based on existing technologies such as inverse trigonometric functions.
[0111] For example, when the angle 401 is less than 90 degrees, the angle 401 may be calculated as follows: ,in, For Angular 401, , are the horizontal and vertical coordinates of the first pixel of the first grayscale image in the adjacent frames, , are respectively the horizontal and vertical coordinates of the first pixel point of the grayscale image of the second frame in the adjacent frame, and t is a preset parameter to prevent the denominator from being 0, and the preset parameter may be 0.01.
[0112] The angle between the horizontal flight direction of the UAV and the initial flight direction at the corresponding moment of any frame in the continuous multi-frame grayscale image corresponding to the target point is obtained, wherein the initial flight direction is the horizontal flight direction of the UAV when the test starts, and each frame in the continuous multi-frame grayscale image has a first pixel point. The horizontal flight direction of the UAV can be obtained by a GPS positioning device.
[0113] For example, under normal circumstances, within a certain period of time at the beginning of the flight test, the drone is flying horizontally toward the south. At this time, the angle between the actual horizontal flight direction obtained by the GPS positioning device and the initial flight direction is 0 degrees, and the angle between the line connecting the two first pixel points in two adjacent frames of images calculated by existing technologies such as inverse trigonometric functions and the column direction where the reference point is located is 0 degrees. Then, in the next period of time, the drone changes its flight direction and flies horizontally toward 45 degrees south-west. At this time, the angle between the actual horizontal flight direction obtained by the GPS positioning device and the initial flight direction is 45 degrees, and the angle between the line connecting the two first pixel points in two adjacent frames of images calculated by existing technologies such as inverse trigonometric functions and the column direction where the reference point is located is 45 degrees. Among them, the initial flight direction is due south.
[0114] Traverse all adjacent frames corresponding to the target point, obtain the angle between the flight direction of the drone and the initial flight direction corresponding to every two adjacent frames corresponding to the target point, and calculate the mean of all the angles corresponding to the target point, which is recorded as Among them, the UAV's flight direction is horizontal.
[0115] Calculate the Euclidean distance between the two first pixel points in any adjacent frame corresponding to the target point, and record it as the first distance. Traverse all adjacent frames corresponding to the target point to obtain the first distance corresponding to every two adjacent frames corresponding to the target point. Calculate the sum of all first distances corresponding to the target point, and record it as L.
[0116] Get the horizontal flight distance of the drone corresponding to any adjacent frame corresponding to the target point. The horizontal flight distance is the actual horizontal flight distance of the drone during the time corresponding to the first moment and the second moment. The first moment is the moment corresponding to the first frame image corresponding to any adjacent frame, and the second moment is the moment corresponding to the second frame image corresponding to any adjacent frame. The horizontal flight distance can be obtained by a GPS-related positioning device installed in the drone. Traverse all adjacent frames corresponding to the target point to obtain the horizontal flight distance corresponding to every two adjacent frames corresponding to the target point. Calculate the sum of all horizontal flight distances corresponding to the target point, denoted as g.
[0117] The instructions are as follows:
[0118] The second blur index reflects the contribution of the corresponding pixel point to the blur degree of the grayscale image, or in other words, reflects the blur degree of the area where the corresponding pixel point is located.
[0119] The larger the value is, the greater the discrete degree of the grayscale of the first pixel is, which means that the possibility that the grayscale image where the target point is located is blurred is greater.
[0120] r and L reflect the relative motion process of the object corresponding to the target point, which can be obtained by and The blur degree of the target point is calculated, and then the blur degree of the grayscale image is calculated. The larger it is, the more likely the camera is shaking, which means the grayscale image at the target point is more likely to be blurred. The larger it is, the more likely the camera is shaking, which means the grayscale image at the target point is more likely to be blurred.
[0121] Traverse all pixels in all grayscale images to obtain the second fuzzy index of each pixel.
[0122] It should be noted that the second fuzzy indexes of all first pixel points corresponding to the target point are the same.
[0123] It can be understood that the second blur degree reflects the blur degree of the area where the corresponding pixel point is located in the "dynamic" dimension.
[0124] In step S4, the noise index of the target point is calculated. The description is as follows:
[0125] In the process of deblurring a grayscale image, the noise of the grayscale image will reduce the deblurring effect. Specifically, the noise will affect the point spread function. In order to reduce the influence of the noise of the grayscale image on deblurring, it is necessary to first calculate the noise index of the pixel. The noise index reflects the probability that the corresponding pixel is noise, or reflects the noise level of the corresponding pixel. The larger the noise index of a pixel, the less credible the first blur index and the second blur index of the pixel.
[0126] Preferably, in one embodiment, the expression of the noise index is:
[0127] ;
[0128] in, is a positive correlation normalization function, which can be a positive correlation maximum and minimum normalization function, where the pixel corresponding to the j-th frame grayscale image is The value is called the denoising difference value, the maximum value is the maximum denoising difference value in the j-th frame grayscale image, and the minimum value is the minimum denoising difference value in the j-th frame grayscale image. is the noise index of the i-th pixel in the j-th grayscale image, is the gray value of the i-th pixel before denoising the j-th gray image. is the gray value of the i-th pixel after denoising the j-th gray image.
[0129] The larger the value is, the more likely it is that the i-th pixel in the j-th grayscale image is noise.
[0130] In one embodiment, the denoising algorithm is a median filter algorithm.
[0131] At this point, the noise index of each pixel in each grayscale image is obtained.
[0132] In step S5, based on the first fuzzy index, the second fuzzy index, and the noise index, the overall fuzzy index of the grayscale image is calculated. The description is as follows:
[0133] The expression of the overall fuzzy index is:
[0134]
[0135] in, is a positive correlation normalization function, which can be a positive correlation maximum and minimum normalization function, where: ,Will The overall reference fuzzy index of the j-th grayscale image is called, and the overall reference fuzzy index corresponding to each grayscale image is calculated. The maximum value in the maximum-minimum function is the largest overall reference fuzzy index of all grayscale images, and the minimum value is the smallest overall reference fuzzy index of all grayscale images. In another embodiment, . is the overall blur index of the j-th grayscale image, and k is the total number of pixels in a grayscale image. It should be noted that the total number of pixels in each grayscale image is the same. is the first fuzzy index of the i-th pixel in the j-th grayscale image. is the second fuzzy index of the i-th pixel, For The value after negative correlation normalization, is the noise index of the i-th pixel.
[0136] In one embodiment, The function for performing negative correlation normalization may be a negative correlation maximum-minimum normalization function, wherein the maximum value is the maximum noise index in the j-th grayscale image frame, and the minimum value is the minimum noise index in the j-th grayscale image frame.
[0137] The overall blur index reflects the blur degree of the grayscale image of the corresponding frame.
[0138] Understandably, It represents the blur index of the i-th pixel in the j-th grayscale image, reflecting the blur degree of the area where the corresponding pixel is located. The bigger, The smaller it is, the greater the probability that the i-th pixel is noise, the less credible the blur index of the i-th pixel is, and the smaller the contribution of the blur index of the i-th pixel to the overall blur index of the j-th frame grayscale image should be. and The relationship is negatively correlated.
[0139] The larger the value is, the more likely it is that the j-th frame grayscale image is blurred.
[0140] So far, the overall blur index of each frame of grayscale image is obtained.
[0141] In step S6, based on the overall fuzzy index and Algorithm, deblurs the grayscale image to obtain a deblurred image.
[0142] Preferably, in one embodiment, updating The expression of the point spread function of the algorithm is:
[0143] ;
[0144] in, is the point spread function of the j-th grayscale image before updating, is the updated point spread function of the j-th frame grayscale image, is the overall blur index of the j-th grayscale image.
[0145] The larger the value, the greater the degree of adjustment to the point spread function.
[0146] For any frame of grayscale image, the updated point spread function and The algorithm deblurs the grayscale image to obtain a deblurred image of the grayscale image. All remaining grayscale images are traversed to obtain a deblurred image of each remaining grayscale image.
[0147] use The method of deblurring an image by an algorithm is a prior art and will not be described in detail.
[0148] When calculating the overall blur index of a grayscale image, the contribution of the pixels in the grayscale image to the overall blur index in a "static state" is taken into account, as is the contribution of the pixels in the grayscale image to the overall blur index in a "dynamic state". At the same time, the effect of noise in the grayscale image on the deblurring process is also considered. Therefore, the updated point spread function can better reflect the blur level of the corresponding grayscale image. When the updated point spread function is used to deblur a grayscale image, the deblurring effect of the grayscale image is better, and the number of iterations in the deblurring process is reduced, which can improve the accuracy of the subsequent flight test results.
[0149] So far, the deblurred images of all grayscale images are obtained.
[0150] In step S7, a stability index is calculated, which is negatively correlated with the difference between the grayscale image and the deblurred image.
[0151] It is understandable that the greater the blur of the grayscale image, the greater the difference between the grayscale image and the corresponding deblurred image. Moreover, the blur of the grayscale image is negatively correlated with the stability index. Therefore, the stability index can be calculated based on the difference between the grayscale image and the deblurred image.
[0152] Preferably, in one embodiment, the expression of the stability index is: ;
[0153] Among them, W is the stability index, is the first reference stability indicator, is the second reference stability index; the process of obtaining the first reference stability index and the second reference stability index includes:
[0154] Calculate the mean of the grayscale values of all pixels in all grayscale images, recorded as the first grayscale mean . Calculate the mean of the grayscale values of all pixels in all deblurred images corresponding to all grayscale images, and record it as the second grayscale mean For the first grayscale mean and the second grayscale mean The absolute value of the difference is normalized by negative correlation to obtain the first reference stability index .
[0155] Calculate the mean of the gradient amplitudes of all pixels in all grayscale images, denoted as the mean . Calculate the mean of the gradient amplitudes of all pixels in all deblurred images corresponding to all grayscale images, denoted as the mean . For the mean With the mean The absolute value of the difference is negatively correlated and normalized to obtain the second reference stability index .
[0156] In one embodiment, the expression for calculating the stability index W is:
[0157] ;in, is a natural exponential function.
[0158] The stability index W reflects the flight stability of the UAV during the flight test.
[0159] The larger it is, the more blurred the grayscale image is and the less stable the flight is.
[0160] The larger it is, the more blurred the grayscale image is and the less stable the flight is.
[0161] In another embodiment, .
[0162] In one embodiment, .
[0163] In step S8, the flight test result is obtained based on the stability index and the preset threshold.
[0164] It is understandable that the greater the stability index, the better the flight test results.
[0165] Preferably, in one embodiment, in response to the stability index being greater than or equal to a preset threshold, the flight test result is qualified; in response to the stability index being less than a preset threshold, the flight test result is unqualified. In one embodiment, the preset threshold is an empirical value of 0.9.
[0166] The implementer may set the preset threshold value according to the specific implementation scenario. It should be noted that the preset threshold value is adapted to the negative correlation normalization function.
[0167] In another embodiment:
[0168] For any grayscale image, calculate the grayscale mean of the grayscale image , calculate the mean value of the gradient amplitude of the pixel points in the grayscale image , calculate the grayscale mean of the deblurred image corresponding to the grayscale image , calculate the mean value of the gradient amplitude of the pixel points in the grayscale image , the third reference stability index corresponding to the grayscale image The expression is:
[0169] .
[0170] All remaining grayscale images are traversed to obtain a third reference stability index for each remaining grayscale image.
[0171] The largest third reference stability index is used as the stability index.
[0172] In the description of this specification, "plurality" or "several" means at least two, such as two, three or more, etc., unless otherwise clearly and specifically defined.
[0173] As used herein, the term "or" is intended to mean an inclusive "or" rather than an exclusive "or." Additionally, the articles "a" and "an" as used in this application and the appended claims are generally understood to mean "one or more" unless specified otherwise or clear from context to be directed to a singular form.
[0174] Where the terms "includes," "having," "having," "having," or variations thereof are used in the detailed description or claims, such terms are intended to be inclusive in a manner similar to the term "comprising."
[0175] Although this specification has shown and described a number of embodiments of the present invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will conceive of many modifications, changes and alternatives without departing from the ideas and spirit of the present invention. It should be understood that in the practice of the present invention, various alternatives to the embodiments of the present invention described herein may be employed.
Claims
1. A flight test system, characterized in that: include: A drone is used to collect multiple grayscale images at multiple consecutive moments containing reference points; Deblurring module, used to take advantage of improved The algorithm performs deblurring processing on each frame image to obtain a corresponding deblurred image; the algorithm includes weighting the point spread function using the overall blur index to obtain an improved point spread function; the overall blur index is positively correlated with the first blur index and the second blur index, and negatively correlated with the noise index; the first blur index is negatively correlated with the difference in gradient between the reference point and the pixel points in the preset neighborhood; the second blur index M is: ,in, is the positive correlation normalization function, D, E and F are weight values, is the grayscale variance of the reference point in all frame images, r is the mean of all angles, and the angle is the angle between the line connecting the reference points in two adjacent frame images and the column direction where the reference points are located, is the mean of the angles between the flight direction of the drone and the initial flight direction at all times, L is the sum of the distances between the reference points in all two adjacent frames of images, g is the sum of the horizontal flight distances of the drone between all two adjacent moments, is the proportional coefficient; the noise index is positively correlated with the grayscale difference of the reference point before and after denoising; The flight test module is used to calculate the stability index of the UAV flight, and the stability index is negatively correlated with the difference between the grayscale images before and after deblurring; when the stability index is greater than a preset threshold, the flight test is qualified; The process of obtaining the improved point spread function includes: renew The expression of the point spread function of the algorithm is: ; in, is the point spread function of the j-th grayscale image before updating, is the updated point spread function of the j-th frame grayscale image, is the overall blur index of the j-th frame grayscale image; The expression of the overall fuzzy index is: ; in, is the overall blur index of the j-th grayscale image, k is the total number of pixels in any grayscale image, is the first fuzzy index of the i-th pixel in the j-th grayscale image. is the second fuzzy index of the i-th pixel in the j-th grayscale image. is the value after negative correlation normalization of the noise index of the i-th pixel in the j-th frame grayscale image; The expression of the stability index W is: ; The difference between the grayscale mean of all grayscale images and the grayscale mean of all corresponding deblurred images is calculated and recorded as difference A1; the difference A1 is negatively correlated and normalized to obtain the first reference stability index: ; Calculate the difference between the mean of the gradient amplitude of all pixels in the grayscale image and the mean of the gradient amplitude of all pixels in the corresponding deblurred image, and record it as the difference A2; perform negative correlation normalization on the difference A2 to obtain the second reference stability index .
2. A flight test system according to claim 1, characterized in that: The expression of the first fuzzy index is: ,in, is the first fuzzy index of the i-th pixel in the j-th grayscale image. is the value after negative correlation normalization of the difference V1, wherein the difference V1 is the difference between the gradient amplitude of the i-th pixel in the j-th frame grayscale image and the mean gradient amplitude of the pixels in its preset neighborhood, is a value obtained by negative correlation normalization of the first mean, where the first mean is the mean of the difference between the gradient direction of the ith pixel in the jth frame grayscale image and the gradient direction of the pixel in a preset neighborhood.
3. A flight test system according to claim 1, characterized in that: The expression of the first fuzzy index is: ,in, is the first fuzzy index of the i-th pixel in the j-th grayscale image. is the value after negative correlation normalization of the difference mean, wherein the difference mean is the mean of the difference between the gradient amplitude of the i-th pixel point in the j-th frame grayscale image and the gradient amplitude of the pixel points in the preset neighborhood, is a value obtained by negative correlation normalization of the first mean, where the first mean is the mean of the difference between the gradient direction of the ith pixel in the jth frame grayscale image and the gradient direction of the pixel in a preset neighborhood.
4. A flight test system according to claim 1, characterized in that: The expression of noise index is: ; in, is the noise index of the i-th pixel in the j-th grayscale image, is the grayscale value of the i-th pixel in the j-th grayscale image before denoising, is the grayscale value of the i-th pixel in the j-th grayscale image after denoising.
5. A flight test system according to claim 1, 2 or 3, characterized in that: The preset neighborhood is an 8-neighborhood.
Citation Information
Patent Citations
Super-resolution reconstruction optimization recovery method for under-sampled degraded images
CN106204438A
Blind deblurring algorithm based on natural image statistic property
CN102708550A
Light source detection method based on image processing
CN114612345A
