Graphite electrode surface micro-crack detection method and system based on machine vision

By employing a machine vision-based method for detecting microcracks on the surface of graphite electrodes, and utilizing one-dimensional gradient projection and sliding window averaging algorithms for image distortion calibration, the problem of pixel distortion caused by wear of mechanical transmission components is solved, thereby improving the reliability of detection and the yield rate of the production line.

CN122391075APending Publication Date: 2026-07-14JIALONG NEW MATERIALS CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
JIALONG NEW MATERIALS CO LTD
Filing Date
2026-03-17
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

In the prior art, wear of mechanical transmission components causes nonlinear sliding of graphite electrodes during rotation processing and inspection, resulting in local pixel distortion of the image, which in turn leads to misjudgment of micro-cracks and affects the yield rate of the production line.

Method used

The method for detecting microcracks on the surface of graphite electrodes based on machine vision utilizes a one-dimensional gradient projection algorithm to extract the effective actual pixel spacing. It then combines a sliding window averaging and numerical accumulation algorithm for time-series accumulation calculation, performs grayscale redistribution and interpolation algorithms to construct a zero-distortion surface image, extracts the elongation index of candidate dark connected regions, and generates crack determination results.

Benefits of technology

It achieves adaptive tracking of mechanical wear and slippage, accurately eliminates nonlinear sliding interference in the transmission mechanism, significantly improves the reliability of detection and the yield rate of the production line, and reduces equipment maintenance and static calibration costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122391075A_ABST
    Figure CN122391075A_ABST
Patent Text Reader

Abstract

The present application relates to the field of image processing, especially to a graphite electrode surface micro crack detection method and system based on machine vision. The method comprises the following steps: first, extracting wave peaks based on the original line scan image and calculating the difference to obtain the effective actual pixel spacing; combining the theoretical knife mark spacing, using the sliding window average and numerical accumulation algorithm and the camera stepping parameter to calculate the real physical mapping coordinates; based on the initial gray value and the coordinates, using the interpolation algorithm to redistribute the gray value to construct the zero distortion surface image; finally, extracting the candidate dark connected domain, calculating the ratio of the area to the square of the minor axis width to obtain the morphological elongation index, and generating the crack judgment result to control the rejection of defective products. The present application effectively eliminates the motion distortion interference and improves the reliability of micro crack identification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing, and more particularly to a method and system for detecting microcracks on the surface of graphite electrodes based on machine vision. Background Technology

[0002] In existing technologies, the detection of micro-cracks on the surface of cylindrical graphite electrodes typically employs a line scan camera in conjunction with a pulse trigger signal of fixed frequency for image acquisition. This conventional detection method relies on a fundamental mechanical engineering assumption: that the driving roller maintains an absolutely constant linear velocity with respect to the graphite electrode surface, thereby aiming to proportionally unfold the three-dimensional surface of the cylinder into a two-dimensional planar image.

[0003] However, in real-world heavy-duty industrial production environments, with the long-term wear and tear of the equipment drive rollers and the unavoidable ellipticity machining tolerances of the graphite electrodes themselves, the mechanical contact friction characteristics of the transmission mechanism inevitably undergo irreversible changes. This objectively existing physical wear leads to the electrodes inevitably experiencing nonlinear dynamic micro-slippage during rotational machining and inspection.

[0004] Under these conditions, because the existing vision acquisition system still triggers the camera to capture images at a preset constant frequency, the captured image rows no longer have a uniform correspondence with the actual physical distance traveled on the electrode surface. This mechanical slippage is reflected in the final digital image as nonlinear stretching or compression distortion of pixels in local areas. For micro-crack detection, this distortion can cause locally formed circular micropores left over from normal processing to be stretched into elongated shapes, which may be misjudged as cracks by the algorithm; or it may cause real micro-cracks to be compressed, leading to missed detection. The existing detection scheme lacks dynamic calibration calculation logic for underlying mechanical fluctuations, causing a sharp decline in the reliability of the equipment when dealing with the aging of the transmission mechanism, which seriously affects the yield determination of the production line. Summary of the Invention

[0005] To address the problem in existing technologies where wear of mechanical transmission components causes minute slippage of electrodes, leading to local pixel distortion and misjudgment of cracks in images, this invention provides a machine vision-based method and system for detecting minute cracks on the surface of graphite electrodes.

[0006] In a first aspect, the present invention provides a method for detecting microcracks on the surface of graphite electrodes based on machine vision, employing the following technical solution: A machine vision-based method for detecting microcracks on the surface of graphite electrodes includes the following steps: The original image is acquired using a visual acquisition device. A one-dimensional gradient projection algorithm is used to extract peaks and calculate differences in the original image to obtain the effective actual pixel spacing within each sampling period. Based on the theoretical blade pattern spacing and the effective actual pixel spacing, a time-series accumulation calculation is performed using a sliding window averaging and numerical accumulation algorithm combined with camera stepping parameters to obtain the real physical mapping coordinates of the corresponding row in the original image for each sampling period. Based on the initial grayscale value of the original image and the real physical mapping coordinates, an interpolation algorithm is used to redistribute the grayscale values ​​to obtain the real grayscale values ​​of each pixel in the zero-distortion surface image, so as to construct the zero-distortion surface image. Candidate dark connected components are extracted based on the zero-distortion surface image. The ratio of the pixel area of ​​the candidate dark connected component to the square of the minor axis width is calculated to obtain the elongation index. When the elongation index is greater than a preset threshold, a crack judgment result is generated so that the classification execution mechanism can perform defective product rejection control.

[0007] This invention calculates the effective actual pixel spacing by extracting the peak features in the original image and derives the relative slip ratio accordingly to track the mechanical sliding of the underlying device in real time. The relative slip ratio is combined with a numerical accumulation algorithm to reconstruct the true physical mapping coordinates of each row of the image, and the image distortion is dynamically calibrated from the root of physical kinematics, ensuring the dimensional accuracy of the constructed zero-distortion surface image.

[0008] Preferably, obtaining the effective actual pixel spacing within the sampling period includes: Calculate the difference in the vertical pixel coordinates of adjacent peaks, and determine the effective mask coefficient based on the difference and the theoretical threshold range; Calculate the effective actual pixel spacing:

[0009] In the formula, The index representing the sampling period; Representing the The effective actual pixel spacing for each sampling period; Represents the total number of peaks; Represents peak index; Representing the first The sampling period of the first The first peak and the second Vertical pixel coordinates of each peak; Representing the The sampling period of the first Effective masking factor for each peak; This represents a tiny parameter that prevents zeroing.

[0010] This invention sets an effectiveness mask coefficient by calculating the difference in the longitudinal pixel coordinates of adjacent peaks and determining whether it falls within a theoretical threshold range. This effectively isolates and eliminates false peak interference caused by dust adhesion or localized oil contamination. This operation prevents abnormal features from participating in subsequent kinematic calculations, ensuring the purity of the effective actual pixel spacing used as a velocity measurement benchmark.

[0011] Preferably, before obtaining the true physical mapping coordinates of the corresponding rows in the original image for each sampling period, the method further includes a step of determining the relative slip ratio; the formula for calculating the relative slip ratio is:

[0012] In the formula, Representing the The relative slip ratio for each sampling period; Represents the theoretical spacing between the tool marks; Represents the fixed length of a smooth window; Represents a backtracking index; Representing the The effective actual pixel spacing under each sampling period.

[0013] This invention takes into account the inertia and high-frequency micro-vibrations present in large rotating machinery during operation. Direct use of instantaneous data can easily lead to overcompensation. Therefore, by introducing a sliding window averaging algorithm to accumulate time-series history and calculate the mean, this invention effectively absorbs and smooths these high-frequency computational noises, so that the calculated relative slip ratio conforms to the actual physical motion inertia of the equipment and prevents secondary sawtooth deformation of the image during reconstruction.

[0014] Preferably, the process of obtaining the theoretical tool mark spacing includes: Based on visual acquisition equipment, a reference image of a standard graduated cylinder under no dynamic slip condition is obtained; Edge extraction calculations are performed on the reference image to obtain the average pixel span of each scale line, which is used as the theoretical blade pattern spacing.

[0015] Preferably, the actual physical mapping coordinates satisfy the following relationship:

[0016] In the formula, Representing the The actual physical coordinates of the corresponding row in the original image for each sampling period; Representing the The physical mapping coordinates of each sampling period in the original image corresponding to the row; Represents the camera stepping parameters; Representing the The relative slip ratio for each sampling period.

[0017] This invention introduces a relative slip ratio to dynamically correct the step increment, thereby achieving real-time compensation for coordinate offsets caused by mechanical slippage, and thus providing a physical coordinate reference with absolute geometric accuracy for subsequent image construction.

[0018] Preferably, obtaining the true grayscale value of each pixel in the zero-distortion surface image includes:

[0019] In the formula, Representing the The actual grayscale value of each pixel; Represents the base pixel index; Represents the first in the original image The initial grayscale value of each pixel; Represents the first in the original image The initial grayscale value of each pixel; Representing the Sub-pixel offset corresponding to each pixel; An image composed of the true gray values ​​of all pixels is denoted as a zero-distortion surface image.

[0020] This invention establishes a quantitative correlation for the transformation of continuous mapped coordinates into discrete image indices, thereby achieving precise reverse positioning of non-uniform physical coordinates in a discrete array. This fundamentally eliminates spatial mapping deviations during image reconstruction and ensures the geometric fidelity of microscopic details.

[0021] Preferably, the method for determining the reference pixel index and the sub-pixel offset includes: For each integer row index in the original image, it is multiplied by a preset camera stepping parameter to obtain the target physical coordinates; a search is performed in the real physical mapping coordinates to lock the coordinate interval containing the target physical coordinates, and interpolation calculation is performed using the proportional relationship of the target physical coordinates within the coordinate interval to determine the continuous mapping position corresponding to the integer row index in the original image; The continuous mapping positions are rounded down to establish a reference pixel index; at the same time, the subpixel offset is obtained by subtracting the reference pixel index from the continuous mapping positions.

[0022] Preferably, the elongation index satisfies the following relationship:

[0023] In the formula, The order index representing the connected components of the candidate dark region; Representing the The elongation index of the morphology of each candidate dark region connected component; Representing the The pixel area of ​​each candidate dark region connected region; Representing the The minor axis width of each candidate dark region connected component.

[0024] Preferably, the process of obtaining the preset threshold includes: Extract historical qualified sample images and use connected component extraction processing to obtain the sample morphology elongation index set; The mean and standard deviation of the sample elongation index set are obtained by using a Gaussian distribution statistical algorithm, and the sum of the sample mean and three times the standard deviation is determined as the preset threshold.

[0025] Secondly, the present invention provides a machine vision-based system for detecting microcracks on the surface of graphite electrodes, employing the following technical solution: A machine vision-based system for detecting microcracks on the surface of graphite electrodes includes a processor and a memory. The memory stores computer program instructions, which, when executed by the processor, implement the aforementioned machine vision-based method for detecting microcracks on the surface of graphite electrodes.

[0026] By adopting the above technical solution, the above-mentioned machine vision-based method for detecting microcracks on the surface of graphite electrodes is generated into a computer program and stored in a memory so that it can be loaded and executed by a processor. This allows for the creation of a terminal device based on the memory and processor, making it convenient to use.

[0027] The present invention has the following technical effects: This invention utilizes the effective actual pixel spacing extracted from the original image as a natural measurement benchmark. It calculates the relative slip ratio in real time and corrects the step increment accordingly to obtain the true physical mapping coordinates. This mechanism accurately eliminates the interference of nonlinear slippage of the transmission mechanism on the imaging size without adding additional hardware sensors, achieving adaptive tracking against mechanical wear and slippage. This not only significantly extends the effective service life of existing transmission equipment but also significantly reduces equipment maintenance and static calibration costs on the production site.

[0028] Furthermore, this invention combines effective masking coefficients to remove dust interference, ensuring the purity of feature extraction; in the spatial reconstruction stage, a sliding window is used to filter out high-frequency mechanical jitter, and grayscale redistribution based on sub-pixel offset is used to construct a zero-distortion surface image, solving the problem of micro-morphological tearing caused by discretization error. Attached Figure Description

[0029] Figure 1This is a flowchart of the method in the machine vision-based method for detecting microcracks on the surface of graphite electrodes provided in the embodiments of the present invention; Figure 2 The original image provided for the embodiments of the present invention; Figure 3 The zero-distortion surface image provided for an embodiment of the present invention. Detailed Implementation

[0030] This invention discloses a machine vision-based method for detecting microcracks on the surface of graphite electrodes, referring to... Figure 1 This includes steps S1-S4: S1: Based on the visual acquisition device, the original image is acquired, and the peak is extracted and the difference is calculated using the one-dimensional gradient projection algorithm to obtain the effective actual pixel spacing in each sampling period.

[0031] It's important to note that in a real graphite electrode turning environment, the surface will inevitably retain periodic physical tool marks, which would ideally serve as a natural velocimetric grating. However, immediately after a cut, the electrode surface is often instantly covered with a high concentration of graphite dust or splashed cutting oil. If we rely solely on conventional grayscale extreme values ​​to extract tool mark peaks, the system cannot distinguish between genuine metal cutting marks and pseudo-noise formed by dust reflection. This direct extraction results in drastic abrupt changes and distortions in the calculated physical spacing. Therefore, the core purpose of this step is to remove contaminants at the source, providing a clean data foundation for subsequent micro-slip velocimetry.

[0032] Preferably, as an example, the original image is acquired based on a visual acquisition device, and a one-dimensional gradient projection algorithm is used to extract peaks and calculate differences in the original image to obtain the effective actual pixel spacing within each sampling period, including: I. Acquiring raw images In the driving vision acquisition device, the photoelectric encoder rotates synchronously with the transmission roller and sends back a fixed-distance hardware trigger pulse to the control bus, while defining a sampling period on the underlying hardware. In response to the pulse, the CMOS photosensitive array in the vision acquisition device performs fixed-frequency line-by-line exposure on the rotating graphite electrode surface under test, thereby generating the original image within the sampling period. II. Determining the Effectiveness of the Masking Coefficient First, the original image is scanned and stitched along the vertical direction to obtain a one-dimensional grayscale curve. Then, the peak detection operator is used to search for local maximum points on the one-dimensional grayscale curve as peaks, and the coordinates of the peaks in the one-dimensional grayscale curve are obtained as vertical pixel coordinates.

[0033] Next, the vertical pixel coordinate difference between each peak and the previous peak is calculated.

[0034] Subsequently, each vertical pixel coordinate difference is compared with a preset theoretical threshold range in the memory in real time. If the vertical pixel coordinate difference is within the theoretical threshold range, the current feature is determined to be a real knife mark, and the effective masking coefficient of the peak is set to 1. If the vertical pixel coordinate difference deviates from the theoretical threshold range, the current feature is determined to be dust interference, and the effective masking coefficient of the peak is set to 0.

[0035] Third, calculate the effective actual pixel spacing based on the effective masking coefficient:

[0036] In the formula, The sequence index representing the sampling period is derived from the encoder's hardware pulse count and represents the k-th physical scan action that occurs on the time axis. Representing the The effective actual pixel spacing for each sampling period; Represents the total number of peaks; Represents peak index; Representing the first The sampling period of the first The first peak and the second The vertical pixel coordinates of each peak; Representing the The sampling period of the first The effective masking coefficient of each peak represents the optical repulsion weight forcibly applied to non-metallic cutting features such as local dust and oil stains. When it is 0, it indicates dirt isolation, and when it is 1, it indicates feature acceptance. Represents a zero-prevention parameter, for example, Take 0.01.

[0037] Understandably, when a localized area of ​​the electrode surface is completely obscured by a dense dust cloud, a high-brightness linear light source illuminating these dust particles will induce extremely chaotic and strong diffuse reflection. This optical perturbation directly causes a nonlinear abrupt change in the local photon energy received by the camera's CMOS sensor array, manifesting as numerous dense grayscale pseudo-peaks in the digital image. At this point, the difference in vertical pixel coordinates between these pseudo-peaks... This will result in a much smaller than the normal theoretical tool mark span determined by the machine tool feed rate, thus leading to a lower mask factor. Because the vertical pixel coordinate difference deviates from the theoretical threshold range, it is forcibly set to 0. In this way, this abnormal vertical pixel coordinate difference is completely zeroed in the numerator due to the product effect, and is also stripped of its counting weight in the denominator, thus ensuring the effective actual pixel spacing in the final output. It depends solely on the actual machining characteristics.

[0038] It should be noted that the method for obtaining the theoretical threshold range includes: Obtain the theoretical feed rate setting value of the graphite electrode turning machine tool and the radial runout tolerance of the machine tool spindle; calculate the difference and sum of the theoretical feed rate setting value and the radial runout tolerance, and multiply the difference and sum by the optical magnification of the camera to obtain the theoretical minimum and maximum theoretical image plane displacement; divide the theoretical minimum and maximum theoretical image plane displacement by the physical pixel size of the camera to obtain the theoretical minimum pixel pitch and maximum pixel pitch, and construct the theoretical threshold range.

[0039] S2: Based on the theoretical blade pattern spacing and the effective actual pixel spacing, a time-series accumulation calculation is performed using a sliding window averaging and numerical accumulation algorithm combined with camera stepping parameters to obtain the real physical mapping coordinates of the corresponding row in the original image for each sampling period.

[0040] It should be noted that after obtaining the effective actual pixel spacing within a single sampling period, the system needs to solve the core nonlinear spatial reconstruction problem, namely, how to accurately restore the discrete pixel domain features to the continuous physical spatial domain. During online scanning imaging, the acquisition of image rows relies on the assumption of equidistant sampling of rotational displacement. However, due to radial wear from long-term service of the drive rollers, dynamic relative slippage inevitably occurs between the transmission mechanism and the measured surface. This physical-level motion misalignment causes the loss of linear correspondence between the camera's hardware trigger pulse and the actual linear displacement of the graphite electrode surface. If preset step parameters are directly used for coordinate marking, it will cause irregular stretching or compression of the image in the axial dimension, destroying the geometric fidelity of the defect morphology. Therefore, the core objective of this step is to: quantify the deviation between the actual pixel features and the baseline theoretical features, calculate the relative slip ratio at the current moment, and accordingly perform dynamic scaling compensation on the camera step parameters, thereby restoring the true physical mapping coordinates of each image row on the electrode surface through kinematic integration.

[0041] Preferably, as an example, based on the theoretical blade pattern spacing and the effective actual pixel spacing, a time-series accumulation calculation is performed using a sliding window averaging and numerical accumulation algorithm combined with camera step parameters to obtain the true physical mapping coordinates of the corresponding row in the original image for each sampling period, including:

[0042]

[0043] In the formula, Representing the The relative slip ratio for each sampling period; Represents the theoretical spacing between the tool marks; Represents the fixed length of a smooth window; Represents a backtracking index; Representing the The effective actual pixel spacing under each sampling period. Representing the The actual physical coordinates of the corresponding row in the original image for each sampling period; Representing the The physical mapping coordinates of each sampling period in the original image corresponding to the row; This represents the camera step parameter; for example, the camera step parameter is 1 pixel.

[0044] Understandably, when the drive shaft reaches the wear phase, the roller momentarily idles on the electrode surface. At this time, the encoder continues to trigger pulses as usual, but the actual linear displacement of the electrode surface experiences a brief reduction, thus affecting the effective pixel pitch. Significant numerical contraction occurs. This numerical contraction leads to a decrease in the relative slip ratio. Synchronous descent. Subsequently, the effective increment in another relation... The coordinates will also adaptively shrink accordingly, for example, dropping to 0.7. This means that although the visual acquisition device still takes a picture of a line, the system only gives it a physical weight of 0.7 steps when reconstructing the coordinates. This adaptive shrinking of the coordinate axis based on underlying physical feedback ensures that even at the moment slippage occurs, each line of image data can still accurately return to its true physical coordinate point, fundamentally eliminating local stretching and size distortion of the image.

[0045] It should be noted that the method for obtaining the theoretical tool mark spacing includes: placing a cylinder with a standard spacing scale on a pair of drive rollers in the mechanical transmission module of the detection equipment, and adjusting the pressure to make the rollers and the surface of the cylinder in a tight fit without relative slippage; starting the drive motor, using a low-speed jogging mode to drive the drive rollers and the standard scale cylinder to rotate at an extremely low speed, and simultaneously triggering the vision acquisition device to acquire a reference image under the condition of no dynamic slip.

[0046] Subsequently, the reference image is scanned and merged along the rotation axis to obtain a one-dimensional grayscale distribution sequence; a first-order difference calculation is performed on the one-dimensional grayscale distribution sequence to obtain the grayscale gradient curve, and local peak points exceeding a preset response threshold in the grayscale gradient curve are searched and located as edge pixel coordinates of each scale line; the difference between two adjacent edge pixel coordinates is calculated to obtain multiple original pixel spans; finally, the arithmetic mean of the multiple original pixel spans is calculated to obtain the average pixel span of each scale line, which is used as the theoretical blade pattern spacing.

[0047] It should also be noted that the method for obtaining the fixed length of the smooth window includes: The total number of pulses from the single-turn encoder of the drive motor and the frequency division coefficient of the line frequency trigger of the line scan camera are obtained. The theoretical number of trigger image rows corresponding to one complete rotation of the drive motor is calculated by dividing the total number of pulses by the frequency division coefficient. Considering that mechanical defects such as bearing eccentricity or out-of-roundness of the drive roller exhibit a physical characteristic with a cycle of one rotation, the theoretical number of trigger image rows is directly determined as the fixed length of the smoothing window to achieve the averaging and cancellation of mechanical vibration deviations within a complete physical cycle.

[0048] S3: Based on the initial grayscale value of the original image and the real physical mapping coordinates, grayscale is redistributed using an interpolation algorithm to obtain the real grayscale value of each pixel in the zero-distortion surface image, so as to construct the zero-distortion surface image.

[0049] It should be noted that the actual physical mapping coordinates calculated through the aforementioned steps are spatially distributed as non-uniformly spaced continuous floating-point numbers, representing the precise physical position of the electrode surface at discrete sampling time points. However, the storage medium for digital images is a discrete image array, and its row indices must be consecutive integers. Directly rounding the continuous coordinates would cause the optical energy of minute features to undergo positional jumps during the discretization mapping, leading to geometric tearing of feature edges. Therefore, the core objective of this step is to assign weights to adjacent integer index positions by analyzing the offset of the discretized positions, thereby accurately compensating the non-uniformly distributed optical features into a standard discrete image array.

[0050] Preferably, as an example, based on the initial grayscale values ​​of the original image and the true physical mapping coordinates, an interpolation algorithm is used to redistribute grayscale values ​​to obtain the true grayscale values ​​of each pixel in the zero-distortion surface image, thereby constructing the zero-distortion surface image, including: First, for each integer row index in the original image, it is multiplied by a preset camera stepping parameter to obtain the target physical coordinates. Then, a search is performed in the real physical mapping coordinates to lock the coordinate interval containing the target physical coordinates. Finally, interpolation calculation is performed using the proportional relationship of the target physical coordinates within the coordinate interval to determine the continuous mapping position corresponding to the integer row index in the original image.

[0051] Next, the continuous mapping positions are rounded down to establish the reference pixel index; at the same time, the subpixel offset is obtained by subtracting the reference pixel index from the continuous mapping positions.

[0052] Finally, the true grayscale value of each pixel is calculated based on the sub-pixel offset:

[0053] In the formula, Representing the The actual grayscale value of each pixel; Represents the base pixel index; Represents the first in the original image The initial grayscale value of each pixel; Represents the first in the original image The initial grayscale value of each pixel; Representing the Subpixel offset corresponding to each pixel.

[0054] An image composed of the true gray values ​​of all pixels is denoted as a zero-distortion surface image.

[0055] Understandably, when processing an integer row index of a zero-distortion surface image, the aforementioned reverse location addressing logic is used to inversely calculate the corresponding continuous mapping position of the target row in the original image. This position is precisely a numerical value with a decimal, such as 15.8. In this case, the system calculates and extracts a sub-pixel offset of 0.8. Since it is closer to the next pixel, it assigns a weight of 0.8 to the initial grayscale value of the next pixel and a weight of 0.2 to the previous pixel, thus making the calculated true grayscale value closer to the grayscale value of the next pixel. This sub-pixel offset-based recombination method ensures that the edge contrast and geometry of the micro-cracks do not become fragmented or jagged due to spatial discretization, preventing the risk of tiny features being ruthlessly torn apart at the underlying algorithm level.

[0056] S4: Based on the zero-distortion surface image, extract candidate dark connected regions, calculate the ratio of the pixel area of ​​the candidate dark connected region to the square of the minor axis width to obtain the elongation index, and generate a crack judgment result when the elongation index is greater than a preset threshold so that the classification execution mechanism can perform defective product rejection control.

[0057] It should be noted that after the aforementioned steps to remove distortion, the image will clearly show the true microstructure of the graphite electrode surface. However, the graphite electrode surface still has venting pores, which will interfere with the identification of stress cracks. Therefore, the core purpose of this step is to eliminate interference such as venting pores and accurately identify stress cracks.

[0058] Preferably, as an example, candidate dark connected components are extracted based on the zero-distortion surface image, and the ratio of the pixel area of ​​the candidate dark connected component to the square of the minor axis width is calculated to obtain a morphological elongation index. When the morphological elongation index is greater than a preset threshold, a crack determination result is generated so that the classification execution mechanism can perform defective product rejection control, including: The zero-distortion surface image is binarized and connected component extraction is performed using a global threshold segmentation algorithm, and the actual pixel area and minor axis width of each candidate dark connected component are obtained. Next, the elongation index is calculated based on the actual pixel area and minor axis width; Finally, the elongation index of the shape is compared with a preset threshold. If it is greater than the preset threshold, a level trigger signal is sent to the external bus to instruct the pneumatic sorting actuator to perform the defective product rejection action.

[0059] The formula for calculating the elongation index is as follows:

[0060] In the formula, The order index representing the connected components of the candidate dark region; Representing the The elongation index of the morphology of each candidate dark region connected component; Representing the The pixel area of ​​each candidate dark region connected region; Representing the The minor axis width of each candidate dark region connected component.

[0061] It should be noted that the method for obtaining the preset threshold includes: extracting historical qualified sample images, calculating the elongation index of each connected component of the historical qualified sample images, using a Gaussian distribution statistical algorithm to calculate the sample mean and standard deviation of the set of elongation indices obtained from all historical qualified sample images, and determining the sum of the sample mean and three times the standard deviation as the preset threshold.

[0062] It is understandable that the minor axis width of a normal cavity is relatively large, while the minor axis width of a stress crack is relatively small. If the connected domain is a stress crack, A smaller value for the elongation index results in a larger calculated elongation index; conversely, a normal circular hole has a smaller calculated elongation index. The elongation index value can be used to distinguish between circular voids and stress cracks.

[0063] To demonstrate the effectiveness of the solution, relevant experiments were conducted. Below are the images obtained from the experiments: Figure 2 The image is the original image. It can be seen from the image that in real industrial production, the physical wear of the transmission mechanism will inevitably lead to non-linear slippage, which will cause the collected local pixels to be stretched and distorted, resulting in some normal round holes being stretched into a narrow shape.

[0064] Figure 3The image shows a zero-distortion surface. It can be seen that the longitudinal local stretching marks have been corrected, and the elongated circular holes have also returned to their normal state, thus eliminating the interference of the circular holes on the detection of micro-cracks.

[0065] This invention also discloses a machine vision-based microcrack detection system for graphite electrode surfaces, including a processor and a memory. The memory stores computer program instructions, which, when executed by the processor, implement the machine vision-based microcrack detection method for graphite electrode surfaces according to this invention.

[0066] The system also includes other components well known to those skilled in the art, such as communication buses and communication interfaces, the settings and functions of which are known in the art and will not be described in detail here.

[0067] In this invention, the aforementioned memory can be any tangible medium containing or storing a program that can be used or combined with an instruction execution system, apparatus, or device. For example, a computer-readable storage medium can be any suitable magnetic or magneto-optical storage medium, such as resistive random access memory (DRAM), dynamic random access memory (DRAM), static random access memory (SRAM), enhanced dynamic random access memory (DRAM), high-bandwidth memory, hybrid memory cube, etc., or any other medium that can be used to store desired information and can be accessed by an application, module, or both. Any such computer storage medium can be part of a device or accessible to or connected to a device.

Claims

1. A machine vision-based method for detecting microcracks on the surface of graphite electrodes, characterized in that, Including the following steps: The original image is acquired using a visual acquisition device. A one-dimensional gradient projection algorithm is used to extract peaks and calculate differences in the original image to obtain the effective actual pixel spacing within each sampling period. Based on the theoretical blade pattern spacing and the effective actual pixel spacing, a time-series accumulation calculation is performed using a sliding window averaging and numerical accumulation algorithm combined with camera stepping parameters to obtain the real physical mapping coordinates of the corresponding row in the original image for each sampling period. Based on the initial grayscale value of the original image and the real physical mapping coordinates, an interpolation algorithm is used to redistribute the grayscale values ​​to obtain the real grayscale values ​​of each pixel in the zero-distortion surface image, so as to construct the zero-distortion surface image. Candidate dark connected components are extracted based on the zero-distortion surface image. The ratio of the pixel area of ​​the candidate dark connected component to the square of the minor axis width is calculated to obtain the elongation index. When the elongation index is greater than a preset threshold, a crack judgment result is generated so that the classification execution mechanism can perform defective product rejection control.

2. The method for detecting microcracks on the surface of graphite electrodes based on machine vision according to claim 1, characterized in that, The effective actual pixel spacing within the sampling period includes: Calculate the difference in the vertical pixel coordinates of adjacent peaks, and determine the effective mask coefficient based on the difference and the theoretical threshold range; Calculate the effective actual pixel spacing: In the formula, The index representing the sampling period; Representing the The effective actual pixel spacing for each sampling period; Represents the total number of peaks; Represents peak index; Representing the first The sampling period of the first The first peak and the second Vertical pixel coordinates of each peak; Representing the The sampling period of the first Effective masking factor for each peak; This represents a tiny parameter that prevents zeroing.

3. The method for detecting microcracks on the surface of graphite electrodes based on machine vision according to claim 1, characterized in that, Before obtaining the true physical mapping coordinates of the corresponding rows in the original image for each sampling period, the method further includes a step of determining the relative slip ratio; the formula for calculating the relative slip ratio is: In the formula, Representing the The relative slip ratio for each sampling period; Represents the theoretical spacing between the tool marks; Represents the fixed length of a smooth window; Represents a backtracking index; Representing the The effective actual pixel spacing under each sampling period.

4. The method for detecting microcracks on the surface of graphite electrodes based on machine vision according to claim 3, characterized in that, The process of obtaining the theoretical tool mark spacing includes: Based on visual acquisition equipment, a reference image of a standard graduated cylinder under no dynamic slip condition is obtained; Edge extraction calculations are performed on the reference image to obtain the average pixel span of each scale line, which is used as the theoretical blade pattern spacing.

5. The method for detecting microcracks on the surface of graphite electrodes based on machine vision according to claim 1, characterized in that, The actual physical mapping coordinates satisfy the following relationship: In the formula, Representing the The actual physical coordinates of the corresponding row in the original image for each sampling period; Representing the The physical mapping coordinates of each sampling period in the original image corresponding to the row; Represents the camera stepping parameters; Representing the The relative slip ratio for each sampling period.

6. The method for detecting microcracks on the surface of graphite electrodes based on machine vision according to claim 1, characterized in that, The process of obtaining the true grayscale values ​​of each pixel in the zero-distortion surface image includes: In the formula, Representing the The actual grayscale value of each pixel; Represents the base pixel index; Represents the first in the original image The initial grayscale value of each pixel; Represents the first in the original image The initial grayscale value of each pixel; Representing the Sub-pixel offset corresponding to each pixel; An image composed of the true gray values ​​of all pixels is denoted as a zero-distortion surface image.

7. The method for detecting microcracks on the surface of graphite electrodes based on machine vision according to claim 6, characterized in that, The method for determining the reference pixel index and the sub-pixel offset includes: For each integer row index in the original image, it is multiplied by a preset camera stepping parameter to obtain the target physical coordinates; a search is performed in the real physical mapping coordinates to lock the coordinate interval containing the target physical coordinates, and interpolation calculation is performed using the proportional relationship of the target physical coordinates within the coordinate interval to determine the continuous mapping position corresponding to the integer row index in the original image; The continuous mapping positions are rounded down to establish a reference pixel index; at the same time, the subpixel offset is obtained by subtracting the reference pixel index from the continuous mapping positions.

8. The method for detecting microcracks on the surface of graphite electrodes based on machine vision according to claim 1, characterized in that, The elongation index of the morphology satisfies the following relationship: In the formula, The order index representing the connected components of the candidate dark region; Representing the The elongation index of the morphology of each candidate dark region connected component; Representing the The pixel area of ​​each candidate dark region connected region; Representing the The minor axis width of each candidate dark region connected component.

9. The method for detecting microcracks on the surface of graphite electrodes based on machine vision according to claim 8, characterized in that, The process of obtaining the preset threshold includes: Extract historical qualified sample images and use connected component extraction processing to obtain the sample morphology elongation index set; The mean and standard deviation of the sample elongation index set are obtained by using a Gaussian distribution statistical algorithm, and the sum of the sample mean and three times the standard deviation is determined as the preset threshold.

10. A machine vision-based system for detecting microcracks on the surface of graphite electrodes, characterized in that, include: A processor and a memory, the memory storing computer program instructions that, when executed by the processor, implement the machine vision-based method for detecting microcracks on the surface of a graphite electrode according to any one of claims 1-9.