Method, apparatus, and storage medium for analyzing farmland soil
By separating insect images from the background and filling in occluded areas when taking farmland soil images with drones, and combining this with visual neural network analysis, the image quality problem caused by insect interference was solved, enabling accurate assessment and management recommendations for farmland soil.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGZHOU MESSCAT SOFTWARE CO LTD
- Filing Date
- 2024-08-26
- Publication Date
- 2026-06-26
AI Technical Summary
When drones take pictures at low altitudes above farmland soil, insects flying by or obstructing the lens can reduce image quality and usability, making soil characteristics less clear and consequently affecting the accuracy of soil analysis and farmland management.
By using drones to capture images of farmland soil, image segmentation algorithms are used to separate insect images from the background. Fill-in or repair algorithms are then used to fill in areas obscured by insects, and visual neural networks are used to analyze the filled images to determine soil fertility and moisture content.
Precise analysis and assessment of farmland soil under insect disturbance conditions have been achieved, providing farmers with effective farmland management advice and improving the accuracy and reliability of soil analysis.
Smart Images

Figure CN119295970B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of agricultural management technology, and in particular to a method, apparatus, equipment, and storage medium for analyzing farmland soil. Background Technology
[0002] In the current agricultural field, using drones to image farmland soil has become an important technological tool. Analyzing these images through visual neural networks allows for precise assessment of soil fertility and moisture content, providing farmers with effective fertilization and irrigation recommendations, thereby improving farmland productivity and crop quality. However, with the development of drone imaging technology, some challenges have gradually emerged. For example, when shooting at low altitudes above farmland soil, interference from flying insects or obstructing the lens can affect image quality and usability. This interference makes soil features less clear, thus impacting the accuracy of soil analysis and farmland management.
[0003] The above content is only used to help understand the technical solution of the present invention and does not represent an admission that the above content is prior art. Summary of the Invention
[0004] The main objective of this invention is to provide a method, apparatus, device, and storage medium for farmland soil analysis, aiming to solve the technical problem that existing drones may be affected by insects flying by or obstructing the lens when taking pictures at low altitudes above farmland soil, thereby affecting the quality and usability of images. This interference makes soil characteristics unclear, thus affecting the accuracy of soil analysis and farmland management.
[0005] To achieve the above objectives, the present invention provides a method for analyzing farmland soil, the method comprising:
[0006] During the flight of the drone at a low altitude above the farmland soil, images of the farmland soil are captured by the drone.
[0007] The farmland soil image is analyzed and identified. When the analysis and identification shows that the farmland soil image contains insect images, an image segmentation algorithm is used to separate the insect images from the background in the farmland soil image.
[0008] Fill in or repair the areas occluded by insects in farmland soil images after separating insect images from the background;
[0009] The fertility and moisture content of the farmland soil are determined by analyzing the infilled farmland soil image using a visual neural network.
[0010] Optionally, the filling or repair algorithm-based method for filling in areas occluded by insects in farmland soil images after separating insect images from the background includes:
[0011] Obtain the nearest farmland soil image that does not contain insect images to the farmland soil image containing insect images;
[0012] Based on the location of insects in the farmland soil image containing insect images, a virtual insect background image is determined in the farmland soil image that does not contain insect images;
[0013] Based on the virtual insect background image, the areas obscured by insects in the farmland soil image after the insect image and background are separated are filled in using a filling or repair algorithm.
[0014] Optionally, acquiring the nearest farmland soil image that does not contain insect images to the farmland soil image containing insect images includes:
[0015] Acquire farmland soil images within a preset frame duration before and after the acquisition of farmland soil images containing insect images;
[0016] Obtain the nearest farmland soil image that does not contain an insect image from the farmland soil images within the preset frame time period before and after.
[0017] Optionally, after acquiring farmland soil images within a preset frame time period before and after the acquisition of farmland soil images containing insect images, the method further includes:
[0018] If no farmland soil image without insect images is detected in the farmland soil images within the preset frame time period before and after, the shooting angle or altitude of the drone is adjusted.
[0019] Based on the adjusted shooting angle or altitude of the drone, farmland soil images containing insect images are reacquired within a second preset frame duration before and after the acquisition;
[0020] Accordingly, obtaining the nearest farmland soil image that does not contain an insect image from the farmland soil images within the preset frame time interval includes:
[0021] Obtain the nearest farmland soil image that does not contain an insect image from the farmland soil images within the second preset frame time period before and after.
[0022] Optionally, when no farmland soil image without insect images is detected in the farmland soil images within the preset frame duration before and after, adjusting the shooting angle or altitude of the drone includes:
[0023] If no farmland soil image without insect images is detected in the farmland soil images within the preset frame time period before and after, the number of surrounding insects is detected by the UAV infrared sensor.
[0024] When the number of insects exceeds a preset number, the drone is controlled to release a colorless insect repellent to drive away surrounding insects.
[0025] When the number of insects is not greater than the preset number of insects, adjust the shooting angle or altitude of the drone.
[0026] Optionally, adjusting the drone's shooting angle or altitude when the number of insects is not greater than a preset number of insects includes:
[0027] When the number of insects is not greater than a preset number of insects, determine the angle and distance between the surrounding insects and the drone;
[0028] The drone's shooting angle or height is adjusted based on the angle and distance between the surrounding insects and the drone using a preset adjustment algorithm.
[0029] Optionally, when the number of insects exceeds a preset number, controlling the drone to release a colorless insect repellent to drive away surrounding insects includes:
[0030] When the number of insects exceeds a preset number, the species of insects around the drone are determined using image recognition technology;
[0031] The drone is controlled to release a corresponding colorless insect repellent based on the type of insects surrounding it, thereby repelling the surrounding insects.
[0032] Furthermore, to achieve the above objectives, the present invention also provides a farmland soil analysis device, the farmland soil analysis device comprising:
[0033] An image capture module is used to capture images of farmland soil by the drone while it is flying at a low altitude above the farmland soil.
[0034] The image separation module is used to analyze and identify the farmland soil image. When the analysis and identification finds that the farmland soil image contains insect images, the image segmentation algorithm is used to separate the insect images in the farmland soil image from the background.
[0035] The region filling module is used to fill in the regions occluded by insects in farmland soil images after the insect images have been separated from the background, based on filling or repair algorithms;
[0036] The farmland judgment module is used to analyze the filled farmland soil image based on a visual neural network, thereby judging the fertility and water content of the farmland soil.
[0037] In addition, to achieve the above objectives, the present invention also provides a farmland soil analysis device, the device comprising: a memory, a processor, and a farmland soil analysis program stored in the memory and executable on the processor, the farmland soil analysis program being configured to implement the steps of the farmland soil analysis method as described in any one of the above.
[0038] In addition, to achieve the above objectives, the present invention also provides a storage medium storing a farmland soil analysis program, which, when executed by a processor, implements the steps of the farmland soil analysis method as described in any of the above claims.
[0039] This invention provides a method for analyzing farmland soil. The method includes: capturing images of farmland soil using a drone while it is flying at a low altitude above the farmland soil; analyzing and identifying the farmland soil images; when insect images are detected in the farmland soil images, separating the insect images from the background using an image segmentation algorithm; filling in the areas obscured by insects in the separated farmland soil images using a filling or repair algorithm; and analyzing the filled farmland soil images using a visual neural network to determine the fertility and moisture content of the farmland soil. This method enables accurate analysis and evaluation of farmland soil even when insects interfere with the drone's capture of farmland soil images, providing farmers with more effective farmland management suggestions. Attached Figure Description
[0040] Figure 1 This is a schematic diagram of the structure of farmland soil analysis equipment in the hardware operating environment involved in the embodiments of the present invention;
[0041] Figure 2 This is a schematic flowchart of the first embodiment of the farmland soil analysis method of the present invention;
[0042] Figure 3 This is a flowchart illustrating the second embodiment of the farmland soil analysis method of the present invention;
[0043] Figure 4 This is a flowchart illustrating the third embodiment of the farmland soil analysis method of the present invention;
[0044] Figure 5 This is a structural block diagram of the first embodiment of the farmland soil analysis device of the present invention.
[0045] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0046] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0047] Reference Figure 1 , Figure 1 This is a schematic diagram of the structure of a farmland soil analysis device in the hardware operating environment of an embodiment of the present invention.
[0048] like Figure 1 As shown, the farmland soil analysis device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen, and optionally, it may also include a standard wired interface or a wireless interface. In this invention, the wired interface of the user interface 1003 may be a USB interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be a high-speed random access memory (RAM) or a non-volatile memory (NVM), such as a disk storage device. The memory 1005 may also optionally be a storage device independent of the aforementioned processor 1001.
[0049] Those skilled in the art will understand that Figure 1 The structure shown does not constitute a limitation on farmland soil analysis equipment and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0050] like Figure 1 As shown, the memory 1005, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a farmland soil analysis program.
[0051] exist Figure 1 In the farmland soil analysis device shown, the network interface 1004 is mainly used to connect to the backend server and communicate with the backend server; the user interface 1003 is mainly used to connect to peripheral devices; the farmland soil analysis device calls the farmland soil analysis program stored in the memory 1005 through the processor 1001 and executes the farmland soil analysis method provided in the embodiment of the present invention.
[0052] Based on the above hardware structure, an embodiment of the farmland soil analysis method of the present invention is proposed.
[0053] Reference Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of the farmland soil analysis method of the present invention, which presents the first embodiment of the farmland soil analysis method of the present invention.
[0054] In the first embodiment, the farmland soil analysis method includes the following steps:
[0055] S10: During the flight of the drone at a low altitude above the farmland soil, the drone takes images of the farmland soil.
[0056] It should be noted that the executing entity in this embodiment can be an electronic device capable of acquiring farmland soil images and analyzing and evaluating them. This electronic device can be installed in a drone or other electronic devices capable of performing the above functions. This embodiment does not limit this.
[0057] It is important to note that before flight, the drone's altitude and angle relative to the soil must be determined to ensure comprehensive and clear soil images are acquired. The onboard camera equipment must be adjusted, including camera parameter settings such as exposure time and focal length, as well as the shooting mode selection, such as single-shot or continuous shooting, to meet the soil image requirements. A suitable flight path should be designed to ensure the drone covers the farmland soil area to be photographed, avoiding overlap or omissions to obtain complete soil image data. During flight, the working status and shooting effect of the camera equipment should be monitored in real time, and flight altitude, speed, or angle should be adjusted promptly to ensure the quality of the captured soil images. The captured farmland soil image data should be stored and organized to ensure the integrity and accuracy of data for subsequent analysis and processing. This step involves aircraft operation techniques and camera equipment settings adjustments, requiring the cooperation of an advanced flight control system and camera technology. Its effect is to obtain clear and complete farmland soil images, providing a reliable data foundation for subsequent soil analysis and assessment.
[0058] S20: Analyze and identify the farmland soil image. When the analysis and identification finds that the farmland soil image contains an insect image, use an image segmentation algorithm to separate the insect image from the background in the farmland soil image.
[0059] It's important to note that image preprocessing, such as noise removal and contrast enhancement, is typically required before image analysis to improve the accuracy of subsequent algorithms. Object detection algorithms, such as deep learning-based convolutional neural networks (CNNs) or traditional feature extraction and classification algorithms, are used to identify and locate insects in soil images. Image segmentation algorithms, such as semantic segmentation or instance segmentation, are then used to separate the insect images from the background. This can be achieved using pixel-level segmentation methods, assigning each pixel in the image to a different category, thus achieving accurate separation of the insects from the background. The segmentation results are then optimized and post-processed, such as removing small regions or isolated pixels and filling in blank areas at segmentation boundaries, to improve the accuracy and completeness of insect-background separation. Quantitative and qualitative evaluations of the segmentation results are performed, such as calculating precision, recall, and F1 score, or visualizing the segmentation results to intuitively assess the separation effect. These steps can utilize relevant algorithms and techniques from image processing and machine learning, such as deep learning models, image segmentation algorithms, feature extraction, and classification techniques. The effect of this step is that it enables precise separation of insects from the background in farmland soil images, providing clear image data for subsequent restoration and analysis.
[0060] S30: Fill in the areas occluded by insects in farmland soil images after separating insect images from the background based on filling or repair algorithms.
[0061] It's important to note that the first step is to determine which areas are occluded by insects and require filling. This can be determined by segmenting the insects against the background. A suitable filling or inpainting algorithm is then selected, such as texture-based image inpainting algorithms or deep learning-based content filling algorithms. These algorithms can infer the content of the occluded areas based on information from surrounding pixels and then fill them in. The pixel information surrounding the insect-occluded areas, including color and texture features, is used as input to the filling algorithm. This information helps the algorithm more accurately predict the content of the occluded areas. The selected filling algorithm is then applied to the occluded areas, generating the filling result based on the surrounding pixel information. The algorithm automatically fills in the occluded areas, restoring the image to its complete state. The quality of the filled image is then evaluated, such as by comparing it with the original image, checking the consistency between the filled area and its surrounding environment, and verifying whether the filling result conforms to visual perception. This can be done through visual inspection or quantitative evaluation. The specific implementation of the filling algorithm may involve techniques from image processing and machine learning, such as texture synthesis and generative adversarial networks (GANs). The effect of this step is to restore the insect-occluded areas into a complete soil image through the filling algorithm, providing an accurate data foundation for subsequent soil analysis.
[0062] S40: Analyze the filled farmland soil image based on a visual neural network to determine the fertility and water content of the farmland soil.
[0063] It should be noted that the preparation involves using infilled farmland soil image data, along with corresponding labeled data on soil fertility and moisture content. This data can be obtained through field collection and experiments. A visual neural network model suitable for soil fertility and moisture content assessment is designed and constructed. This may include convolutional neural networks (CNNs) or other deep learning architectures. The infilled soil images are preprocessed, including size normalization, color space transformation, and feature extraction to extract image features helpful for fertility and moisture content assessment. The constructed neural network model is trained using the prepared dataset. During training, the model learns the relationship between soil images and their fertility and moisture content. The trained model is validated using a validation set, and its performance in fertility and moisture content assessment is evaluated. This may involve calculating metrics such as precision, recall, and F1 score. The trained model is applied to new infilled soil images, and the model predicts soil fertility and moisture content. The model will output the corresponding prediction results. The implementation of these steps involves knowledge and techniques in the field of deep learning, such as neural network architecture design, data preprocessing, model training, and tuning. The effect of this step is that it uses a visual neural network to automatically determine the fertility and moisture content of the soil after filling, providing an important reference for soil management and agricultural production.
[0064] This embodiment provides a method for analyzing farmland soil. The method includes: capturing images of farmland soil using a drone while it is flying at a low altitude above the farmland soil; analyzing and identifying the farmland soil images; when insect images are detected in the farmland soil images, using an image segmentation algorithm to separate the insect images from the background; filling in the areas obscured by insects in the farmland soil images after separation from the background using a filling or repair algorithm; and analyzing the filled farmland soil images using a visual neural network to determine the fertility and moisture content of the farmland soil. This method enables accurate analysis and evaluation of farmland soil even when insects interfere with the drone's capture of farmland soil images, providing farmers with more effective farmland management suggestions.
[0065] Reference Figure 3 , Figure 3 This is a flowchart illustrating the second embodiment of the farmland soil analysis method of the present invention. In the second embodiment, the step of filling in the areas occluded by insects in the farmland soil image after separating the insect image from the background based on a filling or repair algorithm includes:
[0066] S301: Obtain the nearest farmland soil image that does not contain an insect image to the farmland soil image containing an insect image.
[0067] It's important to note that, firstly, a method for measuring image similarity needs to be defined, such as the Structural Similarity Index (SSIM) or Peak Signal-to-Noise Ratio (PSNR). These metrics help measure the degree of similarity between two images. The process involves traversing a database of farmland soil images to find images with high similarity to those containing insect images as candidates. These candidate images are then examined to ensure they do not contain insect images. This can be achieved using the results of previous insect image detection and segmentation steps. The distance between each candidate image and the image containing the insect image is calculated. This can be done using Euclidean distance, Manhattan distance, or other distance metrics. Finally, the image closest to the image containing the insect image is selected from the candidate images that do not contain insect images as the final choice. The implementation of these steps can involve relevant techniques from image processing and computer vision, such as image similarity calculation, image detection, and distance calculation. The effect of this step is to find the most similar farmland soil images that do not contain insect images for further analysis and comparison, thereby aiding in farmland management and insect monitoring.
[0068] S302: Determine a virtual insect background image in a farmland soil image that does not contain insect images based on the location of insects in the farmland soil image containing insect images.
[0069] It should be noted that the process involves using insect detection and segmentation algorithms to determine the location and boundaries of insects in farmland soil images containing insects. This can be achieved using computer vision techniques such as object detection or semantic segmentation. Next, the background region corresponding to the insect location is extracted from farmland soil images that do not contain insect images. This can be achieved by sampling the soil background around the insect location, ensuring that the generated virtual insect background is similar to the real background. The virtual insect background generated in the above steps is then synthesized with the farmland soil image that does not contain insect images. This may involve image overlay, fusion, or blending techniques to ensure that the virtual insect background blends naturally with the soil image. The synthesized image is then quality-assessed to check whether the synthesized insect background matches the real background and whether the synthesized result is natural and realistic. This can be done through visual inspection or image quality evaluation metrics. The implementation methods of these steps involve relevant techniques in the fields of image processing and computer vision, such as object detection, image synthesis, and image fusion. The effect of this step is to generate a farmland soil image with a virtual insect background, which can be used for subsequent analysis and processing without being limited by the location of the real insects.
[0070] S303: Based on the virtual insect background image, fill in the areas of farmland soil image that are occluded by insects in the image after the insect image and background are separated by a filling or repair algorithm.
[0071] It should be noted that image segmentation algorithms are used to separate the insect image from the background, resulting in separate insect and background images. Based on the separation results, the areas occluded by the insects are identified, i.e., the areas that need to be filled or repaired. Appropriate image filling or repair algorithms are selected, such as pixel-based filling algorithms (e.g., based on the mean, median, or Gaussian weighted average of neighboring pixels), texture synthesis-based filling algorithms (e.g., based on local texture), and deep learning-based filling algorithms. The occluded areas are then filled or repaired. The algorithm synthesizes appropriate pixel values based on surrounding background information or overall image features, ensuring the filled area blends naturally with the surrounding environment. The quality of the filled or repaired image is evaluated to check whether the filled area seamlessly integrates with the surrounding environment and whether the filling effect is natural and realistic. This can be done through visual inspection or image quality evaluation metrics. The implementation methods of these steps involve related technologies in image processing and computer vision, such as image segmentation, image filling, and repair algorithms. The effect of this step is to successfully fill or repair the areas occluded by the insects, making the soil image more complete and accurate in subsequent analysis.
[0072] Reference Figure 4 , Figure 4 This is a flowchart illustrating a third embodiment of the farmland soil analysis method of the present invention. In this third embodiment, obtaining the nearest farmland soil image that does not contain insect images to the farmland soil image containing insect images includes:
[0073] S3011: Acquire farmland soil images within a preset frame duration before and after the farmland soil image containing insect images;
[0074] S3012: Obtain the nearest farmland soil image that does not contain an insect image from the farmland soil images within the preset frame time period before and after.
[0075] It should be noted that the purpose of acquiring farmland soil images within a preset frame time interval before and after the insect-containing soil image is to ensure the acquisition of relevant information within consecutive frames, thereby better understanding the distribution and activity of insects in the soil. The preset frame time interval refers to a range set on the timeline to determine the time span between consecutive frames before and after the insect-containing soil image. For example, if the preset frame time interval is set to 10 minutes, it means the system will acquire farmland soil images within 10 minutes before and after the insect-containing soil image.
[0076] Specifically, firstly, a time window needs to be set, including farmland soil images within a preset frame duration, to ensure that consecutive frames before and after the farmland soil image containing insect images are considered. Then, the farmland soil images within the preset frame duration are traversed, and the image closest to the one containing insect images but not containing insect images is selected as the final choice. This can be achieved by calculating the similarity or distance between the images. The effect of this step is to successfully find the closest farmland soil image that does not contain insect images for subsequent analysis and comparison, which helps to accurately identify the insect situation in the farmland soil and make corresponding farmland management decisions.
[0077] It should be understood that defining a time frame ensures the relevance and continuity of the acquired farmland soil images, thereby more accurately capturing changes in insect activity and soil environmental evolution. This helps reduce data clutter and improves the accuracy and reliability of the analysis. Furthermore, defining the time frame effectively controls the amount of data, making subsequent processing more efficient and manageable.
[0078] Furthermore, in this embodiment, after acquiring farmland soil images within a preset frame time period before and after the acquisition of farmland soil images containing insect images, the method further includes:
[0079] If no farmland soil image without insect images is detected in the farmland soil images within the preset frame time period before and after, the shooting angle or altitude of the drone is adjusted.
[0080] Based on the adjusted shooting angle or altitude of the drone, farmland soil images containing insect images are reacquired within a second preset frame duration before and after the acquisition;
[0081] Accordingly, obtaining the nearest farmland soil image that does not contain an insect image from the farmland soil images within the preset frame time interval includes:
[0082] Obtain the nearest farmland soil image that does not contain an insect image from the farmland soil images within the second preset frame time period before and after.
[0083] It should be noted that adjusting the drone's shooting angle or altitude and re-acquiring images helps fill in gaps in farmland soil images where insects were not detected, ensuring more comprehensive and accurate image data. The second preset frame duration refers to the time interval between two preset frames during the process of readjusting the drone's shooting angle or altitude and re-acquiring images when no insect images were detected in the farmland soil images. This duration can be set according to specific circumstances and needs, typically referring to a pre-set time, such as a few seconds or minutes.
[0084] Furthermore, in this embodiment, when no farmland soil image without insect images is detected in the farmland soil images within the preset frame duration before and after, adjusting the shooting angle or altitude of the drone includes:
[0085] If no farmland soil image without insect images is detected in the farmland soil images within the preset frame time period before and after, the number of surrounding insects is detected by the UAV infrared sensor.
[0086] It should be noted that detecting the number of insects in the surrounding area using the drone's infrared sensor means that within a preset frame time period, if no images of farmland soil taken by the drone do not contain insects, the infrared sensor on the drone is used to scan for the number of insects in the surrounding area.
[0087] Specifically, infrared sensors can measure the heat distribution of insects, as insects typically generate minute amounts of heat. The sensors transmit the collected data to the control system on the drone for analysis and processing to determine the number of insects in the vicinity.
[0088] When the number of insects exceeds a preset number, the drone is controlled to release a colorless insect repellent to drive away surrounding insects.
[0089] It should be noted that when the number of insects detected in the surrounding area exceeds the preset value, the system will control the drone to release a colorless insect repellent to drive away the surrounding insects, thereby obtaining an image of farmland soil that does not contain insect images. The preset number of insects refers to the expected number of insects in the farmland soil image that is set in advance.
[0090] When the number of insects is not greater than the preset number of insects, adjust the shooting angle or altitude of the drone.
[0091] It should be noted that when the number of insects detected in the surrounding area does not exceed a preset value, the system will automatically adjust the drone's shooting angle or altitude to ensure that it captures farmland soil images free of insects. The flight control system can be used to adjust the drone's flight parameters, such as attitude control or altitude control, to ensure that the camera's shooting angle or altitude is sufficient to cover the entire farmland and eliminate insect interference. Ensure that the camera on the drone has sufficiently high resolution and a wide angle to capture the largest possible land area and ensure the quality and accuracy of the soil images.
[0092] Furthermore, in this embodiment, adjusting the shooting angle or altitude of the drone when the number of insects is not greater than a preset number of insects includes:
[0093] When the number of insects is not greater than a preset number of insects, determine the angle and distance between the surrounding insects and the drone;
[0094] The drone's shooting angle or height is adjusted based on the angle and distance between the surrounding insects and the drone using a preset adjustment algorithm.
[0095] It should be noted that by using sensors or a vision system, the system can detect the relative position and distance between the drone and surrounding insects. The system uses a preset adjustment algorithm to automatically adjust the drone's shooting angle or altitude based on the detected angle and distance between the drone and the surrounding insects. This can involve changing the flight attitude, altitude, or flight path.
[0096] Specifically, a flight control system and corresponding algorithms can be used to adjust the drone's flight attitude or altitude. For example, the flight direction or altitude can be adjusted based on the relative position of insects to ensure that the camera can capture images of land undisturbed by insects. Such adjustments ensure the acquisition of insect-free farmland soil images, improving image clarity and accuracy.
[0097] Furthermore, in this embodiment, the step of controlling the drone to release a colorless insect repellent to drive away surrounding insects when the number of insects exceeds a preset number includes:
[0098] When the number of insects exceeds a preset number, the species of insects around the drone are determined using image recognition technology;
[0099] The drone is controlled to release a corresponding colorless insect repellent based on the type of insects surrounding it, thereby repelling the surrounding insects.
[0100] It should be noted that the system can use image recognition technology to analyze the types and numbers of surrounding insects. This is achieved by capturing images using a camera mounted on the drone and analyzing and identifying them through algorithms. Based on the identified insect species, the system accurately releases the corresponding colorless insect repellent. These repellents can be chemical substances or other insect-repelling technologies that are effective in repelling insects without harming the soil or crops. By releasing colorless insect repellents, the number of surrounding insects can be quickly and effectively reduced, ensuring that the drone can capture undisturbed soil images. This method improves the quality and accuracy of farmland soil images, providing more reliable data support for agricultural management and decision-making. Furthermore, because colorless insect repellents are used, they do not have harmful impacts on the farmland environment, meeting the requirements of environmental protection and sustainable agriculture.
[0101] Furthermore, this embodiment of the invention also proposes a storage medium storing a farmland soil analysis program, which, when executed by a processor, implements the steps of the farmland soil analysis method described above.
[0102] In addition, refer to Figure 5 The present invention also proposes a farmland soil analysis device, which includes:
[0103] Image capturing module 10 is used to capture images of farmland soil by the drone while the drone is flying at a low altitude above the farmland soil.
[0104] Image separation module 20 is used to analyze and identify the farmland soil image. When the analysis and identification finds that the farmland soil image contains an insect image, an image segmentation algorithm is used to separate the insect image from the background in the farmland soil image.
[0105] The region filling module 30 is used to fill in the regions occluded by insects in the farmland soil image after the insect image and background are separated based on the filling or repair algorithm;
[0106] The farmland judgment module 40 is used to analyze the filled farmland soil image based on a visual neural network, thereby judging the fertility and water content of the farmland soil.
[0107] Other embodiments or specific implementations of the farmland soil analysis device described in this invention can be found in the above-described method embodiments, and will not be repeated here.
[0108] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0109] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments. In the unit claims listing several devices, several of these devices may be embodied by the same hardware item. The use of the terms first, second, and third, etc., does not indicate any order and can be interpreted as names.
[0110] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as a read-only memory image (ROM) / random access memory (RAM), magnetic disk, optical disk), and includes several instructions to cause a terminal user device (which may be a mobile phone, computer, server, air conditioner, or network user device, etc.) to execute the methods described in the various embodiments of the present invention.
[0111] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. A method for analyzing farmland soil, characterized in that, The method includes: During the flight of the drone at a low altitude above the farmland soil, images of the farmland soil are captured by the drone. The farmland soil image is analyzed and identified. When the analysis and identification shows that the farmland soil image contains insect images, an image segmentation algorithm is used to separate the insect images from the background in the farmland soil image. Fill in or repair algorithms to fill in areas occluded by insects in farmland soil images after separating insect images from the background; The fertility and moisture content of the farmland soil are determined by analyzing the infilled farmland soil image based on a visual neural network. The method of filling or repairing areas occluded by insects in farmland soil images after separating insect images from the background, based on the filling or repair algorithm, includes: Obtain the nearest farmland soil image that does not contain insect images to the farmland soil image containing insect images; Based on the location of insects in the farmland soil image containing insect images, a virtual insect background image is determined in the farmland soil image that does not contain insect images; Based on the virtual insect background image, the area occluded by insects in the farmland soil image after the insect image and background are separated is filled in by a filling or repair algorithm; The acquisition of the nearest farmland soil image that does not contain insect images to the farmland soil image containing insect images includes: Acquire farmland soil images within a preset frame duration before and after the acquisition of farmland soil images containing insect images; Obtain the nearest farmland soil image that does not contain an insect image from the farmland soil images within the preset frame time period before and after; After acquiring farmland soil images within a preset frame time period before and after the acquisition of farmland soil images containing insect images, the process further includes: If no farmland soil image without insect images is detected in the farmland soil images within the preset frame time period before and after, the shooting angle or altitude of the drone is adjusted. Based on the adjusted shooting angle or altitude of the drone, farmland soil images containing insect images are reacquired within a second preset frame duration before and after the acquisition; Accordingly, obtaining the nearest farmland soil image that does not contain an insect image from the farmland soil images within the preset frame time interval includes: Obtain the nearest farmland soil image that does not contain an insect image from the farmland soil images within the second preset frame time period before and after; When no farmland soil image without insect images is detected in the farmland soil images within the preset frame time period before and after, adjusting the shooting angle or altitude of the drone includes: If no farmland soil image without insect images is detected in the farmland soil images within the preset frame time period before and after, the number of surrounding insects is detected by the UAV infrared sensor. When the number of insects exceeds a preset number, the drone is controlled to release a colorless insect repellent to drive away surrounding insects. When the number of insects is not greater than the preset number of insects, adjust the shooting angle or altitude of the drone.
2. The method for analyzing farmland soil as described in claim 1, characterized in that, When the number of insects is not greater than a preset number of insects, adjusting the shooting angle or altitude of the drone includes: When the number of insects is not greater than a preset number of insects, determine the angle and distance between the surrounding insects and the drone; The drone's shooting angle or height is adjusted based on the angle and distance between the surrounding insects and the drone using a preset adjustment algorithm.
3. The method for analyzing farmland soil as described in claim 1, characterized in that, When the number of insects exceeds a preset number, controlling the drone to release a colorless insect repellent to drive away surrounding insects includes: When the number of insects exceeds a preset number, the species of insects around the drone are determined using image recognition technology; The drone is controlled to release a corresponding colorless insect repellent based on the species of insects surrounding it, in order to repel the surrounding insects.
4. A farmland soil analysis device, said device being used to implement the farmland soil analysis method as described in any one of claims 1 to 3, characterized in that, The farmland soil analysis device includes: An image capturing module is used to capture images of farmland soil by the drone while it is flying at a low altitude above the farmland soil. The image separation module is used to analyze and identify the farmland soil image. When the analysis and identification finds that the farmland soil image contains insect images, the image segmentation algorithm is used to separate the insect images in the farmland soil image from the background. The region filling module is used to fill in the regions occluded by insects in farmland soil images after the insect images have been separated from the background, based on filling or repair algorithms; The farmland judgment module is used to analyze the filled farmland soil image based on a visual neural network, thereby judging the fertility and water content of the farmland soil.
5. A farmland soil analysis device, characterized in that, The device includes: a memory, a processor, and a farmland soil analysis program stored in the memory and executable on the processor, the farmland soil analysis program being configured to implement the steps of the farmland soil analysis method as described in any one of claims 1 to 3.
6. A storage medium, characterized in that, The storage medium stores a farmland soil analysis program, which, when executed by a processor, implements the steps of the farmland soil analysis method as described in any one of claims 1 to 3.