Intelligent identification method for urban low-altitude patrol unmanned aerial vehicle
Through the intelligent identification method of urban low-altitude patrol drones, the calculation of HSV images and moment feature values is used to generate tracking and time, and the problems of low robustness and low computing efficiency in the existing technology are solved, and more efficient target tracking and patrol are achieved.
Patent Information
- Application Number
- CN202510101805.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-22
- Publication Date
- 2025-05-30
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing urban low-altitude patrol drones have low robustness and low computing efficiency when identifying and tracking mobile targets, resulting in low patrol efficiency.
An intelligent recognition method is adopted to pre-process the low-altitude images, convert them into HSV images, calculate the number of grayscale times and moment feature values, determine the center of mass and change coordinates of the target object, calculate the movement speed and differential values, generate the pursuit route and pursuit time, and send it to the drone control module.
It improves the robustness and computing efficiency of drone identification, improves the efficiency of tracking and patrols, and can accurately and quickly identify and track fast moving targets.
Smart Images

Figure CN120071196A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of low-altitude drones, and particularly to an intelligent recognition method for urban low-altitude patrol drones. Background Art
[0002] Low-altitude drones generally refer to unmanned aerial vehicles or remotely piloted aircraft, which are unmanned aircraft controlled by radio remote control equipment or programmed. They have the advantages of small size, light weight, easy transportation and portability, and have shown extensive application value in many fields. For example, they have important applications in reconnaissance and surveillance, agricultural plant protection, logistics distribution, search and rescue, power inspection, environmental monitoring, film and television aerial photography, etc. In the application of urban low-altitude patrol, it mainly reduces the pressure of human allocation for urban security and increases the efficiency of quickly searching for and quickly arriving at the scene of urban accidents. However, existing urban low-altitude patrol drones have low robustness to the shape change of the target after the perspective changes, low computational efficiency, and it is difficult to accurately and quickly track fast-moving targets during the automatic tracking process, resulting in low patrol efficiency. Summary of the Invention
[0003] Aiming at the deficiencies of the prior art, the present invention provides an intelligent recognition method for urban low-altitude patrol drones, which solves the technical problems of low robustness, low computational efficiency and low tracking and patrol efficiency in the prior art, and achieves the purpose of improving the robustness and computational efficiency of drone recognition and enhancing the tracking and patrol efficiency.
[0004] To solve the above technical problems, the present invention provides the following technical solution: an intelligent recognition method for urban low-altitude patrol drones, the method comprising the following steps:
[0005] S1. Collect low-altitude images of area A in any city at time t, and preprocess the low-altitude images to obtain preprocessed images;
[0006] S2. Convert the preprocessed images into HSV images, and calculate the gray-level times h of the HSV images f ;
[0007] S3. Select the target object in the HSV image, and calculate the moment eigenvalue of the target object according to the gray-level times h f ;
[0008] S4. Collect HSV images at consecutive times after time t, determine the centroid coordinates ZX tc and the change coordinates Zx t+1 of the target object according to the moment eigenvalue, and calculate the moving value Yd t+1 of the change coordinates Zx K and the positive angle value tanμ;
[0009] S5. Calculate the changed coordinate Zx according to the movement value Yd K and the positive angle value tanμ, and calculate the movement speed v t+1 of, and calculate the changed coordinate Zx nb , and calculate the differential speed value ΔCv t+1 between the changed coordinate Zx f (Wx e , Vy f );
[0010] S6. Calculate the pursuit route Xs according to the centroid coordinate ZX tc , and determine the pursuit time Tc according to the differential speed value ΔCv k (Wx f , Vy e ); f ; u ;
[0011] S7. Send the pursuit route Xs k and the pursuit time Tc u of the UAV to the control module of the UAV.
[0012] Preferably, in step S1, the specific implementation steps are as follows:
[0013] S11. Select a pixel point D(a x , b y ) in the low-altitude image. With the pixel point D(a x , b y ) as the center and radius l, determine the neighborhood m of the pixel point D(a x , b y );
[0014] S12. Calculate the filtered pixel point D' according to the neighborhood m of the pixel point D(a x , b y ). The calculation formula is:
[0015]
[0016] where xy represents the total number of the low-altitude image, a x represents the abscissa of the x-th pixel point, and b y represents the ordinate of the y-th pixel point;
[0017] S13. Calculate all the pixel points of the low-altitude image and obtain the filtered image;
[0018] S14. Select a filtered pixel point X(e a , f b ) in the filtered image, and calculate the enhanced adjustment point A of the filtered pixel point X(e a , f b )zq , the calculation formula is:
[0019] A zq = (L - 1)·CDF[X(e a , f b )]
[0020] Among them, L represents the gray level of the pixel point X(e a , f b ), and CDF[X(e a , f b )] represents the cumulative function value of the pixel point X(e a , f b );
[0021] S15. Convert all filtered pixel points X in the filtered image into enhanced adjustment points A zq , and obtain the preprocessed image.
[0022] Preferably, in step S2, the specific implementation steps are as follows:
[0023] S21. Select a pixel point C in the preprocessed image, and obtain the red domain value R, green domain value G, and blue domain value B of the pixel point C in the RGB space;
[0024] S22. Calculate the conversion values H, S, and V of the pixel point C in the HSV space, and convert the preprocessed image into an HSV image. The calculation formula is:
[0025]
[0026] V = max(R, G, B)
[0027] Among them, min(R, G, B) represents the minimum value of the red domain value R, green domain value G, and blue domain value B of the pixel point c;
[0028] S23. Convert the HSV image into histogram bins by the box plot method, and obtain the bin index v and the index value S(a i ) mapped to the bins based on the number of bins in the histogram. Among them, a i represents the i-th pixel point in the HSV image;
[0029] S24. Calculate the gray level count h f of the HSV image, and the calculation formula is:
[0030]
[0031] Among them, h f represents the number of pixel points with pixel value f, that is, the gray level count, and σ[S(a i ) - v] represents the index value S(ai ) and the variable values of the bin index v as independent variables, L represents the highest gray level in the image, and n represents the number of pixel points in the HSV image.
[0032] Preferably, in step S3, the specific implementation steps are as follows:
[0033] S31. Select an object as the target object in the HSV image at time t by means of active selection, and obtain multiple pixel points T(g e , h j ) of the target object;
[0034] S32. Calculate the color analysis value F e , h j ) of the pixel point T(g ys ) of the target object, and the calculation formula is:
[0035]
[0036] Among them, F ys represents the s-th color analysis value;
[0037] S33. Calculate the moment feature values of the target object according to the color analysis value F ys . The moment feature values include the zero moment value L z , the horizontal moment value X b and the vertical moment value Y c , and the calculation formula is:
[0038] L z = ΣF ys
[0039]
[0040] Among them, g e represents the abscissa value of the pixel point T, and h j represents the ordinate value of the pixel point T, and m and l represent the number of pixel points T.
[0041] Preferably, in step S4, the specific implementation steps are as follows:
[0042] S41. Taking the HSV image at time t as the starting point, sort the HSV images after time t in chronological order to obtain a sorted image set, and obtain two adjacent HSV images at time t and t + 1 in the sorted image set;
[0043] S42. In the HSV image at time t, calculate the centroid coordinates ZX tc (p c , q o ) according to the moment feature values, and the calculation formula is:
[0044]
[0045] Among them, p c represents the abscissa of the centroid coordinate ZX tc and q o represents the ordinate of the centroid coordinate ZX tc ;
[0046] S43. Traverse each pixel point in the HSV image at time t + 1, and use the pixel point Zx tc (p c , q o ) with the same moment eigenvalue as the centroid coordinate ZX t+1 (r a , s p ) as the change coordinate at time t + 1;
[0047] S44. Calculate the movement value Yd t+1 of the change coordinate Zx K , and the calculation formula is:
[0048]
[0049] Among them, Yd K represents the Kth movement value;
[0050] S45. Calculate the positive angle value tanμ of the centroid coordinate, and the calculation formula is:
[0051]
[0052] Among them, μ represents the included angle between the line connecting the centroid coordinate ZX tc at time t and the centroid coordinate Zx t+1 at time t + 1 and the latitude line.
[0053] Preferably, in step S5, the specific implementation steps are as follows:
[0054] S51. Calculate the movement speed v K of the change coordinate according to the movement value Yd nb (v ax , v ay ), and the calculation formula is:
[0055]
[0056] Among them, v ax represents the component velocity along the latitude line direction, v ay represents the component velocity along the longitude line direction, and Δt represents the change amount of time;
[0057] S52. Obtain the centroid coordinate Zm at time t + nt+n (t d ,u r ), calculate the positive angle value tanπ at time t + n. The calculation formula is:
[0058]
[0059] where π represents the centroid coordinate ZX at time t tc and the centroid coordinate Zm at time t + n t+n the included angle between the connecting line and the latitude line;
[0060] S53. Calculate the moving direction δ of the centroid coordinate according to the positive angle value tanπ and the positive angle value tanμ. The calculation formula is:
[0061]
[0062] where δ represents the included angle between the direction of the centroid coordinate ZX at time t tc and the latitude line;
[0063] S54. Obtain the maximum flight speed wv of the drone max , and calculate the differential speed value ΔCv between the drone and the changing coordinate according to the moving direction δ f (Wx e , Vy f ). The calculation formula is:
[0064] Wx e = wv max cosδ - v ax
[0065] Vy f = wv max sinδ - v ay
[0066] where Wx e represents the differential speed value along the latitude line direction in the relative speed between the drone and the centroid coordinate, and Vy f represents the differential speed value along the longitude line direction in the relative speed between the drone and the centroid coordinate.
[0067] Preferably, in step S6, the specific implementation steps are as follows:
[0068] S61. Map the drone into the HSV image through the camera projection transformation method, and obtain the machine point coordinates of the drone at time t as Rj g (Zx s , Zw t ) by the geometric center method;
[0069] S62. According to the machine point coordinates Rj g (Zxs , Zw t ) Calculate the movement deviation angle θ of the UAV. The calculation formula is:
[0070]
[0071] where θ represents the centroid coordinate ZX at time t tc and the aircraft point coordinate Rj g (Zx s , Zw t )'s connection line and the included angle with the latitude line;
[0072] S63. Adjust the direction of the UAV according to the movement deviation angle θ of the UAV, and calculate the movement coordinate Rj of the UAV at time t+1 t+1 (Yx h , Yw q ) and the spacing R. The calculation formulas are:
[0073] Yx h = Zx s + wv max Δt
[0074] Yw q = Zw t + wv max Δt
[0075]
[0076] where Yx h represents the abscissa of the h-th aircraft point coordinate, and Yw q represents the ordinate of the q-th aircraft point coordinate;
[0077] S64. Judge whether the UAV catches up with the target object according to the spacing R;
[0078] If R = 0, then the target object is caught up and the process ends;
[0079] If R≠0, then the target object is not caught up, save the movement coordinate Rj t+1 (Yx h , Yw q ) and return to step S61 to replace the aircraft point coordinate Rj g (Zx s , Zw t ) with the movement coordinate Rj t+1 (Yx h , Yw q );
[0080] S64. The multiple movement coordinates Rj in steps S61 - S63 t+n (Yx h+n , Ywq+n ) where n represents the nth moving coordinate, n = 1, 2... n, and a pursuit route Xs is generated based on multiple moving coordinates k ;
[0081] S65. According to the centroid coordinate ZX at time t tc (p c , q o ) and the machine point coordinate is Rj g (Zx s , Zy v ) to calculate the pursuit time Tc u .
[0082] Preferably, the calculation formula of the pursuit route Xs k is:
[0083] Xs k = a f Yx h+n 2 + b l Yw q+n 2 + I
[0084] where Yx h+n , Yw q+n respectively represent the abscissa and ordinate of the nth machine point coordinate, and a f , b l and I respectively represent route coefficients.
[0085] Preferably, the calculation formula of the pursuit time Tc u is:
[0086]
[0087] where Tc u represents the pursuit time of the u-th target object.
[0088] With the above technical solutions, the present invention provides an intelligent recognition method for an urban low-altitude patrol unmanned aerial vehicle, which at least has the following beneficial effects:
[0089] 1. Through the gray-level times and HSV images, the present invention can improve the accuracy and efficiency of feature recognition of images in the image recognition process through color, depth, and light-dark relationships. The gray-level times can facilitate the subsequent calculation of moment eigenvalues, and gray-scale grading of the pixels in the image can not only optimize the image quality but also improve the image processing efficiency.
[0090] 2. Through the calculation of moment eigenvalues, the present invention can not only calculate the eigenvalues of the target object, facilitating the subsequent tracking of the target object, but also enhance the robustness of the calculation process, improve the calculation efficiency, and has the advantage of good real-time performance. It can accurately identify the object features after the object shape changes, thereby improving the accuracy of object recognition.
[0091] 3. Through the calculation of the pursuit route and pursuit time, the present invention can calculate the different positions and different angles of the target object and the drone in real time through the changes of coordinates and angles, quickly calculate the gap value and pursuit time between the two. During the calculation process, it is calculated based on the characteristics of relative motion, regarding the target object as relatively stationary for calculation, and significantly improving the accuracy and calculation efficiency of the recognition method. BRIEF DESCRIPTION OF THE DRAWINGS
[0092] The drawings described herein are used to provide a further understanding of the present application and form a part of the present application. The schematic embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation to the present application. In the drawings:
[0093] Figure 1 is a flowchart of an intelligent recognition method for an urban low-altitude patrol drone of the present invention;
[0094] Figure 2 is a schematic diagram of the principle of generating the pursuit route of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0095] To make the above objects, features, and advantages of the present invention more obvious and understandable, the present invention will be further described in detail below with reference to the drawings and specific embodiments. Thereby, a full understanding of the implementation process of how the present application uses technical means to solve technical problems and achieve technical effects can be obtained and implemented accordingly.
[0096] Due to the technical problems of low robustness, low calculation efficiency, and low tracking and patrol efficiency in the prior art, please refer to Figure 1 - Figure 2 , this embodiment provides an intelligent recognition method for an urban low-altitude patrol drone, improving the robustness and calculation efficiency of drone recognition, and enhancing the tracking and patrol efficiency. The method includes the following steps:
[0097] S1. Collect the low-altitude image of area A in a city at time t, and preprocess the low-altitude image to obtain a preprocessed image; during the patrol of the city, collect the real-time low-altitude image over the city. After the image is collected, it is not clear due to factors such as noise and light, and the image needs to be preprocessed. In step S1, the specific implementation steps are as follows:
[0098] S11. Select a pixel point D(a x , by ), with the pixel point D(a x , b y ) as the center and a radius of l to determine the neighborhood m of the pixel point D(a x , b y ); generally, the radius l is set relatively small. In practice, the radius l is set to 3 - 5 times the size of the pixel point to enable the neighborhood m to effectively perform the filtering function.
[0099] S12. Calculate the filtered pixel point D' according to the neighborhood m of the pixel point D(a x , b y ). The calculation formula is:
[0100]
[0101] where xy represents the total number of low - altitude images, a x represents the abscissa of the x - th pixel point, b y represents the ordinate of the y - th pixel point, and xy represents the total number of pixel points within the neighborhood m;
[0102] S13. Complete the calculation of all pixel points of the low - altitude image and obtain the filtered image;
[0103] S14. Select a filtered pixel point X(e a , f b ) in the filtered image and calculate the enhancement adjustment point A a , f b ) of the filtered pixel point X(e zq . The calculation formula is:
[0104] A zq =(L - 1)·CDF[X(e a , f b )]
[0105] where L represents the gray - level of the pixel point X(e a , f b ), and CDF[X(e a , f b )] represents the cumulative function value of the pixel point X(e a , f b ); the UAV image may have insufficient contrast due to factors such as lighting conditions and camera performance, affecting the accuracy of image recognition. Processing the enhancement adjustment point A zq can improve the brightness difference between different objects in the image, making the image clearer and easier to recognize.
[0106] S15. Convert all filtered pixel points X in the filtered image into enhancement adjustment points A zq, and obtain a preprocessed image. Through operations such as filtering and enhancing adjustment points, it can avoid insufficient contrast in drone images caused by factors such as lighting conditions and camera performance, which may affect the accuracy of image recognition, and enhance adjustment point A zq Processing can improve the brightness difference between different objects in the image, making the image clearer and easier to recognize.
[0107] S2. Convert the preprocessed image into an HSV image and calculate the gray-level count h of the HSV image f ; The preprocessed image is a conventional color RGB image, which is not conducive to target recognition and operation and needs to be processed again. In step S2, the specific implementation steps are as follows:
[0108] S21. Select a pixel point C in the preprocessed image and obtain the red domain value R, green domain value G, and blue domain value B of pixel point C in the RGB space;
[0109] S22. Calculate the conversion values H, S, and V of pixel point C in the HSV space and convert the preprocessed image into an HSV image. The calculation formula is:
[0110]
[0111] V = max(R, G, B)
[0112] Among them, min(R, G, B) represents the minimum value of the red domain value R, green domain value G, and blue domain value B of pixel point C; Converting the RGB image into an HSV image can improve the accuracy and efficiency of feature recognition in the image during the image recognition process through color, depth, and light and dark relationships.
[0113] S23. Convert the HSV image into histogram bins through the box plot method and obtain the bin index v and the index value S mapped to the bin based on the number of bins in the histogram bin (a i ), where a i represents the i-th pixel point in the HSV image; The box plot method is a commonly used method for processing image grayscale and will not be elaborated here. The bin index and the index value of the bin are commonly used values in histogram bins.
[0114] S24. Calculate the gray-level count h of the HSV image f , and the calculation formula is:
[0115]
[0116] Among them, h f represents the number of pixel points with pixel value f, that is, the gray-level count, and σ[S(a i ) - v] represents the index value S(a i) and the variable values of the bin index v as independent variables, L represents the highest gray level in the image, n represents the number of pixels in the HSV image, and h represents the gray level count f The number of pixels that can reflect a certain pixel value. Through the gray level count and the HSV image, the accuracy and efficiency of feature recognition in the image can be improved through color, depth, and light and dark relationships. The gray level count can facilitate the subsequent calculation of moment eigenvalues, and grading the pixels in the image by gray level can not only optimize the image quality but also improve the image processing efficiency.
[0117] S3. Select the target object in the HSV image and calculate the moment eigenvalues of the target object according to the gray level count h f Calculate the moment eigenvalues of the target object; through the gray level count h f Further calculation is still required to obtain the eigenvalues of the target. In step S3, the specific implementation steps are as follows:
[0118] S31. Select an object as the target object in the HSV image at time t through an active selection method and obtain multiple pixels T(g e , h j ) of the target object; The active selection methods include manual selection and automatic recognition through the characteristics of urban emergencies. It is necessary to use a convolutional neural network model to learn and recognize the characteristics of emergencies. Since the above methods are common active recognition methods, they will not be elaborated here.
[0119] S32. Calculate the color analysis value F e , h j ) of the pixels T(g ys ) of the target object, and the calculation formula is:
[0120]
[0121] where F ys represents the s-th color analysis value; In order to facilitate the extraction of eigenvalues, it is necessary to perform arithmetic processing on the color analysis value. The color analysis value can show the probability of the pixel in the histogram.
[0122] S33. Calculate the moment eigenvalues of the target object according to the color analysis value F ys . The moment eigenvalues include the zero moment value L z , the horizontal moment value X b and the vertical moment value Y c , and the calculation formula is:
[0123] L z =∑F ys
[0124]
[0125] Among them, g e represents the abscissa value of pixel point T, h j represents the ordinate value of pixel point T, m and l represent the number of pixel points T. Through the calculation of moment eigenvalues, not only can the eigenvalue of the target object be obtained for subsequent tracking of the target object, but also the robustness of the operation process can be improved, the operation efficiency can be enhanced, and it has the advantage of good real-time performance. It can accurately identify the object characteristics after the object shape changes, thereby improving the accuracy of object recognition.
[0126] S4. Collect the HSV images at consecutive moments after time t, and determine the centroid coordinates ZX tc and the change coordinates Zx t+1 of the target object, and calculate the movement value Yd t+1 and the positive angle value tanμ of the change coordinates Zx K . After processing the eigenvalue of the target object, it is also necessary to identify the target object in the image and perform coordinate operations to facilitate the calculation of the pursuit situation between the UAV and the target object. In step S4, the specific implementation steps are as follows:
[0127] S41. Starting from the HSV image at time t, sort the HSV images after time t in chronological order to obtain a sorted image set, and obtain two adjacent HSV images at time t and time t + 1 in the sorted image set; sorting in chronological order can know the movement situation of the target object.
[0128] S42. In the HSV image at time t, calculate the centroid coordinates ZX tc (p c , q o ) according to the moment eigenvalue, and the calculation formula is:
[0129]
[0130] Among them, p c represents the abscissa of the centroid coordinates ZX tc , q o represents the ordinate of the centroid coordinates ZX tc ;
[0131] S43. Traverse each pixel point in the HSV image at time t + 1, and use the pixel point Zx tc (p c , q o ) with the same moment eigenvalue as the centroid coordinates ZX t+1 (r a , s p ) as the change coordinates at time t + 1;
[0132] S44. Calculate the change coordinates Zxt+1 The moving value Yd K , and the calculation formula is:
[0133]
[0134] where Yd K represents the Kth moving value;
[0135] S45. Calculate the positive angle value tanμ of the centroid coordinate, and the calculation formula is:
[0136]
[0137] where μ represents the included angle between the line connecting the centroid coordinate ZX at time t and the centroid coordinate Zx at time t + 1 and the latitude line. Through the moving value Yd tc and the positive angle value tanμ, the moving distance and direction of the target object can be understood, which is conducive to the calculation of the pursuit situation between the UAV and the target object. The calculation process is simple and fast, improving the operation efficiency. t+1 and the positive angle value tanμ can understand the moving distance and direction of the target object, and then is conducive to the calculation of the pursuit situation between the UAV and the target object. The calculation process is simple and fast, improving the operation efficiency. K and the positive angle value tanμ can understand the moving distance and direction of the target object, and then is conducive to the calculation of the pursuit situation between the UAV and the target object. The calculation process is simple and fast, improving the operation efficiency.
[0138] S5. Calculate the moving speed v K of the changing coordinate Zx t+1 according to the moving value Yd nb and the positive angle value tanμ, and calculate the differential speed value ΔCv t+1 between the changing coordinate Zx f (Wx e , Vy f ); In order to make the operation more accurate, in this process, through the relative speed, the target object can be regarded as stationary, improving the accuracy of the operation. In step S5, the specific implementation steps are as follows:
[0139] S51. Calculate the moving speed v K of the changing coordinate according to the moving value Yd nb (v ax , v ay ), and the calculation formula is:
[0140]
[0141] where v ax represents the component speed along the latitude line direction, v ay represents the component speed along the longitude line direction, and Δt represents the change amount of time; Decomposing the speed into two directions of longitude and latitude can facilitate the calculation of the speed after the positions of both the UAV and the target object have changed in subsequent steps, and is also conducive to the calculation of the differential speed value.
[0142] S52. Obtain the centroid coordinate Zm at time t + n t+n(t d ,u r ), calculate the positive angle value tanπ at time t + n, and the calculation formula is:
[0143]
[0144] where π represents the centroid coordinate ZX at time t tc and the centroid coordinate Zm at time t + n t+n the included angle between the connecting line and the latitude line;
[0145] S53. Calculate the moving direction δ of the centroid coordinate according to the positive angle value tanπ and the positive angle value tanμ, and the calculation formula is:
[0146]
[0147] where δ represents the included angle between the direction of the centroid coordinate ZX at time t tc and the latitude line; through the calculation of the inverse trigonometric function, the approximate moving direction can be found during the change of the moving angle of the target object, which is convenient for determining the moving direction of the UAV.
[0148] S54. Obtain the maximum flight speed wv of the UAV max , and calculate the differential velocity value ΔCv between the UAV and the changing coordinate according to the moving direction δ f (Wx e , Vy f ), and the calculation formula is:
[0149] Wx e = wv max cosδ - v ax
[0150] Vy f = Wv max sinδ - v ay
[0151] where Wx e represents the differential velocity value along the latitude line direction in the relative velocity between the UAV and the centroid coordinate, and Vy f represents the differential velocity value along the longitude line direction in the relative velocity between the UAV and the centroid coordinate. Through the calculation of the differential velocity value ΔCv f (Wx e , Vy f ), the target object can be regarded as relatively stationary for calculation, and the accuracy and calculation efficiency of the recognition method are greatly improved.
[0152] S6. Calculate the pursuit route Xs according to the centroid coordinate ZX tc , and according to the differential velocity value ΔCv k (Wx f (Wxe , Vy f ) Determine the pursuit time Tc u ; Through the differential speed value ΔCv f (Wx e , Vy f ) Further obtain the pursuit route Xs k and the pursuit time Tc u , In step S6, the specific implementation steps are as follows:
[0153] S61. Map the UAV to the HSV image through the camera projection transformation method, and obtain the aircraft point coordinates of the UAV at time t as Rj g (Zx s , Zw t ); The camera projection transformation method and the geometric center method are common methods for processing the mapping of objects in images and finding the geometric centers of objects, and can be implemented without other steps, so no more details will be provided here.
[0154] S62. Calculate the moving deflection angle θ of the UAV according to the aircraft point coordinates Rj g (Zx s , Zw t ), and the calculation formula is:
[0155]
[0156] where θ represents the angle between the line connecting the centroid coordinate ZX at time t tc and the aircraft point coordinates Rj g (Zx s , Zw t ) and the latitude line; The moving deflection angle θ can be understood as the direction of the speed adjusted by the UAV before pursuit.
[0157] S63. Adjust the direction of the UAV according to the moving deflection angle θ of the UAV, and calculate the moving coordinates Rj of the UAV at time t + 1 t+1 (Yx h , Yw q ), and the spacing R, and the calculation formulas are:
[0158] Yx h = Zx s + wv max Δt
[0159] Yw q = Zw t + wv max Δt
[0160]
[0161] where Yx hRepresents the abscissa of the coordinate of the h-th machine point, Yw q Represents the ordinate of the coordinate of the q-th machine point;
[0162] S64. Determine whether the UAV has caught up with the target object according to the spacing R;
[0163] If R = 0, then the target object has been caught up with, and the process ends;
[0164] If R ≠ 0, then the target object has not been caught up with, and the moving coordinate Rj is saved t+1 (Yx h , Yw q ) and return to step S61, and replace the machine point coordinate Rj g (Zx s , Zw t ) with the moving coordinate Rj t+1 (Yx h , Yw q ); During this process, if caught up, it can end. If not caught up, the previous moving coordinate Rj t+1 (Yx h , Yw q ) is used to connect the lines to facilitate obtaining the pursuit route of the UAV's movement.
[0165] S64. Generate a pursuit route Xs from multiple moving coordinates Rj t+n (Yx h+n , Yw q+n ) in steps S61 - S63, where n represents the n-th moving coordinate, n = 1, 2... n. The calculation formula is: k :
[0166] Xs k = a f Yx h+n 2 + b l Yw q+n 2 + I
[0167] where Yx h+n , Yw q+n respectively represent the abscissa and ordinate of the n-th machine point coordinate, and a f , b l and I respectively represent the route coefficients; This step does not perform any operations on the pursuit route Xs kCurve fitting is carried out. First, because the route is a curve only in the first half and a straight line in the second half, using fitting optimization in dealing with the straight line is likely to reduce the operation efficiency. Second, in actual experiments, when the drone discovers a target during low-altitude patrol in the city, in most cases, it moves directly forward in a straight line, and there are few curve processes. The present invention only gives the expression of the curve in the first half, and the straight-line expression is a commonly used and simple representation method, which will not be elaborated here. Therefore, the generated route can be directly used without fitting and optimizing the pursuit route Xs. k Perform fitting and optimization.
[0168] S65. According to the centroid coordinates ZX at time t tc (p c , q o ) and the aircraft point coordinates are Rj g (Zx s , Zy v ) to calculate the pursuit time Tc u , and the calculation formula is:
[0169]
[0170] Among them, Tc u represents the pursuit time of the u-th target object. Through the calculation of the pursuit route and the pursuit time, the different positions and different angles of the target object and the drone can be calculated in real time through the changes of coordinates and angles, and the gap value and pursuit time between the two can be quickly calculated. During the calculation process, it is calculated according to the characteristics of relative motion, regarding the target object as relatively stationary for calculation, and the accuracy and calculation efficiency of the recognition method are greatly improved.
[0171] S7. Send the pursuit route Xs of the drone k and the pursuit time Tc u to the control module of the drone. The sent pursuit route Xs k and the pursuit time Tc u are sent in real time, or the latest pursuit route Xs k and the pursuit time Tc u, through the gray-level times and HSV images, the present invention can improve the accuracy and efficiency of feature recognition of images in the image recognition process through color, depth, and light and dark relationships. The gray-level times can facilitate the subsequent calculation of moment eigenvalues, grading the pixels in the image into gray levels, which can not only optimize the image quality but also improve the image processing efficiency. Through the calculation of the pursuit route and pursuit time, the different positions and different angles of the target object and the drone can be calculated in real time through the changes in coordinates and angles, quickly calculating the difference value and pursuit time between the two. During the calculation process, the calculation is carried out based on the characteristics of relative motion, regarding the target object as relatively stationary for calculation, greatly improving the accuracy rate and calculation efficiency of the recognition method.
[0172] Those of ordinary skill in the art can understand that all or part of the steps in the methods of the above embodiments can be completed by instructing relevant hardware through a program. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program codes.
[0173] The above embodiments have introduced the present invention in detail. Specific examples are used in this article to elaborate on the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present invention.
Claims
1. An intelligent identification method for urban low-altitude patrol drones, characterized in that: The method comprises the following steps: S1, collecting low-altitude images of area A in any city at time t, and preprocessing the low-altitude images to obtain preprocessed images; S2. Convert the preprocessed image into an HSV image and calculate the grayscale level h of the HSV image f ; S3, select the target object in the HSV image, and calculate the gray level according to the gray level h. f Calculate the moment eigenvalues of the target object; S4, collect HSV images at consecutive moments after time t, and determine the centroid coordinates ZX of the target object based on the moment eigenvalue tc and the change coordinate Zx t+1 , and calculate the change coordinate Zx t+1 The moving value Yd K and positive angle value tanμ; S5, according to the moving value Yd K And the positive angle value tanμ calculates the change coordinate Zx t+1 The moving speed v nb , and calculate the change coordinate Zx t+1 The speed difference with the drone ΔCv f (Wx e , Vy f ); S6, according to the centroid coordinate ZX tc Calculate the pursuit route Xs k , according to the differential value ΔCv f (Wx e , Vy f ) Determine the catch-up time Tc u ; S7, set the drone's pursuit route to Xs k and catch-up time Tc u Sent to the drone's control module.
2. The intelligent identification method according to claim 1, characterized in that: In step S1, the specific implementation steps are as follows: S11, select a pixel point D(a x , b y ), with pixel D(a x , b y ) is the center of the circle and the radius is l to determine the pixel D(a x , b y )’s neighborhood m; S12, according to the pixel point D (a x , b y )’s neighborhood m calculates the filtered pixel point D’, and the calculation formula is: Among them, x y Represents the total number of pixels in the low-altitude image, a x Indicates the horizontal coordinate of the x-th pixel, b y Indicates the y-th pixel ordinate; S13, calculating all the pixels of the low-altitude image and obtaining a filtered image; S14, select a filter pixel point X(e) in the filter image a , f b ), calculate the filtered pixel point X(e a , f b ) of the enhanced adjustment point A zq , the calculation formula is: A zq =(L-1)·CDF[X(e a ,f b )] Among them, L represents the pixel point X(e a , f b ) gray level, CDF[X(e a , f b )] represents the pixel point X(e a , f b )’s cumulative function value; S15, converting all filtered pixel points X in the filtered image into enhanced adjustment points A zq , and get the preprocessed image.
3. The intelligent identification method according to claim 1, characterized in that: In step S2, the specific implementation steps are as follows: S21, selecting a pixel point C in the preprocessed image, and obtaining the red domain value R, green domain value G, and blue domain value B of the pixel point C in the RGB space; S22, calculate the conversion values H, S and V of the pixel point C in the HSV space, and convert the preprocessed image into an HSV image. The calculation formula is: V = max(R, G, B) Wherein, min(R, G, B) represents the minimum value of the red domain value R, green domain value G, and blue domain value B of the pixel point C; S23, convert the HSV image into a histogram box by using the box plot method, and obtain the box index v and the index value S (a) mapped to the box based on the number of boxes in the histogram box. i ), where a i Represents the i-th pixel in the HSV image; S24, calculate the gray level number h of the HSV image f , the calculation formula is: Among them, h f represents the number of pixels with a pixel value of f, that is, the number of gray levels, σ(S(a i )-v] represents the index value S(a i ) and the bin index v as the variable values of the independent variables, L represents the highest gray level in the image, and n represents the number of pixels in the HSV image.
4. The intelligent identification method according to claim 1, characterized in that: In step S3, the specific implementation steps are as follows: S31, select an object as the target object in the HSV image at time t by active selection, and obtain multiple pixel points T (g e ,h j ); S32, calculate the pixel point T(g e ,h j ) color analysis value F ys , the calculation formula is: Among them, F ys Represents the sth color analysis value; S33, according to the color analysis value F ys Calculate the moment eigenvalues of the target object, including the zero moment value L z , horizontal moment value X b and longitudinal moment value Y c , the calculation formula is: L z =∑F ys Among them, g e Indicates the horizontal coordinate value of pixel point T, h j represents the ordinate value of pixel point T, and m and l represent the number of pixel points T.
5. The intelligent identification method according to claim 1, characterized in that: In step S4, the specific implementation steps are as follows: S41, taking the HSV image at time t as the starting point, sorting the HSV images after time t in chronological order to obtain a sorted image set, and obtaining two adjacent HSV images at time t and time t+1 in the sorted image set; S42. In the HSV image at time t, calculate the centroid coordinates ZX according to the moment eigenvalues tc (p c ,q o ), the calculation formula is: Among them, p c Represents the centroid coordinates ZX tc The horizontal axis, q o Represents the centroid coordinates ZX tc The vertical coordinate of S43, traverse each pixel point in the HSV image at time t+1, and compare it with the centroid coordinate ZX tc (p c ,q o ) have the same moment eigenvalue as the pixel point Zx t+1 (r a ,s p ) as the change coordinates at time t+1; S44, calculate the change coordinate Zx t+1 The moving value Yd K , the calculation formula is: Among them, Yd K represents the Kth moving value; S45, calculate the positive angle value tanμ of the centroid coordinates, the calculation formula is: Where μ represents the centroid coordinate ZX at time t tc and the centroid coordinates Zx at time t+1 t+1 The angle between the line and the latitude line.
6. The intelligent identification method according to claim 1, characterized in that: In step S5, the specific implementation steps are as follows: S51, according to the movement value Yd K Calculate the moving speed v of the changing coordinates nb (v ax , v ay ), the calculation formula is: Among them, v ax represents the component velocity along the latitude line, v ay represents the component velocity along the longitude line, and Δt represents the change in time; S52. Obtain the centroid coordinate Zm at time t+n t+n (t d ,u r ), calculate the positive angle value tanπ at time t+n, the calculation formula is: Among them, π represents the coordinates of the center of mass ZX at time t tc and the center of mass coordinate Zm at time t+n t+n The angle between the connecting line and the latitude line; S53, calculating the moving direction δ of the centroid coordinates according to the positive angle value tanπ and the positive angle value tanμ, the calculation formula is: Among them, δ represents the centroid coordinate ZX at time t tc The angle between the direction of and the latitude line; S54. Get the maximum flight speed wv of the drone max , calculate the speed difference ΔCv between the drone and the change coordinates according to the moving direction δ f (Wx e , Vy f ), the calculation formula is: Wx e =wv max cosδ-v ax You f =wv max sinδ-v ay Among them, Wx e Represents the differential speed between the drone and the center of mass coordinate along the latitude line, Vy f Indicates the speed difference between the drone and the center of mass coordinates along the longitude line.
7. The intelligent identification method according to claim 1, characterized in that: In step S6, the specific implementation steps are as follows: S61, map the UAV to the HSV image by camera projection transformation method, and obtain the coordinates of the UAV point at time t as Rj by geometric center method g (Zx s , Zw t ); S62, according to the coordinates of the machine point Rj g (Zx s , Zw t ) Calculate the moving deflection angle θ of the drone, the calculation formula is: Among them, θ represents the centroid coordinate ZX at time t tc With the machine point coordinates Rj g (Zx s , Zw t ) and the latitude line; S63, adjust the direction of the drone according to the moving angle θ of the drone, and calculate the moving coordinates Rj of the drone at time t+1 t+1 (Yx h , Y q ) and spacing R, the calculation formula is: Yx h =Zx s +wv max Δt Yw q =Zw t +wv max Δt Among them, Yx h Indicates the horizontal coordinate of the hth machine point coordinate, Yw q Represents the ordinate of the qth machine point coordinate; S64, judging whether the UAV has caught up with the target object according to the distance R; If R = 0, the target object is caught up and the process ends; If R≠0, the target object is not caught up, and the moving coordinates Rj are saved. t+1 (Yx h , Y q ) and returns to step S61 to set the machine point coordinate Rj g (Zx s , Zw t ) is replaced by the moving coordinate Rj t+1 (Yx h , Y q ); S64, the multiple moving coordinates Rj in steps S61-S63 t+n (Yx h+n , Y q+n ), where n represents the nth moving coordinate, n = 1, 2...n, and the pursuit route Xs is generated according to multiple moving coordinates k ; S65, according to the centroid coordinate ZX at time t tc (p c ,q o ) and the coordinates of the machine point are Rj g (Zx s , Zy v ) Calculate the catch-up time Tc u .
8. The intelligent identification method according to claim 7, characterized in that: The pursuit route Xs k The calculation formula is: Xs k =a f Yx h+n 2 +b l Yw q+n 2 +I Among them, Yx h+n , Yw q+n Respectively represent the horizontal and vertical coordinates of the nth machine point coordinates, a f 、b l and I represent the route coefficients respectively.
9. The intelligent identification method according to claim 7, characterized in that: The catch-up time Tc u The calculation formula is: Among them, Tc u represents the pursuit time of the u-th target object.