Shenzhen Kai Mo Rui Electronic Technology Co. LTDShenzhen Kai Mo Rui Electronic Technology Co. LTD

News

A Steel Pipe Surface Defect Detection Method Based on Machine Vision

Source:Shenzhen Kai Mo Rui Electronic Technology Co. LTD2026-09-14

 

Steel pipes, as a raw material, are widely used in industries such as petroleum, chemical processing, electric power, shipbuilding, and automotive manufacturing. In recent years, the trend of economic globalization has placed increasingly stringent demands on product quality. Surface defects in steel pipes can significantly compromise their service life, while the use of substandard pipes in critical equipment locations poses serious safety risks, endangering human life and inflicting substantial financial losses on enterprises.

Therefore, to ensure the quality of steel pipes, relevant enterprises conduct quality inspections; however, these inspection procedures are typically performed manually, making it impossible to detect defects quickly and accurately.

During the steel pipe manufacturing process,Due to various factors, including raw materials, rolling equipment, and processing techniques, the surface may exhibit a range of defects, such as scratches, roll marks, iron oxide scale, surface inclusions, porosity, cracks, and a pitted or rough texture.These defects not only severely compromise the product’s appearance but also degrade its corrosion resistance, wear resistance, and fatigue strength, thereby adversely affecting the company’s development and introducing safety risks during the use of downstream products that rely on steel pipes as raw material.

Surface defect regions are characterized by stress concentration and structural weakness; moreover, abrupt property changes, fatigue damage, and corrosion tend to occur predominantly in these areas, significantly degrading the service performance of steel pipes under complex and harsh environmental conditions. Conducting inspections of surface defect zones in steel pipes to promptly identify such defects is of great importance, as it provides a basis for optimizing manufacturing processes and enhancing equipment condition.

Currently, the detection of surface defects in steel pipes is mostly performed manually. This manual approach relies on on-site expertise and is inefficient.Affected by the on-site environment, the workload is heavy, leading to frequent missed defects and false positives. This approach fails to provide a comprehensive assessment of the steel pipe’s surface quality, suffers from poor real-time performance, offers limited inspection types, and delivers low detection efficiency, lacking a holistic evaluation of product surface integrity. With advances in computing technology and the rise of artificial intelligence, machine vision has found widespread application. Employing machine‑vision methods can effectively address the limitations of manual inspection, delivering high precision and further serving as a data platform for smart manufacturing.

01

Characteristics of Steel Pipe Surface Defect Detection

Both domestically and internationally, machine vision based inspection of metallurgical products primarily targets sheet metal, strip steel, and steel bars. These products feature relatively flat surfaces, low surface roughness, and uniform material reflectivity. As long as the incident illumination angle is appropriately chosen and the intensity distribution is uniform, either area‑scan or line scan cameras can acquire high quality images of surface defects, thereby significantly reducing the complexity of subsequent image processing algorithms.

As shown in the schematic diagram of illumination distribution for surface defect detection on planar materials, ideal lighting can typically be achieved using one or more area scan cameras; by contrast, line scan illumination is even easier to implement, since all points within the illuminated region are equidistant from the light source’s center.

1789358261350036.png 

For steel pipes, due to their geometric characteristics, when a area‑array light source is used, the curved outer surface causes an excessive variation in the distance between the light source’s center and different points on the illuminated region. As shown in the figure, the area closest to the light source exhibits relatively high brightness, whereas the illumination intensity diminishes toward both sides of this nearest point. The resulting image also reflects this pattern: the central region displays higher pixel gray levels, while the peripheral regions have lower pixel gray values.

1789358267712029.png 

Another scenario, as shown in the figure, involves using a line-scan camera and a line-array light source to perform dynamic defect inspection of steel pipe surfaces. Due to factors such as vibration and assembly errors, the central axis of the line-array light source does not align with the longitudinal direction of the line-scan camera’s field of view. Typically, the camera’s field-of-view direction coincides with the line passing through the steel pipe’s rotational center. This misalignment reduces the overlap between the illuminated area and the camera’s field of view, resulting in severe illumination non-uniformity in the captured images and further increasing the complexity of image processing.

1789358274299148.png 

02

Key technical challenges

Due to their geometric structure, steel pipes are prone to uneven illumination. To achieve dynamic, real-time inspection of the curved surface of steel pipes, it is inevitable that the overlap between the light source’s illumination area and the camera’s field of view will be compromised, leading to non-uniform light distribution. This phenomenon can obscure the features of defect regions. When image acquisition is suboptimal, it further increases the complexity of image processing. Although numerous studies have been conducted in the field of machine vision inspection, research on surface defect detection for steel pipes remains relatively limited in China.The main difficulties are as follows:

(1)Like hot-rolled strip steel and heavy rails, hot-rolled seamless steel pipes are covered with a thick layer of iron oxide scale on their surfaces, which can give rise to various false defects.

(2)The curved outer surface of steel pipes is prone to uneven illumination.

(3)Due to uneven illumination, the grayscale differences of defects are significant, leading to severe missed detections.

(4)Affected by curvature, out-of-roundness, and surface protrusion defects, steel pipes vibrate during inspection, leading to image acquisition errors and poorly defined features.

(5)When performing dynamic detection, the overlap between the illumination area and the camera’s field of view decreases, leading to uneven illumination distribution.

03

Imaging Optics Design

The illumination system comprises the selection of illumination mode and the determination of the spatial relationship between the camera and the light source.

Illumination methods for steel pipe surfaces can be categorized into bright-field and dark-field illumination. This paper adopts the bright-field approach, which enhances the contrast between surface defects and the background. Because a single line-scan camera and a linear light source are employed, the effective field of view is narrow. Unlike the surfaces of other metallurgical products, hot-rolled seamless steel pipes, due to the characteristics of their manufacturing process, do not undergo polishing; consequently, their surface reflects light primarily through diffuse reflection. The figure shows the optical path configuration for bright-field illumination.

1789358280789445.png 

Based on the principles of image acquisition, it is necessary to determine the positions of the line-scan camera, the linear light source, and other components, which facilitates the specification of parameters during subsequent hardware selection.

To ensure that the field of view can fully cover steel pipe surfaces of varying lengths, the optical path is designed such that the field-of-view width exceeds the length of the steel pipe.

04

Hardware Parameter Design

  1. Camera

    Line-array cameras are primarily divided into two types: CCD and CMOS.

    Due to its operating principle, the surface of a CCD tends to attract and accumulate dust under the influence of electrostatic fields, which poses limitations in practical industrial inspection. In contrast, CMOS image sensors feature a higher degree of on-chip integration, facilitating optimized hardware design. They offer advantages such as flexible image capture, high sensitivity, wide dynamic range, high resolution, low power consumption, and excellent system integration, while also being more cost‑effective than CCD sensors.

    Based on the image acquisition scheme, the required detection accuracy is 0.5 mm, meaning the smallest detectable defect size is 0.5 mm × 0.5 mm. With a field-of-view width of H = 300 mm, the camera resolution must not be lower than the following values:

图片4.png 

  1. Lens

    The lens is positioned closest to the object being inspected and serves to focus the object onto the camera’s photosensitive sensor. Typically, relevant lens parameters must be considered to ensure proper compatibility with the camera and to enhance image quality. Lens selection involves determining key parameters such as focal length and image sensor format.

    Focal length is an important parameter of a lens and must be determined based on factors such as the object distance. According to the principles of image formation, the focal length can be calculated as follows:

图片5.png 

  1. In the equation, s denotes the length of the photosensitive chip; H is the field-of-view width, i.e., the range of the scene that the camera can capture; and d is the object distance.

  2. Light source

    The appropriate selection of a light source can enhance the performance of an imaging system, for example by improving contrast and reducing interference from irrelevant information. Based on the principles of surface image acquisition for steel pipes, a line‑array light source should be chosen to provide illumination, ensuring that the light intensity is both concentrated and uniform across the field of view.

    Due to the high efficiency, low power consumption, long lifespan, high safety, and excellent controllability of LED light sources, this paper employs LEDs for illumination.

05

Defect Detection

The surface defects of steel pipes arePits, scratches, peeling, and roller marks4 types of defects,

Figure (a) shows a pit defect., characterized by dot-like or blocky depressions that arise when oxide scale or foreign matter, left unremoved, becomes embedded in the steel pipe surface during rolling and subsequently flakes off;

Figure (b) shows a delamination defect., which is a metallic layer adhering to the outer surface of the steel pipe; during the subsequent deep‑processing operations involving pipe threading, inclusions that have accumulated become exposed as the wall thickness decreases, leading to crack initiation and propagation, and causing the surface skin to buckle outward.

1789358295252992.png 

Figure (c) shows a scratch defect., caused by scratches on the steel pipe surface from external metal or hard objects, typically appearing as long, narrow, sharp grooves or relatively shallow pits;

Figure (d) shows a roll-mark defect.This defect is caused by improper roll adjustment or surface damage and exhibits a periodic or continuous distribution.

1789358299695159.png 

Before extracting surface defect features from steel pipes, it is necessary to identify which features are effective. For defects such as pits, delaminations, scratches, and roll marks, features with strong discriminative power should be selected to construct the feature vector. The feature vector serves as a numerical representation of the defect characteristics, and feature extraction typically follows the principles outlined below:

1)Features in the image should be easy to extract;

2)The selected features are numerically unaffected by noise and irrelevant factors.

3)Features of defects of the same type exhibit compactness, while features of different defect types demonstrate good discriminability.

The distribution and size of surface defects on steel pipes are irregular and their morphology is complex; therefore, it is necessary to select features that can accurately characterize these defects. Machine vision technology captures target images with a CCD camera, converts them into image signals in real time, and feeds these signals into an embedded visual image-processing system. Based on information such as image saturation, pixel distribution, object edges, and brightness, the system transforms the image data into digital signals recognizable by a computer. Advanced algorithms are then employed to perform feature extraction and recognition, followed by evaluation of the results. The final output includes defect identification, dimensions, orientation angles, defect counts, pass/fail status, and presence/absence, thereby achieving automated defect detection.

图片8.png 

In summary, the machine-vision–based automatic defect detection system for steel pipes must address the following key issues:

1.It must be capable of online detection of surface defects on steel pipes, such as scratches, abrasions, holes, scale, and pitting.

2.It can handle interference caused by variations in the steel pipe’s width and length, as well as distortions or tilts that occur during movement, and by oil stains or water droplets on the pipe’s surface.

3.Defect detection features self-learning and adaptive capabilities, making it suitable for varying widths, colors, and speeds. It must also incorporate functions such as pattern recognition, automatic exposure, anti‑shake, and defect alarm. Both defect detection and defect alarming are performed dynamically in real time.

4.It must feature high precision and a low incidence of faults, and the system’s tasks should be accomplished by integrating industrial-grade digital cameras with industrial-grade PCs.

Related News

Professional Engineer

24-hour online serviceSubmit requirements and quickly customize solutions for you

+8613798538021