Visual detection method for crushed and processed particles of coarse cereals
Through electron microscope scanning and edge detection technology, combined with continuous judgment factors and internal disorder analysis, visual inspection of particles of grain crushing and processing of grains is optimized, solving the problem of detection disorder caused by particle stacking and surface unevenness, and achieving more accurate particle size Measurement.
Patent Information
- Application Number
- CN202411505223.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2024-11-29
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
During the visual inspection process of grain crushing and processing particles, due to the uneven surface of the particles, it is difficult for the prior art to accurately detect the particle size and contour, resulting in messy detection results, affecting automated judgments.
Grayscale images are obtained through electron microscope scanning, edge detection and fitting, edge curves are screened, continuous judgment factors and internal disorders are calculated, judgment factors are corrected, and detection size is optimized to improve detection accuracy.
The screening and detection of particle areas is effectively optimized, the accuracy of detection results is improved, the messy problems caused by particle stacking and surface unevenness are overcome, and more accurate particle size measurement is obtained.
Smart Images

Figure CN119048491A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of image data processing, and in particular to a method for visually detecting particles in crushed grains. Background Art
[0002] In agricultural scenarios, ultrafine grinding technology is often used to finely process grains for subsequent processing and storage. In the process of visual inspection of grains during grinding, electron microscopes are often used to detect the size of micron-level particles and measure whether the grinding quality meets the standards. However, due to the stacking of particles, when using conventional In the process of contour detection using edge detection technology, there is a problem of unclear contour boundaries. Due to the stacking of particles, the area fitted by the edge contour often cannot well reflect the actual size of the particles. In addition, due to the uneven surface of the particles, the detected edges will be too messy, affecting the machine's automated judgment. Summary of the invention
[0003] The invention provides a visual detection method for particles of crushed grains to solve the existing problems.
[0004] The visual detection method of grains crushed and processed microparticles of the present invention adopts the following technical scheme: One embodiment of the present invention provides a method for visually detecting particles of grains during grinding, the method comprising the following steps: An electron microscope image of the crushed particles is obtained by electron microscope scanning, and the electron microscope image is grayed to obtain a grayscale image, edge detection is performed on the grayscale image to obtain edge pixels, and edge pixels are fitted to obtain an edge curve; Obtaining the direction trend of each edge pixel point on each edge curve, and using the direction trend of each edge pixel point to screen each edge curve to obtain a foreground image; Obtain all curve combinations in the foreground image, calculate the endpoint trend angle of the adjacent edge curve and the defect length of each curve combination within each curve combination, measure the fuzzy difference number of each curve combination in the entire grayscale image, and obtain the continuity judgment factor of each curve combination according to the endpoint trend angle, defect length and fuzzy difference number; obtain the repetition probability number of each edge curve and the coincidence frequency of each curve combination, and obtain the internal disorder of each curve combination according to the repetition probability number of each edge curve, the coincidence frequency of each curve combination and the direction trend of each edge pixel point; obtain the correction judgment factor of each curve combination according to the continuity judgment factor of each curve combination and the internal disorder of each curve combination; The detection size is calculated based on the correction judgment factor of each curve combination, and compared with the size standard to obtain the visual detection result of the grains and cereals crushing processing particles.
[0005] Preferably, the step of obtaining the directional trend of each edge pixel on each edge curve and screening each edge curve using the directional trend of each edge pixel to obtain a foreground image comprises the following specific steps: The direction of each edge pixel on each edge curve is obtained, and the angle between the direction of each edge pixel on each edge curve and the horizontal direction of the grayscale image is calculated, which is recorded as the trend angle of each edge pixel on each edge curve. All edge curves in the grayscale image are combined to obtain a plurality of curve combinations. The trend angles of all edge pixels in each curve combination are counted and the sum of the trend angles of all edge pixels in each curve combination is calculated, which is recorded as the foreground trend value of each curve combination. The foreground trend values of all curve combinations are compared with the preset foreground threshold value. If the foreground trend value of each curve combination is greater than the preset foreground threshold value, each curve combination is classified as a background area to obtain a background set. If the foreground trend value of each curve combination is less than the preset foreground threshold value, each curve combination is classified as a foreground area to obtain a foreground set. The intersection of the background set and the foreground set is obtained as a common set. All curve combinations in the background set excluding the common set are obtained as strong background curve combinations. The grayscale values of all edge pixels on the edge curves in the strong background curve combination are set to 0 on the grayscale image to obtain a foreground image.
[0006] Preferably, the method of calculating the endpoint trend angle of the adjacent edge curve and the defect length of each curve combination within each curve combination, measuring the fuzzy difference number of each curve combination in the entire grayscale image, and obtaining the continuous judgment factor of each curve combination according to the endpoint trend angle, defect length and fuzzy difference number includes the following specific steps: Get the edge pixel points at the lower right end and the upper left end of each edge curve, record them as the right selected endpoint of each edge curve and the left selected endpoint of each edge curve, and get the trend angles of all right selected endpoints and all left selected endpoints; calculate the Euclidean distance between the right selected endpoint of each edge curve in each curve combination in the foreground image and the left selected endpoints on all other edge curves, record the minimum value in the Euclidean distance as the unreached distance of each edge curve in each curve combination, record the left selected endpoints on all other edge curves corresponding to the unreached distance as the left selected endpoint on the nearest edge curve of each edge curve, and calculate the distance between all edge curves in each curve combination. The arithmetic mean of the underreaching distance of the edge curve is recorded as the defect length of each curve combination; the underreaching distance of each edge curve in each curve combination in the foreground image is filled with a straight line and combined with each edge curve to obtain the fuzzy contour area of each curve combination, the fuzzy contour area of each curve combination is mapped to the grayscale image, the variance of the grayscale values of all pixels in each fuzzy contour area on the grayscale image is calculated, recorded as the fuzzy difference number of each curve combination, the variance of the grayscale values of all pixels on the grayscale image is calculated, recorded as the difference measure number; the continuous judgment factor of each curve combination is calculated, and the specific calculation formula is as follows: in, Indicates The continuous judgment factor of the curve combination, Indicates The defect length of the curve combination, Indicates The fuzzy difference number of curve combinations, represents the difference measure, represents a step function, Indicates The first curve combination The trend angle of the right selected endpoint of the edge curve, Indicates The first curve combination The left selected endpoint trend angle of the nearest edge curve of the edge curve, Indicates The number of edge curves in the curve combination and .
[0007] Preferably, the obtaining of the repetition probability number of each edge curve and the coincidence frequency of each curve combination, and obtaining the internal disorder of each curve combination according to the repetition probability number of each edge curve, the coincidence frequency of each curve combination and the direction trend of each edge pixel point, comprises the following specific steps: On the foreground image, count the number of times each edge curve in all curve combinations appears in the curve combination, and record it as the probability of repetition of each edge curve; count the number of times each curve combination appears in other curve combinations, and record it as the frequency of overlap of each curve combination; obtain the minimum circumscribed circle of the fuzzy contour area of each curve combination, calculate the vector distance from the center of the minimum circumscribed circle to all edge pixels on all edge curves in each curve combination, and calculate the sum of all vector distances to obtain the sum vector, record the modulus of the sum vector as the concave-convex balance number of each curve combination, and record the direction of the sum vector as the illumination tendency of each curve combination; obtain the gradient descent direction of all pixels on the grayscale image, and record the gradient descent direction with the largest number of pixels as the overall illumination tendency of the image; calculate the internal disorder of each curve combination on the foreground image, and the specific calculation formula is as follows: in, Indicates The internal turbulence of the curve combination is Indicates The frequency of coincidence of the combination of curves, Indicates The first curve combination The probability of repetition of edge curves, Indicates The number of edge curves in the curve combination and , Indicates The lighting tendency of the curve combination, Indicates the overall lighting tendency of the image. Indicates The concave-convex balance number of the curve combination.
[0008] Preferably, the step of obtaining the modified judgment factor of each curve combination according to the continuity judgment factor of each curve combination and the internal disorder degree of each curve combination comprises the following specific steps: Obtain the maximum and minimum values of the continuity judgment factors of all curve combinations, and calculate the arithmetic mean of the continuity judgment factors of all curve combinations, and record the arithmetic mean as the average continuity; calculate the modified judgment factor of each curve combination, and the specific calculation formula is as follows: in, Indicates The correction judgment factor of the curve combination is Indicates The continuous judgment factor of the curve combination, and Respectively represent the maximum and minimum values of the continuous judgment factors of all curve combinations, represents the average continuity, Indicates The internal turbulence of the curve combination is represents a step function, Indicates that the values in brackets are linearly normalized.
[0009] Preferably, the detection size is calculated according to the correction judgment factor of each curve combination, and the specific steps include the following: The pixel size of the electron microscope is obtained; on the grayscale image, all curve combinations are segmented by regional fitting to obtain the crushed particle area corresponding to each curve combination, the number of pixels contained in each crushed particle area is counted, and the correction judgment factor of each curve combination is multiplied by the number of pixels contained in the crushed particle area corresponding to each curve combination and the pixel size of the electron microscope to obtain the actual size of each probability contour, and the maximum value of the actual sizes of all probability contours is recorded as the detection size.
[0010] The beneficial effects of the technical solution of the present invention are: in order to address the problem that the area fitted by the edge contour often cannot well reflect the actual size of the particles due to the stacking of particles during contour detection, the present invention combines the continuity of the curve combination of the fitted particle area to measure the screening of the particle area and optimizes the actual size; in order to address the problem that the detected edge is too messy due to the unevenness of the particle surface, the present invention analyzes the degree of clutter within the curve combination of the fitted particle area and uses it as a weight to optimize the final detection, so that the final detected particle size is optimized. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0012] Figure 1 The present invention is a flowchart of the steps of a method for visually detecting particles in the crushing process of miscellaneous cereals. DETAILED DESCRIPTION
[0013] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the specific implementation method, structure, characteristics and effects of a method for visual detection of grains and cereals crushed and processed particles proposed by the present invention in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0014] 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.
[0015] The specific scheme of the visual detection method for particles in the crushed grains provided by the present invention is described in detail below with reference to the accompanying drawings.
[0016] See also Figure 1 , which shows a flowchart of a method for visually detecting particles in the crushing of grains according to an embodiment of the present invention, the method comprising the following steps: S001: The electron microscope image of the crushed particles is obtained by electron microscope scanning, and a series of processes such as grayscale conversion and edge detection are performed on the electron microscope image to obtain a grayscale image and an edge curve.
[0017] It should be noted that the current size of ultra-fine grinding products has reached a level higher than that of traditional The pixels are small, so we use the traditional The size of ultrafine particles cannot be detected well, so an electron microscope is used to scan them to obtain an image of the particles. The image needs to be grayed and denoised, and then edge detected to obtain its edge contour curve. In order to maximize the retention of the edge curve, The algorithm has the best effect. This embodiment adopts The algorithm extracts edge curves.
[0018] Specifically, the crushed particles are scanned using an electron microscope to obtain an electron microscope image of the crushed particles, the electron microscope image is gray-scaled to obtain a grayscale image, and the grayscale image is processed using The operator detects the edge pixels in the image and fits the edge pixels to obtain edge curves (different edge curves may have the same edge pixel point, for example, an edge pixel point can belong to multiple edge curves at the same time), and any one of them is recorded as the first edge curve. edge curves, and there are .
[0019] At this point, the grayscale image and edge curve are obtained.
[0020] S002: Use the edge curve to filter and obtain a foreground image.
[0021] It should be noted that, since the distribution of edge curves is very messy, there are many areas in the image composed of multiple edge curves. Among these areas, there are areas of crushed particles that need to be detected, but a large number of irrelevant areas affect the accuracy of the detection results. Therefore, it is assumed that all areas are composed of edge curves. When the endpoints of all edge curves participating in the construction of the area are relatively consistent, that is, they can be better closed, since the area of crushed particles that need to be detected is relatively complete, the greater the probability that the area is the area of crushed particles that need to be detected. Therefore, it is necessary to use the endpoint direction of the edge curve to remove a large number of irrelevant areas to obtain the foreground image.
[0022] Specifically, using The algorithm obtains the direction of each edge pixel on each edge curve, calculates the angle between the direction of each edge pixel on each edge curve and the horizontal direction of the grayscale image, and records it as the trend angle of each edge pixel on each edge curve. All edge curves in the grayscale image are combined to obtain curve combinations, where Indicates from Select from a collection The number of permutations obtained by permuting the sets is is the number of edge curves selected for combination, and , and record any curve combination as curve combination, and there is , count the trend angles of all edge pixels in each curve combination and calculate the sum of the trend angles of all edge pixels in each curve combination, and record it as the foreground trend value of each curve combination.
[0023] Preset a foreground threshold , wherein this embodiment is based on The foreground threshold is described as an example, and this embodiment is not specifically limited. It may depend on the specific implementation situation.
[0024] Further, compare the foreground trend values of all curve combinations with the foreground threshold value. If the foreground trend value of each curve combination is greater than the foreground threshold value, classify each curve combination as the background area to obtain a background set. If the foreground trend value of each curve combination is less than the foreground threshold value, classify each curve combination as the foreground area to obtain a foreground set. Obtain the intersection of the background set and the foreground set as a common set. Obtain all curve combinations in the background set excluding the common set as strong background curve combinations. Set the grayscale values of all edge pixels on the edge curves in the strong background curve combination to 0 on the grayscale image to obtain a foreground image.
[0025] At this point, the foreground image is obtained.
[0026] S003: Perform local and overall analysis on each edge curve in each curve combination on the foreground image to obtain a continuity judgment factor and an internal disorder degree of each curve combination, and obtain a correction judgment factor of each curve combination according to the continuity judgment factor and the internal disorder degree of each curve combination.
[0027] It should be noted that there are only the curve combinations after screening on the foreground image, which means that most of the curve combinations left at this time can be fitted to form a closed area. However, in the fitting process, the superposition of crushed particles will lead to discontinuity of the area, and the degree of continuity between multiple edge curves in the curve combination determines the rationality of regional fitting. An effective method is to judge the overall characteristics of all edge curves in the curve combination and the local characteristics between each edge curve to measure the continuity of the area in the fitting process. When the directions of the endpoints of two relatively adjacent edge curves are roughly the same, it is considered that the continuity of the two edge curves is high, and when the distance between the two endpoints is close, it is considered that the continuity of the two edge curves is high. At the same time, the curve combination in the foreground image is corresponded to the grayscale image, and a region is roughly fitted in advance. If the difference in pixel distribution in the region is too large, that is, there is a completely black discontinuous part, it is considered that the continuity of the region of the curve combination in the fitting process is not high. Therefore, the continuity judgment factor of each curve combination is obtained according to these three feature quantities.
[0028] Specifically, on the foreground image, the edge pixel points at the lower right end and the upper left end of each edge curve are obtained, and are recorded as the right selected endpoint of each edge curve and the left selected endpoint of each edge curve, respectively, to obtain the trend angles of all right selected endpoints and all left selected endpoints; the Euclidean distance between the right selected endpoint of each edge curve in each curve combination in the foreground image and the left selected endpoints on all other edge curves is calculated, and the minimum value in the Euclidean distance is recorded as the unreached distance of each edge curve in each curve combination, and the left selected endpoints on all other edge curves corresponding to the unreached distance are recorded as the left selected endpoint of the nearest edge curve of each edge curve (each left selected endpoint on the nearest edge curve can only correspond to one right selected endpoint, and the calculation order of the right selected endpoint and the left selected endpoint of each edge curve in the entire curve combination is irrelevant). It is required to stipulate that it is only necessary to ensure that the right selected endpoint and the left selected endpoint of each edge curve in each curve combination are involved in the calculation and there is no repeated calculation). The arithmetic mean of the underreaching distances of all edge curves in each curve combination is calculated and recorded as the defect length of each curve combination; the underreaching distances of each edge curve in each curve combination in the foreground image are filled with a straight line and combined with each edge curve to obtain the fuzzy contour area of each curve combination, the fuzzy contour area of each curve combination is corresponded to the grayscale image, the variance of the grayscale values of all pixels in each fuzzy contour area on the grayscale image is calculated, and recorded as the fuzzy difference number of each curve combination, the variance of the grayscale values of all pixels on the grayscale image is calculated, and recorded as the difference measure number; the continuous judgment factor of each curve combination is calculated, and the specific calculation formula is as follows: in, Indicates The continuous judgment factor of the curve combination, Indicates The defect length of the curve combination, Indicates The fuzzy difference number of curve combinations, represents the difference measure, represents a step function, Indicates The first curve combination The trend angle of the right selected endpoint of the edge curve, Indicates The first curve combination The left selected endpoint trend angle of the nearest edge curve of the edge curve, Indicates The number of edge curves in the curve combination and When the The first curve combination When the difference between the trend angles of the right selected endpoint of the edge curve and the left selected endpoint of its nearest edge curve is too large, the two edge curves where they are located are more likely to be discontinuous. The smaller the continuous judgment factor of the curve combination, the The longer the defect length of a curve combination is, the more likely all edge curves in the curve combination are to be discontinuous. The smaller the continuous judgment factor of the curve combination, the step function is used to measure whether the fuzzy difference number exceeds the difference measurement number, and 1 is added to prevent the denominator from being 0. The absolute value of the difference between the fuzzy difference number and the difference measurement number is used to measure the degree of excess. The more the fuzzy difference number of a curve combination exceeds the difference measurement number and the greater the degree of excess, the more discontinuous parts there are in the curve combination. The smaller the continuity judgment factor of the curve combination.
[0029] It should be further explained that, due to the unevenness of the surface of the crushed particles, it is foreseeable that after each curve combination is fitted to the region, there will be a large number of messy areas inside the region, which will affect the judgment of the size of the crushed particles, so it is necessary to measure the internal disorder of each curve combination. This measurement should include two aspects: on the one hand, due to the inclusion relationship between the curve combinations, the edge curves that appear repeatedly in each curve combination are more likely to be the edge contours of the crushed particles, but when a curve combination appears too many times in other curve combinations, it is considered that the curve combination contains too little regional information, and there should be only a small amount of messy information caused by the unevenness inside the crushed particle region, so the possibility that the curve combination is the edge contour of the crushed particles is reduced; on the other hand, in order to measure the amount of information inside the region fitted by each curve combination due to the unevenness of the surface of the crushed particles, combined with the influence of the overall image on the illumination, the difference between each curve combination in the whole and the grayscale image as a whole is obtained to obtain the influence of the unevenness. When this influence is larger, the more messy information inside the region fitted by the curve combination, and this embodiment tends to list the region as an unconcerned region.
[0030] Specifically, on the foreground image, the number of times each edge curve in all curve combinations appears in the curve combination is counted, which is recorded as the repetition probability number of each edge curve; the number of times each curve combination appears in other curve combinations is counted, which is recorded as the coincidence frequency of each curve combination; the minimum circumscribed circle of the fuzzy contour area of each curve combination is obtained, and the vector distance from the center of the minimum circumscribed circle to all edge pixel points on all edge curves in each curve combination is calculated, and the sum of all vector distances is calculated to obtain the sum vector, and the modulus of the sum vector is recorded as the concave-convex balance number of each curve combination, and the direction of the sum vector is recorded as the illumination tendency of each curve combination; the gradient descent direction of all pixels on the grayscale image is obtained, and the gradient descent direction with the largest number of pixels is recorded as the overall illumination tendency of the image; the internal disorder of each curve combination on the foreground image is calculated, and the specific calculation formula is as follows: in, Indicates The internal turbulence of the curve combination is Indicates The frequency of coincidence of the combination of curves, Indicates The first curve combination The probability of repetition of edge curves, Indicates The number of edge curves in the curve combination and , Indicates The lighting tendency of the curve combination, Indicates the overall lighting tendency of the image. Indicates The concave-convex balance number of the curve combination. The first aspect shows the The influence of the internal turbulence of the combination of curves The frequency of coincidence of the curve combination, The larger the number of edge curves in the curve combination, the larger the The smaller the sum of the probability numbers of repetitions of all edge curves in a curve combination, the The less likely the first curve combination is the edge contour of the crushed particle, the The smaller the internal turbulence of the curve combination; The second aspect of The influence of the internal turbulence of the combination of curves The smaller the difference between the illumination tendency of the first curve combination and the overall illumination tendency of the image, the smaller the difference between the first curve combination and the overall illumination tendency of the image. The smaller the concave-convex balance number of the curve combination, the greater the influence of the overall concave-convex balance on the first curve combination. The influence of the combination of the first and second curves is small. The smaller the internal turbulence of the curve combination.
[0031] It should be further explained that after obtaining the continuity judgment factor and internal disorder of each curve combination, the possibility that the area fitted by each curve combination is the crushed particle area is measured and the corrected judgment factor of each curve combination is obtained as the final correction value for the area of the fitting area, so that the measured size of the crushed particles is more accurate.
[0032] Specifically, the maximum and minimum values of the continuity judgment factors of all curve combinations are obtained, and the arithmetic mean of the continuity judgment factors of all curve combinations is calculated, and the arithmetic mean is recorded as the average continuity; the modified judgment factor of each curve combination is calculated, and the specific calculation formula is as follows: in, Indicates The correction judgment factor of the curve combination is Indicates The continuous judgment factor of the curve combination, and Respectively represent the maximum and minimum values of the continuous judgment factors of all curve combinations, represents the average continuity, Indicates The internal turbulence of the curve combination is represents a step function, Indicates that the values in brackets are linearly normalized. The continuity judgment factor of the curve combination needs to be judged by a step function to determine whether it exceeds the average continuity and to be scaled to the maximum value interval of the continuity judgment factor. In the interval, when the continuous judgment factor exceeds the average continuity and the greater the degree of excess, the The larger the correction judgment factor of the curve combination, the The smaller the internal disorder of the curve combination, the better. The less cluttered information there is in the area after the curve combination fitting, the more likely it is to be a crushed particle area, so the corresponding correction judgment factor should be larger, so 1 minus the first The internal disorder of the curve combination is normalized to the opposite number to satisfy the negative correlation and make the value range of this part of the factor within Within the range.
[0033] At this point, the correction judgment factor for each curve combination is obtained.
[0034] S004: The detection size is calculated based on the correction judgment factor of each curve combination, and compared with the size standard to obtain the visual detection result of the grains and cereals crushing processing particles.
[0035] It should be noted that in the process of visual inspection of grains and cereals crushing processing particles, we only need to pay attention to whether the largest crushed particle size meets the qualified standard to obtain the test result. Therefore, after using the correction judgment factor to correct the area of all crushed particle regions in the grayscale image, we can obtain a more accurate calibrated area of the crushed particle region to characterize the crushed particle size and carry out the final standard measurement.
[0036] Preset a size standard , wherein this embodiment is based on This example is described as an example, and this embodiment is not specifically limited. The size standard It may depend on the specific implementation situation.
[0037] Specifically, the pixel size of the electron microscope is obtained; on the grayscale image, all the curve combinations are subjected to regional fitting segmentation to obtain the crushed particle area corresponding to each curve combination, the number of pixels contained in each crushed particle area is counted, the correction judgment factor of each curve combination is multiplied by the number of pixels contained in the crushed particle area corresponding to each curve combination and the pixel size of the electron microscope to obtain the actual size of each probability contour, and the maximum value of the actual sizes of all probability contours is selected as the detection size; the detection size is compared with the size standard, if the detection size is larger than the size standard, the crushing and processing quality of the miscellaneous cereals is unqualified, if the detection size is smaller than the size standard, the crushing and processing quality of the miscellaneous cereals is qualified, and the detection report is obtained, and the detection report is sent to the quality inspection center to complete the visual detection process of the crushing and processing particles of the miscellaneous cereals.
[0038] At this point, the visual inspection of grains and cereals processing particles has been completed.
[0039] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for visually detecting particles of grains crushed and processed by cereals, characterized in that: The method comprises the following steps: An electron microscope image of the crushed particles is obtained by electron microscope scanning, and the electron microscope image is grayed to obtain a grayscale image, edge detection is performed on the grayscale image to obtain edge pixels, and edge pixels are fitted to obtain an edge curve; Obtaining the direction trend of each edge pixel point on each edge curve, and using the direction trend of each edge pixel point to screen each edge curve to obtain a foreground image; Obtain all curve combinations in the foreground image, calculate the endpoint trend angle of the adjacent edge curve and the defect length of each curve combination within each curve combination, measure the fuzzy difference number of each curve combination in the entire grayscale image, and obtain the continuity judgment factor of each curve combination according to the endpoint trend angle, defect length and fuzzy difference number; obtain the repetition probability number of each edge curve and the coincidence frequency of each curve combination, and obtain the internal disorder of each curve combination according to the repetition probability number of each edge curve, the coincidence frequency of each curve combination and the direction trend of each edge pixel point; obtain the correction judgment factor of each curve combination according to the continuity judgment factor of each curve combination and the internal disorder of each curve combination; The detection size is calculated based on the correction judgment factor of each curve combination, and compared with the size standard to obtain the visual detection result of the grains and cereals crushing process particles; The method calculates the endpoint trend angle of the adjacent edge curve and the defect length of each curve combination within each curve combination, measures the fuzzy difference number of each curve combination in the entire grayscale image, and obtains the continuous judgment factor of each curve combination according to the endpoint trend angle, defect length and fuzzy difference number. The specific steps include the following: Get the edge pixel points at the lower right end and the upper left end of each edge curve, record them as the right selected endpoint of each edge curve and the left selected endpoint of each edge curve, and get the trend angles of all right selected endpoints and all left selected endpoints; calculate the Euclidean distance between the right selected endpoint of each edge curve in each curve combination in the foreground image and the left selected endpoints on all other edge curves, record the minimum value in the Euclidean distance as the unreached distance of each edge curve in each curve combination, record the left selected endpoints on all other edge curves corresponding to the unreached distance as the left selected endpoint on the nearest edge curve of each edge curve, and calculate the distance between all edge curves in each curve combination. The arithmetic mean of the underreaching distance of the edge curve is recorded as the defect length of each curve combination; the underreaching distance of each edge curve in each curve combination in the foreground image is filled with a straight line and combined with each edge curve to obtain the fuzzy contour area of each curve combination, the fuzzy contour area of each curve combination is mapped to the grayscale image, the variance of the grayscale values of all pixels in each fuzzy contour area on the grayscale image is calculated, recorded as the fuzzy difference number of each curve combination, the variance of the grayscale values of all pixels on the grayscale image is calculated, recorded as the difference measure number; the continuous judgment factor of each curve combination is calculated, and the specific calculation formula is as follows: in, Indicates The continuous judgment factor of the curve combination, Indicates The defect length of the curve combination, Indicates The fuzzy difference number of curve combinations, represents the difference measure, represents a step function, Indicates The first curve combination The trend angle of the right selected endpoint of the edge curve, Indicates The first curve combination The left selected endpoint trend angle of the nearest edge curve of the edge curve, Indicates The number of edge curves in a curve combination and .
2. A method for visually detecting particles of crushed grains according to claim 1, characterized in that: The step of obtaining the direction trend of each edge pixel on each edge curve and using the direction trend of each edge pixel to screen each edge curve to obtain a foreground image includes the following specific steps: The direction of each edge pixel on each edge curve is obtained, and the angle between the direction of each edge pixel on each edge curve and the horizontal direction of the grayscale image is calculated, which is recorded as the trend angle of each edge pixel on each edge curve. All edge curves in the grayscale image are combined to obtain a plurality of curve combinations. The trend angles of all edge pixels in each curve combination are counted and the sum of the trend angles of all edge pixels in each curve combination is calculated, which is recorded as the foreground trend value of each curve combination. The foreground trend values of all curve combinations are compared with the preset foreground threshold value. If the foreground trend value of each curve combination is greater than the preset foreground threshold value, each curve combination is classified as a background area to obtain a background set. If the foreground trend value of each curve combination is less than the preset foreground threshold value, each curve combination is classified as a foreground area to obtain a foreground set. The intersection of the background set and the foreground set is obtained as a common set. All curve combinations in the background set excluding the common set are obtained as strong background curve combinations. The grayscale values of all edge pixels on the edge curves in the strong background curve combination are set to 0 on the grayscale image to obtain a foreground image.
3. The method for visually detecting particles of crushed grains according to claim 1, characterized in that: The method of obtaining the repetition probability number of each edge curve and the coincidence frequency of each curve combination, and obtaining the internal disorder of each curve combination according to the repetition probability number of each edge curve, the coincidence frequency of each curve combination and the direction trend of each edge pixel point, includes the following specific steps: On the foreground image, count the number of times each edge curve appears in all curve combinations, and record it as the probability of repetition of each edge curve; count the number of times each curve combination appears in other curve combinations, and record it as the frequency of overlap of each curve combination; obtain the minimum circumscribed circle of the fuzzy contour area of each curve combination, calculate the vector distance from the center of the minimum circumscribed circle to all edge pixels on all edge curves in each curve combination, and calculate the sum of all vector distances to obtain the sum vector, record the modulus of the sum vector as the concave-convex balance number of each curve combination, and record the direction of the sum vector as the illumination tendency of each curve combination; obtain the gradient descent direction of all pixels on the grayscale image, and record the gradient descent direction with the largest number of pixels as the overall illumination tendency of the image; calculate the internal disorder of each curve combination on the foreground image, and the specific calculation formula is as follows: in, Indicates The internal disorder of the combination of curves is Indicates The frequency of coincidence of the combination of curves, Indicates The first curve combination The probability of repetition of edge curves, Indicates The number of edge curves in a curve combination and , Indicates The lighting tendency of the curve combination, Indicates the overall lighting tendency of the image. Indicates The concave-convex balance number of the curve combination.
4. The method for visually detecting particles of crushed grains according to claim 1, characterized in that: The method of obtaining the modified judgment factor of each curve combination according to the continuity judgment factor of each curve combination and the internal disorder degree of each curve combination includes the following specific steps: Obtain the maximum and minimum values of the continuity judgment factors of all curve combinations, and calculate the arithmetic mean of the continuity judgment factors of all curve combinations, and record the arithmetic mean as the average continuity; calculate the modified judgment factor of each curve combination, and the specific calculation formula is as follows: in, Indicates The correction judgment factor of the curve combination is Indicates The continuous judgment factor of the curve combination, and Respectively represent the maximum and minimum values of the continuous judgment factors of all curve combinations, represents the average continuity, Indicates The internal disorder of the combination of curves is represents a step function, Indicates that the values in brackets are linearly normalized.
5. The method for visually detecting particles of crushed grains according to claim 1, characterized in that: The specific steps of calculating the detection size according to the correction judgment factor of each curve combination are as follows: The pixel size of the electron microscope is obtained; on the grayscale image, all curve combinations are segmented by regional fitting to obtain the crushed particle area corresponding to each curve combination, the number of pixels contained in each crushed particle area is counted, and the correction judgment factor of each curve combination is multiplied by the number of pixels contained in the crushed particle area corresponding to each curve combination and the pixel size of the electron microscope to obtain the actual size of each probability contour, and the maximum value of the actual sizes of all probability contours is recorded as the detection size.
Citation Information
Patent Citations
Contour curvature estimation-based image feature point extraction method
CN107507208A
Research method for improving biomass degradation and sugar alcohol conversion efficiency of cotton stalk
CN109371076A
Heterogeneous Image Registration Method and System
US20220319011A1
Cited By
Calcium carbonate master batch wind shear forming detection system based on machine vision
CN120404499A
