Method for obtaining seed setting rate of leymus chinensis seeds, electronic device and storage medium
Through X-ray image processing of the wool seed ears and scattered areas, the seed areas are iteratively divided, and the target flower area is identified, which solves the problem of long and inaccurate detection of the fruiting rate of the wool seeds, and achieves fast and accurate acquisition of the fruiting rate.
Patent Information
- Application Number
- CN202510126009.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-27
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2045-01-27
AI Technical Summary
In the prior art, the detection of the fruiting rate of the wool seeds is time-consuming and inaccurate, making it difficult to achieve efficient and accurate fruiting rate detection.
By obtaining X-ray images of the elixir ears, using pixel segmentation and image processing technology, we can automatically identify the elixir ears and scattered areas, iteratively segment the seed areas, identify the target flower area, and calculate the fruiting rate.
It achieves rapid and accurate acquisition of the fruiting rate of sheep grass seeds, and improves detection efficiency and accuracy.
Smart Images

Figure CN119559177B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a method for obtaining the fruit set rate of chinensis seeds, an electronic device and a storage medium. Background Art
[0002] Leymus chinensis is a very important forage grass native to my country. Each mature plant has a complete spike, which is composed of several spikelets. The spikelet axis is actually a very shortened inflorescence axis, with one bract and one pre-emergent leaf at each node. If the lowest node has only bracts and nothing else, this bract is called a lemma. At each node above, in addition to bracts and pre-emergent leaves located near the axis, there are also some floral contents between the two. In this case, the bract is renamed the lemma, and the pre-emergent leaves are correspondingly called the palea. Traditionally, these two palea, along with the various floral organs they contain, are collectively referred to as florets. Florets can form plump seeds or empty seeds. The seeds of Sheepgrass are actually caryopsis, whose pericarp is adhered to the seed coat and is difficult to separate. The bracts that usually tightly wrap the caryopsis are the palea of the florets. The piece that is tightly attached to the caryopsis is the palea, and the piece opposite is the lemma, which has an awn at the top.
[0003] Currently, the key factor limiting the widespread application of Leymus chinensis is its low seed set rate. Testing the seed set rate is crucial in both breeding and production, serving as a criterion for selecting superior germplasm and improving seed production. Therefore, improving the seed set rate is a key focus of Leymus chinensis breeding. The conventional method for testing seed set is to manually count the florets under a microscope, including both the number of established and empty florets. The number of established florets is then divided by the total number of established and empty florets, and the result is multiplied by 100%. However, because Leymus chinensis seeds are completely enclosed in glumes, distinguishing between established and empty florets is difficult, making manual counting time-consuming and inaccurate. Summary of the Invention
[0004] In response to the above technical problems, the present invention provides a method for obtaining the fruit set rate of sheep fescue seeds, an electronic device and a storage medium, which can automatically, quickly and high-throughput identify sheep fescue seeds and florets, thereby accurately and quickly obtaining the fruit set rate of sheep fescue seeds.
[0005] According to a first aspect of the present invention, a method for obtaining the seed setting rate of Leymus chinensis seeds is provided, comprising the following steps:
[0006] Obtain an X-ray image of a Leymus chinensis spike corresponding to the Leymus chinensis sample; the Leymus chinensis spike X-ray image is an image captured after contactless tiling of the Leymus chinensis spike and Leymus chinensis loose particles in the Leymus chinensis sample.
[0007] The pixel segmentation processing of the Leymus chinensis spike X-ray image is performed based on the target pixel segmentation threshold to obtain a binary image corresponding to the Leymus chinensis spike X-ray image, and several Leymus chinensis spike areas and several Leymus chinensis scattered grain areas are determined from the binary image.
[0008] According to the initial pixel segmentation thresholds corresponding to the sheep fescue spike area and the sheep fescue scattered grain area respectively, image pixel segmentation is performed on each sheep fescue spike area and each sheep fescue scattered grain area respectively to obtain a number of first seed areas; and when there is a first seed area with an area larger than the preset seed area, each initial pixel segmentation threshold is iteratively reduced with a preset step size until there is no first seed area with an area larger than the preset seed area, and a number of second seed areas are obtained.
[0009] The binary image corresponding to the X-ray image of the Leymus chinensis spike is processed according to a preset image processing process to obtain a floret image corresponding to the X-ray image of the Leymus chinensis spike; the floret image includes a plurality of target floret areas.
[0010] The ratio of the number of the second seed area to the number of the target floret areas was determined as the single plant fruit setting rate corresponding to the Leymus chinensis sample, and the average value of the single plant fruit setting rates corresponding to all Leymus chinensis samples was taken as the Leymus chinensis seed fruit setting rate.
[0011] Specifically, the target pixel segmentation threshold is obtained through the following steps:
[0012] A histogram of the Leymus chinensis spike corresponding to the Leymus chinensis spike X-ray image is obtained, and an image inflection point is determined from data smaller than a peak value of the Leymus chinensis spike histogram.
[0013] The pixel value corresponding to the image inflection point is used as the target pixel segmentation threshold.
[0014] Specifically, the step of determining a plurality of Leymus chinensis spike regions and a plurality of Leymus chinensis scattered grain regions from the binarized image includes the following steps:
[0015] Data smaller than the first preset area in the binary image is screened out to remove noise data, and a plurality of first target areas corresponding to the Leymus chinensis spikes and the Leymus chinensis loose grains are obtained.
[0016] The first target area larger than the second preset area is determined as the Leymus chinensis spike area, and the first target area not larger than the second preset area is determined as the Leymus chinensis granule area.
[0017] Specifically, the initial pixel segmentation threshold corresponding to the Leymus chinensis spike region is obtained through the following steps:
[0018] According to the histogram corresponding to each Leymus chinensis spike area, the Ojin threshold corresponding to each Leymus chinensis spike area is obtained.
[0019] Traverse the Ojin threshold corresponding to each Leymus chinensis spike area. When the largest Ojin threshold is unique, eliminate the largest Ojin threshold. When the smallest Ojin threshold is unique, eliminate the smallest Ojin threshold to obtain several remaining Ojin thresholds.
[0020] The average value of several remaining Otsu thresholds is used as the initial pixel segmentation threshold corresponding to the Leymus chinensis spike area.
[0021] Specifically, the binary image corresponding to the X-ray image of the Leymus chinensis spike is processed according to a preset image processing process, including the following steps:
[0022] Holes are filled in the Leymus chinensis spike region in the binary image, and data smaller than the area of the first preset region is screened out to obtain a filled Leymus chinensis spike region.
[0023] The opening and closing operations in the image processing are performed on the filled Leymus chinensis spike regions to obtain the Leymus chinensis spike trunk region corresponding to each Leymus chinensis spike region.
[0024] For any Leymus chinensis spike region, the corresponding Leymus chinensis spike trunk region is removed from the filled Leymus chinensis spike region to obtain the initial floret region corresponding to the Leymus chinensis spike region, and a closing operation is performed on the initial floret region to obtain the first floret region.
[0025] The sheepgrass scattered area is added to the image corresponding to the first floret area, and a number of second floret areas are identified according to a preset floret identification condition; wherein the preset floret identification condition means that the area of the first floret area is greater than the preset floret area threshold.
[0026] Specifically, the binary image corresponding to the X-ray image of the Leymus chinensis spike is processed according to a preset image processing process, further comprising the following steps:
[0027] For any Leymus chinensis spike region, the number of second floret regions, the number of second seed regions, the position information of each second floret region, and the position information of each second seed region in the Leymus chinensis spike region are obtained.
[0028] The Leymus chinensis spike axis vector is obtained based on the position distribution of the longest distance of the Leymus chinensis spike in the Leymus chinensis spike area, the position information of each second floret area, and the position information of each second seed area.
[0029] When the number of second floret regions is not less than 2, the angles between the vectors from the center of mass of the sheep fescue spike region to the center of mass of each second floret region and the sheep fescue spike axis vector are obtained, and the second floret region whose corresponding angle is less than the preset angle threshold is determined as the third floret region.
[0030] When the number of the third floret regions is not less than the number of the second seed regions, the third floret regions are marked as target floret regions; otherwise, the second seed regions are marked as target floret regions.
[0031] When the number of the second floret regions is less than 2, the centroid of the Leymus chinensis spike region is marked as the target floret region.
[0032] Specifically, the binary image corresponding to the X-ray image of the Leymus chinensis spike is processed according to a preset image processing process, further comprising the following steps:
[0033] For any Leymus chinensis scattered grain area, when the second floret area corresponding to the Leymus chinensis scattered grain area is 1 or 0, the centroid of the Leymus chinensis scattered grain area is marked as the target floret area.
[0034] Furthermore, the preset seed area is set to 1.6mm 2 .
[0035] Furthermore, the area of the first preset region is set to 2.0 mm 2 .
[0036] Furthermore, the area of the second preset region is set to 8.0 mm 2 .
[0037] Furthermore, the definitions of the sheep fescue spike and sheep fescue loose grains are as follows: the complete spike of a single sheep fescue plant is split into spikelets, that is, the spikelets are cut off from the spike stalk, and the spikelet fragments or florets scattered during the splitting process are called loose grains, and the spikelets obtained by splitting are called sheep fescue spikes.
[0038] According to a second aspect of the present invention, a non-transitory computer-readable storage medium is provided, in which at least one instruction or at least one program is stored. The at least one instruction or the at least one program is loaded and executed by a processor to implement the above-mentioned method for obtaining the seed setting rate of sheep fescue.
[0039] According to a third aspect of the present invention, there is provided an electronic device comprising a processor and the above-mentioned non-transitory computer-readable storage medium.
[0040] According to a fourth aspect of the present invention, a method for screening high-quality Leymus chinensis varieties is provided, wherein the screening is performed according to the following methods (1) and / or (2):
[0041] (1) The seed setting rate of Leymus chinensis was tested according to the above-mentioned method for obtaining the seed setting rate of Leymus chinensis. The higher the seed setting rate, the better the quality of the variety.
[0042] (2) According to the above-mentioned method for obtaining the seed setting rate of Leymus chinensis, the Leymus chinensis spike area of a single Leymus chinensis plant is identified, and the number of Leymus chinensis spikes of a single Leymus chinensis plant is counted. The variety with more Leymus chinensis spikes is of higher quality.
[0043] The present invention has at least the following beneficial effects:
[0044] The present invention provides a method for obtaining a seed setting rate of leopard grass. The method comprises the following steps: firstly obtaining a leopard grass spike X-ray image corresponding to a leopard grass sample, performing pixel segmentation processing on the leopard grass spike X-ray image based on an adaptive target pixel segmentation threshold, obtaining a binarized image corresponding to the leopard grass spike X-ray image, determining a plurality of leopard grass spike regions and a plurality of leopard grass scattered grain regions from the binarized image, performing iterative segmentation of image pixels on the leopard grass spike region and the leopard grass scattered grain region, realizing iterative labeling of the leopard grass seed region, obtaining a plurality of second seed regions, and then obtaining a plurality of target floret regions from the binarized image according to a preset image processing flow, determining a ratio of the number of the second seed regions to the number of the target floret regions as the single plant setting rate corresponding to the leopard grass sample, and then obtaining a total leopard grass seed setting rate. The method can automatically, rapidly and with high throughput identify leopard grass seeds and florets, thereby realizing accurate and rapid acquisition of the leopard grass seed setting rate, and overcoming the shortcomings of low efficiency and low accuracy of manual recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] 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.
[0046] Figure 1 A flow chart of a method for obtaining the seed setting rate of Leymus chinensis provided in an embodiment of the present invention;
[0047] Figure 2 A schematic diagram of the placement of Leymus chinensis spikes and loose Leymus chinensis grains provided in an embodiment of the present invention;
[0048] Figure 3 A histogram of a Leymus chinensis spike and a schematic diagram of its inflection points are provided in an embodiment of the present invention;
[0049] Figure 4 A schematic diagram of a process for identifying a Leymus chinensis spike region and a Leymus chinensis scattered grain region provided in an embodiment of the present invention;
[0050] Figure 5 A schematic diagram of the process of identifying and marking the second seed region provided in an embodiment of the present invention;
[0051] Figure 6 A schematic diagram of the identification process of the second floret region provided in an embodiment of the present invention;
[0052] Figure 7 Schematic diagram of the screening and marking process of target floret areas provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0053] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. 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 those skilled in the art without making any creative efforts shall fall within the scope of protection of the present invention.
[0054] The embodiment of the present invention provides a method for obtaining the seed setting rate of Leymus chinensis seeds. Figure 1 As shown, the method includes the following steps:
[0055] S100, obtaining an X-ray image of a Leymus chinensis spike corresponding to any Leymus chinensis sample; the Leymus chinensis spike X-ray image is an image taken after contactless tiling of the Leymus chinensis spike and the Leymus chinensis loose particles in the Leymus chinensis sample, and the schematic diagram of the placement of the Leymus chinensis spike and the Leymus chinensis loose particles is as follows: Figure 2 As shown, that is, before shooting, each sheepgrass spike was cut from the spike stalk and laid flat on the calibrated field of view on the carrier board. If any loose particles fell, they were placed on the carrier board together, and each sheepgrass spike and each sheepgrass loose particle were separated from each other and had no contact. The sheepgrass spike was laid flat to reduce the spiral effect.
[0056] S200, performing pixel segmentation processing on the Leymus chinensis spike X-ray image based on a target pixel segmentation threshold to obtain a binary image corresponding to the Leymus chinensis spike X-ray image, and determining a number of Leymus chinensis spike regions and a number of Leymus chinensis scattered grain regions from the binary image.
[0057] Specifically, the target pixel segmentation threshold is obtained through the following steps:
[0058] S201, obtaining a histogram of a Leymus chinensis spike corresponding to the Leymus chinensis spike X-ray image, and determining an image inflection point from data less than the peak value of the Leymus chinensis spike histogram. The schematic diagram of the Leymus chinensis spike histogram and inflection point is shown in FIG. Figure 3 As shown, it can be understood that the histogram peak is the background data corresponding to the Leymus chinensis spike X-ray image, and the inflection point of the foreground data is sought forward.
[0059] S202: Using the pixel value corresponding to the image inflection point as a target pixel segmentation threshold.
[0060] Furthermore, the process of determining a number of Leymus chinensis spike regions and a number of Leymus chinensis scattered grain regions from the binary image is as follows: Figure 4 As shown, the following steps are included:
[0061] S210, filtering out data smaller than the first preset area in the binary image to remove noise data, and obtaining a plurality of first target areas corresponding to the stalks of Leymus chinensis and the scattered grains of Leymus chinensis; it can be understood that each stalk of Leymus chinensis and each scattered grain of Leymus chinensis is an independent area of data. Those skilled in the art set the area of the first preset area according to actual needs. In the specific implementation of the present invention, the area of the first preset area is set to 2.0mm 2 , then less than 2.0mm 2 The independent area data is considered as background noise data.
[0062] S220, the first target area larger than the second preset area is determined as the Leymus chinensis spike area, and the first target area not larger than the second preset area is determined as the Leymus chinensis loose grain area. Those skilled in the art set the second preset area according to actual needs. In the specific implementation of the present invention, the second preset area is set to 8.0mm 2 , can be no larger than 8.0mm 2 The scattered areas of Leymus chinensis were first removed to obtain the Leymus chinensis spike areas, and the centroid of each Leymus chinensis spike area was marked before adding the scattered areas of Leymus chinensis.
[0063] As described above, by removing noise data and preventing misidentification of the sheep fescue spike area and the sheep fescue scattered grain area, the number of sheep fescue spikes and the number of sheep fescue scattered grains can be accurately counted, which can be used for the subsequent rapid identification of sheep fescue seeds and florets, and the precise number of sheep fescue seeds and florets can be obtained, making the obtained sheep fescue seed setting rate more accurate and reliable.
[0064] S300, according to the initial pixel segmentation thresholds corresponding to the Leymus chinensis spike region and the Leymus chinensis scattered grain region, respectively, performs image pixel segmentation on each Leymus chinensis spike region and each Leymus chinensis scattered grain region to obtain a plurality of first seed regions; in the specific implementation process, 0.7~1.6mm pixels are screened out from the segmented image. 2 The regional data is used as the first seed regional data.
[0065] And when the area of the first seed region is larger than the area of the preset seed region, each initial pixel segmentation threshold is iteratively reduced with a preset step size until the area of the first seed region is no longer larger than the area of the preset seed region, and a number of second seed regions are obtained; those skilled in the art set the preset seed region area and the preset step size according to actual needs. In the embodiment of the present invention, the preset seed region area is set to 1.6mm 2 .
[0066] Furthermore, before obtaining the second seed region, invalid seeds need to be eliminated. Specifically, after iteratively reducing each initial pixel segmentation threshold with a preset step size and performing image pixel segmentation, the length and thickness of all independent seed regions are obtained. When the length is between 1.5 and 5.0 mm and the thickness is greater than 0.25 mm, it is considered to be a valid seed region, and other independent seed regions are eliminated. The remaining independent seed regions are all used as second seed regions, and the centroid of each second seed region is marked. The specific process is as follows: Figure 5 shown.
[0067] Furthermore, the initial pixel segmentation threshold corresponding to the Leymus chinensis spike region is obtained through the following steps:
[0068] S301, according to the histogram corresponding to each Leymus chinensis spike area, obtain the Ojin threshold value corresponding to each Leymus chinensis spike area. Obtaining the Ojin threshold value according to the histogram is a prior art and will not be described in detail here.
[0069] S302, traverse the Ojin threshold corresponding to each Leymus chinensis spike area, and when the largest Ojin threshold is unique, eliminate the largest Ojin threshold, and when the smallest Ojin threshold is unique, eliminate the smallest Ojin threshold to obtain several remaining Ojin thresholds.
[0070] S303: taking the average value of the remaining Otsu thresholds as the initial pixel segmentation threshold corresponding to the Leymus chinensis spike region.
[0071] Similarly, the initial pixel segmentation threshold corresponding to the Leymus chinensis bulk region is obtained in the same manner as the initial pixel segmentation threshold corresponding to the Leymus chinensis spike region, which will not be repeated here. When performing image pixel segmentation, the initial pixel segmentation threshold corresponding to the Leymus chinensis spike region is used to perform image pixel segmentation on each Leymus chinensis spike region, and the initial pixel segmentation threshold corresponding to the Leymus chinensis bulk region is used to perform image pixel segmentation on each Leymus chinensis bulk region.
[0072] In the above, the corresponding initial pixel segmentation thresholds are calculated according to several Leymus chinensis spike areas and several Leymus chinensis scattered grain areas, so that the Leymus chinensis spike areas and the Leymus chinensis scattered grain areas adopt different initial pixel segmentation thresholds according to their own image characteristics, making the segmented Leymus chinensis spike areas and the Leymus chinensis scattered grain areas clearer.
[0073] S400, performing image processing on the binarized image corresponding to the X-ray image of the Leymus chinensis spike according to a preset image processing process to obtain a floret image corresponding to the X-ray image of the Leymus chinensis spike; the floret image includes a plurality of target floret areas.
[0074] Specifically, the binary image corresponding to the X-ray image of the Leymus chinensis spike is processed according to a preset image processing process, such as Figure 6 As shown, the following steps are included:
[0075] S401 performs hole filling on a Leymus chinensis spike region in the binarized image, and removes data smaller than a first predetermined area to obtain a filled Leymus chinensis spike region, wherein removing data smaller than the first predetermined area can eliminate small fragments that may be present in the image background. The process of hole filling image data is prior art and will not be further described herein.
[0076] S402: Performing an opening and closing operation in image processing on the padded Leymus chinensis spike region to obtain a Leymus chinensis spike trunk region corresponding to each Leymus chinensis spike region. The opening operation can erode the image data to remove sharp portions, and the closing operation can dilate the image data to merge branches to prevent inter-branch noise from affecting subsequent floret identification. After performing the opening and closing operations, the step of filtering out data smaller than the first predetermined region can be performed again to remove broken branches.
[0077] S403, for any sheep fescue spike area, remove the sheep fescue spike trunk area corresponding to itself from the filled sheep fescue spike area to obtain the initial floret area corresponding to the sheep fescue spike area, and perform a closing operation on the initial floret area to obtain the first floret area, wherein, by removing the sheep fescue spike trunk area corresponding to itself from the sheep fescue spike area, several lemma tips can be obtained, each lemma tip represents a floret, and performing a closing operation on the initial floret area can close the broken lemma tip data.
[0078] S404, adding the granular area of Leymus chinensis to the image corresponding to the first floret area, and identifying a number of second floret areas according to preset floret identification conditions; it can be understood as: adding the granular area of Leymus chinensis to the original position corresponding to the granular area of Leymus chinensis.
[0079] Specifically, the preset floret recognition condition refers to the area of the first floret region being larger than the preset floret region area threshold; in a specific implementation, the preset floret region area threshold is 2.5 mm 2 , the area is larger than 2.5mm 2 The first floret area is identified as the second floret area, and the second floret area is temporarily defined as valid data. The area with a length greater than 5.0 mm and a thickness less than 0.2 mm is identified as the leaf area, which is invalid data. The florets in the image with a centroid distance less than 0.6 mm are merged.
[0080] As mentioned above, by performing hole filling processing and morphological operations on the binary image in sequence, and using the lemma tip data obtained from the main area of the sheep fescue spike obtained by the morphological operation and the sheep fescue spike area after the hole filling as the first floret area, it is possible to quickly identify the solid florets and the empty florets, thereby achieving high-throughput and accurate recognition of the floret area.
[0081] Furthermore, the binary image corresponding to the X-ray image of the Leymus chinensis spike is processed according to a preset image processing flow, such as Figure 7 As shown, the following steps are also included:
[0082] S410, for any Leymus chinensis spike area, obtain the number of second floret areas, the number of second seed areas, the position information of each second floret area, and the position information of each second seed area in the Leymus chinensis spike area; this can be understood as: obtaining the position distribution of each Leymus chinensis seed and each floret on the Leymus chinensis spike.
[0083] S420, based on the position distribution of the longest distance of the sheep fescue spike in the sheep fescue spike area, the position information of each second floret area and the position information of each second seed area, obtain the sheep fescue spike cox vector; that is, the direction of the sheep fescue spike cox vector is from the root of the cox to the top of the cox.
[0084] S430, when the number of second floret regions is not less than 2, obtain the angles between the vectors from the centroid of the sheep fescue spike region to the centroid of each second floret region and the sheep fescue spike axis vector, and determine the second floret region with the corresponding angle less than the preset angle threshold as the third floret region; it can be understood that: when the angle is not less than the preset angle threshold, the floret is considered invalid and is determined to be an erroneous point on the leaf or branch; those skilled in the art set the preset angle threshold according to actual needs. In an embodiment of the present invention, the preset angle threshold is 120°.
[0085] S440: When the number of the third floret regions is not less than the number of the second seed regions, mark the third floret regions as target floret regions; otherwise, mark the second seed regions as target floret regions.
[0086] S450: When the number of the second floret regions is less than 2, mark the centroid of the Leymus chinensis spike region as the target floret region.
[0087] Furthermore, the binary image corresponding to the Leymus chinensis spike X-ray image is processed according to a preset image processing flow, further comprising the following steps:
[0088] For any Leymus chinensis scattered grain area, when the second floret area corresponding to the Leymus chinensis scattered grain area is 1 or 0, the centroid of the Leymus chinensis scattered grain area is marked as the target floret area.
[0089] In the above, by analyzing the different numbers of florets and the number of sheep fescue seeds corresponding to the sheep fescue spikes, as well as the distribution of florets and sheep fescue seeds in different sheep fescue spikes, a variety of situations that may appear in the image are covered. In each case, the target floret area is obtained respectively, and the validity of the florets is further confirmed, so that the obtained target floret area and target floret number are more accurate and in line with the actual situation, thereby achieving accurate and rapid acquisition of the sheep fescue seed setting rate.
[0090] S500: Determine the ratio of the number of the second seed regions to the number of the target floret regions as the single plant fruit setting rate corresponding to the Leymus chinensis sample, and take the average of the single plant fruit setting rates corresponding to all Leymus chinensis samples as the Leymus chinensis seed fruit setting rate.
[0091] In a specific embodiment, the chinensis sample is a sample consisting of several chinensis spikes and several chinensis loose grains obtained by disassembling a complete spike of any single chinensis plant. When calculating the chinensis seed setting rate, the chinensis seed setting rate of a single chinensis plant is first calculated, and then the chinensis seed setting rates of the several single chinensis plants are averaged, and the average value is the final chinensis seed setting rate.
[0092] In a parallel embodiment, the Leymus chinensis sample is a mixture of several Leymus chinensis spikes and several Leymus chinensis loose grains obtained by disassembling complete spikes of multiple Leymus chinensis plants and dividing the mixture into any one of the several samples. When calculating the Leymus chinensis seed setting rate, the average value of the seed setting rates corresponding to all the Leymus chinensis samples is used as the Leymus chinensis seed setting rate.
[0093] An embodiment of the present invention also provides a non-transitory computer-readable storage medium, which can be set in an electronic device to store at least one instruction or at least one program related to implementing a method in a method embodiment. The at least one instruction or the at least one program is loaded and executed by the processor to implement the method provided in the above embodiment.
[0094] An embodiment of the present invention further provides an electronic device including a processor and the aforementioned non-transitory computer-readable storage medium.
[0095] The embodiment of the present invention also provides a method for screening high-quality Leymus chinensis varieties, which is performed according to the following method (1) and / or (2):
[0096] (1) The seed setting rate of Leymus chinensis was tested according to the above-mentioned method for obtaining the seed setting rate of Leymus chinensis. The higher the seed setting rate, the better the quality of the variety.
[0097] (2) Identify the chinensis spikelet region of a single chinensis plant using the above-mentioned method for obtaining the seed setting rate of chinensis seeds, and count the number of chinensis spikelets on each chinensis plant. The variety with the most chinensis spikelets is of higher quality. One node represents a chinensis spikelet (i.e., a spikelet).
[0098] Although some specific embodiments of the present invention have been described in detail by way of example, it should be understood by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the present invention. It should also be understood by those skilled in the art that various modifications may be made to the embodiments without departing from the scope and spirit of the present invention. The scope of the present invention is defined by the appended claims.
Claims
1. A method for obtaining the seed setting rate of Leymus chinensis, characterized in that: The method comprises the following steps: Obtaining an X-ray image of a Leymus chinensis spike corresponding to the Leymus chinensis sample; the Leymus chinensis spike X-ray image is an image captured after contactless tiling of the Leymus chinensis spike and loose Leymus chinensis particles in the Leymus chinensis sample; Performing pixel segmentation processing on the Leymus chinensis spike X-ray image based on a target pixel segmentation threshold to obtain a binary image corresponding to the Leymus chinensis spike X-ray image, and determining a number of Leymus chinensis spike regions and a number of Leymus chinensis scattered grain regions from the binary image; the target pixel segmentation threshold refers to a pixel value corresponding to an image inflection point in a Leymus chinensis spike histogram corresponding to the Leymus chinensis spike X-ray image, and the pixel value corresponding to the image inflection point ranges from 25000 to 27000; According to the initial pixel segmentation thresholds corresponding to the Leymus chinensis spike region and the Leymus chinensis scattered grain region, image pixel segmentation is performed on each Leymus chinensis spike region and each Leymus chinensis scattered grain region to obtain a number of first seed regions; and when the area of the first seed region is larger than the area of the preset seed region, each initial pixel segmentation threshold is iteratively reduced with a preset step size until the area of the first seed region is no longer larger than the area of the preset seed region, and a number of second seed regions are obtained; the range of the first seed region is 0.7~1.6mm 2 ; The Leymus chinensis spike region in the binary image corresponding to the Leymus chinensis spike X-ray image is removed from the Leymus chinensis spike region corresponding to the Leymus chinensis spike trunk region, and a closing operation is performed to obtain a first floret region; The first floret region is characterized by the tip of the lemma in the Leymus chinensis spike region; the Leymus chinensis spike trunk region is obtained by performing an opening operation and a closing operation in image processing on the filled Leymus chinensis spike region; Based on the first floret region, performing image processing on the binary image corresponding to the Leymus chinensis spike X-ray image according to a preset image processing process to obtain a floret image corresponding to the Leymus chinensis spike X-ray image; the floret image includes a plurality of target floret regions; The ratio of the number of the second seed area to the number of the target floret areas was determined as the single plant fruit setting rate corresponding to the Leymus chinensis sample, and the average value of the single plant fruit setting rates corresponding to all Leymus chinensis samples was taken as the Leymus chinensis seed fruit setting rate.
2. The method for obtaining the seed setting rate of Leymus chinensis according to claim 1, characterized in that: The sheepgrass sample is a sample consisting of several sheepgrass spikes and several sheepgrass grains obtained by disassembling a complete spike of any single sheepgrass plant, or a sample consisting of several sheepgrass spikes and several sheepgrass grains obtained by disassembling complete spikes of multiple sheepgrass plants and dividing them into any one of several samples.
3. The method for obtaining the seed setting rate of Leymus chinensis according to claim 1, wherein: The method of determining a plurality of Leymus chinensis spike regions and a plurality of Leymus chinensis scattered grain regions from the binarized image comprises the following steps: Screening out data smaller than the first preset area in the binary image to remove noise data, and obtaining a plurality of first target areas corresponding to the Leymus chinensis spikes and the Leymus chinensis loose grains; The first target area larger than the second preset area is determined as the Leymus chinensis spike area, and the first target area not larger than the second preset area is determined as the Leymus chinensis granule area.
4. The method for obtaining the seed setting rate of Leymus chinensis according to claim 1, wherein: Obtain the initial pixel segmentation threshold corresponding to the Leymus chinensis spike area through the following steps: According to the histogram corresponding to each Leymus chinensis spike area, the Ojin threshold corresponding to each Leymus chinensis spike area is obtained; Traverse the Ojin threshold corresponding to each Leymus chinensis spike area, and when the largest Ojin threshold is unique, eliminate the largest Ojin threshold, and when the smallest Ojin threshold is unique, eliminate the smallest Ojin threshold to obtain several remaining Ojin thresholds; The average value of several remaining Otsu thresholds is used as the initial pixel segmentation threshold corresponding to the Leymus chinensis spike area.
5. The method for obtaining the seed setting rate of Leymus chinensis according to claim 1, characterized in that: The first floret region is obtained by the following steps: Filling holes in the Leymus chinensis spike region in the binary image, and filtering out data smaller than the first preset area to obtain a filled Leymus chinensis spike region; For any Leymus chinensis spike region, the corresponding Leymus chinensis spike trunk region is removed from the filled Leymus chinensis spike region to obtain the initial floret region corresponding to the Leymus chinensis spike region, and a closing operation is performed on the initial floret region to obtain the first floret region.
6. The method for obtaining the seed setting rate of Leymus chinensis according to claim 5, characterized in that: The binary image corresponding to the X-ray image of the Leymus chinensis spike is processed according to a preset image processing process, further comprising the following steps: Adding the scattered area of Leymus chinensis to the image corresponding to the first floret area, and identifying a plurality of second floret areas according to a preset floret identification condition; wherein the preset floret identification condition is that the area of the first floret area is greater than a preset floret area threshold; For any Leymus chinensis spike region, obtain the number of second floret regions, the number of second seed regions, the position information of each second floret region, and the position information of each second seed region in the Leymus chinensis spike region; Obtaining a Leymus chinensis spike axis vector based on the position distribution of the longest distance of the Leymus chinensis spike in the Leymus chinensis spike area, the position information of each second floret area, and the position information of each second seed area; When the number of second floret regions is not less than 2, the angles between the vectors from the centroid of the Leymus chinensis spike region to the centroid of each second floret region and the Leymus chinensis spike axis vector are obtained, and the second floret regions whose corresponding angles are less than a preset angle threshold are determined as third floret regions; When the number of the third floret region is not less than the number of the second seed region, the third floret region is marked as the target floret region; otherwise, the second seed region is marked as the target floret region; When the number of the second floret regions is less than 2, the centroid of the Leymus chinensis spike region is marked as the target floret region.
7. The method for obtaining the seed setting rate of Leymus chinensis according to claim 6, characterized in that: The binary image corresponding to the X-ray image of the Leymus chinensis spike is processed according to a preset image processing process, further comprising the following steps: For any Leymus chinensis scattered grain area, when the second floret area corresponding to the Leymus chinensis scattered grain area is 1 or 0, the centroid of the Leymus chinensis scattered grain area is marked as the target floret area.
8. A non-transitory computer-readable storage medium, wherein at least one instruction or at least one program is stored in the storage medium, characterized in that: The at least one instruction or the at least one program is loaded and executed by a processor to implement the method for obtaining the seed setting rate of Leymus chinensis seeds as described in any one of claims 1 to 7.
9. An electronic device, characterized in that: The device comprises a processor and the non-transitory computer-readable storage medium as claimed in claim 8.
Citation Information
Patent Citations
Digitalized identification method, system, equipment and medium for fruited pasture seeds
CN118155076A