CN115205319A - Seed feature extraction and classification method used in seed selection process - Google Patents

Seed feature extraction and classification method used in seed selection process Download PDF

Info

Publication number
CN115205319A
CN115205319A CN202211133557.3A CN202211133557A CN115205319A CN 115205319 A CN115205319 A CN 115205319A CN 202211133557 A CN202211133557 A CN 202211133557A CN 115205319 A CN115205319 A CN 115205319A
Authority
CN
China
Prior art keywords
seed
region
value
obtaining
pixel points
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202211133557.3A
Other languages
Chinese (zh)
Other versions
CN115205319B (en
Inventor
韩文静
刘加加
章园园
侯仰住
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Jinchunyu Seed Technology Co ltd
Original Assignee
Shandong Jinchunyu Seed Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong Jinchunyu Seed Technology Co ltd filed Critical Shandong Jinchunyu Seed Technology Co ltd
Priority to CN202211133557.3A priority Critical patent/CN115205319B/en
Publication of CN115205319A publication Critical patent/CN115205319A/en
Application granted granted Critical
Publication of CN115205319B publication Critical patent/CN115205319B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/72Data preparation, e.g. statistical preprocessing of image or video features
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/762Arrangements for image or video recognition or understanding using pattern recognition or machine learning using clustering, e.g. of similar faces in social networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30242Counting objects in image

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computing Systems (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Multimedia (AREA)
  • Geometry (AREA)
  • Image Analysis (AREA)

Abstract

The invention relates to the technical field of image data processing, in particular to a seed feature extraction and classification method used in a seed selection process, which comprises the following steps: acquiring a gray image of corn seeds on a conveyor belt and segmenting the gray image to obtain a plurality of seed areas; acquiring an edge image of each seed area, and further acquiring appearance integrity through the edge image; performing region segmentation on each seed region to obtain a target region; constructing a gray level co-occurrence matrix of each seed region to obtain energy and contrast, and obtaining mildew significance based on the energy, the contrast and the number of pixel points in a target region; obtaining surface gully degree through the gray level difference corresponding to each pixel point in the seed region; obtaining the quality excellence of a seed region according to the surface gully degree and the mildew significance, obtaining a seed selection quality index by combining the quality excellence with the appearance integrity, and selecting the corn seeds based on the seed selection quality index; the precision of screening the corn seeds is improved.

Description

Seed feature extraction and classification method used in seed selection process
Technical Field
The invention relates to the technical field of image data processing, in particular to a seed feature extraction and classification method used in a seed selection process.
Background
The corn has the characteristics of high and stable yield, strong stress resistance, wide adaptability and the like, has wide planting range and long planting history in China, and the total corn yield is second to that of rice every year in China, so that the corn has become important food raw materials, livestock feed and industrial raw material crops in China; meanwhile, the corn can be intercropped and intercropped with other crops to improve the land utilization rate, and has great significance for increasing the yield of food in China.
When the corn is planted, seeds which are not damaged and have no diseases need to be selected so as to improve the emergence rate of the corn seeds; because the amount of seeds needed by corn planting is large, the corn seeds need to be sorted in advance, seeds without damage, mildew and diseases are screened out, and the utilization rate of the seeds is improved.
At present, the equipment for sorting the seeds mainly screens the seeds according to single physical characteristics, such as specific gravity selection, air separation, gravity type screening and the like, is suitable for batch screening of corn seeds with uniform particle size, and has higher requirement on the uniformity of the particles of the seeds. Meanwhile, the use of different sorting equipment needs complex debugging and has low precision; the method for sorting seeds based on machine vision is also based on single characteristics, for example, cracks on seeds are identified by using a mathematical morphology processing method, the influence of other defects on the seeds is ignored, and the screening effect is poor.
Disclosure of Invention
In order to solve the above technical problem, an object of the present invention is to provide a method for extracting and classifying seed features in a seed selection process, the method comprising the following steps:
acquiring a surface image of corn seeds on a conveyor belt, and converting the surface image into a gray image; segmenting the gray level image to obtain a plurality of seed regions;
carrying out canny edge detection on each seed region to obtain an edge image, and acquiring the appearance integrity of each seed region based on the edge image of each seed region;
performing region segmentation on each seed region to obtain a first region and a second region, counting the number of pixel points in the first region and the second region, and marking the region with the smaller number of pixel points as a target region; constructing a gray level co-occurrence matrix of each seed region, obtaining energy and contrast based on the gray level co-occurrence matrix, and obtaining mildew significance of the seed region based on the energy, the contrast and the number of pixel points in the target region;
calculating a gray difference value by taking each pixel point in the seed region as a central point, and obtaining the surface gully degree of the seed region based on the gray difference value; obtaining the quality excellence of a seed region according to the surface gully degree and the mildew significance;
and obtaining a seed selection goodness index based on the product of the quality goodness degree and the appearance completeness, and selecting the corn seeds based on the seed selection goodness index.
Preferably, the step of obtaining the integrity of the appearance of each seed region based on the edge image of each seed region includes:
carrying out Hough line detection on each edge image to obtain a plurality of straight lines, and obtaining a horizontal coordinate range and a vertical coordinate range corresponding to each straight line; obtaining an overlapping range based on the abscissa range and the ordinate range; obtaining a first value and a second value based on the overlap range;
carrying out corner detection on each edge image to obtain a plurality of corners, and clustering all the corners to obtain a plurality of clusters and a plurality of isolated points;
removing pixel points and angular points on a straight line in the edge image to obtain residual pixel points, and performing circle fitting on all the residual pixel points to obtain goodness of fit;
and obtaining the appearance integrity based on the goodness-of-fit, the number of clusters, the number of isolated points, the number of straight lines, the first value and the second value.
Preferably, the step of obtaining the first value and the second value based on the overlapping range includes:
the overlapping ranges include a transverse overlapping range and a longitudinal overlapping range;
the transverse overlapping range is obtained from a horizontal coordinate range corresponding to any two straight lines; the longitudinal overlapping range is obtained from the longitudinal coordinate range corresponding to any two straight lines;
respectively calculating the ratio of the transverse overlapping range to the horizontal coordinate ranges of the two corresponding straight lines, selecting the smaller value of the ratio, and obtaining a plurality of smaller values according to the horizontal coordinate ranges between all the straight lines in the edge image, wherein the minimum value of the smaller values corresponding to all the horizontal coordinate ranges is the first value;
and respectively calculating the ratio of the longitudinal overlapping range to the longitudinal coordinate ranges of the two corresponding straight lines, selecting the smaller value of the ratio, and obtaining a plurality of smaller values according to the longitudinal coordinate ranges between all the straight lines in the edge image, wherein the minimum value of the smaller values corresponding to all the longitudinal coordinate ranges is the second value.
Preferably, the step of obtaining the appearance integrity based on the goodness-of-fit, the number of clusters, the number of isolated points, the number of straight lines, and the first and second values includes:
multiplying the goodness-of-fit, the first value and the second value to obtain a first product;
calculating the difference value between the number of straight lines and the number of standard straight lines, and multiplying the difference value by the number of clusters and the number of isolated points to obtain a second product;
and the ratio of the first product to the second product is the appearance integrity.
Preferably, the step of obtaining the mildew significance of the seed region based on the energy, the contrast and the number of the pixel points in the target region includes:
acquiring the number of pixel points of each subregion in the target region, and selecting the median of the number of the pixel points of all subregions;
calculating the ratio of the median to the number of pixel points in the target area and the product result of the energy and the contrast;
and obtaining the mildew significance according to the product result and the ratio, wherein the mildew significance and the ratio are in a negative correlation relationship, and the mildew significance and the product result are in a positive correlation relationship.
Preferably, the step of obtaining a surface ravine degree of the seed region based on the gray scale difference value includes:
setting an acceptable threshold; acquiring a gray level difference value between each pixel point in the seed region and eight neighborhood pixel points of the seed region, counting the number of the pixel points of which the gray level difference value is not less than an acceptable threshold value, and further calculating the average value of the gray level difference values which are not less than the acceptable threshold value and correspond to each pixel point to be used as the gully degree of the corresponding pixel point;
and the summation result of the ravines of all the pixel points in the seed region is the surface ravines.
Preferably, the step of obtaining the quality excellence of the seed region according to the surface ravine degree and the mildew significance degree comprises:
and calculating the product of the surface ravity and the mildew significance, and taking the reciprocal of the product as the quality excellence.
Preferably, the step of selecting corn seeds based on the seed selection goodness index comprises:
when the seed selection quality index of the seed area is greater than the seed selection threshold value, the corn seeds corresponding to the seed area are good seeds; and when the seed selection quality index of the seed region is smaller than the seed selection threshold value, the corn seeds corresponding to the seed region are inferior seeds.
The invention has the following beneficial effects: the method comprises the steps of obtaining a plurality of seed areas by segmenting gray level images of corn seeds on a conveyor belt, analyzing each seed area, firstly obtaining edge images of the seed areas, and obtaining the appearance integrity of the seed areas based on edge features in the edge images; secondly, segmenting the seed region to obtain a target region, counting the number of pixels in the target region and a gray level co-occurrence matrix corresponding to the seed region, obtaining the mildew significance of the seed region based on the gray level co-occurrence matrix and the number of pixels in the target region, and analyzing more accurately and comprehensively considering the mildew condition in the seed region; and then, the gray value of each pixel point in the seed region is analyzed to obtain the surface gully degree, so that the characteristic indexes of various aspects of the seed region are obtained, the seed selection quality index of the seed region is obtained through the combination of a plurality of characteristic indexes, the reliability of the seed selection quality index is ensured, and the corn seeds are selected based on the seed selection quality index, so that the screened corn seeds are more accurate.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions and advantages of the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a seed feature extraction and classification method for a seed selection process according to an embodiment of the present invention;
FIG. 2 is a schematic illustration of a corn seed according to an embodiment of the present invention.
Detailed Description
To further illustrate the technical means and effects of the present invention adopted to achieve the predetermined objects, the following detailed description, the structure, the features and the effects of the method for extracting and classifying the seed features in the seed selection process according to the present invention are provided with the accompanying drawings and the preferred embodiments. In the following description, different "one embodiment" or "another embodiment" refers to not necessarily the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The application is applicable to specific scenes: selecting high-quality corn seeds.
The following describes a specific scheme of a seed feature extraction and classification method for a seed selection process in detail with reference to the accompanying drawings.
Referring to fig. 1, a flowchart of a seed feature extraction and classification method for a seed selection process according to an embodiment of the present invention is shown, where the method includes the following steps:
s100, acquiring a surface image of the corn seeds on a conveyor belt, and converting the surface image into a gray image; and segmenting the gray level image to obtain a plurality of seed regions.
The mature seeds in the corn needing to be screened in the corn seed selection process are large in quantity, the stored corn seeds are hard in texture and can be collided in a small range, and therefore the corn seeds can be conveyed forwards in sequence by using the conveying belt, and meanwhile, gaps among the corn seeds are guaranteed to be as far as possible and are not overlapped. In the embodiment of the invention, the CCD camera is adopted to shoot images, and the shooting time intervals are the same, so that all corn seeds on the conveying belt are ensured to be in the shooting range, and the surface images of a plurality of corn seeds are obtained.
The surface image of the corn seed is an RGB image, and the surface image is converted into a gray image; denoising the gray level image by using median filtering to avoid interference caused by noise generated by factors such as environment and the like; and then, sharpening the gray level image by using a Laplace operator to enable boundary contour information in the gray level image to be clearer.
The corn seeds have a large difference with the background, so that the gray-scale image can be segmented to obtain the corn seed regions.
And step S200, performing canny edge detection on each seed area to obtain an edge image, and acquiring the appearance integrity of each seed area based on the edge image of each seed area.
Specifically, in step S100, a seed region of each corn seed is obtained, and edge detection is performed on the gray image corresponding to each seed region, where a canny edge detection operator is used in the edge detection method, so as to obtain an edge image corresponding to each seed region, where the edge image is a binary image.
Because the shape change of the corn seeds is small, the positions where the corn seeds are connected with the corncobs grow more tightly to facilitate the growth and germination of the radicles, the pulled parts of the corn seeds present rough protruded sharp corners, and the rest parts have smooth shapes; FIG. 2 is a schematic view of a corn seed; for any normal corn seed, the left side and the right side of the corn seed are straight and smooth and the upper end of the corn seed is round and smooth by taking the protruded sharp corner as the lower end; in order to ensure the germination rate of the screened corn seeds, all parts of the corn seeds should be completely present.
Analyzing the outermost edges in the edge images of seed areas corresponding to each corn seed, detecting all the outermost edges by using Hough straight line, and recording the number of the straight lines in the detected edge images as
Figure DEST_PATH_IMAGE001
(ii) a And acquiring an abscissa range and an ordinate range of the outermost side corresponding to each straight line, namely constructing a two-dimensional coordinate system by using the edge image, acquiring coordinates of each edge pixel point in the edge image based on the two-dimensional coordinate system, and further acquiring the abscissa range and the ordinate range of the outermost side corresponding to each straight line.
For any two straight lines in the seed area, the transverse overlapping range between the two straight lines can be obtained based on the abscissa ranges corresponding to the two straight lines, and the abscissa is calculatedSelecting the ratio of the overlapping range to the abscissa ranges corresponding to the two straight lines respectively, and recording the smaller value of the ratios corresponding to the two straight lines as the smaller value
Figure 396148DEST_PATH_IMAGE002
(ii) a As an example, assume that the abscissa ranges corresponding to two straight lines are
Figure DEST_PATH_IMAGE003
And
Figure 213057DEST_PATH_IMAGE004
the range of transverse overlap between the two straight lines is then
Figure DEST_PATH_IMAGE005
Therefore, the ratio of the transverse overlapping range to the abscissa range corresponding to the two straight lines can be calculated as:
Figure 561998DEST_PATH_IMAGE006
and
Figure DEST_PATH_IMAGE007
so that the smaller of the two ratios is selected to be
Figure 639807DEST_PATH_IMAGE008
(ii) a By analogy, obtaining edge images
Figure 861841DEST_PATH_IMAGE001
The corresponding smaller value between any two straight lines in the straight lines is recorded as the first value as the minimum value of all the smaller values
Figure DEST_PATH_IMAGE009
Correspondingly, the longitudinal overlapping range between any two straight lines in the edge image is obtained based on the method for obtaining the same transverse overlapping range, the smaller value of the ratio corresponding to each straight line is obtained based on the longitudinal overlapping range, and then the minimum value in the smaller values is obtained and recorded as the second value
Figure 759521DEST_PATH_IMAGE010
It should be noted that, for a corn seed with a normal shape, the number of straight lines obtained by hough straight line detection should be 2, and the overlapping range of the two straight lines is not greater than 1, and the overlapping range includes a transverse overlapping range and a longitudinal overlapping range.
Further, performing corner detection on the edge image to obtain a plurality of corners on the edge in the edge image, wherein the corners exist at the rough protruded sharp corners of the corn seeds under normal conditions and are relatively close to each other; therefore, all the corner points are subjected to cluster analysis, in the embodiment of the invention, 5 is taken as the neighborhood radius, 6 is taken as the minimum point number, all the corner points are clustered to obtain a plurality of clusters, and the number of all the clusters is recorded as
Figure DEST_PATH_IMAGE011
Counting the number of outliers not divided into clusters
Figure 912153DEST_PATH_IMAGE012
It should be noted that, because the corn seed is hard, when the outer edge of the corn seed is incomplete, mostly because of the high-strength collision, a rough fracture surface is usually present, so that new corner points may appear, and thus a plurality of clusters may be obtained when the corner points in the seed region are clustered.
Further, pixel points corresponding to all corner points in the edge image and pixel points on a straight line obtained by Hough line detection are removed to obtain all residual pixel points in the edge image, the residual pixel points are smooth parts at the upper end of the corn seed, circle fitting is carried out on all the residual pixel points, corresponding fitting goodness can be directly obtained, and the circle fitting and the method for obtaining the fitting goodness are the prior known technologies and are not repeated.
Establishing appearance integrity corresponding to the seed region based on the obtained goodness-of-fit, the first value, the second value, the number of straight lines, the number of clusters and the number of isolated points, and multiplying the goodness-of-fit, the first value and the second value to obtain a first product; calculating the difference between the number of straight lines and 2, and multiplying the difference by the number of clusters and the number of isolated points to obtain a second product; the ratio of the first product to the second product is the appearance integrity. The appearance integrity is calculated as:
Figure DEST_PATH_IMAGE013
wherein the content of the first and second substances,
Figure 849061DEST_PATH_IMAGE014
indicating the appearance integrity;
Figure DEST_PATH_IMAGE015
expressing the goodness of fit;
Figure 163368DEST_PATH_IMAGE009
represents a first value;
Figure 751607DEST_PATH_IMAGE010
representing a second value;
Figure 114455DEST_PATH_IMAGE001
represents the number of lines;
Figure 353806DEST_PATH_IMAGE011
represents the number of clusters;
Figure 901331DEST_PATH_IMAGE012
representing the number of outliers;
Figure 960554DEST_PATH_IMAGE016
to adjust the coefficients, the denominator term is avoided to be 0.
When the number of straight lines in the edge image corresponding to the seed region is closer to the number of standard straight lines, the number of clusters is closer to 1, the number of isolated points is smaller, the goodness of fit is higher, and the overlapping range of the straight lines is larger, the more complete the appearance of the corn seed corresponding to the seed region is, and the appearance integrity is shown
Figure 18771DEST_PATH_IMAGE014
The larger; in the embodiment of the invention, the number of the standard straight lines is 2, namely the number of the straight lines obtained by carrying out Hough straight line detection on the outermost edges of the corn seeds with normal shapes.
Step S300, performing region segmentation on each seed region to obtain a first region and a second region, counting the number of pixel points in the first region and the second region, and marking the region with less pixel points as a target region; and constructing a gray level co-occurrence matrix of each seed region, obtaining energy and contrast based on the gray level co-occurrence matrix, and obtaining mildew point significance of the seed region based on the energy, the contrast and the number of pixel points in the target region.
Because the embryos on the corn seeds are mainly milky white, the embryos are completely distributed in one area; the epidermis on the corn seed is yellow and has a larger area than the embryo; therefore, the two areas can be divided based on the color difference of the two parts, and the seed area is divided into a first area and a second area by adopting an OTSU law method; the seeds can mildew due to environmental factors in the storage process, and the mildew on the mildewed seeds is mainly black and has larger color difference with the corn seeds, and the mildew is generally distributed in clusters at different positions of the corn seeds and has smaller dispersed occupied area; therefore, after the seed area is subjected to OTSU law segmentation, the mildewed part and the corn part can be divided, the segmentation threshold is set by an implementer, and in order to ensure the accuracy, the segmentation threshold is set
Figure DEST_PATH_IMAGE017
The value should be small.
It should be noted that, in the embodiment of the present invention, the first region and the second region are not a single region, and when mold spots exist on the surface of the corn seed, because the distribution of the mold spots is relatively dispersed, the first region and the second region may both include a plurality of sub-regions, and the first region and the second region are general terms of the plurality of sub-regions divided by the division threshold, for example, pixel points in the first region are all pixel points whose grayscale values are greater than the division threshold, and pixel points in the second region are all pixel points whose grayscale values are less than the division threshold.
Selecting the area with less pixel points in the first area and the second area as a target area, counting the number of all the pixel points in the target area and recording the number as a target area
Figure 768421DEST_PATH_IMAGE018
Counting the number of pixel points contained in each subregion in the target region, selecting the median value of the number of the pixel points corresponding to all the subregions and recording the median value as the median value
Figure DEST_PATH_IMAGE019
Further, a gray level co-occurrence matrix corresponding to the seed region is obtained, and corresponding energy is obtained based on the gray level co-occurrence matrix
Figure 191574DEST_PATH_IMAGE020
And contrast ratio
Figure DEST_PATH_IMAGE021
Construction method of gray level co-occurrence matrix and energy acquisition based on gray level co-occurrence matrix
Figure 190623DEST_PATH_IMAGE020
And contrast ratio
Figure 36220DEST_PATH_IMAGE021
The method (2) is the prior art and is not described in detail.
According to the energy corresponding to the seed region
Figure 896DEST_PATH_IMAGE020
Contrast ratio of
Figure 906535DEST_PATH_IMAGE021
Calculating the mildew significance of the seed region by the number of pixel points in the target region and the median, acquiring the number of pixel points of each subregion in the target region, and selecting the median of the number of pixel points of all subregions; calculating median valueThe ratio of the number of the pixel points in the target area and the product result of the energy and the contrast; and obtaining the mildew significance according to the product result and the ratio, wherein the mildew significance and the ratio are in a negative correlation, and the mildew significance and the product are in a positive correlation. The mildew significance is calculated specifically as follows:
Figure DEST_PATH_IMAGE023
wherein the content of the first and second substances,
Figure 861721DEST_PATH_IMAGE024
represents the mildew significance;
Figure 527320DEST_PATH_IMAGE020
represents energy;
Figure 330191DEST_PATH_IMAGE021
representing contrast;
Figure 655999DEST_PATH_IMAGE018
representing the number of all pixel points in the target area;
Figure 177110DEST_PATH_IMAGE019
represents the median value;
Figure 115242DEST_PATH_IMAGE017
representing a segmentation threshold.
Energy of gray level co-occurrence matrix
Figure 38198DEST_PATH_IMAGE020
And contrast ratio
Figure 534907DEST_PATH_IMAGE021
The larger the number of the mildew regions, the more the mildew region is dispersed, the greater the degree of mildew significance
Figure 543315DEST_PATH_IMAGE024
The larger; when the target isThe more the number of the pixel points in the region is and the smaller the median value is, the less the number of the pixel points in each sub-region is indicated, and the smaller the region corresponding to the mildew region is, the median value is
Figure 285137DEST_PATH_IMAGE019
The smaller the mildew is, the more pronounced the mildew.
Step S400, calculating a gray level difference value by taking each pixel point in the seed region as a central point, and obtaining the surface gully degree of the seed region based on the gray level difference value; and obtaining the excellent quality of the seed region according to the surface ravine degree and the mildew significance.
The surface of the corn seed with excellent quality is full and bright, smooth and damage-free, and the colors at different positions are transited uniformly and naturally; therefore, a window with the size of 3 x 3 is constructed by taking each pixel point in the seed region as a central point and the gray difference value between each pixel point in the window and the central point of the window is obtained, namely each central point corresponds to 8 gray difference values; an acceptable threshold is set for the gray scale difference in each window, taking into account that there will normally be minor color differences on the surface of the corn seed
Figure DEST_PATH_IMAGE025
In the embodiment of the invention
Figure 656075DEST_PATH_IMAGE025
The empirical value of 4 is taken, and can be set by an implementer in other embodiments; and acquiring the surface gully degree of the seed region based on 8 gray level difference values corresponding to the central points in each window, wherein the surface gully degree is calculated as follows:
Figure DEST_PATH_IMAGE027
Figure DEST_PATH_IMAGE029
wherein, the first and the second end of the pipe are connected with each other,
Figure 774003DEST_PATH_IMAGE030
representing the surface gully degree of the seed area;
Figure DEST_PATH_IMAGE031
representing the gully degree corresponding to each pixel point in the seed region;
Figure 958122DEST_PATH_IMAGE025
represents an acceptable threshold;
Figure 18482DEST_PATH_IMAGE032
indicating a calculation condition that the difference in gray levels within the window is not less than an acceptable threshold
Figure 634140DEST_PATH_IMAGE025
Figure DEST_PATH_IMAGE033
The number of pixel points meeting the calculation condition is represented, namely the gray difference value between the central point and the window is not less than the acceptable threshold value
Figure 911800DEST_PATH_IMAGE025
The number of pixels;
Figure 894800DEST_PATH_IMAGE034
is a central point
Figure 476959DEST_PATH_IMAGE019
The gray value of (a);
Figure DEST_PATH_IMAGE035
indicating that the center point corresponds to the window satisfying the calculation condition
Figure 651851DEST_PATH_IMAGE036
The gray value of each pixel point.
When the gray difference between each pixel point and the adjacent pixel point in the seed region is smaller, the surface of the seed region is smoother and fuller, and the surface gully degree of the corresponding seed region is smaller.
Further, the degree of quality of the seed region is evaluated in combination with the degree of mildew significance of the seed region obtained in step S300 to obtain a product of the surface ravine degree and the degree of mildew significance, and the inverse of the product is taken as the degree of quality, so that the degree of quality is:
Figure 677576DEST_PATH_IMAGE038
wherein the content of the first and second substances,
Figure DEST_PATH_IMAGE039
indicating the excellence of the quality of the seed region;
Figure 69243DEST_PATH_IMAGE024
indicating the mildew significance of the seed region;
Figure 956559DEST_PATH_IMAGE030
indicating the surface gully of the seed area.
When the mold point significance and the surface ravine degree of the seed region are smaller, the surface of the seed region is full and complete, namely the quality of the corn seeds corresponding to the seed region is better, and the quality excellence of the seed region is higher.
And S500, obtaining a seed selection merit index based on the product of the quality merit degree and the appearance integrity, and selecting the corn seeds based on the seed selection merit index.
The quality excellence corresponding to the seed region obtained in step S400 and the appearance integrity of the seed region obtained in step S200 are used to further construct a seed selection merit index of the seed region, in the embodiment of the present invention, the product of the quality excellence and the appearance integrity is calculated, and the product is used as the seed selection merit index, that is, the seed selection merit index is:
Figure DEST_PATH_IMAGE041
wherein, the first and the second end of the pipe are connected with each other,
Figure 750071DEST_PATH_IMAGE042
representing a seed selection quality index;
Figure 946697DEST_PATH_IMAGE014
indicating the appearance integrity;
Figure 655021DEST_PATH_IMAGE039
indicating the degree of quality.
When the appearance integrity and the quality excellence of the seed region are higher, the overall quality of the corn seeds corresponding to the seed region is better, and the seed selection excellence index is higher.
Based on a method for obtaining the same seed selection merit indexes of any seed region, the seed selection merit indexes corresponding to each seed region in the gray-scale image are obtained, and the corn seeds corresponding to all the seed regions are selected based on the seed selection merit indexes.
Specifically, marking a seed region corresponding to each corn seed manually, marking the seed region as good seeds and inferior seeds, and obtaining seed selection good indexes of all the seed regions marked as good seeds and seed selection good indexes of all the seed regions marked as inferior seeds; calculating the mean value of the minimum value of the seed selection merit indexes of all the good seeds and the maximum value of the seed selection merit indexes of all the poor seeds as a seed selection threshold value, and dividing the good seeds and the poor seeds in all the seed regions based on the seed selection threshold value, namely, the seed regions with the seed selection merit indexes larger than the seed selection threshold value are the good seeds, and the seed regions with the seed selection merit indexes smaller than the seed selection threshold value are the poor seeds, so that all the good seeds are reserved.
In summary, in the embodiment of the present invention, the gray-scale images corresponding to all the corn seeds are segmented, the gray-scale images are divided into a plurality of seed regions, and then each seed region is analyzed; firstly, carrying out edge detection on a seed region to obtain a corresponding edge image, and acquiring a first value and a second value based on an overlapping range of a horizontal coordinate and a vertical coordinate corresponding to each straight line in the edge image; then carrying out angular point detection on the seed region to obtain the number of angular points, carrying out circle fitting on all pixel points except the angular points and straight lines to obtain goodness of fit, and further combining all indexes to obtain the appearance integrity of the seed region; secondly, performing region segmentation on the gray value in the seed region to obtain a target region, and obtaining the mildew significance of the seed region based on the number of pixel points in the target region and the gray level co-occurrence matrix of the seed region; then, acquiring surface gully degree of the seed region through gray level difference between each pixel point in the seed region and the pixel points adjacent to the pixel point, and combining the surface gully degree and the mildew point significance degree to obtain the quality excellence of the seed region; further, calculating the product of the quality excellence and the appearance integrity of the seed region to obtain a seed selection excellence index of the seed region, wherein the greater the seed selection excellence index is, the better the quality of the corn seeds corresponding to the seed region is, obtaining and reserving the excellent seeds in all the seed regions by comparing the seed selection excellence index with a seed selection threshold value, and improving the reliability of judging the excellent seeds by selecting the multi-aspect characteristic analysis of the seed region.
It should be noted that: the precedence order of the above embodiments of the present invention is only for description, and does not represent the merits of the embodiments. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that are within the spirit of the present invention are intended to be included therein.

Claims (8)

1. A seed feature extraction and classification method used in a seed selection process is characterized by comprising the following steps:
acquiring a surface image of corn seeds on a conveyor belt, and converting the surface image into a gray image; segmenting the gray level image to obtain a plurality of seed regions;
performing canny edge detection on each seed area to obtain an edge image, and acquiring the appearance integrity of each seed area based on the edge image of each seed area;
performing region segmentation on each seed region to obtain a first region and a second region, counting the number of pixel points in the first region and the second region, and recording the region with less number of pixel points as a target region; constructing a gray level co-occurrence matrix of each seed region, obtaining energy and contrast based on the gray level co-occurrence matrix, and obtaining mildew significance of the seed region based on the energy, the contrast and the number of pixel points in the target region;
calculating a gray difference value by taking each pixel point in the seed region as a central point, and obtaining the surface gully degree of the seed region based on the gray difference value; obtaining the quality excellence of a seed region according to the surface gully degree and the mildew significance;
and obtaining a seed selection goodness index based on the product of the quality goodness and the appearance completeness, and selecting the corn seeds based on the seed selection goodness index.
2. The method of claim 1, wherein the step of obtaining the appearance integrity of each seed region based on the edge image of each seed region comprises:
carrying out Hough line detection on each edge image to obtain a plurality of straight lines, and obtaining a horizontal coordinate range and a vertical coordinate range corresponding to each straight line; obtaining an overlapping range based on the abscissa range and the ordinate range; obtaining a first value and a second value based on the overlap range;
carrying out corner detection on each edge image to obtain a plurality of corners, and clustering all the corners to obtain a plurality of clusters and a plurality of isolated points;
removing pixel points and angular points on a straight line in the edge image to obtain residual pixel points, and performing circle fitting on all the residual pixel points to obtain goodness of fit;
and obtaining the appearance integrity based on the goodness-of-fit, the number of clusters, the number of isolated points, the number of straight lines, the first value and the second value.
3. The method of claim 2, wherein the step of obtaining the first value and the second value based on the overlapping range comprises:
the overlapping ranges include a transverse overlapping range and a longitudinal overlapping range;
the transverse overlapping range is obtained from a horizontal coordinate range corresponding to any two straight lines; the longitudinal overlapping range is obtained from the longitudinal coordinate range corresponding to any two straight lines;
respectively calculating the ratio of the transverse overlapping range to the horizontal coordinate ranges of the two corresponding straight lines, selecting the smaller value of the ratio, and obtaining a plurality of smaller values according to the horizontal coordinate ranges between all the straight lines in the edge image, wherein the minimum value of the smaller values corresponding to all the horizontal coordinate ranges is the first value;
and respectively calculating the ratio of the longitudinal overlapping range to the longitudinal coordinate ranges of the two corresponding straight lines, selecting the smaller value of the ratio, and obtaining a plurality of smaller values according to the longitudinal coordinate ranges between all the straight lines in the edge image, wherein the minimum value of the smaller values corresponding to all the longitudinal coordinate ranges is the second value.
4. The method of claim 2, wherein the step of obtaining the appearance integrity based on the goodness-of-fit, the number of clusters, the number of outliers, the number of straight lines, and the first and second values comprises:
multiplying the goodness-of-fit, the first value and the second value to obtain a first product;
calculating the difference value between the number of straight lines and the number of standard straight lines, and multiplying the difference value by the number of clusters and the number of isolated points to obtain a second product;
and the ratio of the first product to the second product is the appearance integrity.
5. The method of claim 1, wherein the step of obtaining the mildew significance of the seed region based on the energy, the contrast and the number of pixels in the target region comprises:
acquiring the number of pixel points of each subregion in the target region, and selecting the median of the number of the pixel points of all subregions;
calculating the ratio of the median value to the number of pixel points in the target area and the product result of the energy and the contrast;
and obtaining the mildew significance according to the product result and the ratio, wherein the mildew significance and the ratio are in a negative correlation relationship, and the mildew significance and the product result are in a positive correlation relationship.
6. The method of claim 1, wherein the step of deriving surface gully degrees of a seed region based on the gray level differences comprises:
setting an acceptable threshold; acquiring a gray level difference value between each pixel point in the seed region and eight neighborhood pixel points of the seed region, counting the number of the pixel points of which the gray level difference value is not less than an acceptable threshold value, and further calculating the average value of the gray level difference values which are not less than the acceptable threshold value and correspond to each pixel point to be used as the gully degree of the corresponding pixel point;
and the summation result of the ravines of all the pixel points in the seed region is the surface ravines.
7. The method of claim 1, wherein the step of deriving quality excellence of a seed region from the surface ravines and the mildew significance comprises:
and calculating the product of the surface ravine degree and the mildew significance degree, and taking the reciprocal of the product as the quality excellence degree.
8. The method of claim 1, wherein the step of selecting the corn seeds based on the seed selection merit index comprises:
when the seed selection merit index of the seed region is greater than the seed selection threshold value, the corn seeds corresponding to the seed region are the excellent seeds; and when the seed selection quality index of the seed region is smaller than the seed selection threshold value, the corn seeds corresponding to the seed region are inferior seeds.
CN202211133557.3A 2022-09-19 2022-09-19 Seed feature extraction and classification method used in seed selection process Active CN115205319B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211133557.3A CN115205319B (en) 2022-09-19 2022-09-19 Seed feature extraction and classification method used in seed selection process

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211133557.3A CN115205319B (en) 2022-09-19 2022-09-19 Seed feature extraction and classification method used in seed selection process

Publications (2)

Publication Number Publication Date
CN115205319A true CN115205319A (en) 2022-10-18
CN115205319B CN115205319B (en) 2023-01-10

Family

ID=83572266

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211133557.3A Active CN115205319B (en) 2022-09-19 2022-09-19 Seed feature extraction and classification method used in seed selection process

Country Status (1)

Country Link
CN (1) CN115205319B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113537185A (en) * 2020-04-10 2021-10-22 合肥美亚光电技术股份有限公司 Sunflower seed abnormal area identification method and device, sunflower seed sorting method and device
CN116883688A (en) * 2023-09-08 2023-10-13 泗水县锦川花生食品有限公司 Intelligent picking method for fried peanuts

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104990892A (en) * 2015-06-24 2015-10-21 中国农业大学 Spectrum image lossless identification model establishing method for seeds and seed identification method
CN106971393A (en) * 2017-02-23 2017-07-21 北京农业信息技术研究中心 The phenotype measuring method and system of a kind of corn kernel
CN111579511A (en) * 2020-06-15 2020-08-25 南京农业大学 Seed quality detection method and device based on structure hyperspectrum
CN111798467A (en) * 2020-06-30 2020-10-20 中国第一汽车股份有限公司 Image segmentation method, device, equipment and storage medium
US20200367422A1 (en) * 2017-12-03 2020-11-26 Seedx Technologies Inc. Systems and methods for sorting of seeds
CN114119613A (en) * 2022-01-26 2022-03-01 山东慧丰花生食品股份有限公司 Peanut seed selection method based on image processing

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104990892A (en) * 2015-06-24 2015-10-21 中国农业大学 Spectrum image lossless identification model establishing method for seeds and seed identification method
CN106971393A (en) * 2017-02-23 2017-07-21 北京农业信息技术研究中心 The phenotype measuring method and system of a kind of corn kernel
US20200367422A1 (en) * 2017-12-03 2020-11-26 Seedx Technologies Inc. Systems and methods for sorting of seeds
CN111579511A (en) * 2020-06-15 2020-08-25 南京农业大学 Seed quality detection method and device based on structure hyperspectrum
CN111798467A (en) * 2020-06-30 2020-10-20 中国第一汽车股份有限公司 Image segmentation method, device, equipment and storage medium
CN114119613A (en) * 2022-01-26 2022-03-01 山东慧丰花生食品股份有限公司 Peanut seed selection method based on image processing

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
SUTASINEE JITANAN ET AL.: "Quality grading of soybean seeds using image analysis", 《INTERNATIONAL JOURNAL OF ELECTRICAL AND COMPUTER ENGINEERING》 *
闫学慧: "基于机器视觉与深度学习算法的大豆终端考种表型获取方法研究", 《中国优秀硕士学位论文全文数据库农业科技辑》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113537185A (en) * 2020-04-10 2021-10-22 合肥美亚光电技术股份有限公司 Sunflower seed abnormal area identification method and device, sunflower seed sorting method and device
CN116883688A (en) * 2023-09-08 2023-10-13 泗水县锦川花生食品有限公司 Intelligent picking method for fried peanuts
CN116883688B (en) * 2023-09-08 2023-12-01 泗水县锦川花生食品有限公司 Intelligent picking method for fried peanuts

Also Published As

Publication number Publication date
CN115205319B (en) 2023-01-10

Similar Documents

Publication Publication Date Title
CN115205319B (en) Seed feature extraction and classification method used in seed selection process
CN110120042B (en) Crop image pest and disease damage area extraction method based on SLIC super-pixel and automatic threshold segmentation
CN109255757B (en) Method for segmenting fruit stem region of grape bunch naturally placed by machine vision
CN109447945B (en) Quick counting method for basic wheat seedlings based on machine vision and graphic processing
CN115115612B (en) Surface defect detection method and system for mechanical parts
EP1579375A2 (en) Measurement of mitotic activity
CN111882561A (en) Cancer cell identification and diagnosis system
CN109871900A (en) The recognition positioning method of apple under a kind of complex background based on image procossing
CN112907545A (en) Method for detecting bud length and root length of seeds based on image processing
CN107516315B (en) Tunneling machine slag tapping monitoring method based on machine vision
CN112883881A (en) Disordered sorting method and device for strip-shaped agricultural products
CN110575973B (en) Crop seed quality detection and screening system
CN116523898A (en) Tobacco phenotype character extraction method based on three-dimensional point cloud
CN110110810B (en) Squid quality grade identification and sorting method
CN108765448B (en) Shrimp larvae counting analysis method based on improved TV-L1 model
CN110047064B (en) Potato scab detection method
CN109389613B (en) Residual bait counting method based on computer vision
CN114088714B (en) Method for detecting surface regularity of grain particles
Cai et al. Novel image segmentation based on machine learning and its application to plant analysis
CN114088624B (en) Equipment for detecting surface regularity of grain particles
CN113610187B (en) Wood texture extraction and classification method based on image technology
CN114550167A (en) Artificial intelligence based pear quality classification method and device
CN114494099A (en) Method and device for detecting rice processing precision and storage medium
CN116758024B (en) Peanut seed direction identification method
CN107451585B (en) Potato image recognition device and method based on laser imaging

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: Seed feature extraction and classification methods used in seed selection process

Effective date of registration: 20230811

Granted publication date: 20230110

Pledgee: Jinxiang County sub branch of Postal Savings Bank of China Ltd.

Pledgor: Shandong Jinchunyu Seed Technology Co.,Ltd.

Registration number: Y2023980051886