Sunflower seed abnormal area identification method and device, sunflower seed sorting method and equipment
By combining color or depth convolutional segmentation network prediction models with shape features to identify abnormal regions in sunflower seeds, the problem of insufficient identification efficiency and accuracy in existing technologies is solved, and efficient and accurate sunflower seed sorting is achieved.
Patent Information
- Application Number
- CN202010276922.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-04-10
- Publication Date
- 2026-01-13
- Estimated Expiration
- 2040-04-10
Smart Images

Figure CN113537185B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of material sorting technology, and in particular to a method and apparatus for identifying abnormal areas in sunflower seeds, and a method and equipment for sorting sunflower seeds. Background Technology
[0002] Abnormal areas on sunflower seeds that affect their appearance are called "flowered sunflower seeds," which may even be inedible. Therefore, it is necessary to identify and sort these flowered seeds to minimize their impact on sales. There are several types of abnormal areas; refer to [the relevant documentation]. Figure 1 For example, peeled areas. There are two main reasons for the appearance of peeled areas. One is that if mold grows inside the sunflower seeds during their natural growth process, the surface is prone to peeling. The other is that peeling is caused by storage and transportation. Summary of the Invention
[0003] The present invention aims to at least partially solve one of the technical problems in the related art.
[0004] Therefore, the first objective of this invention is to provide a method for identifying abnormal regions in sunflower seeds, comprising:
[0005] Acquire sunflower seed images; based on the sunflower seed images, use a color or depth convolutional segmentation network prediction model to pre-identify abnormal regions of the sunflower seeds to obtain suspected abnormal regions; determine whether the suspected abnormal regions are indeed abnormal regions based on the shape characteristics of the suspected abnormal regions.
[0006] In this technical solution, sunflower seeds are pre-identified using a color or depth convolutional segmentation network prediction model to identify suspected abnormal regions. Then, based on the shape characteristics of these suspected abnormal regions, their authenticity is confirmed. In this process, pre-identification using color or depth convolutional segmentation networks effectively improves recognition efficiency. Based on the pre-identification results, further confirmation using shape features eliminates false identifications, thus achieving the identification of abnormal regions in sunflower seeds. Combining multiple identification methods—pre-identification followed by elimination of false identifications—ensures both a certain level of recognition efficiency and further improves recognition accuracy.
[0007] Optionally, the step of identifying abnormal regions of the sunflower seeds based on the sunflower seed image using color to obtain suspected abnormal regions includes: extracting the grayscale value of the target channel of each pixel of the sunflower seed from the sunflower seed image, determining whether each grayscale value is greater than a preset grayscale threshold, wherein the target channel is any channel in the RGB channel; and determining the region composed of pixels whose grayscale values are greater than the preset grayscale threshold as a suspected abnormal region.
[0008] Optionally, the abnormal area is a peeling area, and the target channel is the G channel.
[0009] Optionally, determining whether the suspected abnormal region is an abnormal region based on its shape characteristics includes: calculating the average width of the suspected abnormal region based on its area, row width, and column width; determining whether the average width is less than a preset width threshold; if it is less, determining that the suspected abnormal region is not an abnormal region, and / or, if it is greater, determining that the suspected region is an abnormal region.
[0010] Optionally, determining whether the suspected abnormal region is an abnormal region based on its shape characteristics includes: calculating the change range of the width of the suspected abnormal region in a preset direction; determining whether the change range is greater than a preset range threshold; if it is less than a preset range threshold, determining that the suspected abnormal region is not an abnormal region, and / or, if it is greater than a preset range threshold, determining that the suspected abnormal region is an abnormal region.
[0011] Optionally, calculating the variation range of the width of the suspected abnormal region in a preset direction includes: counting the number of pixels in each row extending along the preset direction in the suspected abnormal region, and the number of rows, wherein if the column width is greater than the row width, the preset direction is the row direction, otherwise it is the column direction; calculating the average number of pixels per row based on the counted number of rows and the number of pixels per row; calculating the variance of the number of pixels per row based on the number of rows, the number of pixels per row, and the average number of pixels per row; and using the variance of the number of pixels per row as the variation range of the width of the suspected abnormal region in the preset direction.
[0012] Optionally, calculating the variation range of the width of the suspected abnormal region in a preset direction includes: calculating the difference in the number of adjacent pixels in every two rows of the suspected abnormal region, and the number of rows, wherein each row of pixels extends along the preset direction, and if the column width is greater than the row width, the preset direction is a row direction; otherwise, it is a column direction; calculating the mean of the difference in the number of pixels per row based on the counted number of rows and the difference in the number of adjacent pixels in every two rows; calculating the variance of the difference based on the number of rows, the difference in the number of adjacent pixels in every two rows, and the mean of the difference in the number of pixels per row; and using the variance of the difference as the variation range of the width of the suspected abnormal region in the preset direction.
[0013] The second objective of this invention is to provide a method for sorting sunflower seeds, comprising:
[0014] The abnormal region is identified according to any of the above-described sunflower seed abnormal region identification methods;
[0015] The control rejection module rejects sunflower seeds with abnormal areas.
[0016] The third objective of this invention is to provide a sunflower seed abnormality region identification device. This device includes: an acquisition module for acquiring sunflower seed images; a pre-identification module for pre-identifying abnormal regions of the sunflower seeds based on the sunflower seed images using a color or depth convolutional segmentation network prediction model to obtain suspected abnormal regions; and a judgment module for determining whether the suspected abnormal region is indeed an abnormal region based on its shape characteristics.
[0017] The fourth objective of this invention is to provide a sunflower seed sorting device.
[0018] To achieve the above objectives, a fourth aspect of the present invention provides a sunflower seed sorting device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the above-described method for identifying abnormal areas of sunflower seeds or the above-described method for sorting sunflower seeds.
[0019] The sunflower seed sorting equipment of this invention, by executing the above-described sunflower seed abnormal area identification method, can identify abnormal areas of sunflower seeds, ensuring a certain identification efficiency while improving the accuracy of abnormal area identification.
[0020] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0021] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:
[0022] Figure 1 Sunflower seeds with peeled areas;
[0023] Figure 2 These are normal sunflower seeds;
[0024] Figure 3 A flowchart of a method for identifying abnormal regions in sunflower seeds provided in an embodiment of the present invention;
[0025] Figure 4 This is a structural block diagram of a sunflower seed abnormality area identification device provided in an embodiment of the present invention. Detailed Implementation
[0026] Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention.
[0027] The following description, with reference to the accompanying drawings, illustrates a method and apparatus for identifying abnormal regions in sunflower seeds according to an embodiment of the present invention. It should be noted that in this embodiment, "row direction" refers to the direction in which a row of pixels in an image is arranged and extended, such as... Figure 1 The direction from left to right or from right to left; the column direction refers to the direction in which a column of pixels in an image extends, such as... Figure 1 The direction is either from top to bottom or from bottom to top; while the direction of a row of pixels is a preset direction. If the preset direction is row-oriented, a row of pixels can refer to a row of pixels; if the preset direction is column-oriented, a row of pixels can refer to a column of pixels.
[0028] Reference Figure 3 The present invention provides a method for identifying abnormal regions in sunflower seeds, comprising:
[0029] S101. Acquire sunflower seed images. For example, when the sunflower seed abnormality area identification method provided in this embodiment of the invention is applied to a sunflower seed sorting device, images of sunflower seeds during the feeding process of the sunflower seed sorting device can be acquired using a high-speed camera.
[0030] S102. Based on sunflower seed images, use color or depth convolutional segmentation network prediction models to pre-identify abnormal regions of sunflower seeds and obtain suspected abnormal regions.
[0031] Abnormal areas can include one or any combination of peeling areas, lesion areas, insect-eaten areas, and moldy areas. Identification using color or depth convolutional segmentation network prediction models may result in some false positives; that is, a suspected abnormal area may indeed be an abnormal area, or it may not be an abnormal area at all.
[0032] In one implementation, based on a sunflower seed image, abnormal regions are identified by color to obtain suspected abnormal regions, including:
[0033] (1) Extract the grayscale value of the target channel for each pixel in the sunflower seed image, and determine whether each grayscale value is greater than a preset grayscale threshold. The target channel can be any channel in the RGB channels. If the abnormal area is a peeled area, the target channel can be the G channel, i.e., the green channel. Compared with the other two channels, the grayscale value of the G channel is more different and the effect is better. The color of the peeled area is close to the original light-colored area of the sunflower seed. The threshold can be set according to the difference between the original light-colored area of the sunflower seed and the abnormal area, so as to distinguish the light-colored area from the abnormal area.
[0034] (2) The region consisting of pixels whose grayscale value is greater than the preset grayscale threshold is identified as a suspected abnormal region. When the grayscale value of the target channel is greater than the preset grayscale threshold, the pixel is a suspected abnormal pixel, and all identified suspected abnormal pixels constitute a suspected abnormal region.
[0035] In another implementation, an abnormal region of sunflower seeds is pre-identified using a deep convolutional segmentation network prediction model. A deep convolutional segmentation network training model is built, sample images of the material used for training are collected, and abnormal regions of the samples are labeled at the pixel level. Then, the labeled samples are used to train the built deep convolutional segmentation network model to obtain a deep convolutional segmentation network prediction model capable of identification.
[0036] S103. Determine whether a suspected abnormal area is an abnormal area based on its shape characteristics.
[0037] A normal sunflower seed surface consists of striped light-colored areas and striped dark-colored areas. If the shape of a suspected abnormal area differs significantly from the striped pattern, it can be determined that the suspected abnormal area is an abnormal area affecting the appearance of the sunflower seed.
[0038] Color sorting technology is used to separate sunflower seeds. Normal sunflower seeds have a uniform distribution of light and dark colors on their surface. Abnormal areas may resemble the original dark or light areas of the sunflower seed. For example, if peeling occurs in a dark area, peeled areas may appear that are similar in color to the light areas. Because the colors are similar, it is difficult to achieve high-precision identification of abnormal areas in sunflower seeds using color alone, and there is a certain degree of false identification. Figure 1 and Figure 2 As shown, Figure 1 While identifying the peeling areas, it may also... Figure 2 The superficial skin area was mistakenly identified as the peeling area.
[0039] In this embodiment, sunflower seeds are pre-identified using a color or depth convolutional segmentation network prediction model to identify suspected abnormal regions. Then, the shape features of these suspected abnormal regions are used to further confirm their authenticity. In this process, pre-identification using color or depth convolutional segmentation networks effectively improves identification efficiency. Based on the pre-identification results, further confirmation using shape features eliminates false identifications, thus achieving the identification of abnormal regions in sunflower seeds. Combining multiple identification methods—pre-identification followed by elimination of false identifications—ensures both a certain level of identification efficiency and further improves identification accuracy.
[0040] It should be noted that each suspected abnormal region is a connected component. For a sunflower seed image, the number of suspected abnormal regions identified through pre-identification may be one or more. In this embodiment, each suspected abnormal region can be further judged to determine whether it is an abnormal region.
[0041] Determining whether a suspected abnormal region is indeed an abnormal region based on its shape characteristics includes:
[0042] (1) Calculate the average width of the suspected abnormal region based on its area, row width, and column width.
[0043]
[0044] in, Let S be the average width of the suspected abnormal region, S be the area of the suspected abnormal region, i.e. the area of the connected domain that is the suspected abnormal region, and w and h be the row width and column width of the suspected abnormal region, i.e., the corresponding connected domain, respectively.
[0045] (2) Determine whether the average width is less than the preset width threshold. If it is less, determine that the suspected abnormal area is not an abnormal area, and / or, if it is greater, determine that the suspected area is an abnormal area.
[0046] Understandably, in one implementation, if the average width is less than a preset width threshold, the suspected abnormal region can be determined to be an abnormal region. For suspected abnormal regions with an average width greater than the preset width threshold, the suspected abnormal region can be directly determined as an abnormal region, or it can be further determined whether it is an abnormal region through other methods, such as any other method described herein for determining whether a suspected abnormal region is an abnormal region.
[0047] In another implementation, if the average width is greater than a preset width threshold, the suspected abnormal region can be directly determined as an abnormal region. For suspected abnormal regions with an average width less than the preset width threshold, the suspected abnormal region can be directly determined as not an abnormal region, or it can be further determined whether it is an abnormal region through other means. Such other means can be any other method in this article for determining whether a suspected abnormal region is an abnormal region.
[0048] The stripes on the surface of sunflower seeds are relatively narrow. By setting a width threshold, the normal surface of sunflower seeds can be distinguished from abnormal areas, thereby identifying the abnormal areas.
[0049] Determining whether a suspected abnormal region is an abnormal region based on its shape characteristics includes: calculating the variation range of the width of the suspected abnormal region in a preset direction, where the preset direction is either row-oriented or column-oriented; determining whether the variation range is greater than a preset range threshold; if it is less than a preset threshold, the suspected abnormal region is determined not to be an abnormal region, and / or, if it is greater than a preset threshold, the suspected abnormal region is determined to be an abnormal region.
[0050] Understandably, in one implementation, if the change amplitude is less than a preset amplitude threshold, the suspected abnormal region can be determined to be an abnormal region. For suspected abnormal regions with a change amplitude greater than the preset amplitude threshold, the suspected abnormal region can be directly determined as an abnormal region, or it can be further determined whether it is an abnormal region through other methods, such as any other method described in this article for determining whether a suspected abnormal region is an abnormal region.
[0051] In another implementation, if the change amplitude is greater than a preset amplitude threshold, the suspected abnormal region can be directly determined as an abnormal region. For suspected abnormal regions with a change amplitude less than the preset amplitude threshold, the suspected abnormal region can be directly determined as not an abnormal region, or it can be further determined whether it is an abnormal region through other means. These other means can be any of the methods for determining whether a suspected abnormal region is an abnormal region as described below.
[0052] In one implementation, calculating the variation range of the width of the suspected abnormal region in a preset direction includes:
[0053] Count the number of pixels in each row extending along a preset direction in the suspected abnormal region, and the number of rows. If the column width is greater than the row width, the preset direction is the row direction; otherwise, it is the column direction. Calculate the mean number of pixels per row based on the counted number of rows and the number of pixels per row. Calculate the variance of the number of pixels per row based on the number of rows, the number of pixels per row, and the mean number of pixels per row. Use the variance of the number of pixels per row as the variation range of the preset direction width of the suspected abnormal region.
[0054] In practice, if the column width of the sunflower seeds is greater than the row width, then the aforementioned row is considered a row. In this case, the number of rows and the number of pixels per row in the suspected abnormal area are counted. Based on the counted number of rows and the number of pixels per row, the average number of pixels per row is calculated. Based on the number of rows, the number of pixels per row, and the average number of pixels per row, the variance of the number of pixels per row is calculated. The variance of the number of pixels per row is used as the variation range of the preset directional width of the suspected abnormal area.
[0055] On the other hand, if the column width of the sunflower seeds is less than the row width, then the aforementioned row is a column. In this case, the number of columns and the number of pixels per column in the suspected abnormal area are counted. Based on the counted number of columns and the number of pixels per column, the average number of pixels per column is calculated. Based on the number of columns, the number of pixels per column, and the average number of pixels per column, the variance of the number of pixels per column is calculated. The variance of the number of pixels per column is used as the variation range of the preset directional width of the suspected abnormal area.
[0056] In another implementation, calculating the variation range of the width of the suspected abnormal region in a preset direction includes:
[0057] The difference in the number of adjacent pixels between any two rows in the suspected abnormal region is statistically analyzed, along with the number of rows. Each row of pixels extends along a preset direction. If the column width is greater than the row width, the preset direction is row-oriented; otherwise, it is column-oriented. Based on the statistically analyzed number of rows and the difference in the number of adjacent pixels between any two rows, the mean difference in the number of pixels per row is calculated. Based on the number of rows, the difference in the number of adjacent pixels between any two rows, and the mean difference in the number of pixels per row, the variance of the difference in the number of pixels is calculated. The variance of the difference in the number of pixels is used as the variation range of the preset directional width of the suspected abnormal region.
[0058] In practical applications, on the one hand, if the column width of the sunflower seeds is greater than the row width, then the aforementioned row is the row. In this case, the number of rows in the suspected abnormal area and the difference in the number of adjacent pixels between every two rows are counted. Based on the counted number of rows and the difference in the number of adjacent pixels between every two rows, the mean difference in the number of pixels per row is calculated. Based on the number of rows, the difference in the number of adjacent pixels between every two rows, and the mean difference in the number of pixels per row, the variance of the difference in the number of pixels is calculated. The variance of the difference in the number of pixels is used as the variation range of the preset directional width of the suspected abnormal area.
[0059] On the other hand, if the column width of the sunflower seeds is less than the row width, then the aforementioned row is a column. In this case, the number of columns in the suspected abnormal area and the difference in the number of adjacent pixels between every two columns are counted. Based on the counted number of columns and the difference in the number of adjacent pixels between every two columns, the mean of the difference in the number of pixels in each column is calculated. Based on the number of columns, the difference in the number of adjacent pixels between every two columns, and the mean of the difference in the number of pixels in each column, the variance of the difference in the number of pixels is calculated. The variance of the difference in the number of pixels is used as the variation range of the preset directional width of the suspected abnormal area.
[0060] The variance mentioned above can be calculated using the following formula:
[0061]
[0062] If δ 2 Let n be the variance of the number of pixels in a row (or column), then n is the number of rows (or columns) in the abnormal region, and x is the variance of the number of pixels in a row (or column). i The number of pixels per row (or column). This represents the average number of pixels per row.
[0063] If δ 2Let x be the variance of the number of differences. Then n is the difference in the number of adjacent pixels between every two rows (i.e., columns), which is the number of rows (i.e., columns) in the abnormal region minus 1. i It is the difference in the number of adjacent pixels between every two rows (i.e., rows or columns). This is the average difference in the number of pixels per row or column.
[0064] This invention also provides a method for sorting sunflower seeds, the method comprising:
[0065] First, the abnormal region is identified according to any one of the sunflower seed abnormal region identification methods in the above embodiments;
[0066] Then, the rejection module is controlled to reject sunflower seeds with abnormal areas.
[0067] Based on the same inventive concept as the sunflower seed abnormality region identification method described above, this embodiment of the invention also provides a sunflower seed abnormality region identification device, referring to... Figure 4 The device includes:
[0068] Acquisition module 11 is used to acquire sunflower seed images;
[0069] The pre-identification module 12 is used to pre-identify abnormal regions of sunflower seeds based on sunflower seed images using color or depth convolutional segmentation network prediction models, and obtain suspected abnormal regions.
[0070] The judgment module 13 is used to determine whether a suspected abnormal region is an abnormal region based on the shape characteristics of the suspected abnormal region.
[0071] This device pre-identifies sunflower seeds using color or depth convolutional segmentation network prediction models to identify suspected abnormal regions. Then, based on the shape characteristics of these suspected abnormal regions, it confirms whether they are indeed abnormal. In this process, pre-identification using color or depth convolutional segmentation networks effectively improves recognition efficiency. Based on the pre-identification results, further confirmation using shape features eliminates false positives, thus achieving the identification of abnormal regions in sunflower seeds. Combining multiple recognition methods—pre-identification followed by false positive elimination—ensures both a certain level of recognition efficiency and further improves recognition accuracy.
[0072] The pre-identification module 12 is specifically used to extract the grayscale value of the target channel of each pixel in the sunflower seed image, determine whether each grayscale value is greater than a preset grayscale threshold, wherein the target channel is any channel in the RGB channel; and identify the region composed of pixels with grayscale values greater than the preset grayscale threshold as a suspected abnormal region. The abnormal region is a peeling area, and the target channel is the G channel.
[0073] In one embodiment, the judgment module 13 is specifically used to: calculate the average width of the suspected abnormal region based on the area, row width, and column width of the suspected abnormal region; determine whether the average width is less than a preset width threshold; if it is less than the threshold, determine that the suspected abnormal region is not an abnormal region, and / or, if it is greater than the threshold, determine that the suspected region is an abnormal region.
[0074] In another embodiment, the judgment module 13 specifically includes a calculation unit and a judgment unit.
[0075] The calculation unit is used to calculate the change range of the width of the suspected abnormal area in a preset direction, where the preset direction is either row or column.
[0076] The judgment unit is used to determine whether the change amplitude is greater than a preset amplitude threshold; if it is less than, the suspected abnormal area is determined to be an abnormal area, and / or, if it is greater than, the suspected abnormal area is determined to be an abnormal area.
[0077] In one embodiment, the calculation unit is specifically used for: counting the number of pixels in each row extending along a preset direction in the suspected abnormal region, and the number of rows, wherein if the column width is greater than the row width, the preset direction is the row direction, otherwise it is the column direction; calculating the average number of pixels per row based on the counted number of rows and the number of pixels per row; calculating the variance of the number of pixels per row based on the number of rows, the number of pixels per row, and the average number of pixels per row; and using the variance of the number of pixels per row as the variation range of the width of the suspected abnormal region in the preset direction.
[0078] In another implementation, the calculation unit is specifically used to: count the difference in the number of adjacent pixels in every two rows in the suspected abnormal region, and the number of rows, wherein each row of pixels extends along a preset direction; if the column width is greater than the row width, the preset direction is the row direction, otherwise it is the column direction; calculate the mean of the difference in the number of pixels per row based on the counted number of rows and the difference in the number of adjacent pixels in every two rows; calculate the variance of the difference based on the number of rows, the difference in the number of adjacent pixels in every two rows, and the mean of the difference in the number of pixels per row; and use the variance of the difference as the variation range of the width of the suspected abnormal region in the preset direction.
[0079] This invention also provides a sunflower seed sorting device, including: any of the above-mentioned sunflower seed abnormal area identification devices, and a rejection module for rejecting sunflower seeds with abnormal areas based on the judgment result of the judgment module.
[0080] This invention also provides a sunflower seed sorting device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the sunflower seed abnormal area identification method described above.
[0081] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0082] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0083] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing custom logic functions or processes, and the scope of preferred embodiments of the invention includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of the invention pertain.
[0084] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which programs can be printed, because programs can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0085] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any of the following techniques known in the art, or a combination thereof: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0086] Those skilled in the art will understand that all or part of the steps of the methods described in the above embodiments can be implemented by a program instructing related hardware, and the program can be stored in a computer-readable storage medium. When executed, the program includes one or a combination of the steps of the method embodiments.
[0087] Furthermore, the functional units in the various embodiments of the present invention can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0088] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present invention.
Claims
1. A method for identifying abnormal regions in sunflower seeds, characterized in that, include: Capture images of sunflower seeds; Based on the sunflower seed image, a color or depth convolutional segmentation network prediction model is used to pre-identify abnormal regions of the sunflower seeds to obtain suspected abnormal regions. The shape characteristics of the suspected abnormal area and the stripe pattern on the surface of the sunflower seed are used to determine whether the suspected abnormal area is an abnormal area. The shape characteristics of the suspected abnormal area are the average width of the suspected abnormal area and / or the variation range of the width in a preset direction. The abnormal area is a peeling area.
2. The method according to claim 1, characterized in that, The step of identifying suspected abnormal regions based on the sunflower seed image using color analysis to determine the abnormal regions includes: From the sunflower seed image, extract the grayscale value of the target channel of each pixel of the sunflower seed, and determine whether each grayscale value is greater than a preset grayscale threshold, wherein the target channel is any channel in the RGB channel; The region consisting of pixels whose grayscale value is greater than the preset grayscale threshold is identified as a suspected abnormal region.
3. The method according to claim 2, characterized in that, The target channel is the G channel.
4. The method according to claim 1, characterized in that, The step of determining whether the suspected abnormal area is an abnormal area based on the shape characteristics of the suspected abnormal area and the stripe pattern on the surface of the sunflower seeds includes: Calculate the average width of the suspected abnormal region based on its area, row width, and column width; Determine whether the average width is less than a preset width threshold; If the value is less than 1, the suspected abnormal region is determined to be an abnormal region, and / or if the value is greater than 1, the suspected abnormal region is determined to be an abnormal region.
5. The method according to claim 1, characterized in that, The step of determining whether the suspected abnormal area is an abnormal area based on the shape characteristics of the suspected abnormal area and the stripe pattern on the surface of the sunflower seeds includes: Calculate the variation range of the width of the suspected abnormal region in a preset direction; Determine whether the magnitude of the change is greater than a preset magnitude threshold; If the value is less than 1, the suspected abnormal region is determined to be an abnormal region, and / or if the value is greater than 1, the suspected abnormal region is determined to be an abnormal region.
6. The method according to claim 5, characterized in that, The calculation of the change range of the width of the suspected abnormal region in a preset direction includes: The number of pixels in each row extending along the preset direction in the suspected abnormal region is counted, as well as the number of rows. If the column width is greater than the row width, the preset direction is the row direction; otherwise, it is the column direction. Calculate the average number of pixels per row based on the number of rows and the number of pixels per row. Calculate the variance of the number of pixels per row based on the number of rows, the number of pixels per row, and the average number of pixels per row; The variance of the number of pixels in the row is used as the variation range of the preset directional width of the suspected abnormal region.
7. The method according to claim 5, characterized in that, The calculation of the change range of the width of the suspected abnormal region in a preset direction includes: The difference in the number of adjacent pixels in every two rows in the suspected abnormal region is counted, as well as the number of rows. Each row of pixels extends along the preset direction. If the column width is greater than the row width, the preset direction is the row direction; otherwise, it is the column direction. Calculate the average difference in the number of pixels per row based on the number of rows and the difference in the number of adjacent pixels between every two rows. Calculate the variance of the number of pixels based on the number of rows, the difference in the number of adjacent pixels between every two rows, and the average difference in the number of pixels between rows; The variance of the number difference is used as the variation range of the preset directional width of the suspected abnormal region.
8. A method for sorting sunflower seeds, characterized in that, include: The sunflower seed abnormality region identification method according to any one of claims 1-7 identifies the abnormal region; The control rejection module rejects sunflower seeds with abnormal areas.
9. A sunflower seed abnormality area identification device, characterized in that, include: The acquisition module is used to acquire images of sunflower seeds; The pre-identification module is used to pre-identify abnormal regions of the sunflower seeds based on the sunflower seed image using a color or depth convolutional segmentation network prediction model, thereby obtaining suspected abnormal regions. The judgment module is used to determine whether the suspected abnormal area is an abnormal area based on the shape characteristics of the suspected abnormal area and the stripe pattern on the surface of the sunflower seed. The shape characteristics of the suspected abnormal area are the average width of the suspected abnormal area and / or the variation range of the width in a preset direction. The abnormal area is a peeling area.
10. A sunflower seed sorting device, characterized in that, include: The system includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the sunflower seed abnormal area identification method as described in any one of claims 1-7, or the sunflower seed sorting method as described in claim 8.
Citation Information
Patent Citations
Sunflower seed grade classification method based on image processing technology
CN112233107A
Determination method and device for abnormal material removal area and material sorting method and equipment
CN113516611A
Seed feature extraction and classification method used in seed selection process
CN115205319A