Method and device for measuring phenotypic characters of wheat awns in field environment

The wheat ear images in the field are obtained through the mobile terminal and the specified size scale is used for image processing. Combined with deep learning models and image processing technology, the phenotypic traits of wheat mannequins are extracted, which solves the problem of destructive sampling and insufficient information of the existing measurement methods, and realizes the Rapid and accurate measurement of phenotypic traits of Maimang.

CN119417881AActive Publication Date: 2025-02-11AGRI INFORMATION INST OF CHINESE ACAD OF AGRI SCI
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411444962.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-16
Publication Date
2025-02-11
Estimated Expiration
2044-10-16

AI Technical Summary

Technical Problem

The existing method of measuring phenotype traits of wheat dependent dependent manipulation, and the image measurement method can only obtain the number of wheat dependents, but cannot obtain more phenotype traits of wheat dependents. The sampling is highly destructive and is suitable for small sample breeding and unfavorable fields.

Method used

The wheat ear images in the field environment are obtained through the mobile terminal, and the image processing is performed using the specified size ruler. The binarized image of the wheat ears is extracted through deep learning models and image processing technology to determine the phenotype of the wheat ears, including the wheat area, quantity and Average length.

Benefits of technology

It has achieved rapid and accurate measurement of wheat phenotype traits without destroying wheat growth, solving the problem of destructive sampling and insufficient information of existing methods, and is suitable for wheat breeding research in field environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119417881A_ABST
    Figure CN119417881A_ABST
Patent Text Reader

Abstract

The invention discloses a method and a device for measuring phenotypic characters of wheat awns in a field environment. The method comprises the following steps: acquiring a wheat ear image in the field environment through a mobile terminal; the wheat ear image comprises a specified size scale; carrying out image segmentation extraction on the wheat head image according to the wheat head and the specified-size scale to obtain an image of the wheat head and the specified-size scale; determining the actual size represented by each pixel in the wheat ear image according to the image of the specified size scale; performing image processing on the images of the wheat awns and the wheat ears to obtain binary images of the wheat awns and the wheat ears; determining the phenotypic characters of the wheat awns according to the pixel data occupied by the wheat awns and the wheat ears in the binary images of the wheat awns and the wheat ears and the actual size represented by each pixel; the wheat awn phenotypic characters comprise the wheat awn area, the wheat awn number and the wheat awn average length. According to the method, more wheat awn phenotypic characters can be obtained through an image processing technology on the premise that wheat growth is not damaged.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a method and device for measuring wheat awn phenotypic traits in a field environment. Background Art

[0002] This section is intended to provide a background or context to the embodiments of the invention recited in the claims. No admission is made that the description herein is prior art by inclusion in this section.

[0003] The wheat awn is a bristle-like extension of the lemma of the floret, consisting of three vascular bundles and green tissue that confers photosynthesis. The wheat awn increases the photosynthetic area of ​​the spike by 50%, intercepts about 4% of the light, and doubles the net rate of photosynthesis in the spike. The awn develops later than the flag leaf, which makes it senesce later, and the presence of the awn seems to be the main contributor to spike photosynthesis. However, the development of the awn and the floret overlaps in the young spike before anthesis, and the awn is a sink organ for assimilates, and the floret development at this time is also highly sensitive to these assimilates. Therefore, the presence of the awn may affect not only the fertility of the floret, but also the number and size of the grains. Some studies have reported that the presence of the awn can be positive or negative for wheat yield, depending on the growing conditions and genotype, and the question of whether the presence of the awn promotes grain yield remains controversial. Therefore, in-depth research on the role of the awn in grain weight and yield remains a direction for future research. In this context, evaluating the causes of any possible effects of the awn on photosynthesis, carbohydrate storage, and improved water use efficiency requires not only determining the presence or absence of the awn, but also quantifying the sensitivity of the phenotypic traits of the awn to it. Therefore, developing an efficient and automated method for measuring wheat awn phenotypic traits in the field is of great significance for studying wheat yield increase.

[0004] The existing methods for measuring wheat awn phenotypic traits still rely on manual labor, such as using a ruler or tape measure to measure awn length. The more advanced methods are to use root scanners or cameras to collect images for measurement. These methods require destructive sampling after extracting awns and taking them to the laboratory for measurement, which is extremely unfavorable for breeding plots with small sample sizes. Grains and awns sampled during maturity are easy to fall off, which is not conducive to sampling and measurement. In addition, image measurement methods can generally only obtain the number of wheat awns, and cannot obtain more wheat awn phenotypic traits. Summary of the invention

[0005] The embodiment of the present invention provides a method for measuring wheat awn phenotypic traits in a field environment, which is used to obtain wheat awn and wheat ear images without destroying wheat growth, and obtain more wheat awn phenotypic traits through image processing technology. The method includes:

[0006] Acquiring an image of wheat ears in a field environment through a mobile terminal; the wheat ear image includes a specified size ruler, and the specified size ruler is used to determine the size and position of wheat awns and wheat ears in the wheat ear image;

[0007] Perform image segmentation and extraction of wheat ears and a designated size ruler on the wheat ear image to obtain images of wheat ears and a designated size ruler;

[0008] According to the image of the specified size ruler, determine the actual size represented by each pixel in the wheat ear image;

[0009] Performing image processing on the image of wheat awns and wheat ears to obtain a binary image of the wheat awns and wheat ears;

[0010] The phenotypic traits of wheat awn are determined according to the pixel data respectively occupied by the wheat awn and wheat ear in the binary image of the wheat awn and wheat ear, and the actual size represented by each pixel; the phenotypic traits of wheat awn include the area of ​​wheat awn, the number of wheat awn and the average length of wheat awn.

[0011] In one embodiment, obtaining an image of wheat ears in a field environment through a mobile terminal includes: obtaining an imaging image of wheat ears in a field environment placed in front of a preset background plate through a mobile terminal; marking the placement area of ​​the photographed wheat ears and a specified size scale on the preset background plate.

[0012] In one embodiment, image segmentation and extraction of wheat ear awns and wheat ears and specified size scales are performed on wheat ear images to obtain images of wheat ear awns and wheat ears and specified size scales, including: using a deep learning model to extract images of wheat ear awns and wheat ears and specified size scales from multiple wheat ear images to obtain multiple images of wheat ear awns and wheat ears and specified size scales; the deep learning model is pre-trained on a YOLOv8n model using historical wheat ear images, wheat ear awns and wheat ears extracted from historical wheat ear images, and specified size scales extracted from historical wheat ear images.

[0013] In one embodiment, the actual size represented by each pixel in the wheat ear image is determined based on an image of a ruler of a specified size, including: performing local adaptive thresholding, binarization, closing operations, and filling operations on the image of the ruler of the specified size to obtain a binarized image of the ruler; determining the area of ​​the ruler in the image based on the binarized image of the ruler; and determining the actual size represented by each pixel based on the area of ​​the ruler in the image and the actual area of ​​the ruler.

[0014] In one embodiment, determining the actual size represented by each pixel according to the area of ​​the ruler in the image and the actual area of ​​the ruler includes: determining the actual size represented by each pixel according to the area of ​​the ruler in the image and the actual area of ​​the ruler according to the following formula:

[0015]

[0016] Where SSOP is the actual size represented by each pixel, S 图像 is the area of ​​the ruler in the image, S 实际 Actual area of ​​ruler.

[0017] In one embodiment, the phenotypic traits of wheat awn are determined based on the pixel data respectively occupied by the wheat awn and the wheat ear in the binary image of the wheat awn and wheat ear, and the actual size represented by each pixel, including: performing opening operation on the binary image of the wheat awn and wheat ear to obtain a binary image with wheat ears and no wheat awn; subtracting the binary image of wheat ears with no wheat awn from the binary image of the wheat awn and wheat ear to obtain a binary image with wheat awn but no wheat ears; determining the actual area of ​​the wheat awn based on the number of pixels with a grayscale value of 1 in the binary image with wheat awn and no wheat ears and the actual size represented by each pixel.

[0018] In one embodiment, after determining the actual area of ​​the wheat awns, the method also includes: performing skeleton extraction on the binary image with wheat awns but no wheat ears to obtain a binary image of the wheat awn skeleton; performing expansion processing and convex hull calculation on the binary image with wheat ears but no wheat awns to obtain a binary image of the convex hull of the wheat ears; calculating the number of intersections between the convex hull of the wheat ears and the wheat awn skeleton; and determining the number of wheat awns based on the number of intersections.

[0019] In one embodiment, after determining the number of awns based on the number of intersections, the method also includes: calculating the number of pixels with a grayscale value of 1 in the binary image of the awn skeleton; determining the total length of the awn based on the number of pixels with a grayscale value of 1 in the binary image of the awn skeleton and the actual size represented by each pixel; determining the average length of the awn based on the total length of the awn and the number of awns.

[0020] The embodiment of the present invention also provides a device for measuring wheat awn phenotypic traits in a field environment, which is used to obtain wheat awn and ear images without destroying wheat growth, and obtain more wheat awn phenotypic traits through image processing technology. The device includes:

[0021] An image acquisition module is used to acquire an image of wheat ears in a field environment through a mobile terminal; the image of wheat ears includes a specified size ruler, and the specified size ruler is used to determine the size and position of wheat ears in the image;

[0022] An image extraction module is used to perform image segmentation and extraction of wheat ears and a scale of specified size on the wheat ear image to obtain images of wheat ears and a scale of specified size;

[0023] A pixel actual size determination module is used to determine the actual size represented by each pixel in the wheat ear image according to an image of a specified size ruler;

[0024] The module for extracting wheat awn phenotypic traits is used to process images of wheat awns and wheat ears to obtain binary images of wheat awns and wheat ears; the phenotypic traits of wheat awns are determined based on the pixel data respectively occupied by the wheat awns and wheat ears in the binary images of wheat awns and wheat ears, and the actual size represented by each pixel; the phenotypic traits of wheat awns include the area of ​​wheat awns, the number of wheat awns and the average length of wheat awns.

[0025] An embodiment of the present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for measuring wheat awn phenotypic traits in a field environment is implemented.

[0026] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for measuring wheat awn phenotypic traits in a field environment is implemented.

[0027] An embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the method for measuring wheat awn phenotypic traits in a field environment is implemented.

[0028] In an embodiment of the present invention, an image of wheat ears in a field environment is acquired by a mobile terminal, so that images of wheat awns and ears are acquired without destroying the growth of wheat. The wheat ear image includes a specified size ruler, and then the specified size ruler is used to determine the actual size represented by each pixel in the wheat ear image, so that the phenotypic traits of the wheat awn, including the awn area, the number of wheat awns and the average length of wheat awns, are determined through the pixel data respectively occupied by the wheat awn and the wheat ear in the binary image of the wheat awn and ear, and the actual size represented by each pixel. Compared with the prior art, in the embodiment of the present invention, a specified size ruler is photographed when acquiring the wheat ear image, and image processing is performed according to the specified size ruler to obtain the phenotypic traits of the wheat awn area, the number of wheat awns and the average length of wheat awns, thereby realizing rapid and accurate measurement of the surface area, number and length of the wheat awn. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:

[0030] Figure 1 This is a schematic diagram of a process for measuring wheat awn phenotypic traits in a field environment according to an embodiment of the present invention;

[0031] Figure 2 A schematic diagram of presetting a background plate in an embodiment of the present invention;

[0032] Figure 3 A schematic diagram of deep learning model recognition and extraction in an embodiment of the present invention;

[0033] Figure 4Schematic diagram of rectangular ruler image processing in an embodiment of the present invention;

[0034] Figure 5 Schematic diagram of wheat ear image preprocessing in an embodiment of the present invention;

[0035] Figure 6 This is a schematic diagram of measuring wheat awn phenotypic traits in an embodiment of the present invention;

[0036] Figure 7 This is a schematic diagram of progressive processing of expansion thresholds in an embodiment of the present invention;

[0037] Figure 8 Schematic diagram of a device for measuring wheat awn phenotypic traits in a field environment in an embodiment of the present invention. DETAILED DESCRIPTION

[0038] To make the purpose, technical solution and advantages of the embodiments of the present invention more clear, the embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings. Here, the exemplary embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.

[0039] Figure 1 FIG. 1 is a flow chart of a method for measuring wheat awn phenotypic traits under a field environment in an embodiment of the present invention. Figure 1 As shown, the method includes:

[0040] Step 101: acquiring an image of wheat ears in a field environment through a mobile terminal; the wheat ear image includes a specified size ruler, and the specified size ruler is used to determine the size and position of wheat awns and wheat ears in the wheat ear image;

[0041] Step 102, performing image segmentation and extraction of wheat ears and a designated size scale on the wheat ear image to obtain images of wheat ears and a designated size scale;

[0042] Step 103, determining the actual size represented by each pixel in the wheat ear image according to the image of the designated size ruler;

[0043] Step 104, performing image processing on the image of the wheat awn and wheat ear to obtain a binary image of the wheat awn and wheat ear;

[0044] Step 105, determining the phenotypic traits of the wheat awn according to the pixel data respectively occupied by the wheat awn and the wheat ear in the binary image of the wheat awn and wheat ear, and the actual size represented by each pixel; the phenotypic traits of the wheat awn include the wheat awn area, the number of wheat awns and the average length of the wheat awn.

[0045] from Figure 1It can be seen from the shown process that in the embodiment of the present invention, the image of wheat ears in a field environment is obtained by a mobile terminal, so that the image of wheat awns and ears is obtained without destroying the growth of wheat. The wheat ear image includes a specified size ruler, and then the specified size ruler is used to determine the actual size represented by each pixel in the wheat ear image, so that the phenotypic traits of the wheat awn, including the awn area, the number of wheat awns and the average length of wheat awns, are determined by the pixel data respectively occupied by the wheat awn and the wheat ear in the binary image of the wheat awn and ear, and the actual size represented by each pixel. Compared with the prior art, in the embodiment of the present invention, a specified size ruler is photographed when obtaining the wheat ear image, and image processing is performed according to the specified size ruler to obtain the phenotypic traits of the wheat awn area, the number of wheat awns and the average length of wheat awns, thereby realizing rapid and accurate measurement of the surface area, number and length of the wheat awn.

[0046] Below Figure 1 The methods for measuring wheat awn phenotypic traits under field conditions are explained in detail.

[0047] First, the wheat ears are imaged without destroying the wheat growth in the field. The growing wheat ears are directly photographed using mobile terminals and mobile devices such as mobile phones and tablets.

[0048] The wheat ear image captured in the embodiment of the present invention includes a specified size ruler, and the specified size ruler is used to determine the size and position of the wheat awn and wheat ear in the wheat ear image.

[0049] In one embodiment, obtaining an image of wheat ears in a field environment through a mobile terminal may include: obtaining an imaging image of wheat ears in a field environment placed in front of a preset background plate through a mobile terminal; marking the placement area of ​​the photographed wheat ears and a specified size scale on the preset background plate.

[0050] Figure 2 is a schematic diagram of presetting a background plate in an embodiment of the present invention, Figure 2 The size of the preset background plate is 210mm×297mm, including an image acquisition area of ​​140mm×210mm, a rectangular ruler of 10mm×100mm, and a thumb pressing area. When shooting, place the wheat ears in the field as a whole in the image acquisition area of ​​the customized background plate, use the thumb to gently press the lower stem of the wheat ears to fix the wheat ears, and use the other hand to use a smartphone to capture the wheat ears in the image acquisition area.

[0051] During shooting, a large number of wheat field ear image samples can be collected through mobile terminals, which can then be used for model training and measurement of wheat awn phenotypic traits.

[0052] In step 102, the wheat ear image is segmented and extracted for the wheat awn and wheat ear and the designated size scale to obtain the image of the wheat awn and wheat ear and the designated size scale.

[0053] For example, conventional image processing techniques are used to extract images of wheat awns, wheat ears, and designated size scales.

[0054] In order to improve the accuracy of image extraction, in one embodiment, performing image segmentation and extraction of wheat ear and wheat awn and specified size scale on wheat ear images to obtain images of wheat awn and wheat ear and specified size scale can include: using a deep learning model to perform image extraction of wheat awn and wheat ear and specified size scale on multiple wheat ear images to obtain multiple images of wheat awn and wheat ear and specified size scale; the deep learning model is pre-trained on a YOLOv8n model using historical wheat ear images, wheat awn and wheat ears extracted from historical wheat ear images, and specified size scale extracted from historical wheat ear images.

[0055] In this implementation, a large number of wheat field ear image samples are collected in advance using mobile terminals to construct training sets, test sets, and validation sets, and a YOLOv8n model architecture is built. The training set is used to train the YOLOv8n model. During training, Labelme is used to mark the image with a rectangular frame, and the marked targets include no awned ears, awned ears, and rectangular rulers. The YOLOv8n deep learning model is selected to perform transfer learning training and verification on the data, and a model that can automatically identify no awned ears, awned ears, and rectangular rulers is trained. The awned wheat ears and rectangular rulers are extracted based on the identified position information. For example, the imcrop function is used to crop and segment the positions of the awned ears and rectangular rulers in the image.

[0056] Figure 3 This is a schematic diagram of deep learning model recognition and extraction in an embodiment of the present invention. Figure 3 middle:

[0057] Backbone network: The main part of a deep learning model, used to extract basic features from raw input.

[0058] Multi-scale fusion network: used to fuse feature maps from different stages of the backbone network to enhance feature representation capabilities.

[0059] Head network: A network used to process feature maps to produce model output results.

[0060] Loss calculation: It consists of detection loss and classification loss, which is used for the final target detection and classification tasks.

[0061] Decoupling head: decompose the original detection head into two parts.

[0062] Intersection-to-union ratio: The ratio of the intersection and union of the detection box and the true box.

[0063] Distributional Focal Loss: Addresses the flexibility and accuracy issues in bounding box regression by allowing the coordinates of the bounding box to have a wider distribution.

[0064] Binary Cross Entropy: It handles binary classification problems and measures the difference between the probability distribution of the model prediction and the probability distribution of the true label.

[0065] Next, in order to obtain the phenotypic trait data of the actual wheat awn, it is necessary to determine the conversion formula between the image size and the actual size. In step 103, the actual size represented by each pixel in the wheat ear image is determined based on the image of the specified size scale.

[0066] During implementation, the size of the ruler is known, the pixels occupied by the ruler on the image can be obtained, and the actual size represented by each pixel in the wheat ear image can be obtained based on the imaging principle.

[0067] In one embodiment, determining the actual size represented by each pixel in the wheat ear image according to the image of the designated size ruler includes the following steps:

[0068] Step 1, perform local adaptive threshold, binarization, closing operation, and filling operation on the image of the specified size scale to obtain a binarized image of the scale;

[0069] Step 2, according to the binary image of the ruler, determine the area of ​​the ruler in the image;

[0070] Step 3: Determine the actual size represented by each pixel based on the area of ​​the ruler in the image and the actual area of ​​the ruler.

[0071] Figure 4 is a schematic diagram of rectangular ruler image processing in an embodiment of the present invention, referring to Figure 4 , based on the rectangular ruler in the preset background plate, the extracted rectangular ruler image is first processed, for example, the adaptthresh function, imbinarize function, imclose function and imfill function are used to perform local adaptive threshold, binarization, closing operation, filling and other operations on the original image in turn to obtain a complete rectangular ruler binarization image, and then the number of all values ​​1 in the rectangular ruler binarization image is calculated, which is the image area of ​​the rectangular ruler, denoted as S 图像 .

[0072] Furthermore, the actual size represented by each pixel can be determined according to the area of ​​the ruler in the image and the actual area of ​​the ruler according to the following formula:

[0073]

[0074] Where SSOP is the actual size represented by each pixel, S 图像 is the area of ​​the ruler in the image, S 实际 Actual area of ​​ruler.

[0075] After that, the wheat awn phenotypic traits are formally measured. First, the extracted wheat ear image needs to be further pre-processed. In step 104, the image of the wheat awn and wheat ear is processed to obtain a binary image of the wheat awn and wheat ear.

[0076] Figure 5 FIG. 1 is a schematic diagram of wheat ear image preprocessing in an embodiment of the present invention, referring to FIG. Figure 5 First, the gray value of the wheat ear image is extracted by the 2.7*BRG formula, and then the adaptthresh function and imbinarize function are used to perform local adaptive threshold and binarization operations on the gray image to obtain a complete binary image of wheat awns and wheat ears, which is recorded as image BW.

[0077] In the final step 105, the phenotypic traits of the awn are determined based on the pixel data respectively occupied by the awn and the ear in the binary image of the awn and ear, and the actual size represented by each pixel; the phenotypic traits of the awn include the awn area, the number of awns and the average length of the awn.

[0078] During implementation, image processing and algorithm design are performed based on the binary image according to the phenotypic characteristics of the wheat awn, and then the phenotypic traits of the wheat awn are determined based on the actual size represented by the pixels.

[0079] Regarding the measurement of wheat awn area, in one embodiment, the phenotypic traits of wheat awn are determined based on the pixel data respectively occupied by the wheat awn and wheat ear in the binary image of wheat awn and wheat ear, and the actual size represented by each pixel, which may include: performing opening operation on the binary image of wheat awn and wheat ear to obtain a binary image with wheat ears and no wheat awn; subtracting the binary image of wheat ears with no wheat awn from the binary image of wheat awn and wheat ear to obtain a binary image with wheat awn and no wheat ears; determining the actual area of ​​the wheat awn based on the number of pixels with a grayscale value of 1 in the binary image with wheat awn and no wheat ears and the actual size represented by each pixel.

[0080] Regarding the number of wheat awns, in one embodiment, after determining the actual area of ​​the wheat awns, the method for measuring the phenotypic traits of wheat awns in the field environment also includes: performing skeleton extraction on the binary image with wheat awns but without wheat ears to obtain a binary image of the wheat awn skeleton; performing expansion processing and convex hull calculation on the binary image with wheat ears but without wheat awns to obtain a binary image of the convex hull of the wheat ears; calculating the number of intersections between the convex hull of the wheat ears and the wheat awn skeleton; and determining the number of wheat awns based on the number of intersections.

[0081] Among them, when the binary image with wheat awns but no wheat ears is dilated, the dilation threshold progressive method is adopted. By setting multiple dilation thresholds, multiple binary images of wheat ear convex hulls are obtained, and then the number of intersections of multiple wheat ear convex hulls and wheat awn skeletons is calculated. Since the data close to the ear body is closer to the true value, the third quartile is taken as the actual number of wheat awns.

[0082] Regarding the length of wheat awns, in one embodiment, after the number of wheat awns is determined according to the number of intersection points, the method for measuring wheat awn phenotypic traits in the field environment further includes:

[0083] Calculate the number of pixels with a gray value of 1 in the binary image of the wheat awn skeleton;

[0084] The total length of the awn is determined according to the number of pixels with a gray value of 1 in the binary image of the awn skeleton and the actual size represented by each pixel;

[0085] Determine the average length of the awns based on the total length and number of awns.

[0086] Figure 6 Schematic diagram of wheat awn phenotypic trait measurement in the embodiment of the present invention, refer to Figure 6 Specific instructions for performing phenotypic trait measurements on wheat awn.

[0087] 1) Awning area: Use the imopen function to perform opening operation on the binary image BW of wheat awns and wheat ears to obtain the binary image BWN with wheat ears and no wheat awns. Subtract the binary image BWN with wheat ears and no wheat awns from the binary image BW of wheat awns and wheat ears (i.e., BW-BWN), and then perform denoising to obtain the binary image BWA with only wheat awns and no wheat ears. Count the number of values ​​1 in the BWA image, which is the wheat awn image area SAWNim. The calculation formula for the actual wheat awn area AWNSgt is:

[0088] AWNS gt =SAWN im ×SSOP 2

[0089] SSOP is the actual size that each pixel represents.

[0090] 2) Number of wheat awns: The binary image BWA with wheat awns but no wheat ears is subjected to skeleton extraction using the bwskel function to obtain the binary image BWSK of the wheat awn skeleton. The binary image BWN without wheat awns is dilated using the imdilate function, and the convex hull BWC is calculated using the convhull function. The number of wheat awns is determined by calculating the number of intersections between the convex hull and the wheat awn skeleton. Since the size of the dilation affects the number of intersections, in the actual calculation process, the number of intersections at different positions is calculated step by step using the dilation threshold progressive method. Since the data close to the ear is closer to the true value, the third quartile is taken as the actual number of wheat awns.

[0091] Figure 7 This is a schematic diagram of the progressive processing of the expansion threshold in an embodiment of the present invention, referring to Figure 7:The initial value of the expansion threshold is set to 11, and the incremental step is set to 11. The expansion threshold reaches the length of the image as the termination condition. The product of the binary image of the awn skeleton and the convex hull (BWSK*BWC) is calculated to get the intersection IP. The number of IPs (value 1) is the number of awns. The combination of multiple awn numbers is IPN={IPN1, IPN2, IPN3,…IPNn}. The third quartile calculation method is IPNQ3=quantile(IPN,0.75). The calculation formula of the actual number of awns AWNN is:

[0092] AWNN=IPNQ3

[0093] 3) Awn length: The number of 1s in the binary image BWSK of the awn skeleton is counted, which is the total length of the awn BWSKN. The ratio of the total length to the number of awns is the average length of the awn. Therefore, the calculation formula for the actual length of the awn AWNL is:

[0094]

[0095] In summary, the present invention designs a preset background plate in the embodiment, combines a smart phone to obtain wheat ear images in the field, solves the problem of destructive sampling, and combines deep learning algorithms and image processing algorithms to achieve fast and accurate measurement of the surface area, number, and length of wheat awns. Among them, the core algorithm proposes to use the product of the convex hull of the wheat ear body and the wheat awn skeleton to obtain the number of wheat awns, and obtain the number of wheat awns at different positions in the form of progressive thresholds, and finally uses the third quartile as the actual number of wheat awns.

[0096] The present invention also provides a device for measuring wheat awn phenotypic traits in a field environment, as described in the following embodiments. Since the principle of the device to solve the problem is similar to the method for measuring wheat awn phenotypic traits in a field environment, the implementation of the device can refer to the implementation of the method for measuring wheat awn phenotypic traits in a field environment, and the repeated parts will not be repeated.

[0097] Figure 8 FIG. 1 is a schematic diagram of a device for measuring wheat awn phenotypic traits in a field environment according to an embodiment of the present invention. Figure 8 As shown, the wheat awn phenotypic trait measuring device 800 in the field environment includes:

[0098] The image acquisition module 801 is used to acquire an image of wheat ears in a field environment through a mobile terminal; the image of wheat ears includes a specified size ruler, and the specified size ruler is used to determine the size and position of wheat ears in the image;

[0099] An image extraction module 802 is used to perform image segmentation and extraction of wheat ears and a designated size scale on the wheat ear image to obtain images of wheat ears and a designated size scale;

[0100] The pixel actual size determination module 803 is used to determine the actual size represented by each pixel in the wheat ear image according to the image of the designated size ruler;

[0101] The wheat awn phenotypic trait extraction module 804 is used to perform image processing on the image of wheat awn and wheat ear to obtain a binary image of the wheat awn and wheat ear; determine the wheat awn phenotypic traits based on the pixel data occupied by the wheat awn and wheat ear in the binary image of the wheat awn and wheat ear, and the actual size represented by each pixel; the wheat awn phenotypic traits include the wheat awn area, the number of wheat awns and the average length of the wheat awn.

[0102] In one embodiment, the image acquisition module 801 is specifically used for:

[0103] An imaging image of wheat ears placed in front of a preset background plate in a field environment is obtained through a mobile terminal; the preset background plate marks the placement area of ​​the photographed wheat ears and a designated size ruler.

[0104] In one embodiment, the image extraction module 802 is specifically used for:

[0105] A deep learning model is used to extract images of wheat awns and ears and specified size scales from multiple wheat ear images to obtain multiple images of wheat awns and ears and specified size scales; the deep learning model is pre-trained on a YOLOv8n model using historical wheat ear images, wheat awns and ears extracted from historical wheat ear images, and specified size scales extracted from historical wheat ear images.

[0106] In one embodiment, the pixel actual size determination module 803 is specifically used to:

[0107] Perform local adaptive threshold, binarization, closing operation, and filling operation on the image of the specified size scale to obtain a binarized image of the scale;

[0108] According to the binary image of the ruler, determine the area of ​​the ruler in the image;

[0109] The actual size represented by each pixel is determined based on the area of ​​the ruler in the image and the actual area of ​​the ruler.

[0110] In one embodiment, the pixel actual size determination module 703 is specifically used to:

[0111] According to the following formula, the actual size represented by each pixel is determined based on the area of ​​the ruler in the image and the actual area of ​​the ruler:

[0112]

[0113] Where SSOP is the actual size represented by each pixel, S 图像 is the area of ​​the ruler in the image, S 实际Actual area of ​​ruler.

[0114] In one embodiment, the wheat awn phenotypic trait extraction module 704 is specifically used for:

[0115] Performing an opening operation on the binary image of wheat awns and wheat ears to obtain a binary image with wheat ears and no wheat awns;

[0116] The binary image of wheat ears with and without wheat ears is subtracted from the binary image of wheat ears with and without wheat ears to obtain the binary image of wheat ears with and without wheat ears;

[0117] The actual area of ​​the wheat awn is determined based on the number of pixels with a grayscale value of 1 in the binary image with wheat awns but no wheat ears and the actual size represented by each pixel.

[0118] In one embodiment, the device also includes: a module for determining the number of wheat awns; the module for determining the number of wheat awns is used to perform skeleton extraction on the binary image with wheat awns but without wheat ears after the wheat awn phenotypic trait extraction module 804 determines the actual area of ​​the wheat awns, so as to obtain a binary image of the wheat awn skeleton; perform expansion processing and convex hull calculation on the binary image with wheat ears but without wheat awns, so as to obtain a binary image of the convex hull of the wheat ears; calculate the number of intersections between the convex hull of the wheat ears and the wheat awn skeleton; and determine the number of wheat awns according to the number of intersections.

[0119] In one embodiment, the device also includes an awn length determination module, which is specifically used for: after the awn number determination module determines the number of awns according to the number of intersections, it calculates the number of pixels with a grayscale value of 1 in the binary image of the awn skeleton; determines the total length of the awn according to the number of pixels with a grayscale value of 1 in the binary image of the awn skeleton and the actual size represented by each pixel; determines the average length of the awn according to the total length of the awn and the number of awns.

[0120] An embodiment of the present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for measuring wheat awn phenotypic traits in a field environment is implemented.

[0121] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for measuring wheat awn phenotypic traits in a field environment is implemented.

[0122] An embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the method for measuring wheat awn phenotypic traits in a field environment is implemented.

[0123] In an embodiment of the present invention, an image of wheat ears in a field environment is acquired by a mobile terminal, so that images of wheat awns and ears are acquired without destroying the growth of wheat. The wheat ear image includes a specified size ruler, and then the specified size ruler is used to determine the actual size represented by each pixel in the wheat ear image, so that the phenotypic traits of the wheat awn, including the awn area, the number of wheat awns and the average length of wheat awns, are determined through the pixel data respectively occupied by the wheat awn and the wheat ear in the binary image of the wheat awn and ear, and the actual size represented by each pixel. Compared with the prior art, in the embodiment of the present invention, a specified size ruler is photographed when acquiring the wheat ear image, and image processing is performed according to the specified size ruler to obtain the phenotypic traits of the wheat awn area, the number of wheat awns and the average length of wheat awns, thereby realizing rapid and accurate measurement of the surface area, number and length of the wheat awn.

[0124] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0125] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0126] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0127] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0128] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for measuring wheat awn phenotypic traits in a field environment, characterized in that: include: Acquiring an image of wheat ears in a field environment through a mobile terminal; the wheat ear image includes a specified size ruler, and the specified size ruler is used to determine the size and position of wheat awns and wheat ears in the wheat ear image; Perform image segmentation and extraction of wheat ears and a designated size ruler on the wheat ear image to obtain images of wheat ears and a designated size ruler; According to the image of the specified size ruler, determine the actual size represented by each pixel in the wheat ear image; Performing image processing on the image of wheat awns and wheat ears to obtain a binary image of the wheat awns and wheat ears; The phenotypic traits of wheat awn are determined according to the pixel data respectively occupied by the wheat awn and wheat ear in the binary image of the wheat awn and wheat ear, and the actual size represented by each pixel; the phenotypic traits of wheat awn include the area of ​​wheat awn, the number of wheat awn and the average length of wheat awn.

2. The method according to claim 1, characterized in that The wheat ear images in the field environment are obtained through the mobile terminal, including: An imaging image of wheat ears placed in front of a preset background plate in a field environment is obtained through a mobile terminal; the preset background plate marks the placement area of ​​the photographed wheat ears and a designated size ruler.

3. The method according to claim 1, characterized in that The wheat ear image is segmented and extracted into wheat awns and wheat ears and a designated size ruler, and the images of wheat awns and wheat ears and a designated size ruler are obtained, including: A deep learning model is used to extract images of wheat awns and ears and specified size scales from multiple wheat ear images to obtain multiple images of wheat awns and ears and specified size scales; the deep learning model is pre-trained on a YOLOv8n model using historical wheat ear images, wheat awns and ears extracted from historical wheat ear images, and specified size scales extracted from historical wheat ear images.

4. The method according to claim 1, characterized in that According to the image of the specified size ruler, determine the actual size represented by each pixel in the wheat ear image, including: Perform local adaptive threshold, binarization, closing operation, and filling operation on the image of the specified size scale to obtain a binarized image of the scale; According to the binary image of the ruler, determine the area of ​​the ruler in the image; The actual size represented by each pixel is determined based on the area of ​​the ruler in the image and the actual area of ​​the ruler.

5. The method according to claim 4, characterized in that According to the area of ​​the ruler in the image and the actual area of ​​the ruler, determine the actual size represented by each pixel, including: According to the following formula, the actual size represented by each pixel is determined based on the area of ​​the ruler in the image and the actual area of ​​the ruler: Where SSOP is the actual size represented by each pixel, S 图像 is the area of ​​the ruler in the image, S 实际 Actual area of ​​ruler.

6. The method according to claim 1, characterized in that According to the pixel data occupied by the wheat awn and wheat ear in the binary image of the wheat awn and wheat ear, and the actual size represented by each pixel, the phenotypic traits of the wheat awn are determined, including: Performing an opening operation on the binary image of wheat awns and wheat ears to obtain a binary image with wheat ears and no wheat awns; The binary image of wheat ears with and without wheat ears is subtracted from the binary image of wheat ears with and without wheat ears to obtain the binary image of wheat ears with and without wheat ears; The actual area of ​​the wheat awn is determined based on the number of pixels with a grayscale value of 1 in the binary image with wheat awns but no wheat ears and the actual size represented by each pixel.

7. The method according to claim 6, characterized in that After determining the actual area of ​​Maimang, it also includes: Perform skeleton extraction on the binary image with wheat awns but without wheat ears to obtain a binary image of the wheat awn skeleton; The binary image with wheat ears but no wheat awns is expanded and the convex hull is obtained to obtain the binary image of the convex hull of wheat ears; Calculate the number of intersections between the convex hull of the wheat ear and the skeleton of the wheat awn; Determine the number of awns based on the number of intersections.

8. The method according to claim 7, characterized in that After determining the number of awns based on the number of intersections, it also includes: Calculate the number of pixels with a gray value of 1 in the binary image of the wheat awn skeleton; The total length of the awn is determined according to the number of pixels with a gray value of 1 in the binary image of the awn skeleton and the actual size represented by each pixel; Determine the average length of the awns based on the total length and number of awns.

9. A device for measuring wheat awn phenotypic traits in a field environment, characterized in that: include: An image acquisition module is used to acquire an image of wheat ears in a field environment through a mobile terminal; the image of wheat ears includes a specified size ruler, and the specified size ruler is used to determine the size and position of wheat ears in the image; An image extraction module is used to perform image segmentation and extraction of wheat ears and a scale of specified size on the wheat ear image to obtain images of wheat ears and a scale of specified size; A pixel actual size determination module is used to determine the actual size represented by each pixel in the wheat ear image according to an image of a specified size ruler; The module for extracting wheat awn phenotypic traits is used to process images of wheat awns and wheat ears to obtain binary images of wheat awns and wheat ears; the phenotypic traits of wheat awns are determined based on the pixel data respectively occupied by the wheat awns and wheat ears in the binary images of wheat awns and wheat ears, and the actual size represented by each pixel; the phenotypic traits of wheat awns include the area of ​​wheat awns, the number of wheat awns and the average length of wheat awns.

10. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 8 is implemented.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.

12. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Method for extracting wheatear morphological parameters

    CN101944231A

  • Wheat ear character analysis method, device and equipment and storage medium

    CN116091482A

  • Field wheat ear length measuring device

    CN219416002U

  • AU2020100915A4