Method and related device for determining width of target area

Through aerial image processing technology, deep convolutional neural networks and multi-category semantic segmentation models, the width of plants, mulch films and soil areas in farmland can be automatically determined, solving the high cost problem caused by manual measurement and improving the efficiency of crop growth monitoring.

CN114782807BActive Publication Date: 2025-09-09GUANGZHOU XAIRCRAFT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210346592.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-31
Publication Date
2025-09-09
Estimated Expiration
2042-03-31

AI Technical Summary

Technical Problem

In the prior art, changes in plant area width during crop growth require manual measurement, resulting in high manpower and time costs.

Method used

By acquiring aerial images of farmland and using a deep convolutional neural network model and a multi-category semantic segmentation model, the centerline mask images of the plant area, mulch area, and soil area are automatically determined to obtain the width value of the target area.

Benefits of technology

It realizes the automatic acquisition of the width value of the target area in the farmland without human intervention, reduces manpower and time costs, and improves the efficiency of crop growth monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114782807B_ABST
    Figure CN114782807B_ABST
Patent Text Reader

Abstract

Embodiments of the present invention provide a method and related apparatus for determining the width of a target area, relating to the field of computer technology. First, an aerial image of a farmland is acquired. Then, based on the acquired aerial image, the width values ​​of a target area at corresponding positions of a plurality of locations in the farmland are obtained, wherein any location point is located on the centerline of the target area, and the target area is at least one of a plant area, a mulch area, and a soil area in the farmland. Compared to the prior art, the present invention can automatically obtain the width values ​​of a plant area, a mulch area, or a soil area in the farmland based on an aerial image of the farmland without manual processing, thereby solving the problem of high labor and time costs caused by manually measuring the width of a target area in the farmland.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method for determining the width of a target area and a related device. Background Art

[0002] During the growth period of crops, the width of the plant area will become wider as time goes by, and the width of the visible soil area between the planting rows will become narrower accordingly. However, these width changes require growers to frequently go into the fields to observe and measure in order to obtain the actual width data, which is a waste of manpower and time. Summary of the Invention

[0003] The present invention aims to provide a method and related apparatus for determining the width of a target area, which can improve the problems existing in the prior art. The embodiments of the present invention can be implemented as follows:

[0004] In a first aspect, the present invention provides a method for determining a width of a target area, comprising:

[0005] Obtain aerial images of farmland;

[0006] Based on the aerial image, the width values ​​of the target area in the farmland at corresponding positions of several position points are obtained; wherein, any of the position points is located on the center line of the target area, and the target area is at least one of the plant area, mulch area and soil area in the farmland.

[0007] In an optional embodiment, the step of obtaining width values ​​of the target area in the farmland at corresponding positions of a plurality of position points based on the aerial image includes:

[0008] Obtaining a centerline mask image corresponding to the target area based on the aerial image; wherein the centerline mask image has centerline information corresponding to the target area, and the centerline information includes each position point on the centerline and a width value corresponding to each position point;

[0009] According to the centerline mask image, width values ​​at corresponding positions of the plurality of position points are output.

[0010] In an optional embodiment, when the target area is any one of the plant area, the mulch area, and the soil area, the step of obtaining a centerline mask image corresponding to the target area based on the aerial image includes:

[0011] The aerial image is input into a target model to obtain a centerline mask image corresponding to the target area; wherein the target model is pre-trained based on training samples containing the target area.

[0012] In an optional embodiment, when the target area is at least two of the plant area, the mulch area, and the soil area, the step of obtaining a centerline mask image corresponding to the target area based on the aerial image includes:

[0013] The aerial images are respectively input into the first target models corresponding to each target area to obtain a centerline mask image corresponding to each target area; wherein each first target model is pre-trained by a training sample containing the corresponding target area.

[0014] In an optional embodiment, when the target area is at least two of the plant area, the mulch area, and the soil area, the step of obtaining a centerline mask image corresponding to the target area based on the aerial image includes:

[0015] Inputting the aerial image into a multi-category semantic segmentation model to obtain a visual area corresponding to each target area and a category identifier corresponding to each visual area; the multi-category semantic segmentation model is pre-trained based on training samples containing visual areas and category identifiers;

[0016] The aerial image is input into a second target model to obtain a centerline mask image corresponding to each target area; wherein the second target model is pre-trained based on a training sample including a centerline and the width of each position point on the centerline, and each centerline mask image has a regional matching relationship with the corresponding visual area.

[0017] In an optional embodiment, when the target area is at least two of the plant area, the mulch area, and the soil area, the step of obtaining a centerline mask image corresponding to the target area based on the aerial image includes:

[0018] Inputting the aerial image into a third target model to obtain a multi-channel three-dimensional matrix; wherein each channel in the multi-channel three-dimensional matrix corresponds to a two-dimensional matrix, each two-dimensional matrix corresponds to a type of target area, and each two-dimensional matrix includes a centerline and the width of each position point on the centerline; the third target model is pre-trained based on training samples annotated with the multi-channel three-dimensional matrix;

[0019] A centerline mask image of the target area is determined based on a two-dimensional matrix corresponding to each channel in the multi-channel three-dimensional matrix.

[0020] In an optional embodiment, when the target area includes the plant area, the method further includes:

[0021] Determining the growth status of the crops corresponding to the plant area according to the width values ​​of the position points corresponding to the plant area; and / or,

[0022] When the target area includes the mulch area or the soil area, the method further includes:

[0023] The ventilation and light transmission conditions of the mulch area or the soil area are determined according to the width values ​​of the position points corresponding to the mulch area or the soil area.

[0024] In an optional embodiment, the plurality of location points are a plurality of sampling points. When the aerial image is an image initially captured of crops in the farmland, the step of outputting width values ​​at positions corresponding to the plurality of location points based on the centerline mask image includes:

[0025] selecting the plurality of sampling points from the position points on the centerline according to the centerline information; and outputting the width value corresponding to each sampling point according to the centerline mask image; and / or,

[0026] When the aerial image is not an image collected initially for the crops in the farmland, the step of outputting the width values ​​at the positions corresponding to the plurality of position points according to the centerline mask image includes:

[0027] According to the row and column coordinates of each sampling point, a width value corresponding to each sampling point is output based on the centerline mask image.

[0028] In an optional embodiment, the method further comprises:

[0029] obtaining multiple sets of width values ​​of a plurality of position points in the target area based on aerial images at different times during the crop growth period;

[0030] Outputting a width variation curve corresponding to the target area according to the plurality of sets of width values, and analyzing the width variation curve with a standard growth curve to obtain a corresponding farming strategy; and / or,

[0031] Selecting one of the width values ​​corresponding to a plurality of position points obtained from an aerial image at any time during the crop growth period as a target width value; comparing the target width value with a reference width value corresponding to the time to determine a farming strategy to be implemented for the crop at the time; and / or,

[0032] The width values ​​corresponding to a number of position points obtained from the aerial image at any time during the growth period of the crop are input into the farming strategy generation model to determine the farming strategy to be implemented for the crop at that time.

[0033] In an optional embodiment, the method further comprises:

[0034] Displaying the width variation curves corresponding to several position points of the target area through the crop observation interface; and / or,

[0035] The farming strategy is displayed through a crop observation interface.

[0036] In a second aspect, the present invention provides a device for determining a width of a target area, comprising:

[0037] Image acquisition module, used to obtain aerial images of farmland;

[0038] An image processing module is used to obtain the width values ​​of the target area in the farmland at corresponding positions of several position points based on the aerial image; wherein any of the position points is located on the center line of the target area in the farmland, and the target area is at least one of the plant area, mulch area and soil area in the farmland.

[0039] In a third aspect, the present invention provides an agricultural management system, comprising:

[0040] A processing unit, configured to perform at least one of the following operations: obtaining a centerline mask image corresponding to a target area according to the method of any one of the preceding embodiments, obtaining growth conditions and / or ventilation and light transmission conditions of crops according to the method of the preceding embodiments, obtaining corresponding farming strategies according to the method of the preceding embodiments, and obtaining a width change curve of the target area according to the method of the preceding embodiments to obtain a growth change graph of the crops;

[0041] An output unit is used to output the processing result of the processing unit.

[0042] In a fourth aspect, the present invention provides an electronic device comprising: a processor and a memory, wherein the memory is used to store machine-readable instructions executable by the processor, and the processor is used to implement the method described in any one of the aforementioned embodiments when executing the machine-readable instructions.

[0043] In a fifth aspect, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the method described in any one of the aforementioned embodiments.

[0044] In summary, an embodiment of the present invention provides a method and related device for determining the width of a target area. First, an aerial image of a farmland is acquired. Then, based on the acquired aerial image, the width values ​​of the target area at corresponding positions of a plurality of position points in the farmland are obtained, wherein any position point is located on the center line of the target area, and the target area is at least one of the plant area, the mulch area, and the soil area in the farmland. Compared with the prior art, the present invention can automatically obtain the width values ​​of the plant area, the mulch area, or the soil area in the farmland based on the aerial image of the farmland without manual processing, and can solve the problem of high manpower and time costs caused by manually measuring the width of the target area in the farmland. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.

[0046] Figure 1 A structural schematic diagram of the division of crop planting areas in a farmland provided by an embodiment of the present invention.

[0047] Figure 2 A schematic flow chart of a method for determining the width of a target area provided by an embodiment of the present invention.

[0048] Figure 3 A schematic diagram of a centerline mask image corresponding to a plant region provided by an embodiment of the present invention.

[0049] Figure 4 A schematic diagram of a centerline mask image corresponding to a ground film area provided in an embodiment of the present invention.

[0050] Figure 5 A schematic diagram of a first mask image obtained by a multi-category semantic segmentation model provided in an embodiment of the present invention.

[0051] Figure 6 A schematic diagram of a second mask image without category information obtained by a second target model provided in an embodiment of the present invention.

[0052] Figure 7 A schematic diagram of functional modules of a device for determining the width of a target area provided by an embodiment of the present invention.

[0053] Figure 8 A schematic structural diagram of an electronic device provided by an embodiment of the present invention.

[0054] Figure 9A schematic diagram of a module of an agricultural management system provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0055] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings herein can be arranged and designed in various different configurations.

[0056] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention as claimed, but rather merely represents selected embodiments of the present invention. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without creative effort shall fall within the scope of protection of the present invention.

[0057] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings.

[0058] In the description of the present invention, it should be noted that if the terms "upper", "lower", "inside", "outside", etc. appear, the orientation or position relationship indicated is based on the orientation or position relationship shown in the accompanying drawings, or is the orientation or position relationship in which the product of the invention is usually placed when in use. It is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it should not be understood as a limitation on the present invention.

[0059] In addition, the terms "first", "second", etc., if used, are merely used to distinguish and describe, and should not be understood as indicating or implying relative importance.

[0060] It should be noted that, in the absence of conflict, the features in the embodiments of the present invention may be combined with each other.

[0061] During the growth period of crops, the width of the plant area will increase over time, and the width of the visible soil area between the rows will decrease accordingly. However, these width changes require growers to frequently observe and measure in the fields to obtain actual width data. Similarly, observing the growth of crops also requires growers to conduct on-site inspections in the fields to determine how the crops are growing.

[0062] If we want to further monitor crop growth on a large scale and generate visual data for research, the data base of the width of the growing season in the planting area that needs to be measured manually will be very large. Obviously, the existing technology will waste a lot of manpower and material resources and have a high time cost.

[0063] In light of this, embodiments of the present invention provide a method for determining the width of a target area. Based on collected aerial images of farmland, these images are processed to determine the width values ​​corresponding to multiple points on a plant area, mulch film area, or soil area bus, thereby improving the existing techniques. This method is described below using various embodiments with reference to the accompanying drawings.

[0064] For example, take two adjacent planting rows in a farmland, see Figure 1 , Figure 1 A schematic diagram of a structure for dividing crop planting areas in a farmland provided by an embodiment of the present invention. Adjacent planting rows may be spaced a certain distance apart, and the separated areas may be soil areas. Two rows of crops may be sown on each planting row and covered with a mulch film. When the crops germinate and grow, two rows of plant areas are formed. As the crops grow, the width of the plant area may increase, while the width of the mulch film area may decrease. When viewing the farmland from above, the soil area may appear narrower due to being partially covered by the plants.

[0065] Therefore, aerial images of farmland can be used to monitor the width of several points along the centerline of each area within the field. Furthermore, by monitoring the changes in the width of several points within the plant area throughout the growing season, plant growth can be monitored. By monitoring the changes in the width of several points along the centerline of the mulch film area or soil area throughout the growing season, the ventilation of the field can be monitored. Furthermore, by monitoring the width of several points along the centerline of each area at a specific moment, it is possible to determine the current agricultural strategy to be implemented.

[0066] It should be noted that Figure 1 The division of crop planting areas shown is only an example. In practice, crop planting areas may be Figure 1 The structures shown are similar or the plants are planted more densely, etc., which are not limited here. Figure 1 The straight lines between the plant area and the mulch area, and between the plant area and the soil area shown are only examples. In practice, since the growth of each plant in the plant area is different, the boundary between the plant area and the adjacent area should appear as an irregular curve similar to a sawtooth or with greater undulations.

[0067] See Figure 2 , Figure 2A flow chart of a method for determining the width of a target area provided by an embodiment of the present invention. The method may include the following steps:

[0068] S201: Acquire aerial images of farmland.

[0069] In this embodiment, aerial images of farmland can be obtained by at least one method. For example, in an optional example, a camera mounted on a drone can be used to take aerial photos of the farmland to obtain aerial images. In another optional example, a camera located at a fixed point (e.g., a fixed aerial photography point near the farmland area or an observation tower) can be used to take aerial photos of the farmland to obtain images.

[0070] S202: Obtain width values ​​of a target area at corresponding positions of a plurality of position points in the farmland according to the aerial image.

[0071] In this embodiment, any position point is located on the midline of the target area. Figure 1 It can be understood that the target area is at least one of the plant area, film area and soil area in the farmland.

[0072] An embodiment of the present invention provides a method for determining the width of a target area. The method first acquires an aerial image of a farmland. Then, based on the acquired aerial image, the width of the target area at corresponding locations within the farmland is determined. Any location is located on the centerline of the target area, which is at least one of the plant area, the mulch film area, and the soil area within the farmland. Compared to existing technologies, the present invention automatically determines the width of the plant area, the mulch film area, or the soil area within the farmland based on aerial images without manual processing. This method addresses the significant labor and time costs associated with manually measuring the width of target areas within the farmland.

[0073] Optionally, the width values ​​corresponding to the plurality of position points may be obtained from a centerline mask image obtained from an aerial image. Accordingly, step S202 may include the following sub-steps:

[0074] S202-1. Obtain a centerline mask image corresponding to the target area based on the aerial image.

[0075] In this embodiment, the centerline mask image may have centerline information corresponding to the target area, and the centerline information may include each position point on the centerline and a width value corresponding to each position point.

[0076] S202-2. Output width values ​​at corresponding positions of a plurality of position points according to the centerline mask image.

[0077] In this embodiment, the width values ​​at the positions corresponding to the plurality of position points can be directly obtained from the centerline mask image, and the width value data corresponding to the plurality of position points can be further output.

[0078] In a possible implementation, the aforementioned plurality of points may represent all points on the midline of the target area, or may represent a portion of the points on the midline of the target area. The following describes a method for obtaining width values ​​corresponding to sampling points in different time periods when a portion of the points on the midline of the target area are used as sampling points.

[0079] Optionally, aerial images may be acquired at different time periods during the crop growth period. The plurality of location points may be multiple sampling points, and the plurality of sampling points required for the aerial images of the different time periods remain unchanged. In an optional example, when the aerial images are initially acquired for crops in a farmland, S202-2 may include the following sub-steps:

[0080] S202-2a. Select multiple sampling points from the position points on the center line according to the center line information; and output the width value corresponding to each sampling point according to the center line mask image.

[0081] In this embodiment, when the aerial image is an image captured for the first time during the crop growth period, multiple sampling points may be selected on the center line of the corresponding target area according to the center line mask image including center line information.

[0082] Optionally, the number of sampling points is not limited. In an optional example, the combination Figure 1 In a planting row, 11 sampling points can be selected on the midline of one target area, and the number of sampling points selected on the midlines of different target areas can be the same or different. In another optional example, when the aerial image is not an initial acquisition of the crops in the farmland, S202-2 can also include the sub-steps:

[0083] S202 - 2b , outputting a width value corresponding to each sampling point based on the row and column coordinates of each sampling point and the centerline mask image.

[0084] In this embodiment, if the aerial image is not an image collected for the first time during the crop growth period, the row and column coordinates of multiple sampling points can be directly retained according to the corresponding aerial image collected for the first time. Then, based on the centerline mask image obtained from the current aerial image, the row and column coordinates of the multiple sampling points can be combined to directly obtain the width value corresponding to each sampling point.

[0085] Due to errors caused by image stitching or satellite positioning, the subsequent aerial images may be offset from the initial aerial images. In the optional example, taking the target area as the ground film area, combined with Figure 1Multiple sampling points are randomly selected from the centerline of the mulch area corresponding to the initial aerial image. However, due to image offset, these sampling points may not necessarily lie on the centerline of the mulch area corresponding to the subsequent aerial image. Specifically, when the aerial image is not the initial capture of crops in a field, the width value corresponding to each sampling point can be searched based on the centerline information within a radius of a preset number of pixels at the row and column coordinates of each sampling point.

[0086] When the nearest width value can be searched within the range of the preset number of pixels as the radius at the row and column coordinates of a sampling point, it will be used as the width value corresponding to the sampling point; if the width value is not found within the range, it may mean that the plant corresponding to the sampling point has died, and the width value corresponding to the sampling point is counted as zero.

[0087] The size of the preset number of pixels can be set according to actual conditions. In an optional example, the preset number of pixels can be set to 5, 8, or 10, etc., which is not limited here.

[0088] It should be noted that the steps described in the above two examples can be executed separately or in combination, depending on the actual application situation and is not limited here.

[0089] Optionally, there are four implementation methods for obtaining the center line information and width information corresponding to the visual category area. The four implementation methods are introduced below through embodiments.

[0090] In an optional implementation, when the target area is any one of a plant area, a mulch area, and a soil area, step S202-1 may include the following sub-steps:

[0091] S202-1-1. Input the aerial image into the target model to obtain a centerline mask image corresponding to the target area.

[0092] In this embodiment, the target model can be pre-trained based on training samples containing the target area. The target model can be a deep convolutional neural network model, which includes but is not limited to UNet (a semantic segmentation model), CNN (Convolutional Neural Networks), and other models. It is understood that different types of target areas each correspond to a trained target model.

[0093] In the optional example, when the target area is a plant area, the target model corresponding to the plant area should be used. The centerline mask image of the plant area can be obtained by referring to Figure 3 , Figure 3A schematic diagram of a centerline mask image corresponding to a plant region provided by an embodiment of the present invention. In the figure, each grid represents a pixel, and each grid can represent a location point. The centerline of the plant region is composed of a row of location points, corresponding to a row of width values. Non-zero values ​​in grids on the centerline represent the width values ​​corresponding to the column of the plant region where the grid is located.

[0094] It should be noted that Figure 3 The straight line separating the plant region and its adjacent areas is merely an example. In practice, due to the varying growth of plants within a plant region, the boundary between the plant region and its adjacent areas may exhibit a jagged or more irregular curve. Accordingly, the width values ​​corresponding to different columns of pixels within the plant region may be the same or different. Figure 4 、 Figure 5 、 Figure 6 The same applies.

[0095] In an optional example, the aerial image is input into the target model to obtain a centerline mask image corresponding to the target area. The centerline mask image can also be presented in the form of a two-dimensional matrix. The position of the non-zero row in the two-dimensional matrix represents the centerline position, and a non-zero value in the matrix represents the width of the column where the non-zero value is located.

[0096] In another optional implementation, when the target area is at least two of the plant area, the mulch area, and the soil area, step S202-1 may include the following sub-steps:

[0097] S202-1-a. Input the aerial images into the first target model corresponding to each target area to obtain a centerline mask image corresponding to each target area.

[0098] In this embodiment, each first target model can be obtained by pre-training using training samples containing the corresponding target area.

[0099] The first target model can be a deep convolutional neural network model. The deep convolutional neural network model includes but is not limited to models such as UNet and CNN. It is understood that different types of target areas each correspond to a trained first target model.

[0100] Optionally, the first target model corresponding to each target area and the above target model may be the same model or different models.

[0101] In an optional example, when the two visual category areas are plant areas and mulch areas, the aerial image is input into the first target model corresponding to the plant area to obtain the following: Figure 3 The centerline mask image shown in the figure can be obtained by inputting the aerial image into the first target model corresponding to the ground film area. Figure 4 Centerline mask image shown.

[0102] Similarly, in an optional example, the aerial image is input into the first target model to obtain a centerline mask image corresponding to the target area. The centerline mask image can also be presented in the form of a two-dimensional matrix. The position of the non-zero row in the two-dimensional matrix represents the centerline position, and a non-zero value in the matrix represents the width of the column where the non-zero value is located.

[0103] In another optional implementation, when the target area is at least two of the plant area, the mulch area, and the soil area, step S202-1 may also include the following sub-steps:

[0104] S202-1-A. Input the aerial image into a multi-category semantic segmentation model to obtain the visual area corresponding to each target area and the category identifier corresponding to each visual area.

[0105] In this embodiment, the multi-category semantic segmentation model can be pre-trained based on training samples containing visual regions and category identifiers. The multi-category semantic segmentation model can be a deep convolutional neural network model. The multi-category semantic segmentation model can include but is not limited to models such as UNet, FCN (Fully Convolution Network), and DeeplabV3.

[0106] It can be understood that semantic segmentation refers to labeling each pixel in an image with a corresponding category, without distinguishing between individual pixels. Optionally, inputting the aerial image into a multi-category semantic segmentation model can obtain a first mask image, which contains the visual area corresponding to each target area and the category identifier corresponding to each visual area. S202-1-B: Input the aerial image into the second target model to obtain a centerline mask image corresponding to each target area.

[0107] In this embodiment, the second target model is pre-trained based on training samples containing the centerline and the width of each position point on the centerline. It can be understood that the second mask image containing the centerline information of each area can be obtained through the second target model, and the second mask image does not contain the category information of the visual area specifically corresponding to each area. Accordingly, by combining the first mask image with the second mask image, a centerline mask image of each target area can be obtained, and each centerline mask image has a region matching relationship with the corresponding visual area. In an optional example, when targeting the three visual category areas of plant area, mulch area and soil area:

[0108] See Figure 5 , Figure 5A schematic diagram of a first mask image obtained by a multi-class semantic segmentation model according to an embodiment of the present invention. An aerial image is input into the multi-class semantic segmentation model to obtain the following first mask image: the visual area corresponding to the plant region is the region labeled 3 in the image; the visual area corresponding to the mulch region is the region labeled 2 in the image; and the visual area corresponding to the soil region is the region labeled 1 in the image.

[0109] See Figure 6 , Figure 6 A schematic diagram of a second mask image without category information obtained by a second target model provided by an embodiment of the present invention. An aerial image is input into the second target model, and the obtained second mask image contains the centerline information of 1 to 4. Figure 5 and Figure 6 Overlaying the images yields a centerline mask image, showing that Region 1 corresponds to Plant Region 1, Region 2 corresponds to the mulch film region, Region 3 corresponds to Plant Region 2, and Region 4 corresponds to the soil region. It should be noted that this example is merely illustrative, and the specific number and division of regions depends on the actual application and is not limited here.

[0110] In another optional implementation, when the target area is at least two of the plant area, the mulch area, and the soil area, step S202-1 may also include the following sub-steps:

[0111] S202-1-A′: input the aerial image into the third target model to obtain a multi-channel three-dimensional matrix.

[0112] In this embodiment, each channel in the multi-channel three-dimensional matrix can correspond to a two-dimensional matrix, each two-dimensional matrix can correspond to a type of target area, and each two-dimensional matrix contains the centerline information of the corresponding target area, and the centerline information contains a centerline composed of multiple position points and the width of each position point on the centerline. The third target model can be a convolutional neural network model pre-trained based on training samples labeled with the multi-channel three-dimensional matrix. It can be understood that the number of channels in the multi-channel three-dimensional matrix corresponds to the number of target areas, and each two-dimensional matrix contains the centerline information of the corresponding target area. The non-zero row position in the two-dimensional matrix can represent the centerline position of the corresponding target area, and any non-zero value in the two-dimensional matrix can represent the width value of the column where the non-zero value is located. The non-zero value of the non-zero row in the two-dimensional matrix represents the width of the corresponding target area.

[0113] S202-1-B′: Determine a centerline mask image of the target area based on a two-dimensional matrix corresponding to each channel in the multi-channel three-dimensional matrix.

[0114] In this embodiment, the two-dimensional matrices corresponding to each channel are combined to determine the centerline mask images corresponding to all target areas.

[0115] In a possible embodiment, when the target area includes a plant area, the method may further include the steps of:

[0116] S203: Determine the growth status of the crops corresponding to the plant area according to the width values ​​of the position points corresponding to the plant area.

[0117] In this embodiment, the width value corresponding to each position point on the line of the plant area can represent the growth of the crops corresponding to the position point. Taking cotton plants as an example, assuming that each position point corresponds to a cotton plant, during its growth period, as the cotton plant grows, the width value corresponding to the position point should become larger, and the change in the width value corresponding to the position point throughout the growth period can reflect the growth of the cotton plant. It should be noted that this example is only an example. In actual situations, it depends on the actual situation. The number of plants corresponding to a position point may be 1, 2 or 3. Even if the number of plants corresponding to the position point is 0, it may indicate that the growth of the plant at the position point is not good and the plant may have died.

[0118] In a possible example, at a certain moment in the early growth period of the plant area, the centerline mask image of all plant areas in the farmland is obtained, and the centerline information corresponding to each row of plant areas can be extracted. Then, for each row of plant areas, a mean value is obtained based on the width values ​​of all position points in the corresponding centerline information. The mean value can reflect the growth status of the row of plant areas at that moment. This mean value is compared with a preset basic value. If the difference between the mean value and the basic value is within a preset range, it can be reflected that the crops in the row of plant areas are in a normal growth state. If the difference between the mean value and the basic value exceeds the preset range, it can be reflected that the crops in the row of plant areas are in a state of malnutrition or overnutrition. The preset basic value can be the plant width obtained through experiments when the crops grow normally to that moment.

[0119] In another possible embodiment, when the target area is a mulch film area or a soil area, the method may further include the steps of:

[0120] S204: Determine ventilation and light transmission conditions of the mulch film area or the soil area according to the width values ​​of the position points corresponding to the mulch film area or the soil area.

[0121] When the target area includes the mulch area, the width value corresponding to the location point of the mulch area can indirectly reflect the growth of the corresponding crops at the location point, and can reflect the degree of row closure and field ventilation and light transmittance; when the target area includes the soil area, the width value corresponding to the location point of the soil area can also indirectly reflect the growth of the corresponding crops at the sampling point, and directly reflect the ventilation and light transmittance of the area.

[0122] It should be noted that steps S203 and S204 described in the above two implementations can be executed separately or in combination, depending on the actual application situation and are not limited here.

[0123] Optionally, a corresponding farming strategy may be determined based on aerial images of crops during their growth period. Three implementation methods for generating farming strategies are described below.

[0124] In a possible implementation, the method may further include the steps of:

[0125] S205: Based on aerial images taken at different times during the crop growth period, multiple sets of width values ​​are obtained for multiple locations in the target area. S206: Based on the multiple sets of width values, a width change curve corresponding to the target area is output, and the width change curve is analyzed with the standard growth curve to obtain a corresponding farming strategy.

[0126] In an optional example, taking the target area including the plant area as an example, based on aerial images at different times during the crop growth period, multiple sets of width values ​​corresponding to several position points in the plant area in the farmland can be obtained, and each set of width values ​​reflects the width data of the plant area at a moment.

[0127] For each set of width values, an average value can be calculated. The average values ​​corresponding to the multiple sets of width values ​​along the growth timeline are then used to fit a width variation curve for the plant region. This curve reflects the plant's growth during the growth period. By comparing this width variation curve with the plant's standard growth curve, the plant's current growth status can be determined, such as whether it is malnourished or overnourished. The corresponding agricultural strategy for the plant region can be to increase or dilute nutrient concentrations.

[0128] In another possible implementation, the method may further include the steps of:

[0129] S207: selecting one of the width values ​​corresponding to a plurality of position points obtained from the aerial image at any time during the crop growth period as a target width value; comparing the target width value with the reference width value corresponding to the time to determine the farming strategy to be implemented for the crop at the time;

[0130] In an optional example, taking the target area including the plant area as an example, based on the aerial image at a certain moment during the growth period of the crop, a number of width values ​​corresponding to a number of position points in the plant area of ​​the farmland can be obtained. One of the width values ​​is selected as the target width value, and then the target width value can be compared with the reference width value corresponding to the moment. If the difference between the target width value and the reference width value is beyond the predetermined range, it can be reflected that the crops in the plant area of ​​the farmland are in a state of malnutrition (the difference is negative) or overnutrition (the difference is positive). For example, if it is determined to be in a state of malnutrition or overnutrition, the corresponding farming strategy that should be implemented for the plant area can be to increase the nutrient concentration or dilute the nutrient concentration.

[0131] In another possible implementation, the method may further include the steps of:

[0132] S208: Input the width values ​​corresponding to a number of position points obtained from the aerial image at any moment during the crop growth period into the farming strategy generation model to determine the farming strategy to be implemented for the crops at that moment.

[0133] In this embodiment, the agricultural strategy generation model can be pre-trained using training samples containing width data for crop growth stages and corresponding agricultural strategies. By inputting the width values ​​corresponding to several locations obtained from aerial images at any point in the crop's growth period into the agricultural strategy generation model, the agricultural strategy that can be implemented for the crop at that moment can be derived. For example, if the model inputs width data for a crop during its seedling stage, the resulting agricultural strategy may include actions such as watering and fertilizing the seedlings. It should be understood that this example is merely illustrative and not limiting.

[0134] It should be noted that the steps described in the above three implementation modes can be performed separately in one embodiment or in combination in the same embodiment, depending on the actual application situation and is not limited here.

[0135] In an optional example, a width variation curve obtained based on the width values ​​of the target area at different moments obtained through monitoring can be visually presented to the user. The method may further include the steps of:

[0136] S209: Displaying width variation curves corresponding to several position points in the target area through the crop observation interface.

[0137] In another optional example, the farming strategy obtained based on the width values ​​of the target area at different times obtained through monitoring can also be visually presented to the user. The method can further include the steps of:

[0138] S210. Displaying farming strategies through the crop observation interface.

[0139] Based on the above-mentioned method for determining the width of a target area, an embodiment of the present invention further provides a device 200 for determining the width of a target area. Figure 7 , Figure 7 A schematic diagram of the functional modules of a device for determining the width of a target area provided by an embodiment of the present invention, the device comprising:

[0140] An image acquisition module 210 is used to acquire aerial images of farmland;

[0141] The image processing module 220 is used to obtain the width values ​​of the target area at corresponding positions of a plurality of position points in the farmland based on the aerial image.

[0142] Wherein, any position point is located on the center line of the target area in the farmland, and the target area is at least one of the plant area, the mulch film area and the soil area in the farmland.

[0143] In this embodiment, the image acquisition module 210 can be used to execute the above step S201, and the image processing module 220 can be used to execute the above steps S202-S210. For relevant contents of the image acquisition module 210, the image processing module 220 and the data acquisition module 230, please refer to the corresponding specific description above.

[0144] The above-mentioned device 200 for determining the width of the target area is used to execute the method provided by the above-mentioned embodiment. Its implementation principle and technical effects are similar and will not be described in detail here.

[0145] The above modules can be one or more integrated circuits configured to implement the above methods, such as one or more application-specific integrated circuits (ASICs), one or more microprocessors (DSPs), or one or more field programmable gate arrays (FPGAs). For example, when a module is implemented by scheduling program code through a processing element, the processing element can be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For example, these modules can be integrated together and implemented in the form of a system-on-a-chip (SoC).

[0146] Further, based on the above-mentioned method for determining the width of the target area, please refer to Figure 8, which is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. The electronic device 300 includes a processor 310, a memory 320, and a bus 330. The memory 320 stores machine-readable instructions executable by the processor 310. When the electronic device 300 is in operation, the processor 310 communicates with the memory 320 via the bus 330, and the processor 310 executes the machine-readable instructions to implement the above-described method embodiment.

[0147] The processor 310 can be an integrated circuit chip with signal processing capabilities. The processor 102 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0148] The memory 320 can be used to store software programs or data, such as data packets for submodule software upgrades and sequence values ​​that can represent the number of submodules provided in the embodiments of the present application. This example is merely illustrative and is not intended to be limiting. The memory 320 can be, but is not limited to, random access memory (RAM), read-only memory (ROM), flash memory (Flash), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc.

[0149] I understand. Figure 8 The structure shown is for illustration only. The electronic device 300 may also include Figure 8 More or fewer components than shown, or with Figure 8 Different configurations shown. Figure 8 Each component shown in the figure can be implemented by hardware, software or a combination thereof.

[0150] Based on the above-mentioned method for determining the width of the target area, the embodiment of the present invention further provides an agricultural management system 400, please refer to Figure 9 , Figure 9 A schematic diagram of a module of an agricultural management system provided by an embodiment of the present invention, the system includes:

[0151] The processing unit 410 is configured to perform at least one of the following operations:

[0152] Acquire a centerline mask image corresponding to the target area according to the aforementioned method embodiment;

[0153] Obtaining the growth conditions and / or ventilation and light transmission conditions of crops according to the aforementioned method embodiment;

[0154] Obtaining corresponding farming strategies according to the aforementioned method embodiment;

[0155] According to the aforementioned method embodiment, a width variation curve of the target area is obtained to obtain a growth variation diagram of the crop.

[0156] The output unit 420 is used to output the processing result of the processing unit.

[0157] I understand. Figure 9 The structure shown is for illustration only. The agricultural management system 400 may also include Figure 9 More modules are shown in .

[0158] Furthermore, based on the above-described method for determining the width of a target area, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon. When executed by a processor, the computer program executes the steps of the above-described method embodiment. The computer-readable storage medium may be, but is not limited to, a USB flash drive, a mobile hard drive, ROM, RAM, PROM, EPROM, EEPROM, a FLASH disk, or an optical disk, among other media capable of storing program code.

[0159] In summary, the embodiments of the present invention provide a method and related apparatus for determining the width of a target area. The method first acquires an aerial image of a farmland, and then, based on the acquired aerial image, obtains the width values ​​of the target area at corresponding locations within the farmland at a number of locations, wherein any location point is located on the centerline of the target area, and the target area is at least one of a plant area, a mulch film area, and a soil area within the farmland. Compared to the prior art, the present invention automatically obtains the width values ​​of the plant area, mulch film area, or soil area within the farmland based on aerial images of the farmland without requiring manual processing, thereby resolving the high labor and time costs associated with manually measuring the width of the target area within the farmland.

[0160] Furthermore, the width of a target area at any point during the growing season can be used to determine crop growth or reflect ventilation and light transmission. Furthermore, a crop width change curve can be generated, creating a visual chart that more intuitively reflects crop growth changes during the growing season, which has significant research significance for field management. Farming strategies can also be derived based on target area width data, further advancing intelligent planting.

[0161] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present invention should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.

Claims

1. A method for determining the width of a target area, characterized in that: include: Obtain aerial images of farmland; Obtaining a centerline mask image corresponding to a target area based on the aerial image; wherein the target area is at least one of a plant area, a mulch film area, and a soil area in the farmland; the centerline mask image has centerline information corresponding to the target area, the centerline information including a plurality of position points on the centerline and a width value corresponding to each position point; According to the centerline mask image, width values ​​at corresponding positions of the plurality of position points are output.

2. The method according to claim 1, wherein When the target area is any one of the plant area, the mulch area, and the soil area, the step of obtaining a centerline mask image corresponding to the target area based on the aerial image includes: The aerial image is input into a target model to obtain a centerline mask image corresponding to the target area; wherein the target model is pre-trained based on training samples containing the target area.

3. The method according to claim 1, wherein When the target area is at least two of the plant area, the mulch area, and the soil area, the step of obtaining a centerline mask image corresponding to the target area based on the aerial image includes: The aerial images are respectively input into the first target models corresponding to each target area to obtain a centerline mask image corresponding to each target area; wherein each first target model is pre-trained by a training sample containing the corresponding target area.

4. The method according to claim 1, wherein When the target area is at least two of the plant area, the mulch area, and the soil area, the step of obtaining a centerline mask image corresponding to the target area based on the aerial image includes: Inputting the aerial image into a multi-category semantic segmentation model to obtain a visual area corresponding to each target area and a category identifier corresponding to each visual area; the multi-category semantic segmentation model is pre-trained based on training samples containing visual areas and category identifiers; The aerial image is input into a second target model to obtain a centerline mask image corresponding to each target area; wherein the second target model is pre-trained based on a training sample including a centerline and the width of each position point on the centerline, and each centerline mask image has a regional matching relationship with the corresponding visual area.

5. The method according to claim 1, wherein When the target area is at least two of the plant area, the mulch area, and the soil area, the step of obtaining a centerline mask image corresponding to the target area based on the aerial image includes: Inputting the aerial image into a third target model to obtain a multi-channel three-dimensional matrix; wherein each channel in the multi-channel three-dimensional matrix corresponds to a two-dimensional matrix, each two-dimensional matrix corresponds to a type of target area, and each two-dimensional matrix includes a centerline and the width of each position point on the centerline; the third target model is pre-trained based on training samples annotated with the multi-channel three-dimensional matrix; A centerline mask image of the target area is determined based on a two-dimensional matrix corresponding to each channel in the multi-channel three-dimensional matrix.

6. The method according to claim 1, wherein When the target area includes the plant area, the method further includes: determining the growth condition of the crops corresponding to the plant area according to the width values ​​of the position points corresponding to the plant area; And / or, when the target area includes the mulch area or the soil area, the method further includes: The ventilation and light transmission conditions of the mulch area or the soil area are determined according to the width values ​​of the position points corresponding to the mulch area or the soil area.

7. The method according to claim 1, wherein The plurality of location points are a plurality of sampling points. When the aerial image is an image initially captured of crops in the farmland, the step of outputting width values ​​at positions corresponding to the plurality of location points according to the centerline mask image includes: Selecting the plurality of sampling points from the position points on the centerline according to the centerline information; and outputting the width value corresponding to each sampling point according to the centerline mask image; and / or, When the aerial image is not an image collected initially for the crops in the farmland, the step of outputting the width values ​​at the positions corresponding to the plurality of position points according to the centerline mask image includes: According to the row and column coordinates of each sampling point, a width value corresponding to each sampling point is output based on the centerline mask image.

8. The method according to claim 1, wherein The method further comprises: Obtaining multiple sets of width values ​​of a plurality of position points in the target area based on aerial images at different times during the crop growth period; Outputting a width variation curve corresponding to the target area according to the plurality of sets of width values, and analyzing the width variation curve with a standard growth curve to obtain a corresponding farming strategy; and / or, Selecting one of the width values ​​corresponding to a plurality of position points obtained from an aerial image at any time during the crop growth period as a target width value; comparing the target width value with a reference width value corresponding to the time to determine a farming strategy to be implemented for the crop at the time; and / or, The width values ​​corresponding to a number of position points obtained from the aerial image at any time during the growth period of the crop are input into the farming strategy generation model to determine the farming strategy to be implemented for the crop at that time.

9. The method according to claim 8, wherein The method further comprises: Displaying the width variation curves corresponding to several position points of the target area through the crop observation interface; and / or, The farming strategy is displayed through a crop observation interface.

10. A device for determining the width of a target area, characterized in that: include: Image acquisition module, used to obtain aerial images of farmland; An image processing module is configured to obtain, based on the aerial image, a centerline mask image corresponding to a target area; wherein the target area is at least one of a plant area, a mulch film area, and a soil area in the farmland; the centerline mask image has centerline information corresponding to the target area, the centerline information including a plurality of position points on the centerline and a width value corresponding to each position point; The image processing module is further configured to output width values ​​at positions corresponding to the plurality of position points based on the centerline mask image.

11. An agricultural management system, characterized in that: include: a processing unit configured to perform at least one of the following operations: obtaining a centerline mask image corresponding to a target area according to the method of any one of claims 1 to 5, obtaining growth conditions and / or ventilation and light transmission conditions of crops according to the method of claim 6, obtaining corresponding farming strategies according to the method of claim 8, and obtaining a width change curve of the target area according to the method of claim 8 to obtain a growth change diagram of the crops; An output unit is used to output the processing result of the processing unit.

12. An electronic device, characterized in that: include: A processor and a memory, wherein the memory is used to store machine-readable instructions executable by the processor, and the processor is used to implement the method according to any one of claims 1 to 9 when executing the machine-readable instructions.

13. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Method for automatically identifying field weeds in crop seeding-stage using site and grain characteristic

    CN1936919A