A multi-dimensional metal surface defect detection method and system based on machine vision

By combining alternating acquisition and image enhancement techniques with a linear fitting algorithm, the problem of three-dimensional defect detection on the surface of stainless steel cylindrical pots was solved, realizing the identification of three-dimensional defects on bright curved surfaces and improving detection accuracy and efficiency.

CN117169247BActive Publication Date: 2026-07-21FOSHAN UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
FOSHAN UNIVERSITY
Filing Date
2023-06-16
Publication Date
2026-07-21

Smart Images

  • Figure CN117169247B_ABST
    Figure CN117169247B_ABST
Patent Text Reader

Abstract

The application discloses a kind of metal surface defect multidimensional detection method and system based on machine vision, which comprises the following steps: building metal highlight cylindrical surface detection device;Based on metal highlight cylindrical surface detection device, the metal highlight cylindrical surface containing defects is alternately collected and processed;Metal highlight cylindrical surface image set is subjected to image enhancement processing and straight line fitting operation processing;Approximately evenly distributed histogram and straight line fitting result are subjected to data labeling processing;Metal highlight cylindrical surface labeled data is input into target recognition network for detection, and metal highlight cylindrical surface defect detection result is obtained.The application can alternately collect and process the metal highlight cylindrical surface containing defects, and determine whether there is three-dimensional defect on the metal surface based on two-dimensional image.The application can be widely applied to the technical field of metal cylindrical highlight surface defect detection as a kind of metal surface defect multidimensional detection method and system based on machine vision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of high-gloss surface defect detection technology for metal cylinders, and in particular to a multi-dimensional detection method and system for metal surface defects based on machine vision. Background Technology

[0002] Stainless steel, with its excellent corrosion resistance and formability, and sufficient strength and toughness under both high and low temperatures, is widely used as a raw material for manufacturing cookware. In the actual production process, slicing and stamping processes shape the pot into the required form and size, followed by polishing and sanding to achieve a smooth surface. However, due to mechanical failures or improper operation, defects such as scratches, dents, and abrasions can easily occur during processing. Furthermore, human contact with the cookware surface without wearing protective gloves may leave fingerprints and oil stains, affecting the product's appearance and usability. Therefore, a precise and efficient detection method is urgently needed for identifying surface defects and controlling product quality. With the rapid development of artificial intelligence technology, machine vision-based defect detection technology can perform rapid and high-precision inspection of products through non-contact measurement, significantly improving inspection efficiency and playing an increasingly important role in the field of intelligent manufacturing.

[0003] In the detection of defects on the outer surface of cylindrical pots, simple two-dimensional defects (such as scratches and abrasions) can often be effectively detected using an industrial camera with a single type of light source. However, defects with three-dimensional structures (such as pits and protrusions) have always been a major challenge, especially for stainless steel cylindrical pots with bright curved surfaces. Uneven light reflection makes the acquired defect images prone to overexposure, and the two-dimensional images do not clearly represent the height and depth of the three-dimensional structure, affecting subsequent image processing and defect identification. Summary of the Invention

[0004] To address the aforementioned technical problems, the present invention aims to provide a multi-dimensional detection method and system for metal surface defects based on machine vision. This system can determine whether a three-dimensional defect exists on a metal surface by alternately acquiring and processing images of a bright cylindrical metal surface containing defects, based on two-dimensional images.

[0005] The first technical solution adopted in this invention is: a multi-dimensional detection method for metal surface defects based on machine vision, comprising the following steps:

[0006] Construct a detection device for high-gloss cylindrical metal surfaces;

[0007] The high-brightness cylindrical surface of metal is detected by an alternating acquisition process on the high-brightness cylindrical surface of metal containing defects, thereby obtaining a set of high-brightness cylindrical surface images, which includes a first set of high-brightness cylindrical surface images and a second set of high-brightness cylindrical surface images.

[0008] Image enhancement processing is performed on the first set of images of bright metallic cylindrical surfaces to obtain an approximately uniform distribution histogram of the first set of images of bright metallic cylindrical surfaces.

[0009] A linear fitting operation is performed on the second set of images of bright metallic cylindrical surfaces to obtain the linear fitting results of the second set of images of bright metallic cylindrical surfaces.

[0010] Data annotation processing is performed on the approximately uniform distribution histogram of the first metallic bright cylindrical surface image and the straight line fitting result of the second metallic bright cylindrical surface image to obtain the rectangular frame annotation data of the metallic bright cylindrical surface image.

[0011] The rectangular bounding box annotation data of the bright metal cylindrical surface image is input into the target recognition network for detection, and the defect detection results of the bright metal cylindrical surface are obtained.

[0012] Furthermore, the high-brightness cylindrical metal surface detection device includes an industrial area array camera, a bar light source, a backlight, a motor, a rotating platform, and an external triggering device.

[0013] Furthermore, the step of acquiring a set of images of a bright metallic cylinder by alternately acquiring images of a bright metallic cylinder containing defects using the high-brightness metallic cylinder surface detection device specifically includes:

[0014] The defective bright metal cylindrical surface is placed under an industrial area array camera in the bright metal cylindrical surface inspection device for image acquisition.

[0015] Turn off the backlight, control the bar light source in the metal high-brightness cylindrical surface inspection device to illuminate the metal high-brightness cylindrical surface containing defects, control the rotating platform in the metal high-brightness cylindrical surface inspection device to drive the metal high-brightness cylindrical surface containing defects to rotate at a preset frequency, and control the industrial area scan camera in the metal high-brightness cylindrical surface inspection device to acquire at least two images of the metal high-brightness cylindrical surface containing defects at a preset frame rate.

[0016] The image of a bright, defective metallic cylinder surface is cropped using a slicing algorithm to extract the center region of the exposure area, resulting in multiple center regions of the exposure area.

[0017] The center regions of multiple exposure areas are stitched together to obtain the first set of images of a metallic high-brightness cylindrical surface.

[0018] Turn off the bar light source, control the backlight in the metal high-brightness cylindrical surface detection device to illuminate the metal high-brightness cylindrical surface containing defects, and acquire at least two images of the metal high-brightness cylindrical surface containing defects to obtain a second metal high-brightness cylindrical surface image set.

[0019] Integrate the first set of images of bright metallic cylindrical surfaces and the second set of images of bright metallic cylindrical surfaces to construct a set of images of bright metallic cylindrical surfaces.

[0020] Furthermore, the step of performing image enhancement processing on the first set of bright metallic cylindrical images to obtain an approximately uniformly distributed histogram of the first bright metallic cylindrical images specifically includes:

[0021] Histogram equalization is performed on the first set of images of bright metallic cylindrical surfaces to obtain the equalized images of the first bright metallic cylindrical surfaces.

[0022] Obtain the probability of each gray level in the equalized image of the first metallic high-brightness cylindrical surface;

[0023] Set a gray level range coefficient, sum the probability of each gray level in the equalized first metallic bright cylindrical surface image, and multiply it with the gray level range coefficient to obtain the transformed gray level.

[0024] The new gray level probability distribution is calculated based on the transformed gray level, resulting in an approximately uniform distribution histogram of the first metallic high-brightness cylindrical image.

[0025] Furthermore, the expression for the histogram equalization process is as follows:

[0026]

[0027] In the above formula, p(r) k ) represents the probability of each gray level in the corresponding image, r k Represents grayscale levels, n k M×N represents the number of pixels in the entire image that belong to this gray level, and M×N represents the total number of pixels in the image.

[0028] Furthermore, the specific expression for summing the probabilities of each gray level in the equalized first metallic high-brightness cylindrical surface image and multiplying them by the gray level range coefficient is as follows:

[0029]

[0030] In the above formula, s k The value represents the transformed gray level, L⁻¹ represents the gray level range coefficient, and p(r) represents the gray level range coefficient. j T(r) represents the grayscale probability. k ) indicates histogram equalization or histogram linear transformation.

[0031] Furthermore, the step of performing a straight-line fitting operation on the second set of bright metallic cylindrical images to obtain the straight-line fitting result of the second bright metallic cylindrical images specifically includes:

[0032] Obtain a normal image of a bright metallic cylindrical surface as a normal sample image;

[0033] Construct a linear fitting model;

[0034] The optimal straight-line fitting model is constructed by using the RANSAC iterative algorithm to fit the metal boundary contour with normal sample images as observation data.

[0035] Based on the optimal linear fitting model, linear fitting processing is performed on the image set of the second metallic high-brightness cylindrical surface to obtain the linear fitting result of the second metallic high-brightness cylindrical surface image.

[0036] The step of inputting the rectangular bounding box annotation data of the bright metal cylindrical surface image into the target recognition network for detection to obtain the defect detection result of the bright metal cylindrical surface specifically includes:

[0037] The rectangular bounding box annotation data of the bright metal cylindrical surface image is input into the target recognition network for detection. The target recognition network includes a Backbone module, a Neck module, and a Head module.

[0038] Based on the Backbone module, feature extraction processing is performed on the rectangular bounding box annotation data of the metal high-brightness cylindrical surface image to obtain the feature data of the metal high-brightness cylindrical surface image.

[0039] Based on the Neck module, the feature data of the metal high-brightness cylindrical surface image is expanded by the number of channels to obtain the expanded feature data of the metal high-brightness cylindrical surface image.

[0040] Based on the Head module, the feature data of the expanded bright metal cylindrical surface image are processed to obtain the defect detection results of the bright metal cylindrical surface.

[0041] The second technical solution adopted in this invention is: a multi-dimensional detection system for metal surface defects based on machine vision, comprising:

[0042] Build modules to construct a metal high-gloss cylindrical surface detection device;

[0043] The acquisition module, based on the metal high-brightness cylindrical surface detection device, alternately acquires and processes the metal high-brightness cylindrical surface containing defects to obtain a metal high-brightness cylindrical surface image set, which includes a first metal high-brightness cylindrical surface image set and a second metal high-brightness cylindrical surface image set.

[0044] The enhancement module performs image enhancement processing on the first set of images of bright metallic cylindrical surfaces to obtain an approximately uniformly distributed histogram of the first set of images of bright metallic cylindrical surfaces.

[0045] The fitting module performs a straight-line fitting operation on the second set of metallic high-brightness cylindrical surface images to obtain the straight-line fitting results of the second metallic high-brightness cylindrical surface images.

[0046] The annotation module is used to perform data annotation processing on the approximately uniform distribution histogram of the first metallic bright cylindrical surface image and the straight line fitting result of the second metallic bright cylindrical surface image to obtain the rectangular frame annotation data of the metallic bright cylindrical surface image.

[0047] The detection module is used to input the rectangular bounding box annotation data of the bright metal cylindrical surface image into the target recognition network for detection, and obtain the defect detection results of the bright metal cylindrical surface.

[0048] The beneficial effects of the method and system of this invention are as follows: This invention fixes a high-gloss cylindrical metal surface on a rotating platform, and a motor drives the turntable to rotate synchronously, forming relative motion with the camera. Multiple images of the metal surface containing defect information are captured using alternating strip light and backlight illumination. The image acquired by the area scan camera with the strip light only captures the central, uniformly exposed portion. Multiple partially exposed images are then stitched together to form a complete image of the cylindrical metal surface. This process simulates the imaging process of a line scan camera, overcoming the limitation of an area scan camera that only acquires local surface information of the cylinder in a single shot. The images are stitched together from the central, uniformly exposed area of ​​multiple images. This effectively mitigates the adverse effects of uneven light reflection on the bright curved surface. The use of a backlight creates a significant difference in grayscale between the background and the bright metallic cylindrical surface in the acquired image, making it easier to extract the contour features of the bright metallic cylindrical surface. The RANSAC algorithm is then used to fit a straight line to the edge contour. If the bright metallic cylindrical surface has uneven or concave deformation areas, the fitted straight line will deviate from the normal model. This method can determine whether there are three-dimensional defects on the bright metallic cylindrical surface using two-dimensional images. The two image acquisition methods are used alternately, and the obtained defect images can be applied to various downstream detection tasks. Attached Figure Description

[0049] Figure 1 This is a flowchart of the steps of a multi-dimensional detection method for metal surface defects based on machine vision according to the present invention.

[0050] Figure 2 This is a structural block diagram of a multi-dimensional detection system for metal surface defects based on machine vision, according to the present invention.

[0051] Figure 3 This is a schematic diagram of the structure of the metal high-brightness cylindrical surface detection device of the present invention;

[0052] Figure 4 This is a schematic diagram showing the result of cropping the central region of a bright metallic cylindrical image according to the present invention;

[0053] Figure 5This is a schematic diagram of the target recognition network of the present invention. Detailed Implementation

[0054] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments. The step numbers in the following embodiments are only for ease of explanation and do not limit the order of the steps. The execution order of each step in the embodiments can be adapted according to the understanding of those skilled in the art.

[0055] Reference Figure 1 This invention provides a multi-dimensional detection method for metal surface defects based on machine vision, the method comprising the following steps:

[0056] S1. Construct a high-brightness cylindrical metal surface detection device;

[0057] Specifically, refer to Figure 2 The testing device is constructed, and the hardware equipment of the testing platform mainly includes an industrial area scan camera, bar light sources, backlight sources, motors, a rotating platform, external triggering devices, power supplies and controllers required for the above mechanisms, and a computer. First, the high-brightness cylindrical metal surface is fixed at the center of the turntable, and the center position of the camera coincides with the rotation axis of the cylindrical surface. A high-angle lighting method is used to place two bar light sources on both sides of the lens, ensuring that the direction of the bar light sources is parallel to the rotation center of the high-brightness cylindrical metal surface, and that the high-brightness area formed by the light sources on the high-brightness cylindrical metal surface coincides with the center of the exposure area of ​​the area scan camera. The backlight source is placed vertically on the back side of the high-brightness cylindrical metal surface, and the center of the high-brightness cylindrical metal surface and the center of the backlight source form a natural obstruction.

[0058] S2. Based on the metal high-brightness cylindrical surface detection device, the metal high-brightness cylindrical surface containing defects is alternately sampled and processed to obtain a metal high-brightness cylindrical surface image set, the metal high-brightness cylindrical surface image set including a first metal high-brightness cylindrical surface image set and a second metal high-brightness cylindrical surface image set.

[0059] Specifically, this involves image acquisition of a high-gloss metallic cylindrical surface. The solution employs an alternating illumination method. When the trigger device receives an incoming material signal, the controller activates a strip light source to illuminate the surface. A motor drives a rotary table to rotate the high-gloss metallic cylindrical surface synchronously. Simultaneously, a camera continuously acquires images of the cylindrical surface at a preset frame rate. Each rotation of the rotary table captures n images. The computer uses a slicing algorithm to extract the center portion of the exposure area of ​​each image, denoted as x1, x2, x3, ..., x... nFinally, the n cropped regions are sequentially stitched together to obtain the complete cylindrical image Img1. The strip light source forms a uniform reflective surface in the central region of the bright metal cylinder. Cropping the central region of the image avoids the local quality differences caused by uneven light reflection in the full-surface exposure image. Stitching together multiple cropped regions can restore the complete image of the cylindrical surface, overcoming the limitation of area scan cameras that only acquire local information of the bright metal cylinder surface in a single exposure. A schematic diagram of the cropped central region is shown below. Figure 4 As shown, the bright metal cylinder rotates one revolution to complete the acquisition of Img1. At this time, the controller turns off the bar light source and turns on the back light source. The turntable rotates again to take n images to obtain Img2. Since part of the back light source is blocked by the outer surface of the cylinder, only part of the light enters the camera. The background and foreground (cylinder) of the acquired image form a bright and dark area with significant grayscale difference. At this time, the contour features at the boundary of the bright metal cylinder are significant, which is beneficial to the algorithm fitting. The turntable rotates two revolutions. Using an area scan camera, combined with the bar light source and back light source alternating acquisition method, two images Img1 and Img2 containing different feature information are acquired.

[0060] S3. Perform image enhancement processing on the first set of images of bright metallic cylindrical surfaces to obtain an approximately uniform distribution histogram of the first set of images of bright metallic cylindrical surfaces.

[0061] Specifically, image enhancement and line fitting operations are performed on the two images respectively. For image Img1, in order to enhance the contrast of the acquired image and highlight subtle defect features, histogram equalization is performed on the acquired image Img1, the specific expression of which is:

[0062]

[0063] In the formula p(r k The probability r corresponds to each gray level in the image. k Grayscale level: 0~255, n k This represents the number of pixels in the entire image belonging to this gray level. The probability of each gray level appearing in the image is calculated separately, and then equalization is performed. The expression for this is:

[0064]

[0065] Summing the probability of each gray level and multiplying it by the gray level range (gray levels start from 0, so L-1 is used to represent it), rounding the resulting sk to the nearest integer, we get the transformed gray level. Recalculating the probability distribution with the new gray coordinates, we can obtain an approximately uniform distribution histogram of the original image after processing. The processed image has richer details and the defect detection effect is more intuitive.

[0066] S4. Perform a linear fitting operation on the second metal highlighted cylindrical surface image set to obtain the linear fitting result of the second metal highlighted cylindrical surface image;

[0067] Specifically, for multiple Img2 images, use the RANSAC iterative algorithm to perform linear fitting on the boundary contour of the metal highlighted cylinder with normal samples as observed data. Assume the model is a linear equation. Randomly select N data points in a sample as the inlier set, and fit the line to the region with the largest number of inliers in the model selection. For this data sample, the foreground and background regions have significant differences, and the sampling points in the metal highlighted cylinder boundary contour region have obvious linear correlations. Therefore, the line can be easily fitted at the boundary of the metal highlighted cylinder. Then, test all other data against the fitted model. According to certain model-specific loss functions, points that can be well fitted to the estimated model are considered part of the consensus set. A defect-free sample will have enough points classified as the consensus set, indicating a good estimated model. Repeat this sampling test process multiple times to obtain the optimal fitting model. When there are concave and convex deformation regions on the surface of the metal highlighted cylinder, there is a positional deviation between the fitted line and the standard model. Set a suitable inlier threshold t based on the experimental results. When the number of inliers N of the fitted line is less than t, it is determined that there are deformation defects on the surface of the metal highlighted cylinder. This fitting scheme can directly determine whether there are defects with a three-dimensional structure such as pits and protrusions on the curved surface of the metal highlighted cylinder through two-dimensional images. Among them, linear fitting is applicable to preliminarily judge whether there are three-dimensional defects on the surface. The defect region can be marked based on the fitted image, and the type of the defect can be specified. It needs to be input into the target detection network for recognition. The output of the target detection network is the defect position and type in the form of anchor boxes.

[0068] S5. Perform data annotation processing on the approximately uniform distribution histogram of the first metal highlighted cylindrical surface image and the linear fitting result of the second metal highlighted cylindrical surface image to obtain the rectangular box annotation data of the metal highlighted cylindrical surface image;

[0069] Specifically, first use the Labelme software to perform rectangular box annotation on the test images Img1 and Img2. Data annotation is equivalent to processing the data. Perform rectangular box, semantic segmentation, instance segmentation, etc. annotation on Img1 and Img2 according to the detection task requirements.

[0070] S6. Input the rectangular box annotation data of the metal highlighted cylindrical surface image into the target recognition network for detection to obtain the metal highlighted cylindrical surface defect detection result.

[0071] Specifically, bounding box labeled data is fed into target recognition networks for training, such as YOLO and Fast R-CNN; pixel-by-pixel labeled data is suitable for segmentation networks, such as Unet, DeepLab, and Mask R-CNN. The following example uses YOLOv5 to perform defect target detection on acquired images. The labeled images are used as raw data input into the CSP-Darknet53 backbone network for feature extraction, which includes Conv layers, CSP layers, and SPPF layers. The Conv layers perform conventional convolution operations followed by Batch Normalization and SiLu activation functions to prevent overfitting and accelerate model convergence. The CSP layers mainly integrate residual structures to learn features. This layer has two branch structures: one branch specifies multiple stacked Bottleneck residual structures, and the other branch extracts features through only one convolutional layer. Finally, the two branches are concatenated. The SPPF layer uses three cascaded 5×5 convolutional kernels to fuse feature maps from different receptive fields, enriching the expression of image features and further improving the model's running speed and detection accuracy. The network's Neck module primarily employs the PANet structure, which introduces a downsampling feature path on top of the FPN network. This allows positional information from lower layers to be transmitted to deeper layers, thereby enhancing localization capabilities across multiple scales. The network Head layer expands the feature maps of different scales obtained from the Neck layer using 1×1 convolutions. The expanded feature channel count is (number of categories + 5) × the number of pre-selected boxes on each detection layer. Here, 5 corresponds to the x-coordinate, y-coordinate, width, height, and confidence score of the predicted box's center point, ranging from (0,1). A larger value indicates a higher probability of a defective target within the predicted box. The three detection layers in the Head layer correspond to three different sized feature maps obtained from the Neck layer. Each grid on the feature map pre-selects three candidate boxes with different aspect ratios, storing the positional and classification information of all prior boxes along the channel dimension of the feature map. This ultimately predicts and regresses the defective target. The network structure is as follows: Figure 5 As shown.

[0072] Reference Figure 2 A machine vision-based multi-dimensional detection system for metal surface defects includes:

[0073] Build modules to construct a metal high-gloss cylindrical surface detection device;

[0074] The acquisition module, based on the metal high-brightness cylindrical surface detection device, alternately acquires and processes the metal high-brightness cylindrical surface containing defects to obtain a metal high-brightness cylindrical surface image set, which includes a first metal high-brightness cylindrical surface image set and a second metal high-brightness cylindrical surface image set.

[0075] The enhancement module performs image enhancement processing on the first set of images of bright metallic cylindrical surfaces to obtain an approximately uniformly distributed histogram of the first set of images of bright metallic cylindrical surfaces.

[0076] The fitting module performs a straight-line fitting operation on the second set of metallic high-brightness cylindrical surface images to obtain the straight-line fitting results of the second metallic high-brightness cylindrical surface images.

[0077] The annotation module is used to perform data annotation processing on the approximately uniform distribution histogram of the first metallic bright cylindrical surface image and the straight line fitting result of the second metallic bright cylindrical surface image to obtain the rectangular frame annotation data of the metallic bright cylindrical surface image.

[0078] The detection module is used to input the rectangular bounding box annotation data of the bright metal cylindrical surface image into the target recognition network for detection, and obtain the defect detection results of the bright metal cylindrical surface.

[0079] In summary, this proposed image acquisition method, employing alternating strip light and backlight illumination, simultaneously acquires two different types of images. Using strip light, a portion of the exposed surface image is cropped and stitched together to obtain the complete cylindrical image Img1. This effectively avoids the adverse effects of uneven light reflection on bright curved surfaces and compensates for the limitation of area scan cameras in acquiring global information about the cylindrical surface. Using backlight illumination, a feature image Img2 is acquired, characterized by a dark foreground and a bright background. The RANSAC algorithm is then used to fit straight lines to the edge contours, and a thresholding method is applied to detect the presence of three-dimensional structural defects on the surface of the bright metallic cylinder in the two-dimensional image. The defect images acquired using both methods can be applied to various downstream detection tasks.

[0080] The content of the above method embodiments is applicable to this system embodiment. The specific functions implemented in this system embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.

[0081] The above is a detailed description of the preferred embodiments of the present invention. However, the present invention is not limited to the embodiments described. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention. All such equivalent modifications or substitutions are included within the scope defined by the claims of this application.

Claims

1. A multi-dimensional detection method for metal surface defects based on machine vision, characterized in that, Includes the following steps: Construct a detection device for high-gloss cylindrical metal surfaces; The device for detecting high-brightness cylindrical metal surfaces uses an alternating image acquisition process on a defective high-brightness cylindrical metal surface to obtain a set of high-brightness cylindrical metal surface images. This set includes a first set of high-brightness cylindrical metal surface images and a second set of high-brightness cylindrical metal surface images, specifically comprising: The defective bright metal cylindrical surface is placed under an industrial area array camera in the bright metal cylindrical surface inspection device for image acquisition. Turn off the backlight, control the bar light source in the metal high-brightness cylindrical surface inspection device to illuminate the metal high-brightness cylindrical surface containing defects, control the rotating platform in the metal high-brightness cylindrical surface inspection device to drive the metal high-brightness cylindrical surface containing defects to rotate at a preset frequency, and control the industrial area scan camera in the metal high-brightness cylindrical surface inspection device to acquire at least two images of the metal high-brightness cylindrical surface containing defects at a preset frame rate. The image of a bright, defective metallic cylinder surface is cropped using a slicing algorithm to extract the center region of the exposure area, resulting in multiple center regions of the exposure area. The center regions of multiple exposure areas are stitched together to obtain the first set of images of a metallic high-brightness cylindrical surface. Turn off the bar light source, control the backlight in the metal high-brightness cylindrical surface detection device to illuminate the metal high-brightness cylindrical surface containing defects, and acquire at least two images of the metal high-brightness cylindrical surface containing defects to obtain a second metal high-brightness cylindrical surface image set. Integrate the first set of images of bright metallic cylinders and the second set of images of bright metallic cylinders to construct a set of images of bright metallic cylinders; Image enhancement processing is performed on the first set of images of bright metallic cylindrical surfaces to obtain an approximately uniform distribution histogram of the first set of images of bright metallic cylindrical surfaces. A linear fitting operation is performed on the second set of images of bright metallic cylindrical surfaces to obtain the linear fitting results of the second set of images of bright metallic cylindrical surfaces. Data annotation processing is performed on the approximately uniform distribution histogram of the first metallic bright cylindrical surface image and the straight line fitting result of the second metallic bright cylindrical surface image to obtain the rectangular frame annotation data of the metallic bright cylindrical surface image. The rectangular bounding box annotation data of the bright metal cylindrical surface image is input into the target recognition network for detection, and the defect detection results of the bright metal cylindrical surface are obtained.

2. The multi-dimensional detection method for metal surface defects based on machine vision according to claim 1, characterized in that, The high-brightness cylindrical metal surface detection device includes an industrial area array camera, a bar light source, a backlight, a motor, a rotating platform, and an external triggering device.

3. The multi-dimensional detection method for metal surface defects based on machine vision according to claim 2, characterized in that, The step of performing image enhancement processing on the first set of bright metallic cylindrical images to obtain an approximately uniformly distributed histogram of the first bright metallic cylindrical images specifically includes: Histogram equalization is performed on the first set of images of bright metallic cylindrical surfaces to obtain the equalized images of the first bright metallic cylindrical surfaces. Obtain the probability of each gray level in the equalized image of the first metallic high-brightness cylindrical surface; Set a gray level range coefficient, sum the probability of each gray level in the equalized first metallic bright cylindrical surface image, and multiply it with the gray level range coefficient to obtain the transformed gray level. The new gray level probability distribution is calculated based on the transformed gray level, resulting in an approximately uniform distribution histogram of the first metallic high-brightness cylindrical image.

4. The multi-dimensional detection method for metal surface defects based on machine vision according to claim 3, characterized in that, The specific expression for the histogram equalization process is as follows: ; In the above formula, This represents the probability of each gray level in the corresponding image. Indicates grayscale level. This indicates the number of pixels in the entire image that belong to that gray level. This represents the total number of pixels in the image.

5. The multi-dimensional detection method for metal surface defects based on machine vision according to claim 4, characterized in that, The specific expression for summing the probabilities of each gray level in the equalized first metallic high-brightness cylindrical image and multiplying them by the gray level range coefficient is as follows: ; In the above formula, Indicates the grayscale level after transformation. This represents the grayscale range coefficient. This represents the probability of grayscale. This indicates histogram balance or histogram linear transformation.

6. The multi-dimensional detection method for metal surface defects based on machine vision according to claim 5, characterized in that, The step of performing a linear fitting operation on the second set of bright metallic cylindrical images to obtain the linear fitting result of the second bright metallic cylindrical images specifically includes: Obtain a normal image of a bright metallic cylindrical surface as a normal sample image; Construct a linear fitting model; The optimal straight-line fitting model is constructed by using the RANSAC iterative algorithm to fit the metal boundary contour with normal sample images as observation data. Based on the optimal linear fitting model, linear fitting processing is performed on the image set of the second metallic high-brightness cylindrical surface to obtain the linear fitting result of the second metallic high-brightness cylindrical surface image.

7. The multi-dimensional detection method for metal surface defects based on machine vision according to claim 6, characterized in that, The step of inputting the rectangular bounding box annotation data of the bright metal cylindrical surface image into the target recognition network for detection to obtain the defect detection result of the bright metal cylindrical surface specifically includes: The rectangular bounding box annotation data of the bright metal cylindrical surface image is input into the target recognition network for detection. The target recognition network includes a Backbone module, a Neck module, and a Head module. Based on the Backbone module, feature extraction processing is performed on the rectangular bounding box annotation data of the metal high-brightness cylindrical surface image to obtain the feature data of the metal high-brightness cylindrical surface image. Based on the Neck module, the feature data of the metal high-brightness cylindrical surface image is expanded by the number of channels to obtain the expanded feature data of the metal high-brightness cylindrical surface image. Based on the Head module, the feature data of the expanded bright metal cylindrical surface image are processed to obtain the defect detection results of the bright metal cylindrical surface.

8. A multi-dimensional detection system for metal surface defects based on machine vision, characterized in that, Includes the following modules: Build modules to construct a metal high-gloss cylindrical surface detection device; The acquisition module, based on the high-brightness cylindrical metal surface detection device, alternately acquires images of the defective high-brightness cylindrical metal surface to obtain a set of high-brightness cylindrical metal surface images. This set includes a first set of high-brightness cylindrical metal surface images and a second set of high-brightness cylindrical metal surface images, specifically comprising: The defective bright metal cylindrical surface is placed under an industrial area array camera in the bright metal cylindrical surface inspection device for image acquisition. Turn off the backlight, control the bar light source in the metal high-brightness cylindrical surface inspection device to illuminate the metal high-brightness cylindrical surface containing defects, control the rotating platform in the metal high-brightness cylindrical surface inspection device to drive the metal high-brightness cylindrical surface containing defects to rotate at a preset frequency, and control the industrial area scan camera in the metal high-brightness cylindrical surface inspection device to acquire at least two images of the metal high-brightness cylindrical surface containing defects at a preset frame rate. The image of a bright, defective metallic cylinder surface is cropped using a slicing algorithm to extract the center region of the exposure area, resulting in multiple center regions of the exposure area. The center regions of multiple exposure areas are stitched together to obtain the first set of images of a metallic high-brightness cylindrical surface. Turn off the bar light source, control the backlight in the metal high-brightness cylindrical surface detection device to illuminate the metal high-brightness cylindrical surface containing defects, and acquire at least two images of the metal high-brightness cylindrical surface containing defects to obtain a second metal high-brightness cylindrical surface image set. Integrate the first set of images of bright metallic cylinders and the second set of images of bright metallic cylinders to construct a set of images of bright metallic cylinders; The enhancement module performs image enhancement processing on the first set of images of bright metallic cylindrical surfaces to obtain an approximately uniformly distributed histogram of the first set of images of bright metallic cylindrical surfaces. The fitting module performs a straight-line fitting operation on the second set of metallic high-brightness cylindrical surface images to obtain the straight-line fitting results of the second metallic high-brightness cylindrical surface images. The annotation module is used to perform data annotation processing on the approximately uniform distribution histogram of the first metallic bright cylindrical surface image and the straight line fitting result of the second metallic bright cylindrical surface image to obtain the rectangular frame annotation data of the metallic bright cylindrical surface image. The detection module is used to input the rectangular bounding box annotation data of the bright metal cylindrical surface image into the target recognition network for detection, and obtain the defect detection results of the bright metal cylindrical surface.