Method and device for determining diameter of green ball, electronic equipment and storage medium
By acquiring images of green balls inside the ball tray and utilizing edge extraction and center positioning technologies, the diameter of the green balls is automatically detected. This solves the quality fluctuation problem caused by manual operation in the green ball production process and enables reliable statistics on the diameter of green balls and data support for the production process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHENGDE JIANLONG SPECIAL STEEL
- Filing Date
- 2025-12-31
- Publication Date
- 2026-06-12
Smart Images

Figure CN121430477B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of online detection technology for green bulb diameter, and in particular to a method, apparatus, electronic device, and storage medium for determining green bulb diameter. Background Technology
[0002] In the pelletizing process of steel plants, "green pellets" are the core semi-finished product that transforms iron ore powder into qualified blast furnace feed (pellets). Their role is crucial throughout the entire pelletizing process, directly determining the quality of the final finished pellets and the efficiency of blast furnace ironmaking. This is because one of the core functions of green pellets is to transform the fine powder into uniformly sized, blocky semi-finished products (green pellets typically have a diameter of 8-16mm) through a "pelletizing" process (mixing fine iron ore powder with a binder and rolling it into pellets in a pelletizing machine). This lays the morphological foundation for subsequent roasting and furnace feeding.
[0003] Currently, the mainstream process for producing green pellets involves operators adding powder and moisture to the equipment based on the state of the green pellets in the pelletizing pan, and controlling the equipment's rotation speed and other parameters. In other words, the pelletizing process is entirely manual, and differences in individual responsibility and skill level can affect the quality of the green pellets, thus impacting the overall quality of the finished pellets.
[0004] Improving the yield rate of green pellets is an effective way to increase production while maintaining quality, as well as to reduce circulating pressure and equipment load, thereby reducing energy consumption and increasing production efficiency. Currently, a crucial prerequisite for automating equipment upgrades and achieving automatic control is how to determine the state of green pellets within the pellet tray online.
[0005] Therefore, it is necessary to develop a method for determining the diameter of the green pellet. Summary of the Invention
[0006] The present invention provides a method, apparatus, electronic device and storage medium for determining the diameter of green bulbs, which solves the problem of how to determine the diameter of multiple green bulbs online in the prior art.
[0007] In a first aspect, embodiments of the present invention provide a method for determining the diameter of green bulbs, including:
[0008] Acquire a first image, wherein the first image is acquired based on spheres within a sphere disk;
[0009] Edges in the first image are extracted using an edge extraction operator, and multiple first edges are refined to obtain multiple second edges.
[0010] By using the center-of-circle positioning method, multiple first green spheres are identified from the multiple second edges, and the first diameter of each first green sphere is extracted;
[0011] The diameters of the multiple first green bulbs are statistically analyzed to obtain statistical data on the distribution of green bulb diameters.
[0012] In one possible implementation, the step of extracting edges in the first image using an edge extraction operator and thinning the extracted first edges to obtain multiple second edges includes:
[0013] The first image is denoised using Gaussian filtering to obtain a denoised image;
[0014] The denoised image is processed by horizontal and vertical difference operators respectively to obtain a first difference image and a second difference image;
[0015] A gradient map expressing the pixel gradient direction and gradient intensity is constructed using the first difference map and the second difference map.
[0016] Based on the gradient direction and gradient intensity extracted from the gradient map, the retention or rejection setting is performed on each pixel value in the first image;
[0017] The plurality of second edges are constructed based on the retained pixel values.
[0018] In one possible implementation, the step of processing the denoised image using horizontal and vertical difference operators respectively to obtain a first difference image and a second difference image includes:
[0019] Both the horizontal and vertical difference operators are rectangular data blocks. For each of the horizontal and vertical difference operators, the following steps are performed:
[0020] Multiple first data blocks of the same type as the operator are extracted from the denoised image by sliding.
[0021] For each first data block, the first data block and the data at the same position in the operator are multiplied accordingly, and the sum of the multiple products is used as the first difference value of the first data block;
[0022] Based on the position of the first data block in the denoised image, multiple first difference values are arranged to obtain a first difference map or a second difference map.
[0023] In one possible implementation, constructing a gradient map expressing the pixel gradient direction and gradient intensity using the first difference map and the second difference map includes:
[0024] First difference values are extracted from the same location in both the first and second difference maps, and pixel gradient direction and gradient intensity are calculated based on the first formula and the two difference values. The first formula is:
[0025]
[0026] In the formula, Coordinates are The gradient intensity of the pixel, The coordinates in the first difference plot are The first difference value of the pixels, The coordinates in the second difference plot are The first difference value of the pixels, Coordinates are The gradient direction of the pixel, It is the arctangent function in the four quadrants;
[0027] The step of setting the retention or rejection of each pixel value in the first image based on the gradient direction and gradient intensity extracted from the gradient map includes:
[0028] The non-zero pixel values in the gradient map are used as values to be processed.
[0029] For each value to be processed, perform the following steps:
[0030] Find multiple neighboring pixel values from the gradient direction and the opposite direction of the value to be processed using a preset neighborhood radius;
[0031] Set the non-maximum value among the value to be processed and the multiple adjacent pixel values to 0.
[0032] In one possible implementation, identifying multiple first green spheres from the plurality of second edges using center-based localization and extracting the first diameter of each first green sphere includes:
[0033] For each second edge, the center position and diameter of the arc are determined by fitting the arc equation to the pixel position;
[0034] Merge the second edges whose center positions are less than the first threshold, and use them as the edges of the same first living sphere;
[0035] For each first green ball, the first diameter is determined based on the arc diameter of the second edge that forms the edge of the first green ball.
[0036] In one possible implementation, determining the center position and diameter of the arc for each second edge by fitting an arc equation to the pixel position includes:
[0037] Obtain the equation of the circular arc, wherein the undetermined coefficients of the circular arc equation are set to random values, and the circular arc equation is:
[0038]
[0039] In the formula, Center of the arc Axis coordinates Center of the arc Axis coordinates The diameter of the arc;
[0040] Substituting the multiple pixel positions into the residual function constructed based on the circular arc equation, multiple residuals are obtained, wherein the residual function is:
[0041]
[0042] In the formula, For the first One residual, For the first The position of each pixel Axis coordinates For the first The position of each pixel Axis coordinates;
[0043] Based on the multiple residuals, the multiple undetermined coefficients of the circular arc equation are solved iteratively using the Gauss-Newton method to obtain the center position and diameter of the circular arc.
[0044] In one possible implementation, the step of statistically analyzing the diameters of the plurality of first green bulbs to obtain green bulb diameter distribution statistics includes:
[0045] Calculate the average diameter of the plurality of first green balls;
[0046] The standard deviation of the diameter is determined based on the mean and the diameters of the plurality of first green bulbs.
[0047] Secondly, embodiments of the present invention provide a green bulb diameter determining device for implementing the green bulb diameter determining method as described in the first aspect or any possible implementation thereof, the green bulb diameter determining device comprising:
[0048] The image acquisition module is used to acquire a first image, wherein the first image is acquired based on the spheres within the sphere disk;
[0049] The image edge extraction module is used to extract the edges in the first image using an edge extraction operator, and to refine the multiple first edges obtained by extraction to obtain multiple second edges;
[0050] The green ball diameter calculation module is used to identify multiple first green balls from the multiple second edges by means of center positioning, and to extract the first diameter of each first green ball;
[0051] as well as,
[0052] The green bulb diameter statistics module is used to statistically analyze the diameters of the multiple first green bulbs and obtain statistical data on the distribution of green bulb diameters.
[0053] Thirdly, embodiments of the present invention provide an electronic device, including a memory and a processor, wherein the memory stores a computer program executable on the processor, and the processor executes the computer program to implement the steps of the method as described in the first aspect or any possible implementation of the first aspect.
[0054] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method as described in the first aspect or any possible implementation thereof.
[0055] The beneficial effects of the embodiments of the present invention compared with the prior art are as follows:
[0056] This invention discloses a method for determining the diameter of raw balls. First, a first image is acquired, based on raw balls within a ball tray. Then, edges in the first image are extracted using an edge extraction operator, and the extracted first edges are refined to obtain multiple second edges. Next, multiple first raw balls are identified from the multiple second edges using a center-based positioning method, and the first diameter of each first raw ball is extracted. Finally, the diameters of the multiple first raw balls are statistically analyzed to obtain statistical data on the distribution of raw ball diameters. This invention captures an image of the raw balls within the ball tray, extracts the edges of the raw balls using an edge extraction method, and locates the position of the raw balls in the image and determines their diameter based on the edges and center points, avoiding the possibility of duplicate statistics. Finally, statistical data is generated based on the aforementioned raw ball diameters. Therefore, the statistical data of this invention is relatively reliable, enabling online statistical analysis of the distribution of raw ball diameters and reflecting the quality of the raw ball production process from a data perspective. Attached Figure Description
[0057] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0058] Figure 1 This is a flowchart of the method for determining the diameter of green pellets provided in the embodiments of the present invention;
[0059] Figure 2This is a functional block diagram of the green pellet diameter determination device provided in the embodiments of the present invention;
[0060] Figure 3 This is a functional block diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0061] In the following description, specific details such as particular system structures and techniques are set forth for illustrative purposes and not for limitation, so as to provide a thorough understanding of embodiments of the invention. However, those skilled in the art will understand that the invention can be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, and methods are omitted so as not to obscure the description of the invention with unnecessary detail.
[0062] To make the objectives, technical solutions, and advantages of the present invention clearer, specific embodiments will be described below in conjunction with the accompanying drawings.
[0063] The embodiments of the present invention will be described in detail below. This example is implemented based on the technical solution of the present invention, and provides detailed implementation methods and specific operation processes. However, the protection scope of the present invention is not limited to the following embodiments.
[0064] Figure 1 A flowchart illustrating the method for determining the diameter of green pellets provided in an embodiment of the present invention.
[0065] like Figure 1 As shown, a flowchart illustrating the implementation of the green bulb diameter determination method provided by an embodiment of the present invention is presented, and is described in detail below:
[0066] In step 101, a first image is acquired, wherein the first image is acquired based on the spheres within the sphere disk.
[0067] In step 102, the edges in the first image are extracted using an edge extraction operator, and the multiple first edges obtained are refined to obtain multiple second edges.
[0068] In some implementations, the step of extracting edges in the first image using an edge extraction operator and refining the extracted first edges to obtain multiple second edges includes:
[0069] The first image is denoised using Gaussian filtering to obtain a denoised image;
[0070] The denoised image is processed by horizontal and vertical difference operators respectively to obtain a first difference image and a second difference image;
[0071] A gradient map expressing the pixel gradient direction and gradient intensity is constructed using the first difference map and the second difference map.
[0072] Based on the gradient direction and gradient intensity extracted from the gradient map, the retention or rejection setting is performed on each pixel value in the first image;
[0073] The plurality of second edges are constructed based on the retained pixel values.
[0074] In some implementations, the step of processing the denoised image using horizontal and vertical difference operators respectively to obtain a first difference image and a second difference image includes:
[0075] Both the horizontal and vertical difference operators are rectangular data blocks. For each of the horizontal and vertical difference operators, the following steps are performed:
[0076] Multiple first data blocks of the same type as the operator are extracted from the denoised image by sliding.
[0077] For each first data block, the first data block and the data at the same position in the operator are multiplied accordingly, and the sum of the multiple products is used as the first difference value of the first data block;
[0078] Based on the position of the first data block in the denoised image, multiple first difference values are arranged to obtain a first difference map or a second difference map.
[0079] In some implementations, constructing a gradient map expressing the pixel gradient direction and gradient intensity using the first difference map and the second difference map includes:
[0080] First difference values are extracted from the same location in both the first and second difference maps, and pixel gradient direction and gradient intensity are calculated based on the first formula and the two difference values. The first formula is:
[0081]
[0082] In the formula, Coordinates are The gradient intensity of the pixel, The coordinates in the first difference plot are The first difference value of the pixels, The coordinates in the second difference plot are The first difference value of the pixels, Coordinates are The gradient direction of the pixel, It is the arctangent function in the four quadrants;
[0083] The step of setting the retention or rejection of each pixel value in the first image based on the gradient direction and gradient intensity extracted from the gradient map includes:
[0084] The non-zero pixel values in the gradient map are used as values to be processed.
[0085] For each value to be processed, perform the following steps:
[0086] Find multiple neighboring pixel values from the gradient direction and the opposite direction of the value to be processed using a preset neighborhood radius;
[0087] Set the non-maximum value among the value to be processed and the multiple adjacent pixel values to 0.
[0088] For example, the distribution of green ball diameter is a key factor that directly affects the subsequent green ball quality and is also an important reference for equipment control. Therefore, the present invention aims to determine the distribution of green ball diameter during the production process by taking pictures of the green balls in the ball tray of the production equipment, analyzing the green ball diameter based on the pictures, and finally determining the distribution of green ball diameter during the production process.
[0089] To achieve the above objectives, this method extracts image edges from captured images, identifies and analyzes the diameter of the basal cells through image edge recognition, and finally completes the statistical analysis of the basal cell diameter.
[0090] In this process, as an important part of the statistics of the diameter of the raw ball, in terms of image edge extraction, the present invention first uses Gaussian filtering to denoise the first image (i.e. the original input image to be processed) to obtain a smooth denoised image.
[0091] Gaussian filtering, as a linear smoothing filtering method, works by constructing a filter kernel using a Gaussian function. By weighting the gray values of each pixel within the kernel with their corresponding Gaussian weights, image noise is suppressed. During this process, the standard deviation (σ value) of the Gaussian function needs to be adaptively adjusted based on the type and intensity of noise in the original image. For images with a mixture of salt-and-pepper noise and Gaussian noise, a filter kernel with σ ∈ [0.8, 1.5] (commonly 3×3 or 5×5 size) is typically chosen. This effectively filters out high-frequency noise signals while preserving the details of image edges to the greatest extent possible, avoiding excessive smoothing that could lead to the loss of subsequent edge features. The core function of this step is to eliminate interference signals in the original image, providing stable and reliable image data for subsequent difference operations.
[0092] After image filtering is completed, the present invention uses horizontal and vertical difference operators to perform convolution operations on the denoised image to obtain a first difference image reflecting the gray-level changes in the horizontal direction and a second difference image reflecting the gray-level changes in the vertical direction.
[0093] Image edges are essentially regions of abrupt changes in pixel grayscale values. The core function of difference operators is to convert these "abrupt changes" into quantifiable numerical signals by calculating the grayscale differences between adjacent pixels. Commonly used difference operators include the Prewitt operator, the Sobel operator, and the Roberts operator.
[0094] The Sobel operator, due to its weighted averaging mechanism, is more robust to noise and is the most widely used. Its horizontal difference operator kernel is [[-1,0,1],[-2,0,2],[-1,0,1]], which weights the 3×3 neighborhood of each pixel in the denoised image to highlight horizontal grayscale changes. The vertical difference operator kernel is the transpose of the horizontal kernel, i.e., [[-1,-2,-1],[0,0,0],[1,2,1]], specifically capturing vertical grayscale abrupt changes. During the operation, the operator kernel is multiplied pixel-by-pixel by the corresponding region of the denoised image, and then summed. The result is the difference response value of that pixel in the corresponding direction—the larger the absolute value of the response value, the more drastic the grayscale change in that direction, and the more likely it is to be part of an edge. The first and second difference maps record the grayscale change information of the entire image in the two orthogonal horizontal and vertical directions, respectively, providing basic data for subsequent gradient analysis.
[0095] In terms of data processing using operators, local data units for computation are systematically acquired according to sizes matching the preset operators, providing basic data for subsequent difference calculations. Specific operations must follow these specifications:
[0096] First, define the size parameters of the operators used for difference operations (such as the Sobel operator, Prewitt operator, etc.). Common operator sizes are mostly odd-dimensional matrices such as 3×3 or 5×5. The first extracted data block must be completely identical to the operator, that is, the number of rows and columns of the data block must be strictly consistent with the dimensions of the operator to ensure the feasibility of subsequent multiplication operations at corresponding positions.
[0097] Then, a sliding window is used to traverse the entire denoised image, and the sliding process must maintain continuity and integrity. Typically, the sliding step size is set to 1, meaning the window moves 1 pixel horizontally or vertically each time to preserve local image details to the maximum extent. In scenarios with higher processing efficiency requirements, the step size can be adjusted according to actual needs (e.g., setting the step size to 2). However, it should be noted that increasing the step size may lead to the loss of some image information, potentially affecting the accuracy of subsequent difference maps.
[0098] When the sliding window moves to the edge of the image, the window may extend beyond the image area. To avoid data loss, a reasonable boundary padding strategy should be adopted in advance, such as zero-padding (filling the area outside the image area with 0), mirror padding (mirroring the image with the edge pixels as the axis of symmetry), or copy padding (directly copying the edge pixel values to the blank area) to ensure that a complete first data block can be extracted at each location.
[0099] Next, through element-wise operations and accumulation with the operator on the first data block, the grayscale variation features of the local image are quantized into a single difference value, realizing the conversion from two-dimensional data to one-dimensional features. The specific operation logic is as follows:
[0100] For each extracted first data block, it is treated as a two-dimensional matrix with the same dimension as the operator, and a one-to-one correspondence is established between the data blocks and the operator. For example, if the operator is a 3×3 matrix, the element in its i-th row and j-th column (1≤i,j≤3) must precisely match the pixel value in the i-th row and j-th column of the first data block to ensure spatial consistency of the operation.
[0101] Based on the established positional correspondence, the first data block is multiplied element-wise with the operator. This process essentially uses the weight distribution of the operator to weight the local grayscale information of the data block. The weight values at different positions in the operator determine the contribution of the corresponding pixel in the difference calculation. For example, the weights in the edge direction are usually larger in the edge detection operator to enhance the grayscale change signal in the edge region.
[0102] After element-wise multiplication, all the resulting products are summed, and the sum is used as the first difference value of the current first data block. The magnitude of this difference value directly reflects the intensity of grayscale changes in the image region corresponding to the data block. The larger the difference value, the more drastic the grayscale changes in the region, and the more likely it is to be an edge or feature region of the image.
[0103] After obtaining the first difference values of all the first data blocks, the difference values need to be arranged in an orderly manner by associating them with the original image positions. Finally, a difference map that can intuitively reflect the distribution of grayscale changes in the image is constructed, providing a visual and computable data source for subsequent analysis.
[0104] After obtaining the difference map, the gradient map can be constructed. The core value of the gradient map lies in simultaneously representing the gradient intensity (reflecting the drasticness of pixel changes) and gradient direction (reflecting the trend direction of pixel changes) of each pixel. Its construction process is based on the first and second difference maps, and is completed through fixed-point extraction and formula calculation. The specific steps are as follows:
[0105] First, consider the first difference graph (denoted as...). (Figure) and the second difference graph (denoted as) (Figure) Performs synchronized pixel information extraction operations. The core of "synchronization" here lies in the consistency of spatial location—for any coordinate within the image plane... The pixels need to be obtained from Extract the difference value of the corresponding point in the graph (denoted as ). At the same time from Extract the difference value corresponding to the exact same position in the graph (denoted as ). The essence of this operation is to obtain the variation characteristics of the same pixel in two different difference dimensions, providing a basic data pair for subsequent gradient parameter calculation. It is important to note that during the extraction process, the size and resolution of the two difference images must be completely identical to avoid gradient calculation errors caused by spatial misalignment.
[0106] Get each pixel and After the value is calculated, the gradient strength is determined using a preset first formula. and gradient direction The calculation is based on a quantitative relationship established between the difference characteristics and the physical meaning of the gradient, and the specific expression is as follows:
[0107]
[0108] In the formula, Coordinates are The gradient intensity of the pixel, The coordinates in the first difference plot are The first difference value of the pixels, The coordinates in the second difference plot are The first difference value of the pixels, Coordinates are The gradient direction of the pixel, It is the arctangent function in the four quadrants.
[0109] To clarify the physical meaning and calculation logic of each parameter in the formula, a detailed explanation is provided:
[0110] gradient strength As a core indicator characterizing the drastic change of a pixel, gradient strength is calculated by summing the absolute values of two differences. The reason for choosing absolute value calculation is that gradient strength focuses on the "magnitude" of the change rather than its "positive or negative direction." Absolute value conversion quantifies the differential changes in different directions into a unified non-negative intensity value. Summation, on the other hand, fuses the differential features of the two dimensions, allowing the gradient strength to comprehensively reflect the overall change magnitude of the pixel. For example, when... , hour, The larger the value, the more significant the difference between the pixel and the surrounding pixels, and the more likely it is a pixel in the image edge or detail area.
[0111] gradient direction : Used to describe the spatial direction of pixel change trends; its calculation depends on the four-quadrant arctangent function. Compared to the regular arctangent function compared to, The advantage of this function is that it can determine the quadrant of the angle by combining the signs of two parameters, thus accurately outputting values from 0 to... The orientation angle within the specified range avoids directional ambiguity. The physical meaning of this orientation angle is the gradient vector (indicated by...). for Axial components, for (axis components) and The angle along the positive direction of the axis, for example when , hour, This indicates that the gradient direction is northeast, meaning that the change at this pixel point is most significant in the northeast direction.
[0112] After performing the above extraction and calculation operations on all pixels in the image in sequence, each pixel... and The value is stored as the gradient parameter at that location, ultimately forming a complete gradient map. Each pixel in this gradient map contains binary information of "intensity-direction," providing a precise basis for subsequent pixel value retention and rejection settings.
[0113] After obtaining the gradient map containing complete gradient information, the retention / removal settings for each pixel value in the original first image need to be determined based on the gradient direction and intensity. The core objective of this process is to retain pixels with significant features (such as edges and detail pixels) and remove redundant, flat region pixels, thereby achieving image feature enhancement and data simplification. The specific implementation process is as follows:
[0114] First, the pixels in the gradient map are classified and filtered, with gradient strength being the primary factor. The original first image pixel value corresponding to a non-zero pixel is defined as the "value to be processed". This selection logic is based on the fact that a gradient strength of 0 means that the pixel value... and If both gradients are 0, it means that the pixel has no change in either difference dimension. It belongs to a flat area with uniform gray values in the image and contributes little to the expression of image features. It can be regarded as a non-key object for subsequent processing. On the other hand, pixels with non-zero gradient strength are pixels with changing characteristics. They may contain key information such as image edges and textures. They need to be refined to determine whether to keep or discard them.
[0115] For each selected value to be processed, a fine-grained process must be performed following the steps of "neighborhood pixel selection - intensity comparison - value update" to accurately preserve effective feature pixels. The specific steps are as follows:
[0116] Based on the gradient direction of the pixel to be processed and its opposite direction Centered on the given pixel, multiple neighboring pixels are selected according to a preset neighborhood radius. The key here is "directional selection"—the gradient direction points to the direction of the most significant pixel change, while the opposite direction is the direction from which the change originates. Selecting neighboring pixels in these two directions accurately captures groups of feature pixels strongly correlated with the pixel being processed. The value of the neighborhood radius needs to be adjusted according to the image resolution and feature scale. For example, in high-resolution images, a radius of 2 (i.e., directional pixels within a 5×5 neighborhood) can be selected, while in low-resolution images, a radius of 1 (i.e., directional pixels within a 3×3 neighborhood) can be selected to ensure that the selected neighboring pixels cover the core feature region without introducing too many irrelevant pixels.
[0117] After selecting neighboring pixels, the gradient intensity of the pixel to be processed is... The gradient intensity is compared one by one with the gradient intensity of multiple selected neighboring pixels to select the maximum value. Then, a value update operation is performed: the original first image pixel value corresponding to the pixel to be processed and all its neighboring pixels whose gradient intensity is not the maximum value is set to 0, retaining only the pixel value corresponding to the maximum gradient intensity. The core principle of this operation is "non-maximum suppression"—in the same feature direction of the image, the pixel with the largest gradient intensity is the core expression point of that feature, while the surrounding non-maximum pixels are redundant extensions of the feature. Setting them to 0 can effectively suppress false edges while preserving the core feature, improving the clarity and purity of image features. For example, if the gradient intensity of the pixel to be processed is 5, and the gradient intensities of its directional neighborhood pixels are 3, 6, and 4, then the maximum gradient intensity is 6. The original pixel values corresponding to the pixel to be processed and the neighboring pixels with intensities of 3 and 4 need to be set to 0, retaining only the original value of the neighboring pixels with an intensity of 6.
[0118] Process Summary: The entire process revolves around the core steps of "difference map → gradient map → pixel filtering." It constructs gradient features containing both intensity and direction through the fusion and calculation of difference information. Then, based on directional neighborhood analysis of these gradient features, it intelligently retains or removes pixels from the original image. This process ensures the accurate preservation of core image features while optimizing the image by eliminating redundant pixels, providing high-quality input data for subsequent tasks such as image recognition and object detection.
[0119] In step 103, multiple first green spheres are identified from the multiple second edges by center positioning, and the first diameter of each first green sphere is extracted.
[0120] In some embodiments, identifying multiple first green spheres from the plurality of second edges by center positioning and extracting the first diameter of each first green sphere includes:
[0121] For each second edge, the center position and diameter of the arc are determined by fitting the arc equation to the pixel position;
[0122] Merge the second edges whose center positions are less than the first threshold, and use them as the edges of the same first living sphere;
[0123] For each first green ball, the first diameter is determined based on the arc diameter of the second edge that forms the edge of the first green ball.
[0124] In some implementations, determining the center position and diameter of the arc for each second edge by fitting an arc equation to the pixel position includes:
[0125] Obtain the equation of the circular arc, wherein the undetermined coefficients of the circular arc equation are set to random values, and the circular arc equation is:
[0126]
[0127] In the formula, Center of the arc Axis coordinates Center of the arc Axis coordinates The diameter of the arc;
[0128] Substituting the multiple pixel positions into the residual function constructed based on the circular arc equation, multiple residuals are obtained, wherein the residual function is:
[0129]
[0130] In the formula, For the first One residual, For the first The position of each pixel Axis coordinates For the first The position of each pixel Axis coordinates;
[0131] Based on the multiple residuals, the multiple undetermined coefficients of the circular arc equation are solved iteratively using the Gauss-Newton method to obtain the center position and diameter of the circular arc.
[0132] For example, in industrial vision applications such as raw ball quality inspection, accurately identifying raw ball targets and extracting their diameter parameters is one of the core technical aspects. The method described in this paper, at its core, uses a center-of-circle localization strategy to accurately identify multiple corresponding first raw ball entities from multiple second edges pre-selected in an image, and quantitatively extracts the first diameter of each first raw ball. This method achieves edge aggregation and target locking through the core feature of the center of the circle, effectively solving problems such as potential breaks or incompleteness at the edges of raw balls, and improving the accuracy of target recognition and size measurement.
[0133] In some specific implementations, the complete process of identifying and extracting the diameter of a raw sphere through center positioning mainly includes three closely linked technical steps. Through progressively refined processing, a complete raw sphere target is constructed from discrete edge information, and its size is calculated. Specifically, as follows:
[0134] Parameter fitting of a single-edge circular arc
[0135] For each independent second edge, a method based on pixel location fitting of the arc equation is used to determine its corresponding arc center position and arc diameter. This step is the foundation for subsequent center aggregation. Its core logic is that the raw sphere, as an approximate sphere, appears as a circle or near-circular shape in a 2D image, and its edge is essentially part of an arc. Therefore, fitting the arc equation can accurately capture the geometric features of the edge. Due to potential noise interference in industrial images, the edge of a single raw sphere often does not appear as a complete closed circle, but is segmented into multiple discrete edge segments (i.e., second edges). Therefore, it is necessary to solve for the arc parameters of each segment separately.
[0136] For each first green sphere obtained through edge aggregation, its first diameter is not simply the arc diameter of a single edge segment, but rather determined comprehensively through statistical analysis or weighted calculation based on the arc diameters of all second edges constituting the complete edge of the green sphere. This is because the fitting result of a single edge segment may be affected by factors such as local noise and edge sharpness, resulting in certain errors. Fusing the diameter data of multiple edge segments can effectively offset random errors and improve the reliability of diameter measurement. Common processing methods include taking the average or median of all arc diameters, or performing a weighted average based on the length (number of pixels) of the edge segments—the longer the edge segment, the higher its fitting accuracy is usually, and the greater the weight is accordingly.
[0137] Detailed implementation method of circular arc parameter fitting
[0138] In the above process, the fitting of arc parameters on a single edge is the core technology, and its accuracy directly determines the accuracy of subsequent center aggregation and diameter calculation. In some preferred embodiments, this fitting process is completed through a three-step method of "equation construction - residual calculation - iterative solution," which fully utilizes the efficiency of the Gauss-Newton method in nonlinear least squares problems to achieve accurate solutions for the arc center and diameter. The specific process is as follows:
[0139] Initial construction of the equation of a circular arc
[0140] First, we define the form of the circular arc equation used for fitting. Considering the geometric characteristics of the edge of the raw sphere in the image coordinate system, we adopt the standard circle equation as the basis, and its expression is:
[0141]
[0142] In the formula, Represents the coordinates of the center of the arc in the image coordinate system. for Axis coordinates for (axis coordinates) This represents the diameter corresponding to the arc, and is also an approximation of the actual diameter of the raw ball. Before fitting begins, the three undetermined coefficients in the equation... They need to be assigned random initial values, which do not need to be strictly precise, as long as they are within a reasonable range (e.g., and Within the range of image resolution, Based on the estimated size of the green pellet, this provides a starting point for subsequent iterative solutions.
[0143] Residual calculation based on pixel location
[0144] For the currently processed second edge, extract the coordinate information of all the pixels it contains to obtain multiple pixel position data. ,in Here is the index of the pixel. To measure the degree of agreement between the current arc equation and the actual pixel position, a residual function is constructed based on the above circle equation. Each pixel position is substituted into the residual function to calculate the corresponding residual value. The physical meaning of the residual is "the distance deviation from the pixel to the fitted circular arc", and its functional expression is:
[0145]
[0146] In the formula, For the first The residual corresponding to each pixel, when When the pixel falls exactly on the fitted arc, it means that the pixel point is completely on the fitted arc. The larger the absolute value, the greater the deviation between the pixel and the arc. By calculating the residuals of all pixels, a residual sequence can be formed, which intuitively reflects the degree of matching between the arc equation and the actual edge features under the current undetermined coefficients.
[0147] Iterative solution of Gauss-Newton method
[0148] Fitting the equation of a circular arc is essentially a nonlinear least squares problem, that is, finding an optimal set of undetermined coefficients. This minimizes the sum of squared residuals for all pixels. The Gauss-Newton method is an efficient numerical approach for solving this type of problem. Its core idea is to linearize the nonlinear residual function through Taylor expansion, then construct and solve the normal equations, iteratively updating the undetermined coefficients until the convergence condition is met.
[0149] The specific iterative process is as follows: First, based on the current initial values of the undetermined coefficients, calculate the residual sequence and the partial derivative matrix (Jacobi matrix) of the residual function with respect to each coefficient; then, construct a system of normal equations using the Jacobian matrix and the residual sequence, and solve for the correction amount of the coefficients; add the correction amount to the current coefficients to obtain new values of the undetermined coefficients; repeat the above process, calculating the sum of squared residuals after each iteration. When the decrease in the sum of squared residuals is less than a preset convergence threshold (e.g., 10), the value is determined. -6 The iteration stops when the number of iterations reaches a preset upper limit, and the resulting undetermined coefficients are the optimal solution. That is, the position of the center of the arc corresponding to the second edge. That is, the diameter of the arc.
[0150] This method achieves edge aggregation through center positioning, effectively solving the problem of target recognition difficulties caused by fragmentation of raw ball edges; the application of the Gauss-Newton method ensures the accuracy and efficiency of arc parameter fitting, so that even in the presence of image noise, edge blurring and other interference, it can still stably output accurate center position and diameter data, providing a reliable dimensional basis for subsequent applications such as raw ball quality grading.
[0151] In step 104, the diameters of the plurality of first green bulbs are statistically analyzed to obtain statistical data on the distribution of green bulb diameters.
[0152] In some embodiments, the step of statistically analyzing the diameters of the plurality of first green bulbs to obtain statistical data on the distribution of green bulb diameters includes:
[0153] Calculate the average diameter of the plurality of first green balls;
[0154] The standard deviation of the diameter is determined based on the mean and the diameters of the plurality of first green bulbs.
[0155] For example, in green pellet preparation and subsequent industrial production, the consistency of green pellet diameter is one of the key indicators for measuring green pellet quality, directly affecting roasting efficiency, finished product strength, and the stability of subsequent smelting processes. Therefore, after extracting the diameters of multiple green pellets, it is necessary to conduct systematic statistical analysis on these diameter data to ultimately obtain statistical data on green pellet diameter distribution that accurately reflects the size distribution characteristics of green pellets. This statistical data is not only the core basis for green pellet quality assessment but also provides important data support for adjusting green pellet preparation process parameters (such as raw material ratio, pelletizing time, and pelletizing speed), helping to achieve standardized and refined management of green pellet production.
[0156] Core Implementation Method of Bulb Diameter Distribution Statistics
[0157] In some specific implementations, the process of statistically analyzing multiple first green bulb diameters to obtain green bulb diameter distribution statistics revolves around two dimensions: "central tendency" and "dispersion." The mean diameter is calculated to reflect the central tendency, and the standard deviation of the diameter is determined to reflect the dispersion. The combination of the two can initially construct the core characteristics of the green bulb diameter distribution, laying the foundation for subsequent in-depth analysis.
[0158] Calculation of the average diameter of green bulbs
[0159] The average diameter of green heads is a core indicator reflecting the average size of a batch of green heads. Its calculation logic involves taking the arithmetic mean of all extracted first-round head diameter data to eliminate the random influence of individual size differences, highlighting the central tendency of the batch's head size. The specific calculation process must follow rigorous steps to ensure the accuracy of the results:
[0160] First, define the statistical sample range, that is, confirm that all extracted first bulb diameter data are valid data—outliers caused by edge fitting errors, image noise, etc. need to be removed (such as extreme data with diameters much larger or smaller than normal bulb sizes, which can be identified through 3...). Outlier identification and removal are performed using criteria or box plots. Secondly, the number of valid diameter data points is counted, denoted as n (n must meet statistical significance requirements; typically, the sample size should be no less than 30 to ensure the mean is representative). Finally, the sum of all valid diameter data points is calculated and divided by the sample size n to obtain the mean diameter of the green bulb, which is mathematically expressed as:
[0161]
[0162] In the formula, The average diameter These are the effective diameters of each first green ball. For example, if 50 effective diameter data points are extracted from a batch of green balls, totaling 5000mm, then the average diameter is 100mm, indicating that the average size of the green balls in this batch is 100mm. This allows for a direct comparison of the deviation from the production standard size.
[0163] Determined based on the standard deviation of the diameter from the mean.
[0164] The standard deviation of diameter is an important indicator for measuring the degree to which green bulb diameter data deviates from the mean. Its value directly reflects the uniformity of the batch's green bulb size—a smaller standard deviation indicates a more concentrated diameter distribution and better size consistency; a larger standard deviation indicates greater size variation and poorer uniformity. The standard deviation is calculated based on the obtained mean diameter, and the specific steps are as follows:
[0165] The first step is to calculate the deviation of the diameter of each first green bulb from the mean, that is, the diameter data for each green bulb. and The difference This deviation reflects the direction and degree of deviation of the size of a single green bulb from the average level; the second step is to square each deviation value to obtain... This step eliminates the influence of the sign of the deviation and amplifies the weight of larger deviations; the third step is to calculate the average of the squared values of all deviations, i.e., the variance. Its expression is The fourth step is to perform a square root operation to obtain the standard deviation of the diameter. Its mathematical expression is:
[0166]
[0167] It is important to note that when the sample size is small (n<30), in order to avoid underestimating the population standard deviation, a correction formula is usually used, which replaces the denominator with (n - 1), that is, the sample standard deviation is used instead of the population standard deviation for calculation, in order to improve the reliability of the statistical results.
[0168] Basic statistical data, consisting of the mean and standard deviation, forms the starting point for analyzing the distribution of bulb diameter. Based on this, more diverse statistical indicators and applications can be derived. For example, combining the mean and standard deviation can determine the reasonable range of fluctuation in bulb diameter (usually...). (Covering 99.7% of normal data) is used to quickly determine whether the green pellet size meets production standards; by comparing the mean with the preset target size, the overall deviation of the green pellet size can be quantified, providing a direct basis for adjusting process parameters such as the feed speed and roller inclination of the pelletizing machine; by longitudinally comparing the mean and standard deviation of different batches of green pellets, the stability of the production process can be analyzed, and production fluctuations caused by factors such as changes in raw material properties and equipment wear can be detected in a timely manner.
[0169] Furthermore, in practical industrial applications, these fundamental data can be used to create visual charts such as histograms of green pellet diameter distribution and cumulative distribution curves, making the diameter distribution characteristics more intuitive and enabling production managers to quickly grasp the quality status of green pellets and make accurate production decisions. Therefore, the calculation of the mean and standard deviation is not only a core step in green pellet diameter statistics, but also a crucial bridge connecting green pellet size inspection and production process optimization.
[0170] The present invention discloses a method for determining the diameter of raw balls. First, a first image is acquired, based on raw balls within a ball tray. Then, edges in the first image are extracted using an edge extraction operator, and the extracted first edges are refined to obtain multiple second edges. Next, multiple first raw balls are identified from these second edges using a center-based positioning method, and the first diameter of each first raw ball is extracted. Finally, the diameters of the multiple first raw balls are statistically analyzed to obtain statistical data on the distribution of raw ball diameters. This invention captures an image of the raw balls within the ball tray, extracts the edges of the raw balls using an edge extraction method, and locates the position of the raw balls in the image and determines their diameter based on the edges and center points, avoiding the possibility of duplicate statistics. Finally, statistical data is generated based on the aforementioned raw ball diameters. Therefore, the statistical data of this invention is relatively reliable, enabling online statistical analysis of the distribution of raw ball diameters and reflecting the quality of the raw ball production process from a data perspective.
[0171] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0172] The following are embodiments of the apparatus of the present invention. For details not described in detail, please refer to the corresponding method embodiments described above.
[0173] Figure 2 This is a functional block diagram of the green bulb diameter determining device provided in an embodiment of the present invention, with reference to... Figure 2 The device for determining the diameter of the green bulb includes: an image acquisition module 201, an image edge extraction module 202, a green bulb diameter calculation module 203, and a green bulb diameter statistics module 204, wherein:
[0174] Image acquisition module 201 is used to acquire a first image, wherein the first image is acquired based on the spheres within the sphere disk;
[0175] The image edge extraction module 202 is used to extract the edges in the first image using an edge extraction operator, and to refine the multiple first edges obtained by extraction to obtain multiple second edges;
[0176] The green ball diameter calculation module 203 is used to identify multiple first green balls from the multiple second edges by means of center positioning, and extract the first diameter of each first green ball;
[0177] as well as,
[0178] The green bulb diameter statistics module 204 is used to perform statistics on the diameters of the plurality of first green bulbs to obtain green bulb diameter distribution statistics.
[0179] Figure 3 This is a functional block diagram of the electronic device provided in an embodiment of the present invention. For example... Figure 3 As shown, the electronic device 3 of this embodiment includes a processor 300 and a memory 301, wherein the memory 301 stores a computer program 302 that can run on the processor 300. When the processor 300 executes the computer program 302, it implements the steps of the various green bulb diameter determination methods and embodiments described above, for example... Figure 1 Steps 101 to 104 are shown.
[0180] For example, the computer program 302 may be divided into one or more modules / units, which are stored in the memory 301 and executed by the processor 300 to complete the present invention.
[0181] The electronic device 3 can be a desktop computer, laptop, handheld computer, cloud server, or other computing device. The electronic device 3 may include, but is not limited to, a processor 300 and a memory 301. Those skilled in the art will understand that... Figure 3 This is merely an example of electronic device 3 and does not constitute a limitation on electronic device 3. It may include more or fewer components than shown, or combine certain components, or different components. For example, electronic device 3 may also include input / output devices, network access devices, buses, etc.
[0182] The processor 300 may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0183] The memory 301 can be an internal storage unit of the electronic device 3, such as a hard disk or memory. The memory 301 can also be an external storage device of the electronic device 3, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the electronic device 3. Furthermore, the memory 301 can include both internal and external storage units of the electronic device 3. The memory 301 is used to store the computer program 302 and other programs and data required by the electronic device 3. The memory 301 can also be used to temporarily store data that has been output or will be output.
[0184] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the aforementioned method embodiments, and will not be repeated here.
[0185] In the above embodiments, the descriptions of each embodiment have their own emphasis. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0186] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0187] In the embodiments provided by this invention, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0188] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0189] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0190] If the integrated module / unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above-described embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various methods and apparatus embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.
[0191] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A method for determining the diameter of a green bulb, characterized in that, include: Acquire a first image, wherein the first image is acquired based on spheres within a sphere disk; Edges in the first image are extracted using an edge extraction operator, and multiple first edges are refined to obtain multiple second edges. By using a center-based positioning method, multiple first green spheres are identified from the plurality of second edges, and the first diameter of each first green sphere is extracted, including: For each second edge, the center position and diameter of the arc are determined by fitting the arc equation to the pixel position; Merge the second edges whose center positions are less than the first threshold, and use them as the edges of the same first living sphere; For each first green ball, the first diameter is determined based on the arc diameter of the second edge that forms the edge of the first green ball; The diameters of the multiple first green bulbs are statistically analyzed to obtain statistical data on the distribution of green bulb diameters; Specifically, for each second edge, determining the center position and diameter of the arc by fitting the arc equation to the pixel position includes: Obtain the equation of the circular arc, wherein the undetermined coefficients of the circular arc equation are set to random values, and the circular arc equation is: In the formula, Center of the arc Axis coordinates Center of the arc Axis coordinates The diameter of the arc; Substituting the multiple pixel positions into the residual function constructed based on the circular arc equation, multiple residuals are obtained, wherein the residual function is: In the formula, For the first One residual, For the first The position of each pixel Axis coordinates For the first The position of each pixel Axis coordinates; Based on the multiple residuals, the multiple undetermined coefficients of the circular arc equation are solved iteratively using the Gauss-Newton method to obtain the center position and diameter of the circular arc.
2. The method for determining the diameter of green bulbs according to claim 1, characterized in that, The step of extracting edges from the first image using an edge extraction operator and then refining the extracted first edges to obtain multiple second edges includes: The first image is denoised using Gaussian filtering to obtain a denoised image; The denoised image is processed by horizontal and vertical difference operators respectively to obtain a first difference image and a second difference image; A gradient map expressing the pixel gradient direction and gradient intensity is constructed using the first difference map and the second difference map. Based on the gradient direction and gradient intensity extracted from the gradient map, the retention or rejection setting is performed on each pixel value in the first image; The plurality of second edges are constructed based on the retained pixel values.
3. The method for determining the diameter of green bulbs according to claim 2, characterized in that, The process of processing the denoised image using horizontal and vertical difference operators to obtain a first difference image and a second difference image includes: Both the horizontal and vertical difference operators are rectangular data blocks. For each of the horizontal and vertical difference operators, the following steps are performed: Multiple first data blocks of the same type as the operator are extracted from the denoised image by sliding. For each first data block, the first data block and the data at the same position in the operator are multiplied accordingly, and the sum of the multiple products is used as the first difference value of the first data block; Based on the position of the first data block in the denoised image, multiple first difference values are arranged to obtain a first difference map or a second difference map.
4. The method for determining the diameter of green bulbs according to claim 3, characterized in that, The step of constructing a gradient map expressing the pixel gradient direction and gradient intensity using the first difference map and the second difference map includes: First difference values are extracted from the same location in both the first and second difference maps, and pixel gradient direction and gradient intensity are calculated based on the first formula and the two difference values. The first formula is: In the formula, Coordinates are The gradient intensity of the pixel, The coordinates in the first difference plot are The first difference value of the pixels, The coordinates in the second difference plot are The first difference value of the pixels, Coordinates are The gradient direction of the pixel, It is the arctangent function in the four quadrants; The step of setting the retention or rejection of each pixel value in the first image based on the gradient direction and gradient intensity extracted from the gradient map includes: The non-zero pixel values in the gradient map are used as values to be processed. For each value to be processed, perform the following steps: Find multiple neighboring pixel values from the gradient direction and the opposite direction of the value to be processed using a preset neighborhood radius; Set the non-maximum value among the value to be processed and the multiple adjacent pixel values to 0.
5. The method for determining the diameter of green bulbs according to any one of claims 1-4, characterized in that, The step of statistically analyzing the diameters of the plurality of first green bulbs to obtain statistical data on the distribution of green bulb diameters includes: Calculate the average diameter of the plurality of first green balls; The standard deviation of the diameter is determined based on the mean and the diameters of the plurality of first green bulbs.
6. A device for determining the diameter of green bulbs, characterized in that, For implementing the green bulb diameter determination method as described in any one of claims 1-5, the green bulb diameter determination device comprises: The image acquisition module is used to acquire a first image, wherein the first image is acquired based on the spheres within the sphere disk; The image edge extraction module is used to extract the edges in the first image using an edge extraction operator, and to refine the multiple first edges obtained by extraction to obtain multiple second edges; The green ball diameter calculation module is used to identify multiple first green balls from the multiple second edges by means of center positioning, and to extract the first diameter of each first green ball; as well as, The green bulb diameter statistics module is used to statistically analyze the diameters of the multiple first green bulbs and obtain statistical data on the distribution of green bulb diameters.
7. An electronic device comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1 to 5 above.
8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 5 above.