Wheat ear character measuring method and device

Image processing technology is used to obtain wheat ear images and extract skeletons and normals to achieve automatic measurement of wheat ear traits, which solves the problems of low efficiency and low accuracy in measuring wheat ear traits in the existing technology, and significantly improves measurement efficiency and accuracy.

CN118549422APending Publication Date: 2024-08-27INST OF GENETICS & DEVELOPMENTAL BIOLOGY CHINESE ACAD OF SCI
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410539331.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-30
Publication Date
2024-08-27

AI Technical Summary

Technical Problem

In the existing technology, the measurement efficiency of wheat ear traits is low and the accuracy is not high, which is a decisive factor affecting wheat yield and quality.

Method used

Obtain wheat ear images through image processing technology, extract the wheat ear skeleton and its normals, automatically measure wheat ear traits, and improve measurement efficiency and accuracy.

Benefits of technology

Significantly improves the efficiency and accuracy of wheat ear trait measurement, making it faster and more accurate than manual measurement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118549422A
    Figure CN118549422A
Patent Text Reader

Abstract

The embodiment of the invention discloses a wheat ear character measuring method and device. The method comprises the following steps: acquiring a wheat image obtained by performing image acquisition on wheat, and processing the wheat image for wheat ears in the wheat to obtain a wheat ear image representing the wheat ears in the wheat image; processing the wheat ear image to extract a wheat ear skeleton of the wheat ear from the wheat ear image, and obtaining normal lines corresponding to skeleton pixel points in the wheat ear skeleton; and obtaining a wheat ear character measurement result of the wheat ear according to at least one of the wheat ear image, the wheat ear skeleton and the normal corresponding to each skeleton pixel point. According to the technical scheme provided by the embodiment of the invention, automatic measurement of the wheat ear character can be realized, and compared with manual measurement, the measurement efficiency and the measurement precision can be remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of image processing technology, and in particular to a method and device for measuring wheat ear traits. Background Art

[0002] Since wheat ear shape is directly related to wheat grain filling, maturity, and resistance to diseases and pests, ear shape is one of the key factors determining wheat yield and quality.

[0003] However, the formation of ear type is influenced by both genetic and environmental factors. Therefore, in the pursuit of an ideal ear type, the genetic background of the variety and the planting method need to be fully considered.

[0004] However, the current method for obtaining wheat ear traits mainly relies on manual measurement, which has problems of low efficiency and low accuracy, and needs to be improved urgently. Summary of the invention

[0005] The embodiments of the present invention provide a wheat ear trait measurement method and device, which solve the problem of low efficiency and low precision in wheat ear trait measurement.

[0006] According to one aspect of the present invention, a method for measuring wheat ear traits is provided, which may include:

[0007] Acquire a wheat image obtained by collecting the image of wheat, and process the wheat image with respect to wheat ears in the wheat to obtain a wheat ear image representing the wheat ears in the wheat image;

[0008] Processing the wheat ear image to extract the wheat ear skeleton from the wheat ear image, and obtaining normal lines corresponding to each skeleton pixel point in the wheat ear skeleton;

[0009] The wheat ear trait measurement result of the wheat ear is obtained according to at least one of the wheat ear image, the wheat ear skeleton and the normal lines corresponding to the skeleton pixels.

[0010] According to another aspect of the present invention, a wheat ear trait measuring device is provided, which may include:

[0011] A wheat ear image acquisition module is used to acquire a wheat image acquired by image collection of wheat, and process the wheat image with respect to the wheat ears in the wheat to obtain a wheat ear image representing the wheat ears in the wheat image;

[0012] A normal obtaining module is used to process the wheat ear image to extract the wheat ear skeleton from the wheat ear image and obtain the normals corresponding to each skeleton pixel point in the wheat ear skeleton;

[0013] The wheat ear trait measurement module is used to obtain the wheat ear trait measurement result of the wheat ear according to at least one of the wheat ear image, the wheat ear skeleton and the normal lines corresponding to each skeleton pixel point.

[0014] The technical solution of the embodiment of the present invention is to obtain a wheat image obtained by image acquisition of wheat, and then process the wheat image for the wheat ears in the wheat to obtain a wheat ear image representing the wheat ears in the wheat image, and the wheat ear image is the basis for realizing the automatic measurement of wheat ear traits; further, the wheat ear image is processed to extract the wheat ear skeleton of the wheat ear from the wheat ear image, and obtain the normals corresponding to each skeleton pixel point in the wheat ear skeleton, and the wheat ear skeleton and / or the normals corresponding to each skeleton pixel point can be used as the main basis for the automatic measurement of wheat ear traits; according to at least one of the wheat ear image, the wheat ear skeleton and the normals corresponding to each skeleton pixel point, the wheat ear trait measurement result of the wheat ear is obtained. The above technical solution processes the wheat image to obtain the wheat ear image, and further processes the wheat ear image to obtain the wheat ear skeleton and the normals corresponding to each skeleton pixel point, thereby realizing the automatic measurement of wheat ear traits based on the processing result, which can significantly improve the measurement efficiency and measurement accuracy compared with manual measurement.

[0015] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. 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.

[0017] Figure 1 is a flow chart of a wheat ear trait measurement method provided according to an embodiment of the present invention;

[0018] Figure 2 is a flow chart of another wheat ear trait measurement method provided according to an embodiment of the present invention;

[0019] Figure 3 is a flowchart of an optional example of another wheat ear trait measurement method provided in an embodiment of the present invention;

[0020] Figure 4a is a schematic diagram of a wheat image in another wheat ear trait measurement method provided by an embodiment of the present invention;

[0021] Figure 4b According to another wheat ear trait measurement method provided by an embodiment of the present invention, Figure 4a The schematic diagram of the wheat ear skeleton corresponding to the wheat image shown;

[0022] Figure 4c According to another wheat ear trait measurement method provided by an embodiment of the present invention, Figure 4a Schematic diagram of spikelet segmentation corresponding to the wheat image shown;

[0023] Figure 4d According to another wheat ear trait measurement method provided by an embodiment of the present invention, Figure 4c The schematic diagram of the spikelet major axis corresponding to the spikelet segmentation shown;

[0024] Figure 5 is a structural block diagram of a wheat ear trait measurement device provided according to an embodiment of the present invention;

[0025] Figure 6 It is a schematic diagram of the structure of an electronic device for implementing the wheat ear trait measurement method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0026] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in 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. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. The situations of "target", "original", etc. are similar and will not be repeated here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0028] Figure 1It is a flow chart of a wheat ear trait measurement method provided in an embodiment of the present invention. This embodiment is applicable to the case of automatically measuring wheat ear traits, and is particularly applicable to the case of automatically measuring wheat ear traits. The method can be performed by a wheat ear trait measurement device provided in an embodiment of the present invention, and the device can be implemented by software and / or hardware, and the device can be integrated on an electronic device, and the electronic device can be various user terminals or servers.

[0029] See also Figure 1 The method of the embodiment of the present invention specifically includes the following steps:

[0030] S110. Acquire a wheat image obtained by collecting images of wheat, and process the wheat image with respect to wheat ears in the wheat to obtain a wheat ear image representing the wheat ears in the wheat image.

[0031] Among them, wheat may include wheat ears and ear stems. On this basis, the wheat in this step can be understood as wheat whose wheat ear traits (i.e., wheat ear traits) have measurement requirements. Combined with the application scenarios that may be involved in the embodiments of the present invention, for example, it can be any one of wheat, four-row barley, cultivated two-grain wheat and one-grain wheat, etc., which are not specifically limited here. The wheat image can be understood as the image obtained after image acquisition of wheat. Obtain a wheat image.

[0032] Furthermore, since wheat includes wheat ears, the wheat image can be processed to obtain a wheat ear image that can represent the wheat ears in the wheat image. Exemplarily, the wheat image can be processed to segment the wheat ear region where the wheat ears are located from the wheat image, and then the wheat ear region is used as the wheat ear image; the wheat image can also be processed to generate a mask image representing the wheat ear region, and then the mask image is used as the wheat ear image; and so on, which are not specifically limited here. On this basis, optionally, the above-mentioned image processing process can be implemented using an image processing algorithm and / or a neural network model, etc., which are not specifically limited here.

[0033] S120. Processing the wheat ear image to extract the wheat ear skeleton from the wheat ear image, and obtaining normal lines corresponding to each skeleton pixel point in the wheat ear skeleton.

[0034] The wheat ear skeleton can be understood as the skeleton of the wheat ear. The wheat ear image is processed to extract the wheat ear skeleton from the wheat ear image. For example, a thinning algorithm can be used to extract the wheat ear skeleton.

[0035] Furthermore, for each skeleton pixel point in the wheat ear skeleton, the normal of the skeleton pixel point is calculated, so as to obtain the normal lines corresponding to each skeleton pixel point.

[0036] S130. Obtain a measurement result of the wheat ear traits of the wheat ear according to at least one of the wheat ear image, the wheat ear skeleton, and the normal lines corresponding to the skeleton pixels.

[0037] Among them, the wheat ear trait measurement result can be understood as the measurement result of the trait of the wheat ear. In combination with the application scenarios that may be involved in the embodiments of the present invention, for example, it can include at least one of the wheat ear area, wheat ear circumference, wheat ear length and wheat ear width, etc., which are not specifically limited here. In practical applications, optionally, the above-mentioned wheat ear trait measurement result can also be called wheat ear phenotype measurement result or wheat ear performance measurement result.

[0038] The wheat ear trait measurement result is obtained according to at least one of the wheat ear image, the wheat ear skeleton, and the normal lines corresponding to the skeleton pixels. For example, the wheat ear area and / or the wheat ear perimeter can be obtained according to the wheat ear image; the wheat ear length can also be obtained according to the wheat ear skeleton; the wheat ear width can also be obtained according to the normal lines corresponding to the skeleton pixels; and so on, which are not specifically limited here.

[0039] The technical solution of the embodiment of the present invention is to obtain a wheat image obtained by image acquisition of wheat, and then process the wheat image for the wheat ears in the wheat to obtain a wheat ear image representing the wheat ears in the wheat image, and the wheat ear image is the basis for realizing the automatic measurement of wheat ear traits; further, the wheat ear image is processed to extract the wheat ear skeleton of the wheat ear from the wheat ear image, and obtain the normals corresponding to each skeleton pixel point in the wheat ear skeleton, and the wheat ear skeleton and / or the normals corresponding to each skeleton pixel point can be used as the main basis for the automatic measurement of wheat ear traits; according to at least one of the wheat ear image, the wheat ear skeleton and the normals corresponding to each skeleton pixel point, the wheat ear trait measurement result of the wheat ear is obtained. The above technical solution processes the wheat image to obtain the wheat ear image, and further processes the wheat ear image to obtain the wheat ear skeleton and the normals corresponding to each skeleton pixel point, thereby realizing the automatic measurement of wheat ear traits based on the processing result, which can significantly improve the measurement efficiency and measurement accuracy compared with manual measurement.

[0040] In an optional technical solution, the wheat may include a stem below the ear connected to the wheat ear, and the wheat image is processed to obtain a wheat ear image representing the wheat ear in the wheat image, including:

[0041] Obtain a pre-trained wheat ear stem segmentation model, and input the wheat image into the wheat ear stem segmentation model to at least obtain a wheat ear segmentation result output by the wheat ear stem segmentation model for the wheat ear;

[0042] According to the wheat ear segmentation result, a wheat ear image representing the wheat ear in the wheat image is obtained.

[0043] Among them, the understalk of wheat is connected to the wheat ear and is similar to the wheat ear in image presentation. On this basis, if the wheat image is directly input into the wheat ear segmentation model (i.e., the neural network model used only to segment the wheat ear and the background) for wheat ear segmentation, part of the understalk may be segmented as the wheat ear, thus affecting the accuracy of wheat ear segmentation and further affecting the measurement accuracy of wheat ear traits.

[0044] Therefore, in order to ensure the accuracy of wheat ear segmentation, a wheat ear and ear stem segmentation model that can be used to segment wheat ears, ear stems and background can be pre-trained, and then the wheat image can be input into the wheat ear and ear stem segmentation model to at least obtain the wheat ear segmentation result output by the wheat ear and ear stem segmentation model for the wheat ears. On this basis, the ear stem segmentation result output by the wheat ear and ear stem segmentation model for the ear stem can also be obtained. Furthermore, the wheat ear image can be obtained according to the wheat ear segmentation result, for example, the wheat ear segmentation result can be directly used as the wheat ear image; it can also be analyzed first whether the wheat ear segmentation result contains the ear stem and / or whether the ear stem segmentation result contains the wheat ear, and on this basis, the wheat ear image is obtained in combination with the wheat ear segmentation result; and so on, which are not limited here.

[0045] The above technical solution utilizes a wheat ear and ear stem segmentation model that can segment wheat ears, ear stems and background to segment wheat ears, that is, to segment the ear stems and wheat ears independently. Compared with just segmenting the wheat ears, this can effectively ensure the accuracy of wheat ear segmentation and thus ensure the measurement accuracy of wheat ear traits.

[0046] In another optional technical solution, the wheat ear trait measurement results may include at least one of wheat ear area, wheat ear circumference, wheat ear length and wheat ear width.

[0047] On this basis, optionally, the wheat ear trait measurement result of the wheat ear is obtained according to at least one of the wheat ear image, the wheat ear skeleton and the normal lines corresponding to the skeleton pixels, including:

[0048] According to the wheat ear image, the wheat ear area and / or the wheat ear circumference of the wheat ear is obtained.

[0049] The application of wheat ear images realizes the effective measurement of wheat ear area and / or wheat ear circumference.

[0050] Alternatively, obtaining the measurement result of the wheat ear traits of the wheat ear according to at least one of the wheat ear image, the wheat ear skeleton, and the normal lines corresponding to the skeleton pixels respectively includes:

[0051] For each skeleton pixel point in each skeleton pixel point, the distance between the two boundary intersection points of the normal of the skeleton pixel point on the wheat ear boundary can be determined, so as to obtain the wheat ear width according to the distances corresponding to each skeleton pixel point, wherein the wheat ear boundary is the boundary of the wheat ear in the wheat ear image.

[0052] For each skeleton pixel point in each skeleton pixel point, the boundary intersection point corresponding to the skeleton pixel point can be understood as the intersection point of the normal line of the skeleton pixel point on the wheat ear boundary (i.e., the boundary of the wheat ear in the wheat ear image), and the number of the boundary intersection points is two. The distance between the two boundary intersection points is obtained.

[0053] Further, the ear width is obtained according to the distances corresponding to the skeleton pixel points. For example, the distance with the largest value among the distances can be used as the ear width; the average value of the distances can also be used as the ear width; and so on, which are not specifically limited here.

[0054] The above technical solution realizes effective measurement of the width of the wheat ear by utilizing the distance between two boundary intersection points of the normal line of the skeleton pixel point on the boundary of the wheat ear.

[0055] Another optional method is to obtain the measurement result of the wheat ear traits according to at least one of the wheat ear image, the wheat ear skeleton, and the normal lines corresponding to the skeleton pixels, including:

[0056] According to the skeleton length of the wheat ear skeleton, the ear length of the wheat ear is obtained.

[0057] The skeleton length can be understood as the length of the wheat ear skeleton. The wheat ear length is obtained according to the skeleton length.

[0058] The application of wheat ear skeleton realizes the effective measurement of wheat ear length.

[0059] On this basis, optionally, the wheat image may include wheat and a marker, the actual size of the marker is known, and before obtaining the ear length of the wheat ear according to the skeleton length of the wheat ear skeleton, the wheat ear trait measurement method further includes:

[0060] Determine a first number of marking pixels representing the marking object in the wheat image, and obtain an actual length of a single pixel in the wheat image based on the first number and the actual size;

[0061] A second number of skeleton pixel points in the wheat ear skeleton is determined, and a skeleton length of the wheat ear skeleton is obtained according to the second number and the actual length.

[0062] The marker can be understood as an object used to determine the actual length of a single pixel in the wheat image in the real world. The actual size of the marker is known. In practical applications, the shape of the marker can be a circle, square, triangle or other easily detectable shape, which is not specifically limited here. The wheat image obtained by capturing the wheat and the marker is obtained.

[0063] The marked pixel points can be understood as the pixel points that represent the marker among the pixels of the wheat image. The wheat image is analyzed to obtain a first number of marked pixel points. In combination with the application scenarios that may be involved in the embodiments of the present invention, for example, the marker in the wheat image can be identified according to the shape of the marker to extract the marker from the wheat image and obtain a first number. Furthermore, based on the first number and the actual size, the actual length of a single pixel in the wheat image is obtained. It can be understood that the actual length of a single pixel in the wheat image is the same as the actual length of a single pixel in the wheat ear image.

[0064] The skeleton pixel points can be understood as the pixel points representing the skeleton of the wheat ear in the wheat ear image, thereby determining the second number of skeleton pixel points, and then obtaining the skeleton length according to the second number and the actual length.

[0065] The above technical solution uses a marker with a known actual size as a reference to achieve effective measurement of the skeleton length.

[0066] In another optional technical solution, after the wheat ear image is processed to extract the wheat ear skeleton from the wheat ear image, the wheat ear trait measurement method further includes:

[0067] De-noising each skeleton pixel in the wheat ear skeleton to obtain a denoised skeleton;

[0068] Extending the skeleton pixels of the first and last parts of the denoised skeleton to obtain an extended skeleton, wherein the absolute value of the difference between the extended length of the extended skeleton and the skeleton length is smaller than the absolute value of the difference between the denoised length of the denoised skeleton and the skeleton length of the wheat ear skeleton;

[0069] Use the extended skeleton as the ear skeleton.

[0070] In practical applications, there may be noise in the wheat ear skeleton extracted from the wheat ear image, which will affect the accuracy of the wheat ear trait measurement results obtained based on the wheat ear skeleton. To solve this problem, each skeleton pixel point in the wheat ear skeleton can be denoised to obtain a denoised skeleton. Exemplarily, a filter can be used to smooth the noise in the coordinate information of each skeleton pixel point to obtain a denoised skeleton.

[0071] It should be noted that the skeleton length of the denoised wheat ear skeleton may change, which is particularly obvious when using a filter for denoising, because the filter edge effect will affect the skeleton pixels at the head and tail of the wheat ear skeleton. Therefore, the skeleton pixels at the head and tail of the denoised skeleton can be extended to obtain an extended skeleton, so that the extended length of the extended skeleton is closer to the original skeleton length than the denoised length of the denoised skeleton. The extended skeleton is used as the wheat ear skeleton for the final application.

[0072] The above technical scheme performs denoising processing on the wheat ear skeleton to remove the noise in the wheat ear skeleton, and on this basis extends the skeleton pixels at the head and tail parts to compensate for the change in skeleton length caused by the denoising processing, thereby improving the accuracy of the wheat ear trait measurement results obtained based on the wheat ear skeleton.

[0073] Figure 2 It is a flow chart of another wheat ear trait measurement method provided in an embodiment of the present invention. This embodiment is optimized based on the above-mentioned technical solutions. In this embodiment, optionally, the wheat ear includes multiple spikelets. After obtaining the wheat ear image representing the wheat ear in the wheat image, the above-mentioned wheat ear trait measurement method may also include: for each spikelet in the multiple spikelets, the wheat ear image is processed to obtain a spikelet image representing the spikelet in the wheat ear image; for each spikelet pixel point representing the spikelet in the spikelet image, principal component analysis is performed on the position information corresponding to each spikelet pixel point to obtain an analysis result; according to the spikelet image and / or the analysis result, the spikelet trait measurement result of the spikelet is obtained. Among them, the explanations of the terms that are the same or corresponding to the above-mentioned embodiments are not repeated here.

[0074] See also Figure 2 The method of this embodiment may specifically include the following steps:

[0075] S210. Acquire a wheat image obtained by collecting images of wheat, and process the wheat image with respect to wheat ears in the wheat to obtain a wheat ear image representing the wheat ears in the wheat image.

[0076] S220. Process the wheat ear image to extract the wheat ear skeleton from the wheat ear image, and obtain normal lines corresponding to each skeleton pixel point in the wheat ear skeleton.

[0077] S230. Obtain a measurement result of the wheat ear traits of the wheat ear according to at least one of the wheat ear image, the wheat ear skeleton, and the normal lines corresponding to the skeleton pixels.

[0078] S240. For each spikelet in the plurality of spikelets in the wheat ear, the wheat ear image is processed to obtain a spikelet image representing the spikelet in the wheat ear image.

[0079] Wherein, the wheat ear may include an ear axis and a plurality of spikelets. For each spikelet in the plurality of spikelets, the wheat ear image is processed to obtain a spikelet image representing the spikelet in the wheat ear image. Exemplarily, the wheat ear image is processed to segment a spikelet region where the spikelet is located from the wheat ear image, and the spikelet region is used as the spikelet image; the wheat ear image may also be processed to generate a mask image representing the wheat ear region, and the mask image is used as the spikelet image; and so on. On this basis, optionally, the above-mentioned image processing process may be implemented using an image processing algorithm and / or a neural network model, etc., which is not specifically limited here.

[0080] S250. For each spikelet pixel point representing the spikelet in the spikelet image, perform principal component analysis on the position information corresponding to each spikelet pixel point to obtain an analysis result.

[0081] The spikelet pixel point can be understood as the pixel point representing the spikelet in the spikelet image. The position information of each spikelet pixel point is obtained respectively, and then the principal component analysis (PCA) is performed on the position information to obtain the analysis result. Optionally, the analysis result can be, for example, the first principal component (PC1) and / or the second principal component (PC2), etc., which is not specifically limited here.

[0082] S260. Obtain the spikelet trait measurement results of the spikelet according to the spikelet image and / or the analysis result.

[0083] Among them, the spikelet trait measurement result can be understood as the measurement result of the trait of the spikelet, and combined with the application scenarios that may be involved in the embodiments of the present invention, for example, it can include at least one of the spikelet length, spikelet angle, spikelet spacing, and spikelet category (such as fertile spikelet or infertile spikelet), etc., which is not specifically limited here. In addition, it can be understood that since the spikelet is a part of the wheat ear, the spikelet trait measurement result can also be understood as the measurement result of the wheat ear trait.

[0084] According to the spikelet image and / or the analysis result, the spikelet trait measurement result is obtained. For example, the spikelet area and / or spikelet perimeter can be obtained according to the spikelet image; the spikelet classification can also be obtained according to the spikelet image; the spikelet angle and / or spikelet spacing can also be obtained according to the analysis result; etc., which are not specifically limited here.

[0085] The technical solution of the embodiment of the present invention obtains a spikelet image, then performs principal component analysis on the position information of each spikelet pixel point in the spikelet image, and measures the spikelet traits based on this, thereby achieving automatic measurement of the spikelet traits, that is, achieving further automatic measurement of the wheat ear traits.

[0086] An optional technical solution, the position information can be represented by coordinate information, and the analysis result includes the spikelet major axis of the spikelet; the principal component analysis is performed on the position information corresponding to each spikelet pixel point, and the analysis result is obtained, including:

[0087] Performing principal component analysis on the coordinate information corresponding to each spikelet pixel point to obtain the first principal component, and determining the coordinate projection of each spikelet pixel point in each spikelet pixel point along the first principal component direction represented by the first principal component;

[0088] According to the coordinate projections corresponding to each spikelet pixel point, the two spikelet pixel points with the farthest distance along the first principal component direction are determined from each spikelet pixel point, and the line segment connecting the two spikelet pixel points in the spikelet image is taken as the spikelet major axis of the spikelet.

[0089] Among them, when the position information is represented by the coordinate information (x, y), the two coordinates in (x, y) can be understood as two features. At this time, the principal component analysis can be performed on the (x, y) corresponding to each spikelet pixel point, that is, the principal component analysis can be performed on the coordinate matrix composed of each (x, y) to construct a new coordinate system so that the data variance of the coordinate matrix mapped to the new coordinate system is maximized.

[0090] Further, for the first principal component direction represented by the first principal component obtained after principal component analysis, the coordinate projection of each spikelet pixel point along the first principal component direction is determined, that is, the coordinate value of each spikelet pixel point under the coordinate axis corresponding to the first principal component direction in the new coordinate system is determined. In the present technical solution, the first principal component direction is the direction where the long axis of the spikelet is located.

[0091] Then, according to the coordinate projections corresponding to each spikelet pixel point, the two spikelet pixel points with the farthest distance along the first principal component direction are determined from each spikelet pixel point. The two spikelet pixel points are the spikelet pixel points corresponding to the two coordinate projections with the largest difference in each coordinate projection. Therefore, the line segment X connecting the two spikelet pixel points in the spikelet image can be used as the spikelet major axis, realizing the effective analysis of the spikelet major axis.

[0092] On this basis, optionally, the spikelet trait measurement result includes spikelet length; according to the analysis result, the spikelet trait measurement result of the spikelet is obtained, including:

[0093] The spikelet length of the spikelet was obtained based on the major axis length of the spikelet.

[0094] The application of the spikelet long axis realizes the effective measurement of spikelet length.

[0095] Optionally, the spikelet trait measurement result includes the spikelet angle; and according to the analysis result, the spikelet trait measurement result of the spikelet is obtained, including:

[0096] For the skeleton intersection between the extended spikelet major axis and the wheat ear skeleton, the tangent at the skeleton intersection is determined, and the spikelet angle of the spikelet is obtained based on the first angle between the major axis and the horizontal line and the second angle between the tangent and the horizontal line.

[0097] The first angle can be understood as the angle between the long axis and the horizontal line. The skeleton intersection can be understood as the pixel point where the long axis of the spikelet, that is, the line segment X is extended and intersects with the wheat ear skeleton.

[0098] The tangent at the intersection of the skeleton is determined, and then the second angle between the tangent and the horizontal line is determined. Thus, the spikelet angle can be obtained according to the first angle and the second angle, thereby achieving effective measurement of the spikelet angle.

[0099] Optionally, the spikelet trait measurement result includes spikelet spacing; and according to the analysis result, the spikelet trait measurement result of the spikelet is obtained, including:

[0100] From the two endpoints of the long axis of the spikelet, determine the close endpoint that is closer to the wheat ear skeleton, and use the close endpoint as the base endpoint of the spikelet, so as to obtain the spikelet spacing based on the base endpoint of the spikelet and the base endpoints of spikelets adjacent to the spikelet in multiple spikelets.

[0101] Among them, the near endpoint can be understood as the endpoint closer to the wheat ear skeleton among the two endpoints of the spikelet long axis, and the near endpoint is used as the base endpoint of the spikelet (i.e., the base endpoint). On this basis, the spikelet spacing can be determined according to the base endpoints corresponding to each spikelet. Specifically, for the spikelet Y that is adjacent to the spikelet X currently being processed in position among multiple spikelets, or the spikelet Y that is processed after or before the spikelet X in sequence, the spikelet spacing of spikelet X is obtained according to the base endpoint of spikelet X and the base endpoint of spikelet Y, specifically the spikelet spacing between spikelet X and spikelet Y, thereby achieving effective measurement of the spikelet spacing.

[0102] Another optional technical solution, the above-mentioned wheat ear trait measurement method further includes:

[0103] Sorting each skeleton pixel point to obtain a first sorting result;

[0104] For the base end point of the spikelet, determine the nearest pixel point of each skeleton pixel point that is closest to the base end point, so as to obtain the nearest pixel points corresponding to the plurality of spikelets respectively;

[0105] The plurality of spikelets are sorted according to the nearest pixel points respectively corresponding to the plurality of spikelets and the first sorting result to obtain a second sorting result, and the spikelet trait measurement results of the plurality of spikelets are measured in sequence based on the second sorting result.

[0106] In practical applications, the spikelets represented by the spikelet images obtained by analyzing the wheat ear image are disordered, which will result in that the subsequent measurement results of the spikelet traits cannot correspond to the spikelets. In order to solve the above problem, the spikelets can be sorted, for example, in the order from the base to the top or from the top to the base of the wheat ear, so that the spikelet traits of each spikelet can be measured in sequence.

[0107] Specifically, for the base endpoint of the spikelet X currently being processed, the nearest pixel point in each skeleton pixel point that is closest to the base endpoint is determined, thereby obtaining the nearest pixel point corresponding to each spikelet. In this way, the skeleton pixel point can be used as a reference, and the spikelets can be sorted based on the first sorting result of each skeleton pixel point on the wheat ear skeleton. In other words, each skeleton pixel point can be sorted first, for example, in the order from the base to the top or the top to the base of the wheat ear, to obtain the first sorting result. In the present technical solution, optionally, this sorting process can be realized based on the connected domain between each skeleton pixel point, where the two skeleton pixel points closest to each skeleton pixel point can be used as connected skeleton pixel points. Further, according to the nearest pixel points (i.e., skeleton pixel points) corresponding to a plurality of spikelets and the first sorting result, a plurality of spikelets are sorted to obtain a second sorting result. Thus, based on the second sorting result, the spikelet trait measurement results of a plurality of spikelets can be measured in sequence.

[0108] In order to better understand the above-mentioned technical solutions as a whole, the following is an exemplary description of them in combination with specific examples. Figure 3 , the specific steps are as follows:

[0109] 1. Set up a shooting environment, place wheat and a circular marker of known actual size on a base plate, use a camera to shoot, and obtain the wheat image from a normal viewing angle (i.e., the wheat image mentioned above). Figure 4a As shown, there is a circular marker in the upper left corner and wheat on the right, specifically, the wheat ear and the stem under the ear.

[0110] 2. Use the Hough gradient circle finding method to identify the circular marker in the wheat image, and calculate the actual length of a single pixel in the wheat image based on the actual size of the circular marker.

[0111] 3. Annotate the contours of wheat ears and stems under the ears in the wheat images in the training set, validation set, and test set, record the coordinate information of the contours, and generate corresponding mask images based on the coordinate information.

[0112] 4. Construct a UNet network for the segmentation of wheat ears, stems under the ears, and background in wheat images. The backbone feature network can be a ResNet50 network.

[0113] 5. For the mask image obtained in step 3 and the wheat image obtained in step 1, fill them into a square with black color, scale the padded image to a size of 1024×1024, and send it to the UNet network constructed in step 4 for training. In the UNet network training, Focal Loss and Dice Loss are selected as the loss function as the optimization target.

[0114] 6. During the training process, the UNet network with the smallest loss value in the validation set is selected as the semantic segmentation model for the final application (i.e. the wheat ear stem segmentation model mentioned above).

[0115] 7. The wheat image to be measured is sent to the trained UNet network to obtain a mask image 1 of the wheat ear. The mask image 1 can be understood as a representation of the wheat ear image described above. Then, a thinning algorithm is used to extract the wheat ear skeleton from the mask image 1, such as Figure 4b As shown by the red line in ; a filter is then used to smooth the noise in the coordinate information of the wheat ear skeleton, and the skeleton pixels of the first and last parts of the denoised skeleton are extended to compensate for the change in skeleton length caused by the edge effect of the filter.

[0116] 8. Based on the mask image 1 extracted in step 7, the ear area and the ear perimeter of the wheat ear are calculated, and the skeleton length of the wheat ear skeleton obtained in step 7 is calculated as the ear length of the wheat ear.

[0117] 9. Calculate the normal on the skeleton pixel point on the wheat ear skeleton through the wheat ear skeleton extracted in step 7, and then calculate the segment length (i.e. the distance between the normal and the line segment inside the mask image 1 (i.e. the line segment connecting the two boundary intersection points in the above text). In this way, each skeleton pixel point can be traversed to calculate the line segment length, and the measured maximum line segment length is used as the width of the wheat ear.

[0118] 10. The wheat images in the dataset are segmented through the UNet network, and the obtained mask image 1 is bitwise ANDed with the wheat image to separate the wheat ears from the wheat image. The obtained color image is filled into a square with black filling color to obtain new training set, validation set and test set.

[0119] 11. Label the spikelets in the new training set, validation set, and test set obtained in step 10, mark them in sequence along the outline of the spikelets, and divide the spikelets into fertile spikelets and infertile spikelets, and save the labels.

[0120] 12. Use the YOLOv8x-seg network to perform instance segmentation on spikelets. The image obtained in step 11 is scaled to 960×960 and fed into the network for training to obtain the category and mask image 2 of each spikelet on the wheat ear. For example, spikelet segmentation is as follows Figure 4c As shown, each spikelet in the wheat ear image is segmented respectively. According to the mask image 2, the spikelet area and the spikelet perimeter of the spikelet are calculated.

[0121] 13. For each spikelet, each spikelet pixel point with a pixel value of 1 in the mask image 2 of the spikelet is converted into coordinate information (x, y), and the obtained coordinate matrix is ​​subjected to principal component analysis to obtain the coordinate projection of the spikelet along the first principal component direction, and based on this, the line segment l1 between the two farthest endpoints is determined as the spikelet major axis of the spikelet, and the length of the spikelet major axis is used as the spikelet length of the spikelet. For example, the spikelet major axis is as follows: Figure 4d The purple lines in the figure are shown, and the blue lines in the figure are the skeleton of the wheat ear.

[0122] 14. Extend the line segment l1 and intersect the wheat skeleton in step 7 at point P. Find the tangent line l2 at point P, where the equation of l1 is y=k 1 x+b 1 , the l2 equation is y = k 2 x+b 2 On this basis, we can calculate the first angle θ between l1 and the horizontal line. 1 and the second angle θ between l2 and the horizontal line 2 :

[0123] θ 1 =arctan(k 1 );θ 2 =arctan(k 2 )

[0124] Then, the angle between l1 and l2 is calculated based on the following formula, and the angle is used as the spikelet angle of the spikelet:

[0125] Δθ=|θ 1 -θ 2 |.

[0126] 15. Compare the distances between the two endpoints of the long axis of each spikelet obtained in step 13 and the wheat ear skeleton obtained in step 7, and take the endpoint with the shorter distance between the two endpoints (i.e., the near endpoint mentioned above) as the base endpoint of the spikelet. Then, calculate the spikelet spacing based on the base endpoint of each spikelet.

[0127] 16. Supplementary explanation: According to the coordinate information of each skeleton pixel point on the wheat ear skeleton obtained in step 7, each spikelet is sorted in the order from the base to the top of the wheat ear. Based on the sorting result and combined with the above steps, each spikelet can be measured in sequence to correspond the measurement results to each spikelet.

[0128] Figure 5 This is a structural block diagram of a wheat ear trait measuring device provided in an embodiment of the present invention, and the device is used to execute the wheat ear trait measuring method provided in any of the above embodiments. The device and the wheat ear trait measuring method in the above embodiments belong to the same inventive concept. For details not described in detail in the embodiment of the wheat ear trait measuring device, please refer to the embodiment of the above wheat ear trait measuring method. Figure 5 The device specifically includes: a wheat ear image obtaining module 310, a normal obtaining module 320 and a wheat ear trait measuring module 330.

[0129] The wheat ear image obtaining module 310 is used to obtain a wheat image obtained by collecting wheat images, and process the wheat image for wheat ears in the wheat to obtain a wheat ear image representing the wheat ears in the wheat image;

[0130] The normal obtaining module 320 is used to process the wheat ear image to extract the wheat ear skeleton from the wheat ear image, and obtain the normals corresponding to each skeleton pixel point in the wheat ear skeleton;

[0131] The wheat ear trait measurement module 330 is used to obtain the wheat ear trait measurement result of the wheat ear according to at least one of the wheat ear image, the wheat ear skeleton and the normal lines corresponding to the skeleton pixels.

[0132] Optionally, the wheat includes a stem connected to the wheat ear, and the wheat ear image obtaining module 310 may include:

[0133] The wheat ear segmentation result obtaining unit is used to obtain a pre-trained wheat ear stem segmentation model, and input the wheat image into the wheat ear stem segmentation model to at least obtain the wheat ear segmentation result output by the wheat ear stem segmentation model for the wheat ear;

[0134] The wheat ear image obtaining unit is used to obtain a wheat ear image representing the wheat ears in the wheat image according to the wheat ear segmentation result.

[0135] Optionally, the wheat ear trait measurement result may include at least one of the wheat ear area, the wheat ear circumference, the wheat ear length and the wheat ear width; the wheat ear trait measurement module 330 may be specifically used for:

[0136] According to the wheat ear image, obtaining the wheat ear area and / or the wheat ear circumference; and / or,

[0137] Obtaining the length of the wheat ear according to the skeleton length of the wheat ear skeleton; and / or,

[0138] For each skeleton pixel point, the distance between two boundary intersection points of the normal of the skeleton pixel point on the wheat ear boundary is determined, so as to obtain the wheat ear width according to the distances corresponding to each skeleton pixel point, wherein the wheat ear boundary is the boundary of the wheat ear in the wheat ear image.

[0139] On this basis, optionally, the wheat image may include wheat and a marker, and the actual size of the marker is known. The wheat ear trait measuring device may further include:

[0140] An actual length obtaining module is used to determine a first number of marking pixel points representing a marking object in a wheat image before obtaining the length of the wheat ear according to the skeleton length of the wheat ear skeleton, and obtain the actual length of a single pixel point in the wheat image according to the first number and the actual size;

[0141] The skeleton length obtains a length, which is used to determine a second number of skeleton pixels in the wheat ear skeleton, and the skeleton length of the wheat ear skeleton is obtained according to the second number and the actual length.

[0142] Optionally, the wheat ear trait measuring device further comprises:

[0143] The denoising skeleton obtaining module is used to process the wheat ear image, extract the wheat ear skeleton from the wheat ear image, and then perform denoising processing on each skeleton pixel point in the wheat ear skeleton to obtain the denoised skeleton;

[0144] An extended skeleton obtaining module is used to extend the skeleton pixel points of the first and last parts of the denoised skeleton to obtain an extended skeleton, wherein the absolute value of the difference between the extended length of the extended skeleton and the skeleton length is smaller than the absolute value of the difference between the denoised length of the denoised skeleton and the skeleton length of the wheat ear skeleton;

[0145] The wheat ear skeleton update module is used to use the extended skeleton as the wheat ear skeleton.

[0146] Optionally, the wheat ear includes a plurality of spikelets, and the wheat ear trait measurement device further includes:

[0147] A spikelet image obtaining module is used for, after obtaining the wheat ear image representing the wheat ear in the wheat image, processing the wheat ear image for each of the plurality of spikelets to obtain a spikelet image representing the spikelet in the wheat ear image;

[0148] The analysis result obtaining module is used for performing principal component analysis on the position information corresponding to each spikelet pixel point representing the spikelet in the spikelet image to obtain the analysis result;

[0149] The spikelet trait measurement module is used to obtain the spikelet trait measurement result of the spikelet according to the spikelet image and / or the analysis result.

[0150] On this basis, optionally, the position information is represented by coordinate information, and the analysis result includes the spikelet major axis of the spikelet; the analysis result obtaining module may include:

[0151] A coordinate projection determination unit is used to perform principal component analysis on the coordinate information corresponding to each spikelet pixel point to obtain a first principal component, and determine the coordinate projection of each spikelet pixel point in each spikelet pixel point along the first principal component direction according to the first principal component direction;

[0152] The spikelet major axis obtaining unit is used to determine the two spikelet pixel points with the farthest distance along the first principal component direction from each spikelet pixel point according to the coordinate projection corresponding to each spikelet pixel point, and take the line segment connecting the two spikelet pixel points in the spikelet image as the spikelet major axis of the spikelet.

[0153] On this basis, optionally, the spikelet trait measurement result includes at least one of spikelet length, spikelet angle and spikelet spacing; the spikelet trait measurement module includes:

[0154] A spikelet length obtaining unit is used to obtain the spikelet length of the spikelet according to the major axis length of the spikelet major axis; and / or,

[0155] A spikelet angle obtaining unit is used to determine the tangent at the skeleton intersection between the extended spikelet major axis and the wheat ear skeleton, and obtain the spikelet angle of the spikelet according to the first angle between the major axis and the horizontal line and the second angle between the tangent and the horizontal line; and / or,

[0156] The spikelet spacing obtaining unit is used to determine the close endpoint that is closer to the wheat ear skeleton from the two endpoints of the spikelet long axis, and use the close endpoint as the base endpoint of the spikelet to obtain the spikelet spacing of the spikelet based on the base endpoint of the spikelet and the base endpoints of spikelets adjacent to the spikelet in multiple spikelets.

[0157] Alternatively, the wheat ear trait measuring device further comprises:

[0158] A first sorting result obtaining module, used for sorting each skeleton pixel point to obtain a first sorting result;

[0159] A nearest pixel point obtaining module is used to determine the nearest pixel point closest to the base endpoint of the spikelet among the skeleton pixels, so as to obtain the nearest pixel points corresponding to the plurality of spikelets respectively;

[0160] The second sorting result obtaining module is used to sort the multiple spikelets according to the nearest pixel points corresponding to the multiple spikelets and the first sorting result to obtain the second sorting result, so as to measure the spikelet trait measurement results of the multiple spikelets in sequence based on the second sorting result.

[0161] The wheat ear trait measurement device provided by the embodiment of the present invention obtains a wheat image obtained by image acquisition of wheat through a wheat ear image acquisition module, and then processes the wheat image for the wheat ears in the wheat to obtain a wheat ear image representing the wheat ears in the wheat image, and the wheat ear image is the basis for realizing automatic measurement of wheat ear traits; further, the wheat ear image is processed through a normal line acquisition module to extract the wheat ear skeleton of the wheat ear from the wheat ear image, and obtain the normal lines corresponding to each skeleton pixel point in the wheat ear skeleton, and the wheat ear skeleton and / or the normal lines corresponding to each skeleton pixel point can be used as the main basis for automatic measurement of wheat ear traits; through the wheat ear trait measurement module, the wheat ear trait measurement result of the wheat ear is obtained according to at least one of the wheat ear image, the wheat ear skeleton and the normal lines corresponding to each skeleton pixel point. The above-mentioned device processes the wheat image to obtain the wheat ear image, and further processes the wheat ear image to obtain the wheat ear skeleton and the normals corresponding to each skeleton pixel point. Therefore, automatic measurement of the wheat ear characteristics can be achieved based on the processing results. Compared with manual measurement, this can significantly improve the measurement efficiency and measurement accuracy.

[0162] The wheat ear trait measuring device provided in the embodiment of the present invention can execute the wheat ear trait measuring method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0163] It is worth noting that in the embodiment of the above-mentioned wheat ear trait measurement device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.

[0164] Figure 6 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0165] like Figure 6 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0166] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0167] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a wheat ear trait measurement method.

[0168] In some embodiments, the wheat ear trait measurement method can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the wheat ear trait measurement method described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to execute the wheat ear trait measurement method in any other appropriate manner (for example, by means of firmware).

[0169] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0170] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.

[0171] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0172] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0173] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0174] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0175] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0176] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for measuring wheat ear traits, characterized in that: include: Acquire a wheat image obtained by collecting an image of wheat, and process the wheat image with respect to a wheat ear in the wheat to obtain a wheat ear image representing the wheat ear in the wheat image; Processing the wheat ear image to extract the wheat ear skeleton of the wheat ear from the wheat ear image, and obtaining normal lines corresponding to each skeleton pixel point in the wheat ear skeleton; The wheat ear trait measurement result of the wheat ear is obtained according to at least one of the wheat ear image, the wheat ear skeleton and the normal lines corresponding to the skeleton pixel points.

2. The method according to claim 1, characterized in that The wheat includes a stem below the ear connected to the wheat ear, and the processing of the wheat image to obtain a wheat ear image representing the wheat ear in the wheat image includes: Acquire a pre-trained wheat ear stem segmentation model, and input the wheat image into the wheat ear stem segmentation model to at least obtain a wheat ear segmentation result output by the wheat ear stem segmentation model for the wheat ear; According to the wheat ear segmentation result, a wheat ear image representing the wheat ear in the wheat image is obtained.

3. The method according to claim 1, characterized in that The wheat ear trait measurement result includes at least one of wheat ear area, wheat ear circumference, wheat ear length and wheat ear width; The step of obtaining the measurement result of the wheat ear traits of the wheat ear according to at least one of the wheat ear image, the wheat ear skeleton, and the normal lines corresponding to the skeleton pixel points respectively includes: According to the wheat ear image, obtaining the wheat ear area and / or wheat ear circumference of the wheat ear; and / or, According to the skeleton length of the wheat ear skeleton, the length of the wheat ear is obtained; and / or, For each of the skeleton pixel points, determine the distance between two boundary intersection points of the normal of the skeleton pixel point on the wheat ear boundary, so as to obtain the wheat ear width of the wheat ear according to the distances corresponding to each of the skeleton pixel points, wherein the wheat ear boundary is the boundary of the wheat ear in the wheat ear image.

4. The method according to claim 3, characterized in that The wheat image includes the wheat and a marker, the actual size of the marker is known, and before obtaining the length of the wheat ear according to the skeleton length of the wheat ear skeleton, the method further includes: Determine a first number of marking pixels representing the marking object in the wheat image, and obtain an actual length of a single pixel in the wheat image according to the first number and the actual size; A second number of skeleton pixel points in the wheat ear skeleton is determined, and a skeleton length of the wheat ear skeleton is obtained according to the second number and the actual length.

5. The method according to claim 1, characterized in that After the wheat ear image is processed to extract the wheat ear skeleton of the wheat ear from the wheat ear image, the method further includes: Performing denoising processing on each skeleton pixel point in the wheat ear skeleton to obtain a denoised skeleton; Extending the skeleton pixel points of the first and last parts of the denoised skeleton to obtain an extended skeleton, wherein the absolute value of the difference between the extended length of the extended skeleton and the skeleton length is smaller than the absolute value of the difference between the denoised length of the denoised skeleton and the skeleton length of the wheat ear skeleton; The extended skeleton is used as the wheat ear skeleton.

6. The method according to claim 1, characterized in that The wheat ear includes a plurality of spikelets. After obtaining the wheat ear image representing the wheat ear in the wheat image, the method further includes: For each spikelet in the plurality of spikelets, the wheat ear image is processed to obtain a spikelet image representing the spikelet in the wheat ear image; For each spikelet pixel point representing the spikelet in the spikelet image, principal component analysis is performed on position information corresponding to each spikelet pixel point to obtain an analysis result; The spikelet trait measurement result of the spikelet is obtained according to the spikelet image and / or the analysis result.

7. The method according to claim 6, characterized in that The position information is represented by coordinate information, and the analysis result includes the spikelet major axis of the spikelet; The principal component analysis is performed on the position information corresponding to each spikelet pixel point to obtain the analysis result, including: Performing principal component analysis on the coordinate information corresponding to each spikelet pixel point to obtain a first principal component, and determining the coordinate projection of each spikelet pixel point in the spikelet pixel points along the first principal component direction represented by the first principal component; According to the coordinate projections corresponding to the spikelet pixels, the two spikelet pixel points with the farthest distance along the first principal component direction are determined from the spikelet pixels, and the line segment connecting the two spikelet pixel points in the spikelet image is used as the spikelet major axis of the spikelet.

8. The method according to claim 7, characterized in that The spikelet trait measurement result includes at least one of spikelet length, spikelet angle and spikelet spacing; The step of obtaining the spikelet trait measurement result of the spikelet according to the analysis result comprises: According to the length of the major axis of the spikelet, the spikelet length of the spikelet is obtained; and / or, For the skeleton intersection point between the extended long axis of the spikelet and the wheat ear skeleton, determine the tangent line at the skeleton intersection point, and obtain the spikelet angle of the spikelet according to the first angle between the long axis and the horizontal line and the second angle between the tangent line and the horizontal line; and / or, Determine the close endpoint that is closer to the wheat ear skeleton from the two endpoints of the long axis of the spikelet, and use the close endpoint as the base endpoint of the spikelet, so as to obtain the spikelet spacing of the spikelet based on the base endpoint of the spikelet and the base endpoints of the spikelets adjacent to the spikelet among the multiple spikelets.

9. The method according to claim 6, characterized in that Also includes: Sorting the skeleton pixels to obtain a first sorting result; For the base endpoint of the spikelet, determine the nearest pixel point among the skeleton pixels that is closest to the base endpoint, so as to obtain the nearest pixel points corresponding to the plurality of spikelets respectively; The plurality of spikelets are sorted according to the nearest pixel points respectively corresponding to the plurality of spikelets and the first sorting result to obtain a second sorting result, and the spikelet trait measurement results of the plurality of spikelets are measured in sequence based on the second sorting result.

10. A wheat ear trait measuring device, characterized in that: include: A wheat ear image obtaining module is used to obtain a wheat image obtained by collecting images of wheat, and process the wheat image for the wheat ears in the wheat to obtain a wheat ear image representing the wheat ears in the wheat image; A normal obtaining module, used for processing the wheat ear image to extract the wheat ear skeleton of the wheat ear from the wheat ear image, and obtaining normals corresponding to each skeleton pixel point in the wheat ear skeleton; The wheat ear trait measurement module is used to obtain the wheat ear trait measurement result of the wheat ear according to at least one of the wheat ear image, the wheat ear skeleton and the normal lines corresponding to the skeleton pixel points.

Citation Information

Cited By

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

    CN119417880A

  • Wheat flag leaf and wheat ear character intelligent identification method and system based on deep learning

    CN119625464A