Leymus chinensis seed setting rate acquisition method, electronic equipment and storage medium
By obtaining the X-ray map of the wool grass sample and performing adaptive pixel segmentation processing, the wool grass ear area and the scattered area are identified, which solves the problem of long and inaccurate artificial counting in the prior art, and the accurate and rapid acquisition of the seed fruiting rate of the wool grass seeds is achieved.
Patent Information
- Application Number
- CN202510126009.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-27
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2045-01-27
AI Technical Summary
In the prior art, methods for detecting the fruiting rate of wool grasses require manual counting of small flowers under a microscope, which takes a long time and is inaccurate, making it difficult to automatically and quickly and high throughput to identify wool grasses seeds and small flowers.
By obtaining the x-ray map of the x-ray sample of the x-ray sample, pixel segmentation is performed based on the adaptive target pixel segmentation threshold, the x-ray sample area and the scattered area are identified, and the seed area is obtained iteratively, and the fruiting rate is calculated.
It achieves accurate and rapid acquisition of the seed fruiting rate of goat grass, overcomes the shortcomings of low manual recognition efficiency and low accuracy, and can automatically and quickly and high throughput to identify the seeds and flowers of goat grass.
Smart Images

Figure CN119559177A_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 setting rate of Leymus 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 leymus chinensis has a complete spike, which is composed of several spikelets. The spikelet axis is actually a very shortened inflorescence axis, and each node can have a bract and a prepubescent leaf. If the lowest node only has a bract and nothing else, then this bract can be called a lemma. In addition to bracts and prepubescent leaves located near the axis, there are also some flower contents between the two nodes at the top. At this time, the bract is renamed as the lemma, and the prepubescent leaves are correspondingly called the palea. It is customary to call these two palea together with the various floral organs contained in them as florets, which can form full seeds or empty seeds. The seeds of sheepgrass are actually caryopsis, whose pericarp is adhered to the seed coat and is not easy to separate. The bracts that usually tightly wrap the caryopsis are the lemmas of the florets. The piece that is closely attached to the caryopsis is the palea, and the piece opposite is the lemma, which has an awn at the top.
[0003] At present, the key factor limiting the widespread application of Leymus chinensis is the low fruiting rate. In Leymus chinensis breeding and production, it is necessary to detect the fruiting rate index as a standard for screening excellent germplasm and improving seed production levels. Therefore, improving the fruiting rate is the main direction of Leymus chinensis breeding. In the prior art, the conventional method for detecting the fruiting rate is to manually count the number of florets under a microscope, including the number of fruiting florets and the number of empty shell florets, divide the number of fruiting florets by the total number of fruiting florets and empty shell florets, and then multiply by 100%. However, since the seeds of Leymus chinensis are completely wrapped in the glumes, it is difficult to distinguish between fruiting florets and empty shell florets, and manual counting is 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 achieving accurate and rapid acquisition of the fruit set rate of sheep fescue seeds.
[0005] According to a first aspect of the present invention, a method for obtaining a seed setting rate of Leymus chinensis is provided, comprising the following steps: Obtain an X-ray image of a sheep grass spike corresponding to the sheep grass sample; the X-ray image of the sheep grass spike is an image captured after contactless tiling of the sheep grass spike and sheep grass loose particles in the sheep grass sample.
[0006] 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.
[0007] According to the initial pixel segmentation thresholds corresponding to the sheep granae spike area and the sheep granae scattered area respectively, image pixel segmentation is performed on each sheep granae spike area and each sheep granae scattered 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.
[0008] The binary image corresponding to the X-ray image of the sheep fescue spike is processed according to a preset image processing flow to obtain a floret image corresponding to the X-ray image of the sheep fescue spike; the floret image includes a plurality of target floret areas.
[0009] The ratio of the number of the second seed area to the number of the target floret area was determined as the single plant fruit setting rate corresponding to the Leymus chinensis sample, and the average of the single plant fruit setting rates corresponding to all Leymus chinensis samples was taken as the Leymus chinensis seed fruit setting rate.
[0010] Specifically, the target pixel segmentation threshold is obtained through the following steps: 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 that is less than a peak value of the Leymus chinensis spike histogram.
[0011] The pixel value corresponding to the inflection point of the image is used as the target pixel segmentation threshold.
[0012] Specifically, the step of determining a plurality of Leymus chinensis spike regions and a plurality of Leymus chinensis scattered grain regions from the binary image comprises the following steps: Data in the binary image that is smaller than the first preset area 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.
[0013] The first target area having an area larger than the second preset area is determined as a Leymus chinensis spike area, and the first target area having an area not larger than the second preset area is determined as a Leymus chinensis scattered grain area.
[0014] Specifically, the initial pixel segmentation threshold corresponding to the Leymus chinensis spike region is obtained through the following steps: According to the histogram corresponding to each Leymus chinensis spike area, the Otsu threshold corresponding to each Leymus chinensis spike area is obtained.
[0015] The Otsu thresholds corresponding to each Leymus chinensis spike area are traversed. When the largest Otsu threshold is unique, the largest Otsu threshold is eliminated, and when the smallest Otsu threshold is unique, the smallest Otsu threshold is eliminated to obtain several remaining Otsu thresholds.
[0016] The average value of several remaining Otsu thresholds is used as the initial pixel segmentation threshold corresponding to the Leymus chinensis spike region.
[0017] Specifically, the binary image corresponding to the X-ray image of the Leymus chinensis spike is processed according to a preset image processing flow, including the following steps: Holes in the Leymus chinensis spike region in the binary image are filled, and data smaller than the area of the first preset region is screened out to obtain a filled Leymus chinensis spike region.
[0018] 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.
[0019] 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.
[0020] Add the scattered area of sheep fescue to the image corresponding to the first floret area, and identify several second floret areas according to the 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.
[0021] Specifically, the binary image corresponding to the X-ray image of the Leymus chinensis spike is processed according to a preset image processing flow, and further includes the following steps: 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.
[0022] According to 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, the Leymus chinensis spike axis vector is obtained.
[0023] When the number of second floret regions is not less than 2, 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 are obtained, and the second floret region whose corresponding angle is less than the preset angle threshold is determined as the third floret region.
[0024] 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.
[0025] 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.
[0026] Specifically, the binary image corresponding to the X-ray image of the Leymus chinensis spike is processed according to a preset image processing flow, and further includes 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.
[0027] Furthermore, the preset seed area is set to 1.6 mm 2 .
[0028] Furthermore, the area of the first preset region is set to 2.0 mm 2 .
[0029] Furthermore, the area of the second preset region is set to 8.0 mm 2 .
[0030] Furthermore, the definitions of the sheep fescue spike and the 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.
[0031] 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, and 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.
[0032] 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.
[0033] 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 method (1) and / or (2): (1) The fruit set rate of Leymus chinensis was tested according to the above-mentioned method for obtaining the fruit set rate of Leymus chinensis seeds. The higher the fruit set rate, the better the quality of the variety.
[0034] (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.
[0035] The present invention has at least the following beneficial effects: The invention provides a method for obtaining a seed setting rate of Leymus chinensis. The method comprises the following steps: firstly obtaining a Leymus chinensis spike X-ray image corresponding to a Leymus chinensis sample, performing pixel segmentation processing on the Leymus chinensis spike X-ray image based on an adaptive target pixel segmentation threshold, obtaining a binary image corresponding to the Leymus chinensis spike X-ray image, determining a plurality of Leymus chinensis spike regions and a plurality of Leymus chinensis scattered grain regions from the binary image, performing iterative segmentation of image pixels on the Leymus chinensis spike region and the Leymus chinensis scattered grain region, realizing iterative marking of Leymus chinensis seed regions, obtaining a plurality of second seed regions, and then obtaining a plurality of target floret regions from the binary 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 Leymus chinensis sample, and then obtaining a total seed setting rate of Leymus chinensis. The method can automatically and rapidly identify Leymus chinensis seeds and florets with high throughput, thereby realizing accurate and rapid acquisition of the seed setting rate of Leymus chinensis, and overcoming the disadvantages of low efficiency and low accuracy of manual recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] 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.
[0037] Figure 1 A flow chart of a method for obtaining the seed setting rate of Leymus chinensis seeds provided in an embodiment of the present invention; Figure 2 A schematic diagram of placing Leymus chinensis spikes and loose grains of Leymus chinensis provided in an embodiment of the present invention; Figure 3 A histogram of a Leymus chinensis spike and a schematic diagram of an inflection point provided in an embodiment of the present invention; 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; Figure 5 A schematic diagram of a process of identifying and marking a second seed region provided in an embodiment of the present invention; Figure 6 A schematic diagram of the identification process of the second floret region provided in an embodiment of the present invention; Figure 7 A schematic diagram of the screening and marking process of the target floret region provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0038] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions 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 those skilled in the art without creative work are within the scope of protection of the present invention.
[0039] 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 comprises the following steps: S100, obtaining an X-ray image of a sheep grass spike corresponding to any sheep grass sample; the X-ray image of a sheep grass spike is an image taken after non-contact tiling of a sheep grass spike and a sheep grass grain in the sheep grass sample, and the schematic diagram of the placement of the sheep grass spike and the sheep grass grain is as follows Figure 2 As shown, that is, before shooting, each sheepgrass ear is cut from the ear stalk and laid flat on the calibrated field of view on the carrier board. If any loose particles fall, they are placed on the carrier board together, and it is ensured that each sheepgrass ear and each sheepgrass loose particle are separated and not in contact with each other, and the sheepgrass ears are laid flat to reduce the spiral effect.
[0040] 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.
[0041] Specifically, the target pixel segmentation threshold is obtained through the following steps: S201, obtaining a histogram of a sheep calf corresponding to the X-ray image of the sheep calf, and determining an image inflection point from data less than the peak value of the histogram of the sheep calf. The schematic diagram of the histogram of the sheep calf and the inflection point is as shown in FIG. Figure 3 As shown; it can be understood that: the histogram peak is the background data corresponding to the X-ray image of the sheep fescue spike, and the turning point of the foreground data is sought forward.
[0042] S202: Taking the pixel value corresponding to the image inflection point as the target pixel segmentation threshold.
[0043] Furthermore, the specific process of determining a plurality of Leymus chinensis spike regions and a plurality of Leymus chinensis scattered grain regions from the binary image is as follows: Figure 4 As shown, the following steps are included: S210, filter out the data smaller than the first preset area in the binary image to remove noise data, and obtain 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 are independent area 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.
[0044] S220, determining the first target area larger than the second preset area as the sheep grass spike area, and determining the first target area not larger than the second preset area as the sheep grass loose grain area. Those skilled in the art set the second preset area area according to actual needs. In the specific implementation of the present invention, the second preset area area is set to 8.0mm 2 , can be no larger than 8.0mm 2 The scattered areas of Leymus chinensis are first removed to obtain the Leymus chinensis spike areas, and the centroid of each Leymus chinensis spike area is marked before adding the scattered areas of Leymus chinensis.
[0045] As mentioned above, by removing noise data and preventing misidentification of the sheep granae spike area and the sheep granae scattered grain area, the number of sheep granae spikes and the number of sheep granae scattered grains can be accurately counted, which can be used for the subsequent rapid identification of sheep granae seeds and florets, and the precise number of sheep granae seeds and florets can be obtained, making the obtained sheep granae seed setting rate more accurate and reliable.
[0046] S300, according to the initial pixel segmentation thresholds corresponding to the Leymus chinensis spike region and the Leymus chinensis scattered grain region, respectively, image pixel segmentation is performed on each Leymus chinensis spike region and each Leymus chinensis scattered grain region to obtain a plurality of first seed regions; in a specific implementation process, 0.7-1.6 mm pixels are selected from the segmented image. 2 The regional data is used as the first seed regional data.
[0047] 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 plurality of second seed regions are obtained; technicians in this field 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.6 mm 2 .
[0048] 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.
[0049] Furthermore, the initial pixel segmentation threshold corresponding to the Leymus chinensis spike area is obtained through the following steps: S301, according to the histogram corresponding to each Leymus chinensis spike area, obtain the Otsu threshold value corresponding to each Leymus chinensis spike area. Obtaining the Otsu threshold value according to the histogram is a prior art and will not be described in detail here.
[0050] S302, traversing the Ojin threshold corresponding to each sheep grass spike area, when the largest Ojin threshold is unique, the largest Ojin threshold is eliminated, and when the smallest Ojin threshold is unique, the smallest Ojin threshold is eliminated to obtain a number of remaining Ojin thresholds.
[0051] S303, taking the average value of the remaining Otsu thresholds as the initial pixel segmentation threshold corresponding to the Leymus chinensis spike region.
[0052] Similarly, the initial pixel segmentation threshold corresponding to the scattered grain area of the sheep grass is obtained in the same manner as the initial pixel segmentation threshold corresponding to the sheep grass spike area, which will not be repeated here. When performing image pixel segmentation, the initial pixel segmentation threshold corresponding to the sheep grass spike area is used to perform image pixel segmentation on each sheep grass spike area, and the initial pixel segmentation threshold corresponding to the scattered grain area of the sheep grass is used to perform image pixel segmentation on each sheep grass scattered grain area.
[0053] 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 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 Leymus chinensis scattered grain areas clearer.
[0054] S400, performing image processing on the binary image corresponding to the X-ray image of the sheep fescue spike according to a preset image processing flow to obtain a floret image corresponding to the X-ray image of the sheep fescue spike; the floret image includes a plurality of target floret areas.
[0055] Specifically, 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 6 As shown, the following steps are included: S401, performing hole filling on the Leymus chinensis spike region in the binary image, and filtering out data smaller than the first preset region area, to obtain a filled Leymus chinensis spike region, wherein filtering out data smaller than the first preset region area can eliminate some small fragments that may exist in the image background. The process of performing hole filling on image data is prior art and will not be repeated here.
[0056] S402, performing an opening operation and a closing operation in the image processing on the filled Leymus chinensis spike region to obtain a Leymus chinensis spike trunk region corresponding to each Leymus chinensis spike region. The opening operation can corrode the image data to remove the sharp parts, and the closing operation can expand the image data to merge the branches to avoid the influence of the noise between the branches on the subsequent floret recognition. After the opening and closing operations are performed, the step of filtering out the data smaller than the first preset area can be performed again to remove the broken branches.
[0057] S403, for any sheep fescue spike region, remove the sheep fescue spike trunk region corresponding to itself from the filled sheep fescue spike region to obtain the initial floret region corresponding to the sheep fescue spike region, and perform a closing operation on the initial floret region to obtain the first floret region, wherein, by removing the sheep fescue spike trunk region corresponding to itself from the sheep fescue spike region, several lemma tips can be obtained, each lemma tip represents a floret, and performing a closing operation on the initial floret region can close the broken lemma tip data.
[0058] S404, adding the scattered 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 scattered area of Leymus chinensis to the original position corresponding to the scattered area of Leymus chinensis.
[0059] Specifically, the preset floret identification condition means that the area of the first floret region is greater 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 region is identified as the second floret region, and the second floret region is temporarily defined as valid data. The region with a length greater than 5.0 mm and a thickness less than 0.2 mm is identified as the leaf envelope region, which is invalid data. The florets whose centroid distance in the image is less than 0.6 mm are merged.
[0060] 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.
[0061] Further, 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: S410, for any sheep fescue 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 sheep fescue spike area; it can be understood as: obtaining the position distribution of each sheep fescue seed and each floret on the sheep fescue spike.
[0062] S420, obtaining the axis vector of the sheep fescue spike 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; that is, the direction of the sheep fescue spike axis vector is from the root of the spike axis to the top of the spike axis.
[0063] 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 whose corresponding angle is less than a 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; technical personnel in this field set the preset angle threshold according to actual needs. In an embodiment of the present invention, the preset angle threshold is 120°.
[0064] 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.
[0065] S450, when the number of the second floret regions is less than 2, marking the centroid of the Leymus chinensis spike region as the target floret region.
[0066] Furthermore, the binary image corresponding to the X-ray image of the Leymus chinensis spike is processed according to a preset image processing flow, 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.
[0067] 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, various 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 realizing the accurate and rapid acquisition of the sheep fescue seed fruiting rate.
[0068] S500, determining 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 taking the average of the single plant fruit setting rates corresponding to all the Leymus chinensis samples as the Leymus chinensis seed fruit setting rate.
[0069] 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 several single chinensis plants are averaged, and the average value is the final chinensis seed setting rate.
[0070] In a parallel embodiment, the chinensis sample is a mixture of several chinensis spikes and several chinensis loose grains obtained by disassembling complete spikes of multiple chinensis plants and then divided into any one of several samples. When calculating the chinensis seed setting rate, the average value of the setting rates corresponding to all chinensis samples is used as the chinensis seed setting rate.
[0071] 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.
[0072] An embodiment of the present invention further provides an electronic device, comprising a processor and the aforementioned non-transitory computer-readable storage medium.
[0073] The embodiment of the present invention also provides a method for screening high-quality Leymus chinensis varieties, which is screened according to the following method (1) and / or (2): (1) The fruit set rate of Leymus chinensis was tested according to the above-mentioned method for obtaining the fruit set rate of Leymus chinensis seeds. The higher the fruit set rate, the better the quality of the variety.
[0074] (2) According to the above-mentioned method for obtaining the seed setting rate of Leymus chinensis, the spike region 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. One node represents a Leymus chinensis spikelet.
[0075] Although some specific embodiments of the present invention have been described in detail by way of example, it will be appreciated 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 will also be appreciated 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 non-contact tiling of the Leymus chinensis spike and loose particles in the Leymus chinensis sample; Based on the target pixel segmentation threshold, pixel segmentation processing is performed on the Leymus chinensis spike X-ray image to obtain a binary image corresponding to the Leymus chinensis spike X-ray image, and a number of Leymus chinensis spike regions and a number of Leymus chinensis scattered grain regions are determined from the binary image; According to the initial pixel segmentation thresholds corresponding to the sheep grass spike region and the sheep grass scattered grain region, image pixel segmentation is performed on each sheep grass spike region and each sheep grass scattered grain region to obtain a plurality of first seed regions; and when there is a first seed region with an area larger than a preset seed region, each initial pixel segmentation threshold is iteratively reduced with a preset step size until there is no first seed region with an area larger than the preset seed region, and a plurality of second seed regions are obtained; Performing image processing on the binary 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; The ratio of the number of the second seed area to the number of the target floret area was determined as the single plant fruit setting rate corresponding to the Leymus chinensis sample, and the average 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 loose particles obtained by disassembling a complete spike of any single sheepgrass plant, or a sample consisting of several sheepgrass spikes and several sheepgrass loose particles obtained by disassembling complete spikes of multiple sheepgrass plants and then divided into any one of several samples.
3. The method for obtaining the seed setting rate of Leymus chinensis according to claim 1, characterized in that: The target pixel segmentation threshold is obtained by the following steps: 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 that is less than a peak value of the histogram of the Leymus chinensis spike; The pixel value corresponding to the inflection point of the image is used as the target pixel segmentation threshold.
4. The method for obtaining the seed setting rate of Leymus chinensis according to claim 1, characterized in that: The method of determining a plurality of Leymus chinensis spike regions and a plurality of Leymus chinensis scattered grain regions from the binary 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 having an area larger than the second preset area is determined as a Leymus chinensis spike area, and the first target area having an area not larger than the second preset area is determined as a Leymus chinensis scattered grain area.
5. The method for obtaining the seed setting rate of Leymus chinensis seeds according to claim 1, characterized in that: The initial pixel segmentation threshold corresponding to the Leymus chinensis spike area is obtained through the following steps: According to the histogram corresponding to each Leymus chinensis spike area, the Otsu threshold corresponding to each Leymus chinensis spike area is obtained; Traverse the Otsu thresholds corresponding to each Leymus chinensis spike area, and when the largest Otsu threshold is unique, eliminate the largest Otsu threshold, and when the smallest Otsu threshold is unique, eliminate the smallest Otsu threshold to obtain several remaining Otsu thresholds; The average value of several remaining Otsu thresholds is used as the initial pixel segmentation threshold corresponding to the Leymus chinensis spike region.
6. The method for obtaining the seed setting rate of Leymus chinensis seeds according to claim 1, 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 flow, comprising the following steps: Filling holes in the Leymus chinensis spike region in the binary image, and filtering out data smaller than the area of the first preset region, to obtain a filled Leymus chinensis spike region; Performing the opening and closing operations in the image processing on the filled Leymus chinensis spike region, and obtaining the Leymus chinensis spike trunk region corresponding to each Leymus chinensis spike region; For any Leymus chinensis spike region, remove the Leymus chinensis spike trunk region corresponding to itself from the filled Leymus chinensis spike region to obtain the initial floret region corresponding to the Leymus chinensis spike region, and perform a closing operation on the initial floret region to obtain the first floret region; Add the scattered area of sheep fescue to the image corresponding to the first floret area, and identify several second floret areas according to the 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.
7. The method for obtaining the seed setting rate of Leymus chinensis seeds 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 flow, further comprising the following steps: 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 the axis vector of the Leymus chinensis spike according to 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 region whose corresponding angle is less than a preset angle threshold is determined as the third floret region; 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.
8. The method for obtaining the seed setting rate of Leymus chinensis seeds 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 flow, 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.
9. 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 the processor to implement the method for obtaining the seed setting rate of Leymus chinensis seeds as described in any one of claims 1-8.
10. An electronic device, characterized in that: The invention comprises a processor and the non-transitory computer-readable storage medium as claimed in claim 9.
Citation Information
Patent Citations
Method for calculating rice maturing rate
CN104268890A
Method for nondestructively extracting rice spike character through X-ray-visible light dual-mode imaging
CN109557090A
Method and system for screening grey matter of rice seeds
CN115908279A
Rice setting rate detection method based on hyperspectral imaging technology
CN116660175A
Digitalized identification method, system, equipment and medium for fruited pasture seeds
CN118155076A