CCD (Charge Coupled Device) scanning imaging detection method and system for surface defects of continuous casting billet
Through multi-light source illumination, image enhancement, optical flow method correction and convolutional neural network recognition methods, the defects of traditional CCD scanning imaging methods in complex lighting and high-temperature dynamic environments are solved, and the high accuracy of surface defect detection of casting billets is achieved. robustness.
Patent Information
- Application Number
- CN202411456493.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-18
- Publication Date
- 2025-02-18
AI Technical Summary
Traditional CCD scanning imaging methods have poor image quality under complex lighting conditions, making it difficult to accurately identify small defects, and the high temperature and dynamic characteristics of the surface of the casting billet lead to image blurring and data loss, and the system lacks the ability to classify different types of defects.
Multi-light source illumination combined with light sources of different bands and weighted synthesis technology to perform image acquisition and denoising; use adaptive Gaussian filtering and image enhancement algorithm to improve signal-to-noise ratio; correct image blur caused by high temperature and dynamic changes through optical flow method ; Convolutional neural network is used to identify surface defects on the enhanced image, and calculate the size and position of the defects based on subpixel accuracy.
It significantly improves the accuracy and robustness of surface defect detection of casting billets, can accurately identify and classify surface defects in complex lighting and high-temperature dynamic environments, and improves the accuracy, efficiency and stability of detection.
Smart Images

Figure CN119477810A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of casting detection technology, and in particular to a CCD scanning imaging detection method, system, electronic equipment and non-transient computer-readable storage medium for continuous casting surface defects. Background Art
[0002] In the continuous casting process, the detection of surface defects of the ingot is crucial to improving product quality. At present, the commonly used surface defect detection methods mainly include manual detection and traditional machine vision detection. Manual detection relies on the operator's experience, is time-consuming and prone to human errors; while traditional machine vision detection is usually based on a two-dimensional CCD (charge-coupled device) camera, which captures the surface image of the ingot, and then processes and analyzes the image to identify surface defects. With the advancement of technology, some systems have introduced image enhancement and intelligent algorithms to improve the accuracy of defect recognition.
[0003] However, the traditional CCD scanning imaging method has poor image quality under complex lighting conditions, which may lead to inaccurate identification of small defects. Secondly, due to the high temperature and dynamic characteristics of the billet surface, image blur or data loss is prone to occur during the imaging process. In addition, the system often lacks the ability to classify different types of defects, and it is difficult to distinguish between cracks, pits, oxide scale and other defects, which affects the reliability and comprehensiveness of the detection results. Summary of the invention
[0004] In view of the technical problems existing in the prior art, the present invention provides a CCD scanning imaging detection method, system, electronic device and non-transitory computer-readable storage medium for detecting surface defects of continuous casting billets, which can improve the detection accuracy and robustness of surface defects of casting billets.
[0005] The technical solution of the present invention to solve the above technical problems is as follows:
[0006] The present invention provides a CCD scanning imaging detection method for continuous casting billet surface defects, the method comprising:
[0007] The surface of the ingot is illuminated by using multiple light sources, and an image of the surface of the ingot is collected by using a high-resolution CCD camera;
[0008] De-noising the collected image, using adaptive Gaussian filtering and image enhancement algorithm to improve the signal-to-noise ratio of the image, to obtain a first enhanced image;
[0009] Using an optical flow method to correct image blur in the first enhanced image caused by high temperature and dynamic changes on the surface of the ingot, and calculating a motion vector of each pixel in the first enhanced image to obtain a second enhanced image;
[0010] Performing surface defect recognition on the enhanced second enhanced image by using a convolutional neural network to determine surface defects on the surface of the ingot;
[0011] Based on sub-pixel precision calculations, the size and location of each of the surface defects are determined.
[0012] Optionally, the image of the surface of the casting billet is obtained by:
[0013] Determine a plurality of light sources of different wavelength bands from the plurality of light sources;
[0014] Determining the brightness value of a pixel point of an image of the surface of the casting billet according to the illumination operation of the plurality of light sources on the surface of the casting billet;
[0015] An image of the surface of the casting billet is obtained according to the brightness values of the pixel points.
[0016] Optionally, determining the brightness value of each pixel point of the image of the surface of the casting billet according to the illumination operation of the plurality of light sources on the surface of the casting billet comprises:
[0017] Obtain the brightness value of the pixel under the light source in each band;
[0018] Obtaining a weighting coefficient of the light source in each wavelength band;
[0019] The brightness value of each pixel point of the image on the surface of the casting billet is determined according to the brightness value of the pixel point under the light source of each band and the weighting coefficient of the light source of each band.
[0020] Optionally, the adopting of an adaptive Gaussian filter and an image enhancement algorithm to improve the signal-to-noise ratio of the image to obtain a first enhanced image includes:
[0021] Acquiring an adjustment parameter and a Laplace operator for adjusting the brightness value of the image;
[0022] Adjusting the brightness value of the image according to the adjustment parameter and the Laplace operator to obtain the brightness value of the pixel point of the first enhanced image;
[0023] The first enhanced image is determined according to brightness values of pixels of the first enhanced image.
[0024] Optionally, adjusting the brightness value of the image according to the adjustment parameter and the Laplace operator to obtain the brightness value of the pixel point of the first enhanced image includes:
[0025] For each pixel point, calculating a first product value of the adjustment parameter and the Laplace operator;
[0026] Calculate a first sum value of a first constant and the first product value;
[0027] The brightness value of the pixel point of the first enhanced image is determined according to the brightness value of the image and the first sum value.
[0028] Optionally, calculating the motion vector of each pixel in the first enhanced image includes:
[0029] Obtaining the horizontal displacement and vertical displacement of each pixel point;
[0030] Obtaining the rate of change of the brightness value of each pixel in the horizontal direction and the rate of change in the vertical direction;
[0031] According to the horizontal displacement and vertical displacement of each pixel point, the horizontal change rate and vertical change rate of the brightness value of each pixel point, the brightness change rate of the brightness value of each pixel point in a preset time is determined as the motion vector of each pixel point.
[0032] Optionally, the motion vector of each pixel in the first enhanced image is expressed as:
[0033]
[0034] Among them, v(x, y) is the motion vector of each pixel point (x, y) in the first enhanced image, and u and v are the displacement of each pixel point in the horizontal direction and the vertical direction respectively.
[0035] Optionally, the method further includes:
[0036] Determine the size distribution of the defect area corresponding to each pixel point according to the size and position of each surface defect;
[0037] Obtaining the weight of each pixel;
[0038] The average size of the surface defects is determined according to the size distribution of the defect areas corresponding to the pixels and the weight of each pixel.
[0039] Optionally, the average size of the surface defects is expressed as:
[0040]
[0041] Among them, d defect is the average size of the surface defect, ω(x,y) is the weight of the pixel (x,y), and D(x,y) is the size distribution of the defect area corresponding to the pixel (x,y)
[0042] The present invention also provides a CCD scanning imaging detection system for continuous casting billet surface defects, the system comprising:
[0043] In addition, to achieve the above-mentioned purpose, the present invention also proposes an electronic device, comprising: a memory for storing computer software programs; a processor for reading and executing the computer software programs, thereby realizing a CCD scanning imaging detection method for surface defects of continuous casting billets as described above.
[0044] In addition, to achieve the above-mentioned purpose, the present invention also proposes a non-transitory computer-readable storage medium, in which a computer software program is stored. When the computer software program is executed by a processor, a CCD scanning imaging detection method for surface defects of continuous casting billets as described above is implemented.
[0045] The beneficial effects of the present invention are:
[0046] (1) The present invention adopts multi-light source illumination, combines light sources of different wavelengths and uses weighted synthesis technology, which can effectively reduce the impact of complex lighting conditions on CCD image acquisition. The multi-light source is used to enhance image details and effectively maintain image quality when processing high-brightness or low-brightness areas, ensuring that surface defects can be clearly captured even in an environment with uneven lighting.
[0047] (2) The present invention uses adaptive Gaussian filtering and image enhancement algorithms to denoise the captured images, which can fully consider the balance between noise and edge details in the image, and can not only remove noise, but also retain or enhance the fine defect features in the image. This enables the system to still identify tiny surface cracks, pits and other defects in a noisy industrial production environment, thereby improving the accuracy of detection.
[0048] (3) The present invention uses the optical flow method to correct the image blur problem caused by the high temperature and dynamic characteristics of the ingot surface. By calculating the motion vector of each pixel point, determining the displacement in the horizontal and vertical directions, eliminating the blur caused by the movement of the object, the movement of the pixel can be accurately described, and efficient and accurate dynamic blur repair can be achieved, ensuring the clarity of the detected image and greatly improving the defect detection capability of the system in a high-speed production line environment.
[0049] In summary, the present invention solves the main technical problems encountered in the existing continuous casting billet surface defect detection by comprehensively using multi-light source illumination, image enhancement, dynamic blur correction and intelligent recognition algorithm, can significantly improve the detection accuracy, efficiency and stability, and has broad industrial application prospects. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 A flow chart of a CCD scanning imaging detection method for continuous casting slab surface defects provided by the present invention;
[0051] Figure 2 A schematic diagram of the structure of a CCD scanning imaging detection system for continuous casting surface defects provided by the present invention;
[0052] Figure 3 A schematic diagram of the hardware structure of a possible electronic device provided by the present invention;
[0053] Figure 4 A schematic diagram of the hardware structure of a possible computer-readable storage medium provided by the present invention. DETAILED DESCRIPTION
[0054] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0055] In the description of the present invention, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0056] In the description of the present invention, the term "for example" is used to mean "used as an example, illustration or explanation". Any embodiment described as "for example" in the present invention is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is given to enable any technician in the field to implement and use the present invention. In the following description, details are listed for the purpose of explanation. It should be understood that a person of ordinary skill in the art can recognize that the present invention can be implemented without using these specific details. In other examples, well-known structures and processes will not be elaborated in detail to avoid obscuring the description of the present invention with unnecessary details. Therefore, the present invention is not intended to be limited to the embodiments shown, but is consistent with the widest scope consistent with the principles and features disclosed in the present invention.
[0057] See also Figure 1 , provides a flow chart of a CCD scanning imaging detection method for continuous casting surface defects of the present invention, comprising the following steps:
[0058] Step 201: illuminate the surface of the ingot using multiple light sources, and capture an image of the surface of the ingot using a high-resolution CCD camera.
[0059] In some embodiments, the image of the surface of the ingot is obtained by:
[0060] Determine a plurality of light sources of different wavelength bands from the plurality of light sources;
[0061] Determining the brightness value of a pixel point of an image of the surface of the casting billet according to the illumination operation of the plurality of light sources on the surface of the casting billet;
[0062] An image of the surface of the casting billet is obtained according to the brightness values of the pixel points.
[0063] In some embodiments, the brightness value of each pixel point of the image of the surface of the casting billet is determined by:
[0064] Obtain the brightness value of the pixel under the light source in each band;
[0065] Obtaining a weighting coefficient of the light source in each wavelength band;
[0066] The brightness value of each pixel point of the image on the surface of the casting billet is determined according to the brightness value of the pixel point under the light source of each band and the weighting coefficient of the light source of each band.
[0067] Specifically, the brightness value of each pixel of the image of the casting surface can be expressed as:
[0068]
[0069] Among them, I(x,y) is the brightness value of the pixel (x,y) of the image, L i (x, y) is the brightness value of the pixel point (x, y) under the i-th band light source, a i is the weighting coefficient of the light source in the i-th band, and n is the number of light sources.
[0070] In the specific implementation, I(x,y) is the total brightness value of the pixel with coordinates (x,y) in the image. In the detection of surface defects of continuous casting billets, the CCD camera will capture the brightness information of each position on the surface of the billet. However, due to the high temperature of the continuous casting billet surface and the complex industrial environment, the image brightness under a single light source may be uneven, resulting in unstable image quality. By using multiple light sources with different wavelengths, the brightness value L under each light source can be combined. i (x, y) to generate a more stable and clearer brightness value I(x, y), thereby reducing the impact of uneven lighting.
[0071] L i(x,y) represents the brightness value of the pixel with coordinates (x,y) in the image under the light source of the i-th band. Light sources of different bands can provide different lighting conditions, such as visible light, infrared light, or ultraviolet light, and can capture more details for different surface characteristics. For example, when detecting cracks, light in certain bands may be able to better highlight the crack edge, while other bands may be more suitable for capturing surface oxide scale or pits. By acquiring images in multiple bands, it can be ensured that even if the lighting conditions in one band are poor, other bands can still provide effective brightness information, thereby enhancing the overall quality of the image.
[0072] a i is the weighting coefficient of the light source in the i-th band, used to calculate the brightness value L of each band i (x, y) is weighted. The contribution of each band of light source to the image brightness may be different. By adjusting a i The value of can optimize the contribution of the brightness of different bands to the total image. For example, in some cases, the light source of a certain band may have a poor effect on defect recognition. In this case, the weight of this band can be reduced to reduce its impact on the total brightness I(x,y); on the contrary, if the light source of a certain band has a very good effect on detail enhancement, the weight of this band can be increased.
[0073] The selection of weighting coefficients is usually based on experience or experimental data, and the optimal weight combination of different light sources can be determined through repeated debugging. The value of the weighting coefficient can be dynamically adjusted according to the actual detection conditions to cope with different surface materials, lighting environments, and defect characteristics. For example, in some scenarios, infrared light may be more likely to capture defects caused by surface temperature, while in other scenarios, ultraviolet light may be more suitable for detecting surface oxide layers. Therefore, the weighting coefficient is the key to ensuring the adaptability and flexibility of the system.
[0074] n is the number of light sources, that is, the total number of light sources in different bands. In the surface inspection of continuous casting billets, the combination of multiple light sources can effectively enhance the details of the image. Common light source combinations include visible light, infrared light and ultraviolet light, each of which provides specific brightness information in different bands. By increasing the number of light sources n, more surface feature information can be captured, thereby improving the accuracy of defect identification. Light sources of different bands can be optimized for different defect features, such as cracks, oxide scales or pits. Visible light is suitable for capturing surface details, infrared light can penetrate the surface material and more clearly show the defects of the subsurface layer, while ultraviolet light is more sensitive to the surface effects of certain oxides or chemical reactions. Therefore, an increase in the number of light sources means higher detection accuracy and adaptability.
[0075] It can be understood that the final pixel brightness is formed by weighted summing the brightness values under light sources of different bands. The brightness value of each band represents different lighting conditions or material properties. Therefore, through weighted summation, the information of these different light sources can be comprehensively utilized to generate a more stable and clear image. Since light sources of different bands have different sensitivities to defect features, the weighted and synthesis process can maximize the advantages of each light source in a complex lighting environment, avoid excessive or low brightness under a single light source, and ensure the global quality of the image. For example, infrared light may not capture details in some areas, but visible light can make up for this deficiency; conversely, infrared light may perform better in a high temperature environment.
[0076] In the detection of surface defects of continuous casting billets, the high temperature and complex surface reflection characteristics of the billets make it difficult for traditional single light source detection to obtain stable image quality. By introducing a combination of multi-band light sources, the brightness image generated after weighted synthesis can clearly display surface details and reduce image noise and blur caused by uneven lighting and high surface temperature. Especially in the detection of complex defects such as cracks, pits and oxide scales, the combination of multi-band light sources can significantly improve the visibility and recognition rate of defects.
[0077] The present invention uses a multi-light source lighting system to weight and synthesize the brightness information of different bands, thereby improving the stability and clarity of the image in complex environments. This method can maintain high image quality under unfavorable lighting conditions, providing more accurate and clear basic data for the detection of surface defects. By reasonably setting the number of light sources and the weighting coefficients of each band, it is possible to ensure that the best image quality can be obtained under different conditions, greatly improving the adaptability and accuracy of the continuous casting billet surface defect detection system.
[0078] Step 202: De-noise the collected image, and use an adaptive Gaussian filter and an image enhancement algorithm to improve the signal-to-noise ratio of the image to obtain a first enhanced image.
[0079] In some embodiments, step 202 may include:
[0080] Acquiring an adjustment parameter and a Laplace operator for adjusting the brightness value of the image;
[0081] Adjusting the brightness value of the image according to the adjustment parameter and the Laplace operator to obtain the brightness value of the pixel point of the first enhanced image;
[0082] The first enhanced image is determined according to brightness values of pixels of the first enhanced image.
[0083] In some embodiments, for each pixel point, the first product value of the adjustment parameter and the Laplace operator can be calculated first, and then the first sum value of the first constant and the first product value can be calculated, and then the brightness value of the pixel point of the first enhanced image can be determined based on the brightness value of the image and the first sum value.
[0084] Specifically, the brightness value of a pixel of the first enhanced image can be expressed as:
[0085]
[0086] Among them, I enh (x, y) is the brightness value of the pixel of the first enhanced image, λ is the adjustment parameter, is the Laplacian of the brightness value.
[0087] In the specific implementation, I enh (x,y) is the brightness value of the pixel (x,y) in the enhanced image, that is, after processing, the brightness value of each pixel of the image will be adjusted to enhance the contrast and details of the image. Through this enhancement process, the noise and blur in the image are suppressed, and important features (such as defect edges or textures) are highlighted. In the surface defect detection of continuous casting billets, after this enhancement step, subtle defects such as cracks and pits on the surface can be presented more clearly, thereby improving the recognition accuracy of the detection system.
[0088] It is the Laplace operator of the image brightness I(x,y), which is used to calculate the second-order derivative of the pixel in the image. The Laplace operator is often used for edge detection and image enhancement in image processing. Its main function is to highlight edge features by calculating the degree of brightness change in the image. The Laplace operator describes the brightness change around the pixel. When the brightness around a pixel in the image changes dramatically, the Laplace operator value will be larger, reflecting that the edge or details of the image may exist at the pixel; when the brightness changes slowly, the Laplace operator value will be smaller. Using this feature, the edges or details of the image can be enhanced and the noise in the smooth area can be suppressed.
[0089] λ is an adjustment parameter used to control the influence of the Laplace operator on image enhancement. By adjusting the value of λ, the intensity of image enhancement can be adjusted. When λ is large, the effect of the Laplace operator is more significant, and the edges and details of the image will be greatly enhanced, but it may also cause some noise to be amplified. Therefore, it is necessary to find a suitable λ value in the balance between edge enhancement and noise amplification. When λ is small, the effect of the Laplace operator is weakened, and the image enhancement effect becomes gentler, which is suitable for scenes with more noise.
[0090] In the detection of surface defects in continuous casting billets, the value of λ can be adjusted according to different application scenarios. For example, when detecting small cracks, a larger λ may be required to highlight these tiny edge features; while in a noisy environment, λ may need to be appropriately reduced to avoid noise amplification.
[0091] In the detection of surface defects of continuous casting billets, images are often affected by complex lighting and surface reflection, resulting in large noise and blurred edges in the collected images. The above enhancement formula can effectively improve the clarity of the defect edges in the image, especially in the detection of small defects such as cracks and pits. The enhanced image will be clearer, which is convenient for the system to automatically identify and classify. Since the surface of the continuous casting billet may have high temperature and dynamic changes, the image noise is more significant. By properly adjusting the λ value, the system can find a balance between noise suppression and edge enhancement according to the actual detection environment, ensuring that key features in the image (such as cracks, oxide scale and other defects) can be highlighted while suppressing irrelevant noise interference.
[0092] The present invention uses the Laplace operator to calculate the secondary derivative of the brightness of the image, which can effectively enhance the edges and details of the image, and flexibly control the enhancement effect by adjusting the parameter λ. The method is particularly effective in the detection of surface defects of continuous casting billets, which can improve the clarity of the detected image, enhance the visibility of subtle defects, and achieve noise suppression in smooth areas in a noisy environment, ensuring the accuracy and reliability of the detection system.
[0093] Step 203: Use the optical flow method to correct the image blur in the first enhanced image caused by the high temperature and dynamic changes of the surface of the casting billet, calculate the motion vector of each pixel in the first enhanced image, and obtain the second enhanced image.
[0094] In some embodiments, the motion vector of each pixel in the first enhanced image may be calculated in the following manner:
[0095] Obtaining the horizontal displacement and vertical displacement of each pixel point;
[0096] Obtaining the rate of change of the brightness value of each pixel in the horizontal direction and the rate of change in the vertical direction;
[0097] According to the horizontal displacement and vertical displacement of each pixel point, the horizontal change rate and vertical change rate of the brightness value of each pixel point, the brightness change rate of the brightness value of each pixel point in a preset time is determined as the motion vector of each pixel point.
[0098] In some embodiments, the motion vector of each pixel in the first enhanced image is expressed as:
[0099]
[0100] Among them, v(x, y) is the motion vector of each pixel point (x, y) in the first enhanced image, and u and v are the displacement of each pixel point in the horizontal direction and the vertical direction respectively.
[0101] In specific implementation, the optical flow method is a classic computer vision technology used to estimate the speed and direction of the movement of pixels in an image in consecutive frames. It assumes that the brightness of an object remains unchanged at adjacent time points, that is, if a pixel is displaced from time t to t+Δt, its brightness value remains almost unchanged within this small range. Therefore, the movement of each pixel can be inferred by tracking the brightness changes in the image.
[0102] In this continuous casting billet surface defect detection method, since the billet surface temperature is high and in dynamic change, the image captured by the CCD camera may be blurred due to motion. In order to correct this blur, the optical flow method is needed to calculate the motion vector of each pixel, that is, the displacement of each pixel in the time dimension.
[0103] v(x,y) is the motion vector of the pixel (x,y) in the image and is the core variable that needs to be calculated. The motion vector contains the speed and direction of the pixel in the image. The optical flow method assumes that the brightness of the image remains constant over time, so the movement of each pixel can be deduced by calculating the change over time.
[0104] It is the rate of change of brightness of the pixel (x, y) at time t, that is, the brightness increment over time. This is an important feature of the image when it changes over time, reflecting the degree of change in the image brightness. If the object in the image is displaced, the value of this item is not zero.
[0105] They are the rates of change of the brightness value I(x,y) of the pixel (x,y) in the horizontal and vertical directions, representing the gradient information of the image in these two directions. They describe the rate of change of brightness in the horizontal and vertical directions of the image, respectively. Features such as edges and textures in the image can be captured through these gradient information.
[0106] u and v represent the displacement of the pixel in the horizontal and vertical directions respectively, which are the two components of the motion vector. Assume that the movement of each pixel in the image can be decomposed into horizontal displacement u and vertical displacement v in both directions, and this movement can be described by differential equations within a certain time interval. Finally, by solving these unknown u and v, the movement of each pixel can be known.
[0107] In practical applications, the surface temperature of the ingot is high and the surface changes rapidly, so the collected image will be blurred. Through the above optical flow method, the motion vector v(x,y) of the pixel point can be calculated, that is, the displacement u and v of the pixel point in the horizontal and vertical directions. According to this displacement information, the blurred image is reversely corrected to restore a clear image. This is particularly important in the process of detecting ingots with high-speed movement and high surface temperature, which can improve the accuracy of defect recognition and the clarity of the image.
[0108] In summary, the present invention can effectively solve the dynamic blur problem in continuous casting billet surface detection by analyzing the changes in image brightness over time and space and combining it with the optical flow method, thereby improving the accuracy of defect detection.
[0109] Step 204: Perform surface defect recognition on the enhanced second enhanced image through a convolutional neural network to determine surface defects on the surface of the ingot.
[0110] In the present invention, after the aforementioned image enhancement steps (such as Laplace operator enhancement method, etc.), a second enhanced image is obtained. After processing, this image enhances the detailed information of the surface of the ingot, such as the edges and textures of defects such as cracks, pits and scales, thereby providing clearer basic data for subsequent defect identification. By improving the contrast and clarity of the image, the enhanced image not only effectively reduces noise and blur, but also enhances the visibility of defects, providing more accurate input data for the learning and recognition process of CNN.
[0111] In the specific implementation, the enhanced second enhanced image is input to the convolutional neural network. The image has been significantly improved in terms of defect features through the enhancement step, such as the edges of cracks become clearer, the outlines of pits are more obvious, and noise is effectively suppressed. The convolution layer of the CNN begins to process the input image layer by layer to extract local features in the image. These features can include simple low-level features such as edges and corners, as well as more complex patterns such as the shape, texture, and size of defects. The pooling layer downsamples the feature map to reduce the data dimension while retaining key information. This process can help the model identify defects over a large range while reducing computational complexity. The fully connected layer of the CNN further processes the features and outputs a probability distribution. Each pixel is classified as a certain type of defect, such as cracks, pits, or oxide scale according to probability. In this way, CNN can automatically identify and classify surface defects in large-scale industrial production environments, avoiding errors in manual inspection.
[0112] In summary, the present invention uses a convolutional neural network to identify surface defects on the enhanced second enhanced image. By automatically extracting features from the image, CNN can accurately identify and classify various types of defects on the surface of the ingot. Combined with image enhancement technology, CNN can achieve high-precision, automated surface defect detection in a complex production environment, greatly improving detection efficiency and reliability, and providing important technical support for quality control in industrial production.
[0113] Step 205: Determine the size and position of each surface defect based on sub-pixel precision calculation.
[0114] Among them, sub-pixel accuracy means that when processing images, the resolution exceeds the level of a single pixel, and the features in the image can be measured more accurately. Usually, pixel-level accuracy can only locate features in the image (such as defects) at whole pixel points, while sub-pixel accuracy can interpolate between pixel points to achieve more accurate positioning. In the detection of surface defects in continuous casting billets, the size of the defects is often very small and complex. The use of traditional pixel-level methods may lead to inaccurate measurements, especially when dealing with defects with blurred edges or irregular sizes. Through sub-pixel precision calculations, the measurement accuracy of defect size and position can be greatly improved.
[0115] In some embodiments, the method of the present invention may further include:
[0116] Determine the size distribution of the defect area corresponding to each pixel point according to the size and position of each surface defect;
[0117] Obtaining the weight of each pixel;
[0118] The average size of the surface defects is determined according to the size distribution of the defect areas corresponding to the pixels and the weight of each pixel.
[0119] In some embodiments, the average size of the surface defects is expressed as:
[0120]
[0121] Among them, d defect is the average size of the surface defects, ω(x,y) is the weight of the pixel (x,y), and D(x,y) is the size distribution of the defect area corresponding to the pixel (x,y).
[0122] In the specific implementation, d defect is the average size of surface defects, ω(x,y) is the weight of the pixel, and D(x,y) is the size distribution of the defect area.
[0123] In the specific implementation, d defectIt is the average size of the defect, that is, the overall size of the defect calculated based on the size distribution of the entire defect area and the weight of each pixel. This value can represent the average area or volume of the defect, depending on the specific application scenario. In the detection of surface defects of continuous casting billets, surface defects such as cracks, pits or oxide scales are often unevenly distributed in size. By calculating the average size, the overall characteristics of the defects can be better characterized, providing a basis for subsequent quality inspection and evaluation.
[0124] ω(x,y) is the weight of the pixel (x,y), which is used to perform weighted processing on different pixels. The weight setting is usually determined based on the importance or confidence of the pixel in the defect area. Different weights can reflect the contribution of different pixels to the overall defect size. In the image, some pixels may be located at the edge of the defect, and the size of these areas may be difficult to accurately estimate, so they can be given lower weights. Those pixels located in the core area of the defect are usually more important for the calculation of the defect size, so they have higher weights. Reasonable setting of weights can make the calculated average size more accurate and avoid excessive influence of edge pixels on the results.
[0125] The setting of ω(x,y) can be based on multiple factors, such as the brightness of the image, the edge gradient, the relative position of the pixel position in the defect area, etc. In practical applications, weights are often set by some predefined function or empirical rules. For example, for those areas with large brightness changes (such as the core part of the defect), a larger weight can be set, while for areas with greater noise influence, the weight can be reduced.
[0126] D(x,y) represents the size of the defect area corresponding to the pixel (x,y). During the defect detection process, each pixel in the image can be associated with the size of the defect area where it is located, representing the defect area or volume occupied by the point. Different pixels may belong to different parts of the defect area, so the size value D(x,y) will be different. Usually, through image processing techniques such as edge detection and segmentation algorithms, the defect area can be segmented from the background to obtain the defect area size D(x,y) corresponding to each pixel. For large-area defects, the pixel D(x,y) value inside is larger; while for small or edge defects, the size D(x,y) is smaller. The defect size distribution D(x,y) is the core data for determining the average size of the defect. By calculating the size distribution of different pixels, the overall shape and range of the defect can be accurately described.
[0127] It can be understood that in the detection of surface defects of continuous casting billets, the size of the defect is an important detection indicator. Different types of defects, such as cracks, pits, scales, etc., have different size characteristics. Through this formula, the average size of surface defects can be calculated for easy classification and evaluation. In the actual detection process, the defect area is often irregular in shape and uneven in size. By introducing weights and size distribution, these irregular areas can be reasonably weighted to calculate a reasonable average size. For example, the central area of a crack is often more important than the edge area, so a greater weight can be given to the central area. This formula can not only provide the average size of the defect, but also combine different pixel weights to more accurately describe the distribution of the defect. This is of great significance for subsequent quality control and defect classification, especially in scenarios where defects need to be accurately located and sized, the weighting mechanism of this formula can improve the accuracy of detection.
[0128] In summary, the present invention calculates the average size of surface defects by weighted summation of pixel points. The weight reflects the contribution of different pixel points to the defect size calculation, and the size distribution is directly associated with the defect area corresponding to each pixel point. Through this weighted calculation, the average size of the defect can be accurately estimated to ensure that the calculation result can reflect the size characteristics of the core area and suppress the interference of noise and edges on the result. In the detection of surface defects of continuous casting billets, this formula can effectively improve the accuracy and reliability of defect detection, and provide important technical support for quality monitoring in industrial production.
[0129] See also Figure 2 , Figure 2 A schematic structural diagram of a CCD scanning imaging detection system for continuous casting slab surface defects provided by the present invention.
[0130] like Figure 2 As shown, a CCD scanning imaging detection system for continuous casting surface defects proposed in an embodiment of the present invention comprises:
[0131] An image acquisition module 301 is used to illuminate the surface of the ingot using multiple light sources and to acquire an image of the surface of the ingot using a high-resolution CCD camera;
[0132] A first enhancement module 302 is used to perform denoising on the collected image, and use an adaptive Gaussian filter and an image enhancement algorithm to improve the signal-to-noise ratio of the image to obtain a first enhanced image;
[0133] The second enhancement module 303 is used to correct the image blur caused by the high temperature and dynamic changes of the surface of the casting billet in the first enhanced image by using the optical flow method, and calculate the motion vector of each pixel point in the first enhanced image to obtain a second enhanced image;
[0134] A first detection module 304 is used to identify surface defects on the enhanced second enhanced image through a convolutional neural network to determine surface defects on the surface of the ingot;
[0135] The second detection module 305 is used to determine the size and position of each surface defect based on sub-pixel precision calculation.
[0136] See also Figure 3 , Figure 3 Schematic diagram of an electronic device provided by an embodiment of the present invention. Figure 3 As shown, an embodiment of the present invention provides an electronic device 400, including a memory 410, a processor 420, and a computer program 411 stored in the memory 410 and executable on the processor 420. When the processor 420 executes the computer program 411, the following steps are implemented:
[0137] The surface of the ingot is illuminated by using multiple light sources, and an image of the surface of the ingot is collected by using a high-resolution CCD camera;
[0138] De-noising the collected image, using adaptive Gaussian filtering and image enhancement algorithm to improve the signal-to-noise ratio of the image, to obtain a first enhanced image;
[0139] Using an optical flow method to correct image blur in the first enhanced image caused by high temperature and dynamic changes on the surface of the ingot, and calculating a motion vector of each pixel in the first enhanced image to obtain a second enhanced image;
[0140] Performing surface defect recognition on the enhanced second enhanced image by using a convolutional neural network to determine surface defects on the surface of the ingot;
[0141] Based on sub-pixel precision calculations, the size and location of each of the surface defects are determined.
[0142] See also Figure 4 , Figure 4 A schematic diagram of an embodiment of a computer-readable storage medium provided in an embodiment of the present invention. Figure 4 As shown, this embodiment provides a computer-readable storage medium 500, on which a computer program 411 is stored. When the computer program 411 is executed by a processor, the following steps are implemented:
[0143] The surface of the ingot is illuminated by using multiple light sources, and an image of the surface of the ingot is collected by using a high-resolution CCD camera;
[0144] De-noising the collected image, using adaptive Gaussian filtering and image enhancement algorithm to improve the signal-to-noise ratio of the image, to obtain a first enhanced image;
[0145] Using an optical flow method to correct image blur in the first enhanced image caused by high temperature and dynamic changes on the surface of the ingot, and calculating a motion vector of each pixel in the first enhanced image to obtain a second enhanced image;
[0146] Performing surface defect recognition on the enhanced second enhanced image by using a convolutional neural network to determine surface defects on the surface of the ingot;
[0147] Based on sub-pixel precision calculations, the size and location of each of the surface defects are determined.
[0148] It should be noted that in the above embodiments, the description of each embodiment has its own emphasis, and for parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0149] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0150] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded computer, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A system that specifies the functions of a box or multiple boxes.
[0151] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction system, which is implemented in the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0152] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0153] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0154] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A CCD scanning imaging detection method for continuous casting billet surface defects, characterized in that: The method comprises: The surface of the ingot is illuminated by using multiple light sources, and an image of the surface of the ingot is collected by using a high-resolution CCD camera; Performing denoising on the collected image, using adaptive Gaussian filtering and image enhancement algorithm to improve the signal-to-noise ratio of the image, and obtaining a first enhanced image; Using an optical flow method to correct image blur in the first enhanced image caused by high temperature and dynamic changes on the surface of the ingot, and calculating a motion vector of each pixel in the first enhanced image to obtain a second enhanced image; Performing surface defect recognition on the enhanced second enhanced image by using a convolutional neural network to determine surface defects on the surface of the ingot; Based on sub-pixel precision calculations, the size and location of each of the surface defects are determined.
2. The CCD scanning imaging detection method for continuous casting surface defects according to claim 1 is characterized in that: The image of the surface of the casting billet is obtained by: Determine a plurality of light sources of different wavelength bands from the plurality of light sources; Determining the brightness value of a pixel point of an image of the surface of the casting billet according to the illumination operation of the plurality of light sources on the surface of the casting billet; An image of the surface of the casting billet is obtained according to the brightness values of the pixel points.
3. The CCD scanning imaging detection method for continuous casting surface defects according to claim 2 is characterized in that: Determining the brightness value of the pixel point of the image of the surface of the casting billet according to the illumination operation of the plurality of light sources on the surface of the casting billet comprises: Obtain the brightness value of the pixel under the light source in each band; Obtaining a weighting coefficient of the light source in each wavelength band; The brightness value of each pixel point of the image on the surface of the casting billet is determined according to the brightness value of the pixel point under the light source of each band and the weighting coefficient of the light source of each band.
4. The CCD scanning imaging detection method for continuous casting surface defects according to claim 3 is characterized in that: The method of using an adaptive Gaussian filter and an image enhancement algorithm to improve the signal-to-noise ratio of the image to obtain a first enhanced image includes: Acquiring an adjustment parameter and a Laplace operator for adjusting the brightness value of the image; Adjusting the brightness value of the image according to the adjustment parameter and the Laplace operator to obtain the brightness value of the pixel point of the first enhanced image; The first enhanced image is determined according to brightness values of pixels of the first enhanced image.
5. The CCD scanning imaging detection method for continuous casting surface defects according to claim 4 is characterized in that: The step of adjusting the brightness value of the image according to the adjustment parameter and the Laplace operator to obtain the brightness value of the pixel point of the first enhanced image includes: For each pixel point, calculating a first product value of the adjustment parameter and the Laplace operator; Calculate a first sum value of a first constant and the first product value; The brightness value of the pixel point of the first enhanced image is determined according to the brightness value of the image and the first sum value.
6. The CCD scanning imaging detection method for continuous casting surface defects according to claim 5 is characterized in that: The calculating the motion vector of each pixel in the first enhanced image includes: Obtaining the horizontal displacement and vertical displacement of each pixel point; Obtaining the rate of change of the brightness value of each pixel in the horizontal direction and the rate of change in the vertical direction; According to the horizontal displacement and vertical displacement of each pixel point, the horizontal change rate and vertical change rate of the brightness value of each pixel point, the brightness change rate of the brightness value of each pixel point in a preset time is determined as the motion vector of each pixel point.
7. The CCD scanning imaging detection method for continuous casting surface defects according to claim 6 is characterized in that: The motion vector of each pixel in the first enhanced image is expressed as: Among them, v(x, y) is the motion vector of each pixel point (x, y) in the first enhanced image, and u and v are the displacement of each pixel point in the horizontal direction and the vertical direction respectively.
8. The CCD scanning imaging detection method for continuous casting surface defects according to claim 7 is characterized in that: The method further comprises: Determine the size distribution of the defect area corresponding to each pixel point according to the size and position of each surface defect; Obtaining the weight of each pixel; The average size of the surface defects is determined according to the size distribution of the defect areas corresponding to the pixels and the weight of each pixel.
9. The CCD scanning imaging detection method for continuous casting slab surface defects according to any one of claims 1 to 8, characterized in that: The average size of the surface defects is expressed as: Among them, d defect is the average size of the surface defects, ω(x,y) is the weight of the pixel (x,y), and D(x,y) is the size distribution of the defect area corresponding to the pixel (x,y).
10. A CCD scanning imaging detection system for continuous casting surface defects, characterized in that: The system comprises: An image acquisition module is used to illuminate the surface of the ingot using multiple light sources and to acquire an image of the surface of the ingot using a high-resolution CCD camera; A first enhancement module, used for performing denoising on the collected image, using adaptive Gaussian filtering and image enhancement algorithm to improve the signal-to-noise ratio of the image, and obtaining a first enhanced image; A second enhancement module is used to correct the image blur caused by the high temperature and dynamic changes of the surface of the casting billet in the first enhanced image by using an optical flow method, and calculate the motion vector of each pixel point in the first enhanced image to obtain a second enhanced image; A first detection module is used to identify surface defects of the enhanced second enhanced image by using a convolutional neural network to determine surface defects on the surface of the ingot; The second detection module is used to determine the size and position of each of the surface defects based on sub-pixel precision calculation.
Citation Information
Cited By
Steel pipe production defect identification management method and system based on visual inspection
CN120431045A
A Visual Inspection-Based Method and System for Defect Identification and Management in Steel Pipe Production
CN120431045B
Magnetic stripe appearance defect automatic detection method and system based on image recognition
CN120471904A
Metal surface defect detection method and system based on 3D visual identification
CN121073909A