Disclosure of Invention
The invention aims to solve the technical problem of providing a method and a device for detecting the frequency band of an unmanned aerial vehicle signal, which are designed according to the characteristics that the frequency domain transition zone of the WiFi signal is gentle and the frequency domain transition zone of the unmanned aerial vehicle signal is steeper aiming at the unmanned aerial vehicle signal receiving scene with the interference signal mainly comprising the WiFi signal, and can detect the frequency band of the unmanned aerial vehicle signal under the condition that the unmanned aerial vehicle signal is approximately wide.
In order to solve the technical problems, a first aspect of the embodiment of the invention discloses a method for detecting a signal frequency band of an unmanned aerial vehicle, which comprises the following steps:
s1, acquiring an unmanned aerial vehicle signal;
S2, processing the unmanned aerial vehicle signal to obtain a time-frequency diagram of the unmanned aerial vehicle signal;
s3, processing the time-frequency diagram of the unmanned aerial vehicle signal to obtain a transverse smooth time-frequency diagram;
s4, sharpening the transverse smooth time-frequency diagram to obtain a sharpened time-frequency diagram;
s5, processing the sharpened time-frequency diagram to obtain an edge time-frequency diagram;
s6, processing the edge time-frequency diagram to obtain a longitudinal edge time-frequency diagram;
s7, detecting the longitudinal edge time-frequency diagram to obtain rough selection frequency band information of the unmanned aerial vehicle signal;
s8, screening the rough frequency band information of the unmanned aerial vehicle signal to obtain the frequency band information of the unmanned aerial vehicle signal.
In a first aspect of the embodiment of the present invention, the processing the unmanned aerial vehicle signal to obtain a time-frequency diagram of the unmanned aerial vehicle signal includes:
s21, oversampling is carried out on the unmanned aerial vehicle signal to obtain an oversampled signal;
s22, carrying out frequency spectrum shifting on the over-sampled signal to obtain a baseband signal;
s23, resampling the baseband signal to obtain a resampled signal;
s24, dividing the resampled signals to obtain N time segment signals, wherein N is an integer;
S25, carrying out Fourier transform on each time slice signal to obtain a frequency spectrum of each time slice signal;
s26, processing the frequency spectrum of each time segment signal to obtain a time-frequency diagram of the unmanned aerial vehicle signal.
In a first aspect of the embodiment of the present invention, the processing the time-frequency diagram of the unmanned aerial vehicle signal to obtain a laterally smoothed time-frequency diagram includes:
s31, performing open operation on the time-frequency diagram of the unmanned aerial vehicle signal, and removing a bright thin line in the longitudinal direction of the time-frequency diagram of the unmanned aerial vehicle signal to obtain an open operation processing time-frequency diagram;
s32, performing a closed operation on the open operation processing time-frequency diagram, and removing dark thin lines in the longitudinal direction of the open operation processing time-frequency diagram to obtain a horizontal smooth time-frequency diagram.
In a first aspect of the embodiment of the present invention, the sharpening process is performed on the laterally smoothed time-frequency graph to obtain a sharpened time-frequency graph, which includes:
s41, convolving the transverse smooth time-frequency diagram with a two-dimensional Gaussian convolution kernel to obtain a Gaussian blur time-frequency diagram;
s42, subtracting the Gaussian blur time-frequency diagram from the transverse smooth time-frequency diagram to obtain a differential time-frequency diagram;
S43, processing the differential time-frequency diagram by using a correction model to obtain a sharpened time-frequency diagram;
the correction model is as follows:
wherein x is the pixel value, y is the corrected output, and y>1 is a correction coefficient, and the correction coefficient is set to be 1,is a round down function.
In a first aspect of the embodiment of the present invention, the processing the sharpened time-frequency graph to obtain an edge time-frequency graph includes:
s51, carrying out Gaussian filtering on the sharpened time-frequency diagram to obtain a filtered time-frequency diagram;
s52, performing non-maximum gradient suppression on the filtered time-frequency diagram to obtain roughing edge point information of the sharpened time-frequency diagram;
and S53, performing double-threshold screening on the roughing edge point information to obtain an edge time-frequency diagram.
In a first aspect of the embodiment of the present invention, the processing the edge time-frequency diagram to obtain a longitudinal edge time-frequency diagram includes:
s61, performing open operation on the edge time-frequency diagram, and removing transverse bright stripes to obtain an open operation edge time-frequency diagram;
s62, performing a closed operation on the open operation edge time-frequency diagram to obtain a longitudinal edge time-frequency diagram.
In a first aspect of the embodiment of the present invention, the detecting the longitudinal edge time-frequency diagram to obtain roughing frequency band information of the unmanned aerial vehicle signal includes:
S71, detecting the longitudinal edge time-frequency diagram, and enabling the duration length of the time-domain sampling point of the longitudinal edge time-frequency diagram to be greater than a preset threshold T 1 Discarding other edges as valid edges;
s72, processing the effective edge, detecting that the effective edge appears at the same time and the time overlapping range is larger than a preset threshold T 2 The rising edge and the falling edge are combined, and meanwhile, the bandwidth between the rising edge and the falling edge is consistent with the bandwidth of a preset unmanned aerial vehicle signal, and the effective combination is recorded;
s73, if the total length of the effective edge with a certain frequency point is greater than a preset threshold T 3 The rising edge or the falling edge of the unmanned aerial vehicle is used as the left end or the right end of a signal frequency band, a row which accords with the preset unmanned aerial vehicle signal bandwidth and has the largest edge pixel points is searched, the row is approximately used as the falling edge or the rising edge, and a pair of approximate rising edge and falling edge combinations are formed;
the effective combination and the approximate combination of the rising edge and the falling edge form rough frequency band information of the unmanned aerial vehicle signal.
As an optional implementation manner, in the first aspect of the embodiment of the present invention, the filtering the rough selection frequency band information of the unmanned aerial vehicle signal to obtain the frequency band information of the unmanned aerial vehicle signal includes:
S81, screening rough frequency band information of the unmanned aerial vehicle signal, and taking the average of the time superposition part of the rising edge and the falling edge to obtain an average value array;
s82, averaging the average value array;
s83, processing the part lower than the average value in the average value array, if the occupied bandwidth exceeds the preset threshold value T 4 And the gradient thereof exceeds a preset threshold value T 5 The unmanned aerial vehicle signal is an interference signal; if the occupied bandwidth exceeds a preset threshold T 4 And the gradient does not exceed a preset threshold T 5 The drone signal is an approximately solid signal; if the occupied bandwidth does not exceed the preset threshold T 4 And the gradient exceeds a preset threshold T 5 The drone signal is an approximately solid signal;
s84, the frequency bands of the rising edge and the falling edge corresponding to all the approximately solid signals are the frequency band information of the unmanned aerial vehicle signals.
The second aspect of the embodiment of the invention discloses an unmanned aerial vehicle signal frequency band detection device, which comprises:
the signal acquisition module is used for acquiring unmanned aerial vehicle signals;
the time-frequency diagram calculation module is used for processing the unmanned aerial vehicle signals to obtain a time-frequency diagram of the unmanned aerial vehicle signals;
The transverse smoothing module is used for processing the time-frequency diagram of the unmanned aerial vehicle signal to obtain a transverse smoothing time-frequency diagram;
the sharpening module is used for carrying out sharpening processing on the transverse smooth time-frequency diagram to obtain a sharpened time-frequency diagram;
the edge detection module is used for processing the sharpened time-frequency diagram to obtain an edge time-frequency diagram;
the longitudinal smoothing module is used for processing the edge time-frequency diagram to obtain a longitudinal edge time-frequency diagram;
the frequency band roughing module is used for detecting the longitudinal edge time-frequency diagram to obtain roughing frequency band information of the unmanned aerial vehicle signal;
and the frequency band screening module is used for screening the rough frequency band information of the unmanned aerial vehicle signal to obtain the frequency band information of the unmanned aerial vehicle signal.
In a second aspect of the embodiment of the present invention, the processing the unmanned aerial vehicle signal to obtain a time-frequency diagram of the unmanned aerial vehicle signal includes:
s21, oversampling is carried out on the unmanned aerial vehicle signal to obtain an oversampled signal;
s22, carrying out frequency spectrum shifting on the over-sampled signal to obtain a baseband signal;
s23, resampling the baseband signal to obtain a resampled signal;
s24, dividing the resampled signals to obtain N time segment signals, wherein N is an integer;
S25, carrying out Fourier transform on each time slice signal to obtain a frequency spectrum of each time slice signal;
s26, processing the frequency spectrum of each time segment signal to obtain a time-frequency diagram of the unmanned aerial vehicle signal.
In a second aspect of the embodiment of the present invention, the processing the time-frequency diagram of the unmanned aerial vehicle signal to obtain a laterally smoothed time-frequency diagram includes:
s31, performing open operation on the time-frequency diagram of the unmanned aerial vehicle signal, and removing a bright thin line in the longitudinal direction of the time-frequency diagram of the unmanned aerial vehicle signal to obtain an open operation processing time-frequency diagram;
s32, performing a closed operation on the open operation processing time-frequency diagram, and removing dark thin lines in the longitudinal direction of the open operation processing time-frequency diagram to obtain a horizontal smooth time-frequency diagram.
In a second aspect of the embodiment of the present invention, the sharpening process is performed on the laterally smoothed time-frequency graph to obtain a sharpened time-frequency graph, which includes:
s41, convolving the transverse smooth time-frequency diagram with a two-dimensional Gaussian convolution kernel to obtain a Gaussian blur time-frequency diagram;
s42, subtracting the Gaussian blur time-frequency diagram from the transverse smooth time-frequency diagram to obtain a differential time-frequency diagram;
S43, processing the differential time-frequency diagram by using a correction model to obtain a sharpened time-frequency diagram;
the correction model is as follows:
wherein x is the pixel value, y is the corrected output, and y>1 is a correction coefficient, and the correction coefficient is set to be 1,is a round down function.
In a second aspect of the embodiment of the present invention, the processing the sharpened time-frequency graph to obtain an edge time-frequency graph includes:
s51, carrying out Gaussian filtering on the sharpened time-frequency diagram to obtain a filtered time-frequency diagram;
s52, performing non-maximum gradient suppression on the filtered time-frequency diagram to obtain roughing edge point information of the sharpened time-frequency diagram;
and S53, performing double-threshold screening on the roughing edge point information to obtain an edge time-frequency diagram.
In a second aspect of the embodiment of the present invention, the processing the edge time-frequency diagram to obtain a longitudinal edge time-frequency diagram includes:
s61, performing open operation on the edge time-frequency diagram, and removing transverse bright stripes to obtain an open operation edge time-frequency diagram;
s62, performing a closed operation on the open operation edge time-frequency diagram to obtain a longitudinal edge time-frequency diagram.
In a second aspect of the embodiment of the present invention, the detecting the longitudinal edge time-frequency diagram to obtain rough frequency band information of the unmanned aerial vehicle signal includes:
S71, detecting the longitudinal edge time-frequency diagram, and enabling the duration length of the time-domain sampling point of the longitudinal edge time-frequency diagram to be greater than a preset threshold T 1 Discarding other edges as valid edges;
s72, processing the effective edge, detecting that the effective edge appears at the same time and the time overlapping range is larger than a preset threshold T 2 The rising edge and the falling edge are combined, and meanwhile, the bandwidth between the rising edge and the falling edge is consistent with the bandwidth of a preset unmanned aerial vehicle signal, and the effective combination is recorded;
s73, if the total length of the effective edge with a certain frequency point is greater than a preset threshold T 3 The rising edge or the falling edge of the unmanned aerial vehicle is used as the left end or the right end of a signal frequency band, a row which accords with the preset unmanned aerial vehicle signal bandwidth and has the largest edge pixel points is searched, the row is approximately used as the falling edge or the rising edge, and a pair of approximate rising edge and falling edge combinations are formed;
the effective combination and the approximate combination of the rising edge and the falling edge form rough frequency band information of the unmanned aerial vehicle signal.
In a second aspect of the embodiment of the present invention, the filtering the rough selection frequency band information of the unmanned aerial vehicle signal to obtain the frequency band information of the unmanned aerial vehicle signal includes:
S81, screening rough frequency band information of the unmanned aerial vehicle signal, and taking the average of the time superposition part of the rising edge and the falling edge to obtain an average value array;
s82, averaging the average value array;
s83, processing the part lower than the average value in the average value array, if the occupied bandwidth exceeds the preset threshold value T 4 And the gradient thereof exceeds a preset threshold value T 5 The unmanned aerial vehicle signal is an interference signal; if the occupied bandwidth exceeds a preset threshold T 4 And the gradient does not exceed a preset threshold T 5 The drone signal is an approximately solid signal; if the occupied bandwidth does not exceed the preset threshold T 4 And the gradient exceeds a preset threshold T 5 The drone signal is an approximately solid signal;
s84, the frequency bands of the rising edge and the falling edge corresponding to all the approximately solid signals are the frequency band information of the unmanned aerial vehicle signals.
The third aspect of the invention discloses another unmanned aerial vehicle signal frequency band detection device, which comprises:
a memory storing executable program code;
a processor coupled to the memory;
the processor invokes the executable program codes stored in the memory to execute part or all of the steps in the unmanned aerial vehicle signal frequency band detection method disclosed in the first aspect of the embodiment of the invention.
Compared with the prior art, the embodiment of the invention has the following beneficial effects:
the invention provides a time-frequency graph-based unmanned aerial vehicle signal frequency band detection method, which is designed according to the characteristic that the transition zone of a WiFi signal frequency domain is gentle and the transition zone of the unmanned aerial vehicle signal frequency domain is steeper aiming at an unmanned aerial vehicle signal receiving scene with an interference signal mainly comprising the WiFi signal, and can detect the frequency band of the unmanned aerial vehicle signal under the condition that the unmanned aerial vehicle signal is approximately wide. The method provided by the invention has the advantages of better capability of identifying signals in the time-frequency diagram and higher accuracy of identifying the signal frequency bands of the unmanned aerial vehicle.
Detailed Description
In order to make the present invention better understood by those skilled in the art, the following description will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The terms first, second and the like in the description and in the claims and in the above-described figures are used for distinguishing between different objects and not necessarily for describing a sequential or chronological order. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, apparatus, article, or device that comprises a list of steps or elements is not limited to the list of steps or elements but may, in the alternative, include other steps or elements not expressly listed or inherent to such process, method, article, or device.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the invention. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
The invention discloses a method and a device for detecting a signal frequency band of an unmanned aerial vehicle, wherein the method comprises the following steps: acquiring an unmanned aerial vehicle signal; processing the unmanned aerial vehicle signal to obtain a time-frequency diagram of the unmanned aerial vehicle signal; processing the time-frequency diagram of the unmanned aerial vehicle signal to obtain a transverse smooth time-frequency diagram; sharpening the transverse smooth time-frequency diagram to obtain a sharpened time-frequency diagram; processing the sharpened time-frequency diagram to obtain an edge time-frequency diagram; processing the edge time-frequency diagram to obtain a longitudinal edge time-frequency diagram; detecting the longitudinal edge time-frequency diagram to obtain rough frequency band information of the unmanned aerial vehicle signal; and screening the rough frequency band information of the unmanned aerial vehicle signal to obtain the frequency band information of the unmanned aerial vehicle signal. The method has higher unmanned aerial vehicle signal frequency band accurate recognition rate. The following will describe in detail.
Example 1
Referring to fig. 1, fig. 1 is a flowchart of a method for detecting a signal frequency band of an unmanned aerial vehicle according to an embodiment of the present invention. The unmanned aerial vehicle signal frequency band detection method described in fig. 1 is applied to the unmanned aerial vehicle signal frequency band detection field, and the embodiment of the invention is not limited. As shown in fig. 1, the method for detecting the signal frequency band of the unmanned aerial vehicle may include the following operations:
s1, acquiring an unmanned aerial vehicle signal;
s2, processing the unmanned aerial vehicle signal to obtain a time-frequency diagram of the unmanned aerial vehicle signal;
s3, processing the time-frequency diagram of the unmanned aerial vehicle signal to obtain a transverse smooth time-frequency diagram;
s4, sharpening the transverse smooth time-frequency diagram to obtain a sharpened time-frequency diagram;
s5, processing the sharpened time-frequency diagram to obtain an edge time-frequency diagram;
s6, processing the edge time-frequency diagram to obtain a longitudinal edge time-frequency diagram;
s7, detecting the longitudinal edge time-frequency diagram to obtain rough selection frequency band information of the unmanned aerial vehicle signal;
s8, screening the rough frequency band information of the unmanned aerial vehicle signal to obtain the frequency band information of the unmanned aerial vehicle signal.
Optionally, the processing the unmanned aerial vehicle signal to obtain a time-frequency diagram of the unmanned aerial vehicle signal includes:
S21, oversampling is carried out on the unmanned aerial vehicle signal to obtain an oversampled signal;
s22, carrying out frequency spectrum shifting on the over-sampled signal to obtain a baseband signal;
s23, resampling the baseband signal to obtain a resampled signal;
s24, dividing the resampled signals to obtain N time segment signals, wherein N is an integer;
s25, carrying out Fourier transform on each time slice signal to obtain a frequency spectrum of each time slice signal;
s26, processing the frequency spectrum of each time segment signal to obtain a time-frequency diagram of the unmanned aerial vehicle signal.
Optionally, the processing the time-frequency diagram of the unmanned aerial vehicle signal to obtain a horizontal smooth time-frequency diagram includes:
s31, performing open operation on the time-frequency diagram of the unmanned aerial vehicle signal, and removing a bright thin line in the longitudinal direction of the time-frequency diagram of the unmanned aerial vehicle signal to obtain an open operation processing time-frequency diagram;
s32, performing a closed operation on the open operation processing time-frequency diagram, and removing dark thin lines in the longitudinal direction of the open operation processing time-frequency diagram to obtain a horizontal smooth time-frequency diagram.
Optionally, the sharpening the horizontal smoothing time-frequency diagram to obtain a sharpened time-frequency diagram includes:
s41, convolving the transverse smooth time-frequency diagram with a two-dimensional Gaussian convolution kernel to obtain a Gaussian blur time-frequency diagram;
S42, subtracting the Gaussian blur time-frequency diagram from the transverse smooth time-frequency diagram to obtain a differential time-frequency diagram;
s43, processing the differential time-frequency diagram by using a correction model to obtain a sharpened time-frequency diagram;
the correction model is as follows:
wherein x is the pixel value, y is the corrected output, and y>1 is a correction coefficient, and the correction coefficient is set to be 1,is a round down function.
Optionally, the processing the sharpened time-frequency graph to obtain an edge time-frequency graph includes:
s51, carrying out Gaussian filtering on the sharpened time-frequency diagram to obtain a filtered time-frequency diagram;
s52, performing non-maximum gradient suppression on the filtered time-frequency diagram to obtain roughing edge point information of the sharpened time-frequency diagram;
and S53, performing double-threshold screening on the roughing edge point information to obtain an edge time-frequency diagram.
Optionally, the processing the edge time-frequency diagram to obtain a longitudinal edge time-frequency diagram includes:
s61, performing open operation on the edge time-frequency diagram, and removing transverse bright stripes to obtain an open operation edge time-frequency diagram;
s62, performing a closed operation on the open operation edge time-frequency diagram to obtain a longitudinal edge time-frequency diagram.
Optionally, the detecting the longitudinal edge time-frequency diagram to obtain rough selection frequency band information of the unmanned aerial vehicle signal includes:
S71, detecting the longitudinal edge time-frequency diagram, and enabling the duration length of the time-domain sampling point of the longitudinal edge time-frequency diagram to be greater than a preset threshold T 1 Discarding other edges as valid edges;
s72, processing the effective edge, detecting that the effective edge appears at the same time and the time overlapping range is larger than a preset threshold T 2 The rising edge and the falling edge are combined, and meanwhile, the bandwidth between the rising edge and the falling edge is consistent with the bandwidth of a preset unmanned aerial vehicle signal, and the effective combination is recorded;
s73, if the total length of the effective edge with a certain frequency point is greater than a preset threshold T 3 The rising edge or the falling edge of the unmanned aerial vehicle is used as the left end or the right end of a signal frequency band, a row which accords with the preset unmanned aerial vehicle signal bandwidth and has the largest edge pixel points is searched, the row is approximately used as the falling edge or the rising edge, and a pair of approximate rising edge and falling edge combinations are formed;
the effective combination and the approximate combination of the rising edge and the falling edge form rough frequency band information of the unmanned aerial vehicle signal.
Optionally, the filtering the rough selection frequency band information of the unmanned aerial vehicle signal to obtain the frequency band information of the unmanned aerial vehicle signal includes:
S81, screening rough frequency band information of the unmanned aerial vehicle signal, and taking the average of the time superposition part of the rising edge and the falling edge to obtain an average value array;
s82, averaging the average value array;
s83, processing the part lower than the average value in the average value array, if the occupied bandwidth exceeds the preset threshold value T 4 And the gradient thereof exceeds a preset threshold value T 5 The unmanned aerial vehicle signal is an interference signal; if the occupied bandwidth exceeds a preset threshold T 4 And the gradient does not exceed a preset threshold T 5 The drone signal is an approximately solid signal; if the occupied bandwidth does not exceed the preset threshold T 4 And (2) andthe gradient exceeds a preset threshold T 5 The drone signal is an approximately solid signal;
s84, the frequency bands of the rising edge and the falling edge corresponding to all the approximately solid signals are the frequency band information of the unmanned aerial vehicle signals.
Example two
Referring to fig. 2, fig. 2 is a flowchart of another method for detecting a signal frequency band of an unmanned aerial vehicle according to an embodiment of the present invention. The unmanned aerial vehicle signal frequency band detection method described in fig. 2 is applied to the unmanned aerial vehicle signal frequency band detection field, and the embodiment of the invention is not limited. As shown in fig. 2, the method for detecting the signal frequency band of the unmanned aerial vehicle may include the following operations:
1. And (5) constructing a time-frequency diagram. The received signal is first oversampled and shifted to baseband, then resampled, and divided into a plurality of time slices. Next, a fast Fourier transform is performed on all the samples in each time segment, respectively, and the magnitudes of all the results are normalized to the [0,255] interval and rounded by rounding. And finally, longitudinally arranging the time slices according to the time sequence, and transversely arranging the rounded result in each time slice to form a gray scale time-frequency diagram of the received signal.
Alternatively, the acquisition of the time-frequency diagram may be performed using the following formula:
C s (t, f) is the result of the time-frequency analysis, f and t represent frequency versus time, and f (ζ, τ) represents the kernel function. s (t) is the input signal, in the present invention
For C s (t, f) preprocessing, clipping from the image coordinate frame, retaining the part with information content in the center of the image, adjusting the size of the image, reducing the lengthy and tedious calculation amount after that, and then carrying out graying processing on the image, reducing noise to a certain extent and not losing the main information content of the signalAfter graying, the image is subjected to dimension reduction processing.
Let n-dimensional vector w be the mapping vector, the maximized variance of the mapped low-dimensional spatial data is:
Where m is a number of data, x i In the form of a vector which is a vector,as an average vector, it can be transformed into:
wherein the method comprises the steps oftr is the trace of the matrix and U is the covariance matrix.
Thus, a group of dimension-reduced data is obtained.
Optionally, the contrast of the time-frequency image can be enhanced, and the contrast of the image can be improved, by the following steps:
a two-dimensional gray level histogram of a time-frequency image is calculated first, and a spatial entropy value and a set of spatial mutual information values can be calculated for each gray level. The mapping relation between the input image and the output image is sought by using the spatial entropy value, and global contrast enhancement is realized in a space domain. And then realizing local contrast enhancement by two-dimensional discrete cosine transformation and coefficient equalization in a frequency domain.
The image space entropy formula is:
the length of each grid is denoted as R, and the width is denoted as C:
h k (m,n)←h k (m,n)/(R×C)
h k (M, N) is a gray histogram of the kth grid, and the input image X is composed of M rows and N columns of small grids.
The entropy is normalized, and the processing process is as follows:
using the normalized entropy value, calculating a discrete function as:
the cumulative distribution function used to form the final mapping relationship is calculated as:
[y d ,y u ]expressed as the gray dynamic range of the output image, y is usually given during image processing d 、y u Respectively take the value of y d =0,y u =2 8 -1=255. The input image is mapped to the output image.
For y k And performing two-dimensional discrete cosine transform, performing weighted equalization on the obtained result, and performing two-dimensional discrete inverse cosine transform to obtain an output result.
The weighted equalization formula is:
w(k,l)∈R
alpha is defined as a local contrast enhancement coefficient, and d (k, l) is a frequency domain coefficient of a two-dimensional discrete cosine transform; the value of gamma reflects the degree of local contrast enhancement, and when the value of gamma is zero, only local contrast enhancement is present but not global contrast enhancement is present, wherein k is more than or equal to 1 and less than or equal to H-1, and l is more than or equal to 1 and less than or equal to W-1.
2. Signal frequency band detection scheme
Step 1: and removing part of interference by morphological operation and transverse smoothing of the image.
Morphological operations are an efficient image processing method that includes a erosion operation, an dilation operation, an open operation, and a close operation, where both the open operation and the close operation are based on the erosion operation and the dilation operation. Corrosion and expansion are descriptions of bright parts: the etching operation is based on the original image, and each point in the image takes the minimum value in the preset range, so that dark parts of the image are increased, and bright parts seem to be corroded; the expansion operation is based on the original image, and each point in the image takes the maximum value in a preset range, so that the bright part of the image is increased, and the bright part looks like 'expansion'.
According to the above description of corrosion and expansion, the operation is to corrode the image before expansion, so that the dark part is increased after the operation, and the method is mainly used for supplementing the dark part and removing burrs and scattered noise of the bright part. The closing operation is to expand and then corrode the image, so that the bright part is increased after the opening operation, and the closing operation is mainly used for supplementing the bright part and removing burrs and scattered noise of the dark part.
In this step, the preset ranges of the etching operation and the expanding operation are defined as 1×k, where K is an integer greater than 1, i.e., a lateral range. The method comprises the steps of firstly removing longitudinal bright thin lines through open operation, and then removing longitudinal dark thin lines through closed operation, so that transverse smoothing is carried out on a time-frequency diagram.
Step 2: and the image edge is enhanced through USM sharpening, so that the subsequent edge extraction is facilitated.
The principle of USM (UnSharp Mask) sharpening is to extract the edges in the image first, and then add the obtained edges to the original image to obtain the sharpened image.
The USM sharpening utilizes a two-dimensional Gaussian convolution kernel to convolve with an image to obtain a Gaussian blurred image, wherein the standard deviation of the Gaussian kernel can be defined by the user, and the larger the standard deviation is, the more blurred the image is. The gaussian blur process eliminates some original edges in the image, so that subtracting the blurred image from the original image yields edges in the image. Then, the edges are added with the original image, so that the image with the edges strengthened can be obtained, and the sharpening effect is achieved.
In this step, a Gamma correction process is also added after the USM sharpening to adjust the contrast. The Gamma correction process specifically includes: nonlinear transformation is carried out on each pixel in the image, the pixel point value is set as x, the output is y, and the transformation function is as follows:
wherein, gamma>1 is a correction coefficient, and the correction coefficient is set to be 1,is a round down function. The derivative of the function is larger near 0, and the distinction between high pixel value and low pixel value can be widened, so that the contrast ratio is improved.
Step 3: the image edges are extracted by Canny edge detection.
Canny edge detection involves the following process:
(1) Gaussian filtering: and carrying out two-dimensional Gaussian filtering on the gray level time-frequency diagram, wherein the Gaussian kernel is 5 multiplied by 5, and the standard deviation is about 1.5, so that some noise is removed, and the interference to subsequent edge detection is avoided.
(2) Non-maximum gradient suppression: the horizontal and vertical gradients can be approximated by convolving the image in the horizontal and vertical directions using two types of sobel kernels, respectively:
from the resulting horizontal and vertical gradients, a two-dimensional gradient for each point can be synthesized, represented by magnitude and direction. The magnitude of the gradient is the magnitude of the vector sum of the horizontal and vertical gradients, and the direction of the two-dimensional gradient will typically be approximately 8 m-shaped for facilitating subsequent screening of the maximum edge points. For the two-dimensional gradient after approximation, selecting two adjacent points on the corresponding straight line of each point direction except the edge, and if the two selected points are the same or opposite to the gradient direction of the central point and the gradient value of the central point is the maximum, marking the central point as the edge point.
(3) Dual threshold screening: first two thresholds maxVal and minVal of different sizes are set. For each edge point obtained in the last step, if the gradient amplitude of the edge point is larger than maxVal, reserving the point, wherein the point is called as a strong edge; if the gradient amplitude of the edge point is smaller than minVal, deleting the point; if the gradient amplitude of the edge points is larger than minVal but smaller than maxVal, the connected parts of the edge points are regarded as a group of virtual edges. If there is a part of the connection between the virtual edge and the strong edge, the part of the edge point is reserved, otherwise, the part of the edge point is deleted.
Step 4: the lateral edges are removed by morphological operations to longitudinally smooth the image.
In the step, the operation range is set to be K multiplied by 1, namely a longitudinal range, the transverse bright stripes are removed by performing open operation, and then the fine bright vertical stripes are connected by performing closed operation, so that the extraction of the longitudinal edges is realized.
Step 5: detecting appropriate "rising and falling edge" combinations
For each longitudinal edge obtained in the last step, sampling the longitudinal edge in the time domain to a continuous length not smaller than a threshold T 1 The edges of (2) are taken as valid edges and the other edges are discarded. It is assumed that the respective approximate bandwidths of all drone signals are actually known. If the same time appears and the time overlap range is larger than the threshold value T 2 The combination of the rising edge and the falling edge of (1), the same asWhen the bandwidth between the rising edge and the falling edge accords with the approximate bandwidth of the unmanned aerial vehicle signal, the effective combination is recorded; if the combination of the rising edge and the falling edge does not exist, but the total length under a certain frequency point is larger than the threshold value T 3 In the time range of the edge in the Canny edge detection result, the rising edge or the falling edge is used as the left end or the right end of the signal frequency band, a row which accords with the approximate bandwidth of the unmanned aerial vehicle signal and has the maximum edge pixel points is searched, the row is approximately used as the falling edge or the rising edge, and a pair of approximate 'rising edge and falling edge' combination is further formed.
Step 6: screening for approximately solid signals in a time-frequency plot
The last step can obtain all frequency bands with the bandwidth approximately the same as that of the unmanned aerial vehicle signal, however, the frequency bands cannot be guaranteed to contain the unmanned aerial vehicle signal. On the one hand, since there are multiple rising edges and falling edges in the time-frequency diagram, there may be a combination of "rising edges and falling edges" that is not made up of edges of the drone signal, for example, some interfering signals with narrower bandwidths and steep edges are arranged together, and it is possible that the bandwidth of a certain "rising edge and falling edge" combination matches the approximate bandwidth of the drone signal. On the other hand, since there are some frequencies in the interference signal that are not used, there are significant dark vertical lines inside the interference signal in the time-frequency diagram, which are also counted as edges. Therefore, the combination of the rising edge and the falling edge identified in the previous step does not necessarily correspond to the unmanned aerial vehicle signal, and the loopholes can be eliminated by screening the approximate solid signal, and the screening steps are as follows:
(1) For each combination of the rising edge and the falling edge, the average of the time superposition parts of the rising edge and the falling edge is taken, and a one-dimensional array can be obtained. Then, the one-dimensional array is averaged, and the part of the one-dimensional array lower than the average value is counted.
(2) Considering that the center frequency of the drone signal may not be used, there may be dark narrow vertical lines at corresponding locations in the time-frequency diagram. There is typically a significant unused in the "rising and falling edge" combination consisting of edges of non-drone signalsThe dark vertical lines inside the WiFi signal are also obviously wider than the dark vertical lines in the unmanned aerial vehicle signal, and whether the bandwidth occupied by the parts below the average value exceeds a threshold value T can be judged 4 At the same time, judging whether the gradient of each position in the above-mentioned portion lower than average value exceeds threshold value T 5 . If there is the bandwidth exceeding the threshold T 4 And the gradient exceeds a threshold T 5 If yes, the signal is judged to be an interference signal.
(3) If the partial bandwidth below the average exceeds the threshold T 4 Without the gradient exceeding the threshold T 5 The internal amplitude of the signal frequency band is not greatly changed and is similar to a solid signal; if the partial bandwidth below the average value does not exceed the threshold T 4 While the gradient exceeds the threshold T 5 The dark color narrow and thin vertical lines exist in the signal block, which occupies small bandwidth and is a signal characteristic of the unmanned aerial vehicle and is similar to a solid signal.
And finally, taking the frequency band combined by the rising edge and the falling edge corresponding to all the approximately solid signals as a detection result of the unmanned aerial vehicle signal frequency band.
In the present embodiment, the threshold T 1 ,T 2 ,T 3 ,T 4 ,T 5 The present invention is not limited by the need for extensive experimental setup.
The time-frequency diagram for simulation test is 27, including the received signals in different scenes, as shown in fig. 3. The part with the approximate shape of a rectangle in the time-frequency diagram is the position where the unmanned aerial vehicle signal appears. The scheme is used for detecting the signal time-frequency diagram, and the detection result of the time-frequency diagram is shown in fig. 4. The position of the black rectangular frame in the time-frequency diagram is the detection result of the unmanned aerial vehicle signal frequency band. As can be seen from fig. 4, 26 unmanned aerial vehicle signal frequency bands in 27 time-frequency diagrams can be accurately identified, and the probability of accurate identification reaches 96%, so that the effectiveness of the scheme provided herein is verified.
Example III
Referring to fig. 5, fig. 5 is a schematic structural diagram of an unmanned aerial vehicle signal frequency band detection device according to an embodiment of the present invention. The unmanned aerial vehicle signal frequency band detection device described in fig. 5 is applied to the unmanned aerial vehicle signal frequency band detection field, and the embodiment of the invention is not limited. As shown in fig. 5, the unmanned aerial vehicle signal frequency band detection device may include the following operations:
S301, a signal acquisition module is used for acquiring unmanned aerial vehicle signals;
s302, a time-frequency diagram calculation module is used for processing the unmanned aerial vehicle signal to obtain a time-frequency diagram of the unmanned aerial vehicle signal;
s303, a transverse smoothing module, which is used for processing the time-frequency diagram of the unmanned aerial vehicle signal to obtain a transverse smoothing time-frequency diagram;
s304, a sharpening module is used for carrying out sharpening processing on the transverse smooth time-frequency diagram to obtain a sharpened time-frequency diagram;
s305, an edge detection module is used for processing the sharpened time-frequency diagram to obtain an edge time-frequency diagram;
s306, a longitudinal smoothing module is used for processing the edge time-frequency diagram to obtain a longitudinal edge time-frequency diagram;
s307, a frequency band roughing module, which is used for detecting the longitudinal edge time-frequency diagram to obtain roughing frequency band information of the unmanned aerial vehicle signal;
s308, a frequency band screening module is used for screening rough frequency band information of the unmanned aerial vehicle signals to obtain frequency band information of the unmanned aerial vehicle signals.
Example IV
Referring to fig. 6, fig. 6 is a schematic structural diagram of another signal frequency band detection device for an unmanned aerial vehicle according to an embodiment of the present invention. The unmanned aerial vehicle signal frequency band detection device described in fig. 6 is applied to the unmanned aerial vehicle signal frequency band detection field, and the embodiment of the invention is not limited. As shown in fig. 6, the unmanned aerial vehicle signal frequency band detection device may include the following operations:
A memory 401 storing executable program codes;
a processor 402 coupled with the memory 401;
the processor 402 invokes executable program codes stored in the memory 401 for performing the steps in the unmanned aerial vehicle signal frequency band detection method described in the first and second embodiments.
The apparatus embodiments described above are merely illustrative, in which the modules illustrated as separate components may or may not be physically separate, and the components shown as modules may or may not be physical, i.e., may be located in one place, or may be distributed over multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above detailed description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course by means of hardware. Based on such understanding, the foregoing technical solutions may be embodied essentially or in part in the form of a software product that may be stored in a computer-readable storage medium including Read-Only Memory (ROM), random-access Memory (Random Access Memory, RAM), programmable Read-Only Memory (Programmable Read-Only Memory, PROM), erasable programmable Read-Only Memory (Erasable Programmable Read Only Memory, EPROM), one-time programmable Read-Only Memory (OTPROM), electrically erasable programmable Read-Only Memory (EEPROM), compact disc Read-Only Memory (Compact Disc Read-Only Memory, CD-ROM) or other optical disc Memory, magnetic disc Memory, tape Memory, or any other medium that can be used for computer-readable carrying or storing data.
Finally, it should be noted that: the embodiment of the invention discloses a method and a device for detecting a signal frequency band of an unmanned aerial vehicle, which are disclosed by the embodiment of the invention and are only used for illustrating the technical scheme of the invention, but not limiting the technical scheme; although the invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art will understand that; the technical scheme recorded in the various embodiments can be modified or part of technical features in the technical scheme can be replaced equivalently; such modifications and substitutions do not depart from the spirit and scope of the corresponding technical solutions.