Aerial image detection method, device, drone and storage medium
By detecting the saturation of the drone images and filtering out high-completeness images, the problem that low-completeness images captured by the drone affect environmental perception and surveying and mapping accuracy is solved, and the accuracy of functional applications is improved.
Patent Information
- Application Number
- CN202310768850.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-27
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2043-06-27
AI Technical Summary
The low-completeness images taken by drones affect environmental perception and the accuracy of plot mapping, and the existing technology lacks the detection link of image integrity.
By detecting the saturation of the image, determining the average saturation of each pixel row, judging the completeness of the image, and filtering out effective images with high integrity for functional applications.
It improves the accuracy of the UAV function application, ensures subsequent functional effects, and solves the problem of low-completeness images affecting the accuracy of the application.
Smart Images

Figure CN116958062B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of drone technology, and in particular to an aerial image detection method, device, drone, and storage medium. Background Art
[0002] With the advancement of science and technology, drones are becoming increasingly widely used, appearing more frequently in recent years. For example, drones are being used for power inspections, agricultural plant protection, aerial photography, high-altitude firefighting, emergency communications, and express logistics. As a key sensor in drones, the quality of the images they capture directly impacts their environmental perception and land surveying capabilities.
[0003] In existing technologies, drones directly process each image captured by their cameras to implement corresponding functional applications. For example, drones analyze the surrounding environment based on each camera image, or save each camera image as aerial survey data for surveying and mapping land. Because existing drones lack a process for checking image integrity, when cameras capture invalid images with low integrity, using these images to perceive the environment or map land can affect the accuracy of perception or mapping. Summary of the Invention
[0004] The present application provides an aerial image detection method, device, drone and storage medium, which detect the integrity of an image by detecting the saturation of the image to determine whether there are any missing images, thereby facilitating the subsequent screening of valid images with high integrity for use in various functional applications, and solving the problem in the prior art of affecting the accuracy of functional applications when using invalid images with low integrity.
[0005] In a first aspect, the present application provides an aerial image detection method, comprising:
[0006] Determining an average saturation of each pixel row in a first image captured by a camera mounted on the drone based on the saturation of each pixel in the first image;
[0007] determining a degree of integrity of the first image according to an average saturation of each pixel row;
[0008] Determine whether the first image has any missing parts according to the completeness of the first image.
[0009] In a second aspect, the present application provides an aerial image detection device, comprising:
[0010] a saturation determination module configured to determine an average saturation of each pixel row in a first image captured by a camera mounted on the drone based on the saturation of each pixel in the first image;
[0011] an integrity determination module, configured to determine the integrity of the first image according to the average saturation of each pixel row;
[0012] The first detection module is configured to determine whether the first image has any missing parts according to the completeness of the first image.
[0013] In a third aspect, the present application provides a drone, comprising:
[0014] One or more processors; a memory storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the aerial image detection method as described in the first aspect.
[0015] In a fourth aspect, the present application provides a storage medium comprising computer-executable instructions, which, when executed by a computer processor, are used to perform the aerial image detection method as described in the first aspect.
[0016] In the present application, a first image captured by a camera mounted on a drone is obtained, and based on the saturation of each pixel in the first image, the average saturation of each pixel in each row of the first image is determined to obtain the average saturation of each pixel row in the first image. Based on the average saturation of each pixel row in the first image, the integrity of the first image is detected, and based on the integrity of the first image, it is determined whether the first image is missing. Through the above technical means, the integrity of the first image can be quickly detected based on the saturation of the first image to determine whether the image is missing, which facilitates the subsequent screening of valid images with high integrity for use in various functional applications, improves the accuracy of functional applications, and further ensures the functional effects of subsequent functional applications, solving the problem in the prior art of affecting the accuracy of functional applications when invalid images with low integrity are used. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 This is a flow chart of an aerial image detection method provided in an embodiment of the present application;
[0018] Figure 2 is a flow chart for determining the average saturation of each pixel row in a first image provided by an embodiment of the present application;
[0019] Figure 3 is a schematic diagram of an invalid image with a missing lower portion provided by an embodiment of the present application;
[0020] Figure 4 is a flowchart of determining the integrity of a first image provided by an embodiment of the present application;
[0021] Figure 5 is a first schematic diagram of a first image provided in an embodiment of the present application;
[0022] Figure 6 is a second schematic diagram of the first image provided in an embodiment of the present application;
[0023] Figure 7 is a third schematic diagram of the first image provided in an embodiment of the present application;
[0024] Figure 8 This is a schematic structural diagram of an aerial image detection device provided in an embodiment of the present application;
[0025] Figure 9 Schematic diagram of the structure of a drone provided in an embodiment of the present application. DETAILED DESCRIPTION
[0026] In order to make the purpose, technical solutions and advantages of the present application clearer, the specific embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. It is understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. It should also be noted that, for ease of description, only some, but not all, of the contents related to the present application are shown in the accompanying drawings. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe each operation (or step) as a sequential process, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0027] The terms "first," "second," and the like in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of this application can be implemented in an order other than that illustrated or described herein, and that the objects distinguished by "first," "second," and the like are generally of the same type, and do not limit the number of objects; for example, the first object can be one or more. In addition, the term "and / or" in the specification and claims refers to at least one of the connected objects, and the character " / " generally indicates that the objects connected are in an "or" relationship.
[0028] The aerial image detection method provided in this embodiment can be performed by a drone, which can be implemented through software and / or hardware. The drone can be composed of two or more physical entities or a single physical entity. A drone refers to an aerial device that operates according to remote control commands or preset commands.
[0029] The drone is installed with at least one operating system. Based on the operating system, the drone can install at least one application. The application can be a native application of the operating system or an application downloaded from a third-party device or server. In this embodiment, the drone has at least one application that can execute the aerial image detection method.
[0030] For ease of understanding, this embodiment is described by taking a drone as an example of the subject that performs the aerial image detection method.
[0031] In one embodiment, when a drone is performing a plant protection mission, it can use its camera to capture images of the surrounding environment to perceive its surroundings. The captured images are then used to identify obstacles and circumvent them based on the identified obstacles to ensure operational safety. When performing a surveying mission, the drone uses its camera to capture images of the surveyed land parcels. These images are saved for use in constructing a land parcel model after the flight, or the land parcel model is constructed in real time based on the captured images. The images captured by the drone's camera during operations can be used in applications such as environmental perception and land parcel surveying, significantly enriching the drone's operational capabilities. If the camera's memory is insufficient during image capture, the lower portion of the image will be discarded when saving the currently captured image, resulting in incomplete images and low image integrity. Because existing drones lack a process for detecting image integrity, when the camera captures an invalid image with low integrity, the drone will use the remaining image to analyze the surrounding environment or construct a land parcel model, affecting the accuracy of the environmental analysis or modeling results.
[0032] In order to solve the problem in the above-mentioned prior art that the use of low-completeness invalid images affects the accuracy of functional applications, this embodiment provides an aerial image detection method, which detects the integrity of the image through the saturation of the image to determine whether there are any missing images, so as to facilitate the subsequent screening of high-completeness valid images for use in various functional applications.
[0033] Figure 1 A flowchart of an aerial image detection method provided by an embodiment of the present application is given. Figure 1 , the aerial image detection method specifically includes:
[0034] S110 : Determine an average saturation of each pixel row in the first image based on the saturation of each pixel point in the first image captured by the camera mounted on the drone.
[0035] In this embodiment, the first image can be understood as the image currently captured by the drone from the corresponding mounted camera. After the drone acquires the first image captured by the camera, it determines the saturation of each pixel in the first image and calculates the average saturation of all pixels in each row, row by row, to obtain the average saturation of each pixel row in the first image. A pixel row consists of pixels located in the same row in the first image.
[0036] When determining the average saturation of each pixel row in the first image, the first image can be converted from an RGB color space to a color space that includes saturation, and a saturation single-channel image can be extracted from the converted first image. The average saturation of each pixel row can be determined based on the saturation single-channel image. Color spaces that include saturation include the HSV color space and the HSL color space. This embodiment is described using the conversion of the first image from the RGB color space to the HSV color space as an example. Figure 2 This is a flow chart of determining the average saturation of each pixel row in the first image provided by an embodiment of the present application. Figure 2 As shown, the step of determining the average saturation of each pixel row in the first image specifically includes S1101-S1102:
[0037] S1101 . Convert a first image from an RGB color space to an HSV color space, and extract a saturation single-channel image from the converted first image.
[0038] S1102 : Determine the average saturation of each pixel row based on the saturation of each pixel in the saturation single-channel image.
[0039] Exemplarily, a red single-channel image, a green single-channel image, and a blue single-channel image are extracted from a first image in an RGB color space, and the values of each pixel in the red single-channel image, the green single-channel image, and the blue single-channel image are used. The minimum value and the maximum value are determined from the values of the pixel in the red, green, and blue channels. Based on a preset color space conversion formula, the values of each pixel in the red, green, and blue channels and the minimum value and the maximum value are used to determine the values of each pixel in the brightness channel, the saturation channel, and the hue channel. The color space conversion formula is as follows:
[0040] V=M
[0041]
[0042]
[0043] Among them, V is the value of the pixel in the brightness single channel, S is the value of the pixel in the saturation single channel, H is the value of the pixel in the hue single channel, G is the value of the pixel in the green single channel, R is the value of the pixel in the red single channel, B is the value of the pixel in the blue single channel, M is the maximum value of the pixel in the red, green and blue channels, and N is the minimum value of the pixel in the red, green and blue channels. After converting the first image to the HSV color space based on the above color space conversion formula, extract the saturation single channel image from the first image, and obtain the saturation of each pixel from the saturation single channel image. Sum the saturations of the pixels in the same row and divide them by the number of pixels in a row to obtain the average saturation of the corresponding pixel row. The average saturation calculation formula for the pixel row is:
[0044]
[0045] Where sat[i] is the average saturation of the i-th pixel row in the first image, col is the total number of columns in the first image, that is, the number of pixels in a row, and S(i,j) is the saturation of the pixel in the i-th row and j-th column in the first image. Based on the above formula for calculating the average saturation of pixel rows, the average saturation of each pixel row can be determined by the saturation of the pixels in each row.
[0046] S120 : Determine the completeness of the first image according to the average saturation of each pixel row.
[0047] For example, Figure 3 Schematic diagram of an invalid image with a missing lower portion provided by an embodiment of the present application. Figure 3 As shown, when the camera's memory is insufficient, the lower portion of the image content is lost when saving the currently captured image, resulting in a sudden change in the saturation of the upper and lower pixels in the image. Therefore, this embodiment proposes detecting whether the lower portion of the first image is missing based on the average saturation of each pixel row, thereby determining the integrity of the first image. Figure 4 This is a flow chart of determining the integrity of the first image provided by an embodiment of the present application. Figure 4 As shown, the step of determining the integrity of the first image specifically includes S1201-S1202:
[0048] S1201. Determine a step row in the first image based on a difference in average saturation between two adjacent pixel rows in the first image; wherein the difference between the average saturation of the step row and the average saturation of the corresponding adjacent pixel row is greater than or equal to a preset saturation threshold.
[0049] Among them, the preset saturation threshold is the minimum difference in average saturation between the adjacent pixel rows of the non-missing part and the missing part in the invalid image set in this embodiment. The pixel rows 1 to k in the invalid image are the non-missing part, and the pixel rows k+1 to row are the missing part, then the adjacent pixel rows of the non-missing part and the missing part are the pixel rows of the kth row and the pixel rows of the k+1th row, and row is the row number of the last row. When the average saturation of two adjacent pixel rows is greater than or equal to the preset saturation threshold, it indicates that the average saturation of the two adjacent pixel rows changes greatly, that is, there is a step row in the two adjacent pixel rows. When the average saturation of two adjacent pixel rows is less than the preset saturation threshold, it indicates that the average saturation of the two adjacent pixel rows changes little, that is, there is no step row in the two adjacent pixel rows.
[0050] This embodiment provides two implementation methods for determining the step rows of the first image. The first method is to traverse all pixel rows in the first image to determine all step rows appearing in the first image. The second method is to traverse the pixel rows in the first image in row order and stop traversing after determining the step row that appears for the first time in the first image.
[0051] In a first implementation, the difference in average saturation between each pixel row and the corresponding next pixel row is determined in a top-down row order. If the difference between a certain pixel row and the corresponding next pixel row is greater than or equal to a preset saturation threshold, the pixel row is determined to be a step row. Alternatively, the difference in average saturation between each pixel row and the corresponding previous pixel row is determined in a bottom-up row order. If the difference between a certain pixel row and the corresponding previous pixel row is greater than or equal to a preset saturation threshold, the previous pixel row is determined to be a step row. After traversing all pixel rows of the first image, all step rows in the first image are determined.
[0052] In a second implementation, the average saturation of each pixel row is traversed in the order of the rows of the first image, and the difference between the average saturation of the current pixel row and the average saturation of the next pixel row is determined; when the difference is greater than or equal to a preset saturation threshold, the current pixel row is determined to be a step row in the first image, and the traversal is stopped. Exemplarily, the difference between the average saturation of the pixel row in the first row and the average saturation of the pixel row in the second row in the first image is calculated, and the difference is compared with the preset saturation threshold. When the difference is greater than or equal to the preset saturation threshold, the pixel row in the first row is determined to be a step row. When the difference is less than the preset saturation threshold, the difference between the average saturation of the pixel row in the second row and the average saturation of the third row in the first image is continued to be calculated, and the difference is compared with the preset saturation threshold. When the difference between the average saturation of the pixel row in the i-th row in the first image and the average saturation of the pixel row in the i+1-th row is greater than or equal to a preset saturation threshold, the pixel row in the i-th row is determined to be a step row in the first image, and the traversal is stopped to no longer calculate the difference between subsequent adjacent pixel rows. Therefore, the step row in the first image is currently uniquely determined to be the pixel row in the i-th row.
[0053] It should be noted that, in this embodiment, after the difference in average saturation between adjacent pixel rows is determined, the absolute value of the difference is compared with a preset saturation threshold.
[0054] S1202: Determine the completeness of the first image according to the step lines in the first image.
[0055] Depend on Figure 3 As shown in the figure, if there is no missing portion in the first image, then adjacent pixel rows in the first image will not experience a sudden change in saturation, and accordingly, there are no step rows in the first image. Therefore, if there are no step rows in the first image, the integrity of the first image can be determined to be one.
[0056] In the case where there are step lines in the first image, the integrity of the first image is determined in two corresponding manners for the above two manners of determining the step lines in the first image.
[0057] A first implementation manner is to determine the completeness of the first image according to the number of step lines in the first image when all step lines in the first image are determined. Figure 5 and Figure 6 is a schematic diagram of the first image provided in the embodiment of the present application. Figure 5As shown, assuming that the i-th row to the row-th row, that is, the last row in the first image, is the missing part of the first image, then the saturation of the i-th row and the i+1-th row will suddenly change, and there will be no saturation sudden change between the adjacent pixel rows after the i+1-th row. Accordingly, when determining the step row, it will be determined that the difference in the average saturation between the i-th row and the i+1-th row is greater than or equal to the preset saturation threshold, and then it will be determined that the i-th row is the only step row in the first image. Therefore, when the number of step rows in the first image is equal to one, it can be determined that the first image is missing, that is, the completeness of the first image is less than one. As shown in Figure 6 As shown, when there is no missing part in the first image, the saturation of adjacent pixel rows may change suddenly multiple times in the first image due to other reasons such as the shooting environment or the shooting content. For example, if the difference in the average saturation between the i-th row and the i+1-th row in the first image is greater than or equal to the preset saturation threshold, and the difference in the average saturation between the i+k-th row and the i+k+1-th row is greater than or equal to the preset saturation threshold, then the i-th row and the i+k-th row are determined to be step rows, where k is a positive integer greater than zero. Therefore, when the number of step rows in the first image is greater than one, it can be determined that there is no missing part in the first image, that is, the completeness of the first image is equal to one.
[0058] The second implementation method is to determine the first step line in the first image, and then determine the saturation fluctuation parameters of the subsequent pixel rows based on the average saturation of the pixel rows following the step line; and determine the integrity of the first image based on the saturation fluctuation parameters of the subsequent pixel rows. The saturation fluctuation parameters can represent the stability of the average saturation of the subsequent pixel rows. Figure 5 and Figure 6 , the i-th row is a step row, and its subsequent pixel rows are the i+1-th row to the row-th row. When there is a missing value in the first image, the average saturation of the i+1-th row to the row-th row will remain at a relatively stable value. When there is no missing value in the first image, the average saturation of the i+1-th row to the row-th row will fluctuate. Therefore, when the saturation fluctuation parameter is large, it indicates that the average saturation of the i+1-th row to the row-th row is not stable enough, and it can be determined that the i+1-th row to the row-th row in the first image normally records the image content, that is, the first image has no missing parts, and the integrity of the first image is equal to one. When the saturation fluctuation parameter is small, it indicates that the average saturation of the i+1-th row to the row-th row is relatively stable, and therefore the i+1-th row to the row-th row in the first image are missing parts, and the integrity of the first image is less than one.
[0059] In this embodiment, the fluctuation parameter includes the saturation standard deviation or the saturation variance, so as to characterize the stability of the subsequent pixel rows by the variance and standard deviation of the average saturation of the pixel rows following the step row. The standard deviation calculation formula is as follows:
[0060]
[0061] Among them, σ is the standard deviation of the average saturation from row i+1 to row, σ 2 is the variance of the average saturation from the i+1th row to the rowth row, and sat[p] is the average saturation of the pixel row in the pth row.
[0062] When the saturation fluctuation parameter is less than or equal to a preset fluctuation threshold, the integrity of the first image is determined based on the ratio of the number of step rows to the total number of pixel rows in the first image. When the saturation fluctuation parameter is greater than the preset fluctuation threshold, the integrity of the first image is determined to be one. The fluctuation threshold can be understood as the maximum variance or standard deviation of the average saturation of the pixel rows in the missing portion of the invalid image. When the standard deviation or variance of the average saturation of the pixel rows following the step row is greater than the corresponding fluctuation threshold, it indicates that the pixel rows following the step row are normal content in the first image, and the integrity of the first image is determined to be one. When the standard deviation or variance of the average saturation of the pixel rows following the step row is less than or equal to the corresponding fluctuation threshold, the subsequent pixel rows are determined to be missing content in the first image, i.e., the integrity of the first image is determined to be less than one. Since the pixel rows following the step row are all missing content in the first image, the step row and the pixel rows preceding the step row are normal content in the first image. Therefore, the ratio of the number of pixel rows in the step row to the total number of pixel rows in the first image is the integrity of the first image. For example, the step line is the 10th line, and the total number of lines of the first image is 20 lines. Then the 11th to 20th lines of the first image are all missing parts of the first image, and it can be determined that the completeness of the first image is 50%.
[0063] Figure 7 is a third schematic diagram of the first image provided in the embodiment of the present application. Figure 7 As shown, it is not ruled out that the first image has missing parts and sudden changes in saturation due to the shooting environment or shooting content. In this case, it may not be accurate to determine the completeness of the first image according to the number of all step rows in the first image or the saturation fluctuation parameters of the pixel rows following the first step row. In this regard, this embodiment proposes that each pixel row in the first image can be traversed in order from bottom to top to determine the difference between the pixel row and the previous pixel row. When the difference between a certain pixel row and the previous pixel row is greater than a preset saturation threshold for the first time, the previous pixel row of the pixel row is determined to be a step row in the first image, and the traversal is stopped. For example, it is determined that Figure 7If the difference in average saturation between rows i+k+1 and i+k exceeds a preset saturation threshold, row i+k is determined to be a step row in the first image, and traversal stops. The saturation fluctuation parameters of the pixel rows following the step row, i.e., rows i+k+1 to row, are then compared with the preset fluctuation threshold. This accurately determines that rows i+k+1 to row represent missing portions of the first image, thereby determining the integrity of the first image and improving the accuracy of detecting the integrity of the first image.
[0064] S130: Determine whether the first image has any missing parts according to the completeness of the first image.
[0065] For example, if the integrity of the first image is equal to one, it is determined that the first image does not have any missing parts; if the integrity of the first image is less than one, it is determined that the first image has missing parts. The missing part detection result and the integrity of the first image can be associated with the first image and saved, so that a valid first image can be retrieved from the image storage space when various functional applications are subsequently executed.
[0066] In this embodiment, when the integrity of the first image is greater than or equal to a preset integrity threshold, the first image is determined to be a valid image; or, when the integrity of the first image is less than the preset integrity threshold, the first image is determined to be an invalid image. A valid image refers to an image that can be used in a functional application, and an invalid image refers to an image that cannot be used in a functional application. Exemplarily, since different functional applications have different requirements for the integrity of the first image, different integrity thresholds may be set in different functional applications. For example, when the first image is used for surveying and mapping a plot, each part of the first image will affect the accuracy of the surveying and mapping plot, so the integrity threshold set for the surveying and mapping plot is one. When the integrity of the first image is equal to one, the first image may be determined to be a valid image for surveying and mapping the plot; when the integrity of the first image is less than one, the first image may be determined to be an invalid image that cannot be used for surveying and mapping the plot. When the first image is used to perceive the environment, the higher the integrity of the first image, the more accurate the analyzed environmental information. However, there is no need to ensure that the integrity of the first image is equal to one. A completeness threshold less than 1 can be set according to actual needs. When the integrity of the first image is greater than or equal to the completeness threshold, the first image can be determined as a valid image for perceiving the environment. When the integrity of the first image is less than the completeness threshold, the first image can be determined as an invalid image that cannot be used to perceive the environment.
[0067] It should be noted that if the integrity threshold is one, then when determining the integrity of the first image, it is sufficient to determine that the integrity of the first image is less than one or equal to one, without determining a specific value for the integrity of the first image. For example, when it is determined that the saturation fluctuation parameter of the pixel row following the step row is less than or equal to a preset fluctuation threshold, it can be determined that the integrity of the first image is less than one, and the first image is therefore determined to be not a valid image.
[0068] When the integrity of the first image is greater than the integrity threshold corresponding to the perceived environment, the first image can be determined to be a valid image for perceiving the environment. However, since the first image includes missing parts that cannot be used for perceiving the environment, the missing parts in the first image can be cropped before being used for perceiving the environment, and the remaining parts can be used for perceiving the environment. Figure 3 It can be seen that the pixel rows following the step row in the first image are the missing parts of the first image, so the pixel rows following the step row in the first image can be cropped out, and the step row and the previous pixel rows in the first image can be used to analyze the environmental information.
[0069] When the drone determines that the integrity of the first image is less than one, it can be determined that insufficient memory of the current camera causes the first image to be missing. The drone can clear the camera memory in time to avoid the problem of frequent image missing in the future.
[0070] It should be noted that in addition to missing information, the first image may also be too bright or too dark. When the first image is too bright or too dark, accurate feature information cannot be extracted from it. Therefore, the first image with such problems cannot be used to accurately perceive the surrounding environment or construct a land model. To further improve the accuracy of various functional applications using images captured by cameras, the brightness of the first image is tested before or after the integrity test to determine whether the first image is a valid image with qualified brightness.
[0071] Exemplarily, the global average brightness of the first image is determined based on the brightness of each pixel in the first image. If the global average brightness falls within a preset brightness range, the first image is determined to be a valid image; if the global average brightness does not fall within the preset brightness range, the first image is determined to be an invalid image. The preset brightness range is the brightness range of the first image within which valid feature information can be extracted, as set in this embodiment. This range was determined through extensive aerial image experiments. After converting the first image from RGB color space to HSV color space, a single-channel brightness image is extracted from the converted first image. The global average brightness of the first image is determined based on the brightness value of each pixel in the single-channel brightness image. The global average brightness is compared with the preset brightness range. If the global average brightness is less than the lower limit of the preset brightness range, the first image is determined to be too dark. If the global average brightness is greater than the upper limit of the preset brightness range, the first image is determined to be too bright. If the global average brightness is greater than the lower limit and less than the upper limit, the brightness of the first image is determined to be normal.
[0072] If the drone needs to save the integrity and brightness detection results of the first image, regardless of the detection results, the drone will perform integrity and brightness detection on the first image, and after obtaining the integrity and brightness detection results of the first image, the drone will associate the first image with the integrity and brightness detection results and save them.
[0073] If the drone is selecting valid images for use in subsequent functional applications, it may first determine that the integrity of the first image is less than a preset integrity threshold, or that the brightness of the first image is not within a preset brightness range, and then deem the first image an invalid image not to be used in subsequent functional applications. Thereafter, the brightness or integrity of the first image is no longer checked.
[0074] For example, if the drone first detects the integrity of the first image and then detects the brightness of the first image, after determining that the integrity of the first image is less than a preset integrity threshold, it can directly determine that the first image is a low-integrity image, and the first image is treated as an invalid image not used in subsequent functional applications, and the brightness of the first image is no longer detected. After determining that the first image is greater than or equal to the preset integrity threshold, it is determined whether the global average brightness of the first image is within a preset brightness range. If the global average brightness of the first image is within the preset brightness range, it is determined that the first image is an image with normal brightness and high integrity, and the first image can be used as a valid image for subsequent functional applications. If the global average brightness of the first image is less than the preset brightness range or greater than the preset brightness range, it is determined that the first image is too dark or too bright, and the first image is treated as an invalid image.
[0075] If the drone first detects the brightness of the first image and then detects its integrity, and after determining that the global average brightness of the first image is less than or greater than a preset brightness range, the drone can directly determine that the first image is too dark or too bright, and then treat the first image as an invalid image not used in subsequent functional applications, and no longer detect the integrity of the first image. After determining that the global average brightness of the first image is within the preset brightness range, the integrity of the first image is determined. If the integrity of the first image is greater than or equal to a preset integrity threshold, the first image is determined to be an image with normal brightness and high integrity, and the first image can be used as a valid image for subsequent functional applications. If the integrity of the first image is less than the preset integrity threshold, the first image is determined to be an image with low integrity, and the first image is treated as an invalid image not used in subsequent functional applications.
[0076] In summary, the aerial image detection method provided in the embodiment of the present application obtains a first image captured by a camera mounted on a drone, and determines the average saturation of each pixel point in each row of the first image based on the saturation of each pixel point in the first image, thereby obtaining the average saturation of each pixel row in the first image. Based on the average saturation of each pixel row in the first image, the integrity of the first image is detected, and based on the integrity of the first image, it is determined whether the first image is missing. Through the above-mentioned technical means, the integrity of the first image can be quickly detected based on the saturation of the first image to determine whether the image is missing, which facilitates the subsequent screening of valid images with high integrity for use in various functional applications, improves the accuracy of functional applications, and further ensures the functional effects of subsequent functional applications, solving the problem in the prior art of affecting the accuracy of functional applications when invalid images with low integrity are used.
[0077] Based on the above embodiments, Figure 8 This is a schematic diagram of the structure of an aerial image detection device provided in an embodiment of the present application. Figure 8 The aerial image detection device provided in this embodiment specifically includes: a saturation determination module 21, a completeness determination module 22 and a first detection module 23.
[0078] The saturation determination module 21 is configured to determine the average saturation of each pixel row in the first image captured by the camera mounted on the drone based on the saturation of each pixel point in the first image;
[0079] an integrity determination module 22, configured to determine the integrity of the first image according to the average saturation of each pixel row;
[0080] The first detection module 23 is configured to determine whether the first image has any missing parts according to the completeness of the first image.
[0081] Based on the above embodiment, the first detection module 23 includes: a first valid image determination submodule, configured to determine the first image as a valid image when the integrity of the first image is greater than or equal to a preset integrity threshold; or, an invalid image determination submodule, configured to determine the first image as an invalid image when the integrity of the first image is less than a preset integrity threshold.
[0082] Based on the above embodiment, the completeness determination module 22 includes: a step row determination submodule, configured to determine the step row in the first image based on the difference in average saturation between two adjacent pixel rows in the first image; wherein the difference between the average saturation of the step row and the average saturation of the corresponding adjacent pixel rows is greater than or equal to a preset saturation threshold; and a completeness determination submodule, configured to determine the completeness of the first image based on the step row in the first image.
[0083] Based on the above embodiment, the first integrity determination unit includes: a first determination subunit, configured to determine the integrity of the first image based on the ratio of the number of step rows to the total number of pixel rows of the first image when the saturation fluctuation parameter is less than or equal to a preset fluctuation threshold; wherein the fluctuation parameter includes the saturation standard deviation or the saturation variance; and a second determination subunit, configured to determine that the integrity of the first image is equal to one when the saturation fluctuation parameter is greater than a preset fluctuation threshold.
[0084] Based on the above embodiment, the step row determination submodule includes: a difference determination unit, configured to traverse the average saturation of each pixel row in the row order of the first image, and determine the difference between the average saturation of the current pixel row and the average saturation of the next pixel row; a step row determination unit, configured to determine the current pixel row as a step row in the first image and stop traversal when the difference is greater than or equal to a preset saturation threshold.
[0085] Based on the above embodiment, the integrity determination submodule includes: a fluctuation parameter determination unit, which is configured to determine the saturation fluctuation parameters of the subsequent pixel rows based on the average saturation of the pixel rows subsequent to the step row when there is a step row in the first image; and a first integrity determination unit, which is configured to determine the integrity of the first image based on the saturation fluctuation parameters of the subsequent pixel rows.
[0086] Based on the above embodiment, the integrity determination submodule includes: a second integrity determination unit configured to determine that the integrity of the first image is equal to one when there is no step line in the first image.
[0087] Based on the above embodiment, the saturation determination module 21 includes: a color space conversion unit, configured to convert the first image from the RGB color space to the HSV color space, and extract a saturation single-channel image from the converted first image; a saturation determination unit, configured to determine the average saturation of each pixel row based on the saturation of each pixel point in the saturation single-channel image.
[0088] Based on the above embodiment, the aerial image detection device includes: a brightness determination module, configured to determine the global average brightness of the first image based on the brightness of each pixel in the first image; and a second detection module, configured to determine that the first image is a valid image when the global average brightness falls within a preset brightness range.
[0089] As mentioned above, the aerial image detection device provided in the embodiment of the present application obtains a first image captured by a camera mounted on a drone, and determines the average saturation of each pixel point in each row of the first image based on the saturation of each pixel point in the first image, thereby obtaining the average saturation of each pixel row in the first image. Based on the average saturation of each pixel row in the first image, the integrity of the first image is detected, and based on the integrity of the first image, it is determined whether the first image is missing. Through the above-mentioned technical means, the integrity of the first image can be quickly detected based on the saturation of the first image to determine whether the image is missing, which facilitates the subsequent screening of valid images with high integrity for use in various functional applications, improves the accuracy of functional applications, and further ensures the functional effects of subsequent functional applications, solving the problem in the prior art of affecting the accuracy of functional applications when invalid images with low integrity are used.
[0090] The aerial image detection device provided in the embodiment of the present application can be used to execute the aerial image detection method provided in the above embodiment, and has corresponding functions and beneficial effects.
[0091] Figure 9 This is a schematic diagram of the structure of a drone provided in an embodiment of the present application, with reference to Figure 9 The drone includes a processor 31, a memory 32, a communication device 33, an input device 34, and an output device 35. The drone may include one or more processors 31 and one or more memories 32. The drone's processor 31, memory 32, communication device 33, input device 34, and output device 35 may be connected via a bus or other means.
[0092] The memory 32, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as the program instructions / modules corresponding to the aerial image detection method of any embodiment of the present application (for example, the saturation determination module 21, the integrity determination module 22 and the first detection module 23 in the aerial image detection device). The memory 32 may mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system and application programs required for at least one function; the data storage area can store data created according to the use of the device, etc. In addition, the memory 32 may include a high-speed random access memory and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory may further include a memory remotely located relative to the processor, and these remote memories can be connected to the device via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network and a combination thereof.
[0093] The communication device 33 is used for data transmission.
[0094] The processor 31 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory 32, that is, realizes the above-mentioned aerial image detection method.
[0095] The input device 34 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the device. The output device 35 may include a display device such as a display screen.
[0096] The drone provided above can be used to execute the aerial image detection method provided in the above embodiment, and has corresponding functions and beneficial effects.
[0097] An embodiment of the present application also provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to execute an aerial image detection method. The aerial image detection method includes: determining the average saturation of each pixel row in the first image based on the saturation of each pixel point in the first image captured by a camera mounted on an unmanned aerial vehicle; determining the integrity of the first image based on the average saturation of each pixel row; and determining whether the first image has any missing parts based on the integrity of the first image.
[0098] Storage medium - any of various types of memory devices or storage devices. The term "storage medium" is intended to include: installation media, such as CD-ROMs, floppy disks, or tape drives; computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media (such as hard disks or optical storage); registers or other similar types of memory elements, etc. Storage media may also include other types of memory or combinations thereof. In addition, the storage medium may be located in the first computer system in which the program is executed, or it may be located in a different second computer system that is connected to the first computer system via a network (such as the Internet). The second computer system can provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media residing in different locations (e.g., in different computer systems connected via a network). The storage medium may store program instructions (e.g., embodied as a computer program) that can be executed by one or more processors.
[0099] Of course, the storage medium containing computer-executable instructions provided in an embodiment of the present application is not limited to the above-mentioned aerial image detection method, and can also execute related operations in the aerial image detection method provided in any embodiment of the present application.
[0100] The aerial image detection device, storage medium and drone provided in the above embodiments can execute the aerial image detection method provided in any embodiment of the present application. For technical details not described in detail in the above embodiments, please refer to the aerial image detection method provided in any embodiment of the present application.
[0101] The above are only preferred embodiments of the present application and the technical principles employed. The present application is not limited to the specific embodiments described herein, and any obvious changes, readjustments, and substitutions that are apparent to those skilled in the art will not depart from the scope of protection of the present application. Therefore, although the present application has been described in detail through the above embodiments, the present application is not limited to the above embodiments and may include many other equivalent embodiments without departing from the scope of the present application. The scope of the present application is determined by the scope of the claims.
Claims
1. A method for detecting aerial images, characterized in that: include: Determining an average saturation of each pixel row in a first image captured by a camera mounted on the drone based on the saturation of each pixel in the first image; determining a degree of integrity of the first image according to an average saturation of each pixel row; The method includes: determining a step row in the first image based on a difference in average saturation between two adjacent pixel rows in the first image; wherein the difference between the average saturation of the step row and the average saturation of the corresponding adjacent pixel row is greater than or equal to a preset saturation threshold; and determining the completeness of the first image based on the step row in the first image; Determine whether the first image has any missing parts according to the completeness of the first image.
2. The aerial image detection method according to claim 1, characterized in that: The determining the integrity of the first image according to the step line in the first image includes: In a case where there is a step line in the first image, determining a saturation fluctuation parameter of the subsequent pixel rows according to an average saturation of the pixel rows subsequent to the step line; The integrity of the first image is determined based on the saturation fluctuation parameters of the subsequent pixel rows.
3. The aerial image detection method according to claim 2, characterized in that: The determining the integrity of the first image according to the saturation fluctuation parameter of the subsequent pixel row includes: When the saturation fluctuation parameter is less than or equal to a preset fluctuation threshold, determining the integrity of the first image according to a ratio of the number of step rows to the total number of pixel rows of the first image; wherein the fluctuation parameter includes a saturation standard deviation or a saturation variance; In a case where the saturation fluctuation parameter is greater than a preset fluctuation threshold, it is determined that the integrity of the first image is equal to one.
4. The aerial image detection method according to claim 1, characterized in that: The determining, according to the average saturation of two adjacent rows in the first image, a step row in the first image includes: Traversing the average saturation of each pixel row according to the row order of the first image, and determining the difference between the average saturation of the current pixel row and the average saturation of the next pixel row; When the difference is greater than or equal to a preset saturation threshold, the current pixel row is determined as a step row in the first image, and the traversal is stopped.
5. The aerial image detection method according to claim 1, characterized in that: The determining the integrity of the first image according to the step line in the first image includes: In the case that there is no step line in the first image, it is determined that the completeness of the first image is equal to one.
6. The aerial image detection method according to claim 1, characterized in that: The determining, based on the completeness of the first image, whether the first image is missing includes: When the integrity of the first image is greater than or equal to a preset integrity threshold, the first image is determined to be a valid image; or when the integrity of the first image is less than a preset integrity threshold, the first image is determined to be an invalid image.
7. The aerial image detection method according to claim 1, characterized in that: Determining the average saturation of each pixel row in the first image based on the saturation of each pixel in the first image captured by the camera mounted on the drone includes: Convert the first image from the RGB color space to the HSV color space, and extract a saturation single-channel image from the converted first image; Based on the saturation of each pixel in the saturation single-channel image, an average saturation of each pixel row is determined.
8. The aerial image detection method according to claim 1, characterized in that: The method further comprises: determining a global average brightness of the first image based on the brightness of each pixel in the first image; When the global average brightness falls within a preset brightness range, the first image is determined to be a valid image.
9. An aerial image detection device, characterized in that: include: a saturation determination module configured to determine an average saturation of each pixel row in a first image captured by a camera mounted on the drone based on the saturation of each pixel in the first image; an integrity determination module configured to determine the integrity of the first image based on the average saturation of each pixel row; wherein the integrity determination module comprises: determining a step row in the first image based on a difference in average saturation between two adjacent pixel rows in the first image; wherein the difference between the average saturation of the step row and the average saturation of the corresponding adjacent pixel row is greater than or equal to a preset saturation threshold; and determining the integrity of the first image based on the step row in the first image; The first detection module is configured to determine whether the first image has any missing parts according to the completeness of the first image.
10. A drone, characterized in that: include: one or more processors; A memory stores one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the aerial image detection method according to any one of claims 1 to 8.
11. A storage medium containing computer-executable instructions, characterized in that: When executed by a computer processor, the computer executable instructions are used to perform the aerial image detection method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Method of measuring measurement target
CN102654466A
Elevator smoke detection method and device, electronic equipment and storage medium
CN115311621A