A method, apparatus, electronic device and storage medium for detecting aggregate particle size.
By employing median filtering, Gaussian filtering, proportional segmentation, and adhesion region removal algorithms, the problems of noise, uneven illumination, and adhesion in aggregate particle size detection are solved, achieving efficient and accurate aggregate particle size identification.
Patent Information
- Application Number
- CN202211010815.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-23
- Publication Date
- 2026-03-06
- Estimated Expiration
- 2042-08-23
AI Technical Summary
In existing technologies, aggregate particle size detection suffers from problems such as noise interference, uneven illumination, and aggregate adhesion areas, resulting in low detection accuracy and efficiency.
A preprocessing method combining median filtering and Gaussian filtering is adopted, along with proportional segmentation and a new algorithm for removing adhesion regions. Aggregate particle size is obtained through Canny edge detection and circumcircle annotation.
It improves the accuracy and speed of aggregate particle size detection, reduces the impact of noise and uneven lighting, effectively removes aggregate adhesion areas, and enhances the robustness of detection.
Smart Images

Figure CN115457109B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer vision and target detection technology, specifically to a method, apparatus, electronic device, and storage medium for aggregate particle size detection. Background Technology
[0002] With the rapid development of science and technology in recent years, especially the continuous advancement of artificial intelligence and big data technologies, these technologies are increasingly being applied to various aspects of life, bringing convenience to people. In industrial production, while pursuing product quality and efficiency, people are beginning to focus on production speed, and object detection is one of the artificial intelligence technologies that plays a crucial role in industrial production. Object detection is a popular area of digital image processing, widely used in fields such as robot navigation, intelligent vehicles, aerospace, anomaly detection, and intelligent monitoring. It is an important branch of image processing and computer vision, and a core component of intelligent monitoring systems. Furthermore, object detection is a crucial preprocessing step for many tasks, such as image segmentation, object recognition, object localization, and tracking.
[0003] In recent years, as society has placed higher demands on the speed of industrial production, more and more researchers have begun to apply target detection to various stages of production to reduce the consumption of human capital, and aggregate particle size detection is an important task in this regard. However, aggregate particle size detection methods based on traditional algorithms still have some problems to be solved. For example, how to remove noise from the industrial site, how to reduce the impact of uneven lighting in the industrial site on aggregate identification, and how to remove aggregate adhesion areas, etc. Summary of the Invention
[0004] The technical problems solved by this invention are: how to remove noise from industrial sites, how to reduce the impact of uneven lighting in industrial sites on aggregate identification, and how to remove at least one of the aggregate adhesion areas.
[0005] To achieve the above objectives, this invention proposes a method, apparatus, electronic device, and storage medium for aggregate particle size detection. It employs a combination of median filtering and Gaussian filtering to process noise from the industrial environment multiple times during the preprocessing stage. Furthermore, due to uneven lighting in industrial environments, direct binarization of the image can lead to partial information loss. Therefore, this invention designs a proportional segmentation method to crop, binarize, and stitch the Gaussian-blurred image proportionally. Finally, given the significant adhesion problem of aggregates in conveyor belts, this invention employs a novel adhesion region removal algorithm to remove adhesion from the binarized aggregate image. Final algorithm testing results demonstrate that the proposed aggregate particle size detection method has fast processing speed, high aggregate recognition rate, and accurate aggregate particle size identification.
[0006] According to a first aspect of the present invention, the present invention provides a method for detecting aggregate particle size, comprising the following steps:
[0007] Obtain the original image corresponding to the aggregate;
[0008] The original image is smoothed using median filtering to obtain a smoothed image.
[0009] The weight coefficients of the R, G, and B channels in the smoothed image are adjusted to obtain a grayscale image;
[0010] The gray image is blurred by applying a Gaussian filter to obtain a blurred image.
[0011] The blurred image is cropped vertically according to a preset ratio using a proportional segmentation method to obtain a proportionally cropped image.
[0012] The images cropped according to the specified ratio are binarized with different thresholds and then stitched together to obtain a binarized image of the aggregate.
[0013] A novel algorithm for removing adhesion regions is used to remove adhesion from the binarized image of the aggregate, resulting in a binarized image with the adhesion regions removed.
[0014] The binarized image of the removed adhesion region is detected using the Canny edge detection operator, and then the original image is overlaid to obtain the aggregate edge image;
[0015] The radius threshold filtering method is used to filter the radius of the aggregate edge image to select the required aggregate.
[0016] The circumcircle annotation method was used to annotate the screened aggregates with circumcircle to obtain the final aggregate particle size detection results.
[0017] Preferably, the new adhesion region removal algorithm has the following specific formula:
[0018] y i =len(x i A)
[0019] z=(z j ,z k )=Δy i
[0020] Where A represents the wrapping line of the bonded aggregate, and len is used to calculate the defect point x. i The length of distance A, Δy i For y i The combination of the two pixels with the largest median value, z is determined by (z j ,z k The two pixels that will be used for image segmentation are composed of 2 pixels.
[0021] According to a second aspect of the present invention, an aggregate particle size detection device is provided, comprising the following modules:
[0022] The image acquisition module is used to acquire the original image corresponding to the aggregate.
[0023] A smoothing module is used to smooth the original image using median filtering to obtain a smoothed image.
[0024] The grayscale image acquisition module is used to adjust the weight coefficients of the R, G, and B channels in the smoothed image to obtain a grayscale image;
[0025] The Gaussian filter module is used to perform image blurring on the gray image using Gaussian filtering to obtain a blurred image;
[0026] The image cropping module is used to crop the blurred image vertically according to a preset ratio using a proportional segmentation method to obtain a proportionally cropped image.
[0027] The binarization processing module is used to perform binarization processing on the image after cropping according to the ratio with different thresholds, and then stitch them together to obtain a binarized image of the aggregate.
[0028] The adhesion removal module is used to remove adhesion from the aggregate binarized image using a new adhesion region removal algorithm to obtain a binarized image with the adhesion region removed.
[0029] The edge detection module is used to detect the binarized image of the removed adhesion region using the Canny edge detection operator, and then overlay the original image to obtain the aggregate edge image;
[0030] The radius threshold filtering module is used to perform radius filtering on the aggregate edge image using the radius threshold filtering method to select the required aggregate.
[0031] The outer circle annotation module is used to perform outer circle annotation on the screened aggregates using the outer circle annotation method to obtain the final aggregate particle size detection results.
[0032] According to a third aspect of the present invention, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the aggregate particle size detection method.
[0033] According to a fourth aspect of the present invention, a storage medium is provided thereon storing a computer program that, when executed by a processor, implements the steps of the aggregate particle size detection method.
[0034] This invention provides a method for aggregate particle size detection. In the initial stage, median filtering is used to smooth the original input image, and a grayscale image is obtained by changing the weight coefficients of the R, G, and B channels in the image. Subsequently, Gaussian filtering is applied to process the noise contained in the industrial environment in the grayscale image, resulting in a blurred image. Furthermore, to reduce the impact of uneven lighting in the industrial environment on aggregate identification, this invention designs a proportional segmentation method to crop, binarize, and stitch the Gaussian-blurred image. Finally, to reduce the problem of aggregate adhesion in the conveyor belt, this invention employs a novel adhesion region removal algorithm to remove adhesion from the binarized aggregate image, and sequentially uses the Canny edge detection operator, radius threshold filtering, and circumcircle annotation to obtain the final aggregate particle size identification result. Experimental results show that the overall algorithm has a fast running speed, high accuracy in aggregate particle size identification, and strong robustness. Attached Figure Description
[0035] The present invention will be further described below with reference to the accompanying drawings and embodiments. In the accompanying drawings:
[0036] Figure 1 The following is an execution flowchart of an industrial conveyor belt aggregate particle size detection method provided by an embodiment of the present invention;
[0037] Figure 2 Original industrial site conveyor belt aggregate images provided for embodiments of the present invention;
[0038] Figure 3 The image provided in this embodiment of the invention has undergone median filtering and smoothing.
[0039] Figure 4 The grayscale image provided for the embodiments of the present invention;
[0040] Figure 5 The blurred image provided in the embodiment of the present invention;
[0041] Figure 6 The cropped image provided in the embodiments of the present invention;
[0042] Figure 7 The binarized image provided in the embodiments of the present invention;
[0043] Figure 8 This is a binarized image of the adhesive portion after removal, provided in an embodiment of the present invention.
[0044] Figure 9 This is an aggregate edge detection image provided in an embodiment of the present invention;
[0045] Figure 10 The image after radius threshold filtering provided in the embodiments of the present invention;
[0046] Figure 11This is a structural diagram of an industrial conveyor belt aggregate particle size detection device provided in an embodiment of the present invention. Detailed Implementation
[0047] Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values of the components and steps set forth in these embodiments do not limit the scope of the present invention.
[0048] At the same time, it should be understood that, for ease of description, the dimensions of the various parts shown in the accompanying drawings are not drawn according to actual scale.
[0049] The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit the invention or its application or use.
[0050] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to specific embodiments and accompanying drawings.
[0051] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.
[0052] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limitations. Therefore, other examples of exemplary embodiments may have different values.
[0053] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.
[0054] Example 1
[0055] This embodiment selects to detect the aggregate particle size on an industrial conveyor belt. It should be noted that the aggregate particle size detection method provided by the present invention is not limited to the specific implementation scenario of an industrial conveyor belt, but can also be applied to any scenario that requires aggregate particle size detection.
[0056] refer to Figure 1 Based on the specific implementation scenario of industrial conveyor belts, this embodiment of the invention provides an aggregate particle size detection method. The method is implemented using an industrial conveyor belt aggregate particle size detection model composed of operations such as filtering and noise reduction, proportional trimming, and radius screening, and includes the following steps:
[0057] S1. Median filtering is used to smooth the original input industrial conveyor belt image to obtain a smoothed image.
[0058] refer to Figure 2 It is preferable to use a high-definition camera to capture raw images. Images captured from conveyor belts in raw industrial settings contain significant noise, such as particle noise (salt and pepper) from the aggregate surface itself. Directly binarizing these images would greatly interfere with subsequent aggregate detection and radius recognition. Therefore, refer to... Figure 3 In the initial stage, this invention uses median filtering to preprocess the original image and filter out particle noise.
[0059] S2. Adjust the weight coefficients of the R, G, and B channels in the smoothed image to obtain a grayscale image.
[0060] refer to Figure 2 Because lighting in industrial settings is uneven, high-contrast lighting at the top and bottom of an image can cause subsequent aggregate identification to focus primarily on the central area. Therefore, this invention adjusts the weight coefficients of the R, G, and B channels in the smoothed image to obtain a grayscale image with low lighting contrast, specifically as follows: Figure 4 As shown.
[0061] In this embodiment, the specific adjustment formula is as follows:
[0062] y = 0.2126R + 0.7152G + 0.07B
[0063] R, G, and B represent the three channels that make up a color image: red, green, and blue. These three specific coefficients typically represent how humans perceive the intensity of light. Human vision is most sensitive to green, hence this coefficient has the largest value (0.7152), while it is least sensitive to blue, hence this coefficient has the smallest value (0.07).
[0064] It should be noted that the coefficients in the above adjustment formula are not fixed and can be adjusted according to the actual situation and needs.
[0065] S3. The grayscale image still contains noise from the industrial site. Gaussian filtering is used to blur the image, resulting in a blurred image, such as... Figure 5 As shown.
[0066] S4. In the blurred image, the lighting from the industrial site is uneven. A proportional segmentation method is designed to crop the Gaussian blurred image vertically according to a certain ratio. The cropped image is shown below. Figure 6 As shown.
[0067] In this embodiment, the preferred cutting ratio is 500:900:500:148, which can be adjusted according to actual conditions and needs.
[0068] S5. The images cropped according to the specified ratio are binarized with different thresholds and then stitched together to obtain a binarized image of the aggregate, such as... Figure 7 As shown.
[0069] The image after the Gaussian module is cropped vertically according to a proportional segmentation method as described in S4. Therefore, during the binarization process, this invention designs specific threshold parameters for different cropped portions to extract the general outline of the conveyor belt aggregate to the greatest extent. For a cropping ratio of 500:900:500:148, the binarization thresholds are 165:185:160:150, respectively. Similarly, these specific values can be adjusted according to actual conditions and requirements.
[0070] S6. A novel algorithm for removing adhesion regions is used to remove adhesion from the binarized image of the aggregate, resulting in a binarized image with the adhesion regions removed, as shown below. Figure 8 As shown.
[0071] refer to Figure 7 The aggregate binarized image obtained by S5 often contains a large number of adhesion regions. Directly performing edge detection on the binarized image will result in inaccurate detection of some aggregate particle sizes. Therefore, this invention proposes a new adhesion region removal algorithm consisting of convex hull detection, convex hull defect detection, finding the farthest point of the defect, and image segmentation steps.
[0072] refer to Figure 8 First, the convex hull detection method is used to obtain the enclosing line A of the bonded aggregate. Convex hull detection means that if the straight line segment connecting any two points within the enclosing image A is inside A, then the enclosing line A is said to be convex, and the method for forming the image A is called the convex hull detection method. The difference between the actual image and the enclosing line A is called convex hull defect detection.
[0073] Considering that the pixels in the aggregate adhesion region are farther from the wrapping line A compared to other defect points, finding the two farthest defect points and connecting them to segment the image can effectively solve the aggregate adhesion problem in the binarized image. Therefore, this invention proposes a new algorithm for removing adhesion regions, the specific formula of which is as follows:
[0074] y i =len(x i A)
[0075] z=(z j ,z k )=Δy i
[0076] Where A represents the wrapping line of the bonded aggregate, and len is used to calculate the defect point x. i The length of distance A, Δy iFor y i The combination of the two pixels with the largest median value, z is determined by (z j ,z k This consists of two pixels that will be used for image segmentation. For example... Figure 8 As shown, by employing the adhesion region removal algorithm proposed in this invention, the problem of inaccurate particle size identification caused by aggregate stacking in the existing aggregate detection process can be effectively solved.
[0077] S7. The binarized image is detected using the Canny edge detection operator, and the original image is overlaid to obtain the aggregate edge image, such as... Figure 9 As shown.
[0078] It should be noted that the Canny edge detection operator is an existing edge detection algorithm, so it will not be described in detail here.
[0079] S8. Using a radius threshold filtering method, the aggregate edge image is filtered by setting a radius parameter to select the aggregate required for the industrial site.
[0080] In this embodiment, the specific radius screening value is set to 30mm, which can be adjusted according to actual conditions and needs.
[0081] S9. Use the circumcircle annotation method to annotate the smallest circumcircle of the aggregate after radius screening, and obtain the final aggregate particle size detection results, such as... Figure 10 As shown.
[0082] Example 2:
[0083] refer to Figure 11 This invention provides an aggregate particle size detection device, which can be used to implement the steps of the aggregate particle size detection method described in Embodiment 1. The device specifically includes the following modules:
[0084] Image acquisition module 1 is used to acquire the original image corresponding to the aggregate;
[0085] Smoothing module 2 is used to smooth the original image using median filtering to obtain a smoothed image;
[0086] The gray image acquisition module 3 is used to adjust the weight coefficients of the R, G, and B channels in the smoothed image to obtain a gray image;
[0087] Gaussian filter module 4 is used to perform image blurring processing on the gray image using Gaussian filtering to obtain a blurred image;
[0088] Image cropping module 5 is used to crop the blurred image vertically according to a preset ratio using a proportional segmentation method to obtain a proportionally cropped image;
[0089] The binarization processing module 6 is used to perform binarization processing on the image after cropping according to the ratio with different thresholds, and then stitch them together to obtain a binarized image of the aggregate.
[0090] The adhesion removal module 7 is used to remove adhesion from the aggregate binarized image using a new adhesion region removal algorithm to obtain a binarized image with the adhesion region removed.
[0091] Edge detection module 8 is used to detect the binarized image of the removed adhesion area using the Canny edge detection operator, and then overlay the original image to obtain the aggregate edge image;
[0092] The radius threshold filtering module 9 is used to perform radius filtering on the aggregate edge image using the radius threshold filtering method to select the required aggregate.
[0093] The circumcircle annotation module 10 is used to perform circumcircle annotation on the screened aggregates using the circumcircle annotation method to obtain the final aggregate particle size detection results.
[0094] Example 3:
[0095] This embodiment provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps of the aggregate particle size detection method described in Embodiment 1 and achieves the same technical effect, which will not be repeated here.
[0096] Example 4:
[0097] This embodiment provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, it implements the steps of the aggregate particle size detection method described in Embodiment 1 and can achieve the same technical effect, which will not be repeated here.
[0098] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0099] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments. In the unit claims listing several devices, several of these devices may be embodied by the same hardware item. The use of the terms first, second, and third, etc., does not indicate any order and can be interpreted as identifiers.
[0100] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. An aggregate particle size detection method, characterized by, The aggregate particle size detection method comprises the following steps: An original image corresponding to the aggregate is acquired. The original image is smoothed by median filtering to obtain a smoothed image. The weight coefficients of R, G and B channels in the smoothed image are adjusted to obtain a gray image. The gray image is blurred by Gaussian filtering to obtain a blurred image. The blurred image is cropped up and down according to a preset ratio by a proportional segmentation method to obtain a proportionally cropped image. The proportionally cropped image is binarized at different threshold values respectively, and spliced to obtain an aggregate binarized image. A new connected region removal algorithm is used to remove the connected regions of the aggregate binarized image to obtain a binarized image with removed connected regions. A canny edge detection operator is used to detect the binarized image with removed connected regions, and the original image is overlaid to obtain an aggregate edge image. A radius threshold filtering method is used to filter the aggregate edge image to select the required aggregate. An inscribed circle labeling method is used to label the selected aggregate to obtain the final aggregate particle size detection result. The new connected region removal algorithm has the following specific formula: y i = len(x i ,A) z = (z j ,z k ) = Ay i Wherein, A represents the package line of the caking aggregate, len is used for calculating the defect point x i The length of distance A, Δy i is y i The combination of the two pixel points with the largest median value, z is composed of (z j , z k ) and represents the two pixel points to be used for image segmentation.
2. The aggregate particle size detection method according to claim 1, characterized by, The weight coefficients of R, G and B channels in the smoothed image are adjusted to obtain a gray image, and the specific adjustment formula is: y = 0.2126R + 0.7152G + 0.07B Wherein R, G and B represent the three channels of the image, i.e. red, green and blue.
3. The aggregate particle size detection method according to claim 1, characterized by, The blurred image is cropped up and down according to a preset ratio by a proportional segmentation method, and the preset ratio is 500:900:500:
148.
4. The aggregate particle size detection method according to claim 1, characterized by, The proportionally cropped image is binarized at different threshold values respectively, and the specific binarization threshold values are 165:185:160:
150.
5. The aggregate particle size detection method according to claim 1, characterized by, The radius threshold filtering method is used to filter the aggregate edge image to select the required aggregate, and the specific radius selection value is set to 30mm.
6. The aggregate particle size detection method according to claim 1, characterized by, The original image corresponding to the aggregate is acquired by a high-definition camera.
7. An aggregate particle size detection apparatus, characterized by, It comprises the following modules: An image acquisition module is used to acquire the original image corresponding to the aggregate. A smoothing module is used to smooth the original image by median filtering to obtain a smoothed image. A gray image acquisition module is used to adjust the weight coefficients of R, G and B channels in the smoothed image to obtain a gray image. A Gaussian filtering module is used to blur the gray image by Gaussian filtering to obtain a blurred image. An image cropping module is used to crop the blurred image up and down according to a preset ratio by a proportional segmentation method to obtain a proportionally cropped image. A binarization processing module is used to binarize the proportionally cropped image at different threshold values respectively, and splice to obtain an aggregate binarized image. A connected region removal module is used to remove the connected regions of the aggregate binarized image by a new connected region removal algorithm to obtain a binarized image with removed connected regions. An edge detection module is used to detect the binarized image with removed connected regions by a canny edge detection operator, and overlay the original image to obtain an aggregate edge image. A radius threshold filtering method is used to filter the aggregate edge image to select the required aggregate. A radius threshold filtering module is configured to filter the aggregate edge image by using a radius threshold filtering method to screen out the required aggregate. An inscribed circle labeling module is configured to label the screened aggregate by using an inscribed circle labeling method to obtain a final aggregate particle size detection result. The new adhesion area removal algorithm has the following specific formula: y i = len(x i ,A) z = (z j ,z k ) = Δy i Wherein, A represents the package line of the caking aggregate, len is used for calculating the defect point x i The length of distance A, Δy i Is y i The combination of the two pixel points with the largest median value, z is composed of (z j ,z k ) and represents the two pixel points to be used for image segmentation.
8. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the program to implement the steps of the aggregate particle size detection method in any one of claims 1-6.
9. A storage medium having stored thereon a computer program, characterized in that The computer program is executed by the processor to implement the steps of the aggregate particle size detection method in any one of claims 1-6.
Citation Information
Patent Citations
Ore image granularity detection algorithm based on image processing technology
CN111047555A