Next Article in Journal
Optimizing Urban Traffic Efficiency and Safety via V2X: A Simulation Study Using the MOSAIC Platform
Previous Article in Journal
HCDFI-YOLOv8: A Transmission Line Ice Cover Detection Model Based on Improved YOLOv8 in Complex Environmental Contexts
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Geometric Parameter Identification of Large Bent Pipes Using a Single-View Vision System

by
Krzysztof Borkowski
1,*,
Dariusz Janecki
2,
Jarosław Zwierzchowski
1 and
Dawid Sebastian Pietrala
1
1
Department of Automation and Robotics, Kielce University of Technology, al. Tysiąclecia P. P. 7, 25-314 Kielce, Poland
2
Institute of Electronics, Lodz University of Technology, al. Politechniki 10, 90-590 Łódz, Poland
*
Author to whom correspondence should be addressed.
Sensors 2025, 25(17), 5420; https://doi.org/10.3390/s25175420
Submission received: 20 May 2025 / Revised: 22 August 2025 / Accepted: 26 August 2025 / Published: 2 September 2025

Abstract

This paper describes methods of determining important measurement parameters of large bent pipes with diameters of up to 1.2 m for heavy industry, which can be obtained instantly from a vision system. The article presents, in detail, modeling methods of the bending angle, radius, and straight sections of the bent pipe. The system is able to detect the start and end of such sections, which is novel in automatic pipe measurement. The article also demonstrates the use of a modified Hough transform in line and curve fitting and the necessary image preprocessing. The complete system operates on distortion models and image projection dedicated for pipe models with images taken from a single camera.

1. Introduction

Vision systems play a crucial role in modern manufacturing, enabling continuous monitoring and real-time adjustment of production parameters to ensure compliance with increasingly stringent quality standards. Despite significant technological progress, there remains a noticeable lack of simple and effective measurement systems dedicated to applications in heavy industry.
The purpose of this study is to develop algorithms for a vision-based measurement system intended to inspect the dimensions and shapes of large-scale bent pipes used in heavy-industry applications. A key objective is also to evaluate the measurement accuracy of the proposed system using data acquired from a single-camera setup and to compare the results with those obtained from a coordinate measuring machine (CMM).
The use of low-cost 2D vision systems for the dimensional inspection of 3D objects is a worthwhile approach, offering a balance between system simplicity, cost-effectiveness, and acceptable measurement accuracy in industrial environments.
Our system is designed to verify the dimensional conformity of nominal cylindrical and toroidal geometries from a single image and is not intended to detect defects such as ovalization or local variations in the radius of the bend.
The authors previously published an ICCS 2023 paper describing the method of mathematical modeling of bent pipes and camera calibration, also presenting quantitative and qualitative measurements [1]. The focus was on single- and double-bending models in one plane, and the perspective projection for images obtained from the vision system was described there. In this work, we extend that research and present methods for estimating parameters relevant to heavy-industry inspection. It was assumed that the bent pipe model is already known and that an appropriate perspective projection was made.

1.1. List of Main Contributions

The new elements that are worth emphasizing in this paper are the following: (1) algorithms for the necessary image pre-processing, (2) an algorithm for fitting straight lines or curves to the contour of the bent pipe and a modification of Hough transform, and (3) a mathematical method for determining the pipe diameter and bending angle, as well as the beginning and end of straight sections in bent pipes.

1.2. Related Works

A wide range of methods for shape measurement and classification have been developed, which can be broadly divided into contact and non-contact techniques [2,3]. Contact methods, such as coordinate measuring arms [4,5], offer high accuracy, but they require manual operation and are not suitable for automated inspection of large-scale bent pipes. As a result, non-contact optical methods—both active (e.g., laser scanning, structured light projection [6,7]) and passive (e.g., photogrammetry, stereovision [8,9])—have become increasingly popular for the measurement and inspection of complex pipe geometries. However, the application of active optical methods, such as fringe projection [10] to long metallic pipes, is limited by issues with specular reflections and the difficulty of ensuring uniform projection and calibration over large areas [11]. Consequently, recent research has focused on vision-based and multi-view approaches, as summarized below.
In recent years, several studies have been published on optical inspection and measurement systems for bent pipes and tubes. Most of these systems reconstruct the 3D surface of the pipe using passive multi-view approaches.
In [12], a preliminary discretization of the point cloud in circles was used. In experiments carried out in a measurement space of 1850 × 1200 × 500 mm , a standard deviation of 0.12 mm was achieved for dimensional length A (Figure 1 at Ref. [12]), which measured 83.94 mm . The relative uncertainty for the dimension length was 0.14 % .
The study presented in [13] introduced a photometric linearization method to eliminate light reflections on the surface of the pipe and a method to determine the length of the centerline. In the experiments, an eight-camera vision system with a measurement area of 850 × 850 mm was utilized. During the measurement, a standard deviation of 0.167 mm was achieved for the length of the centerline, which was measured as 373 mm . The relative uncertainty for measuring the length of the centerline was 0.04 % .
The system described in [14] consists of 16 cameras with a measurement volume of 1850 × 1200 × 500 mm . The experiments carried out yielded an average squared measurement error of 0.5 mm for a bending radius of 60 mm . The relative uncertainty for the radius was 0.83 % .
The work presented in [15] describes a pipe measurement system based on stereo vision, incorporating a perspective model of the pipe to enhance the accuracy of the reconstructed spatial axis.
Huang [16] conducted an error analysis of 3D reconstruction for bent pipes using a multicamera setup divided into stereo pairs. In addition, a backlit work table was used to improve the visibility of the pipes features.
In [17], a system was presented to reconstruct the shape of pipes from images captured by a three-view vision system. The study accounted for perspective distortions for each camera, and the pipe surfaces were described using circles of the same diameter. An average squared measurement error of 0.125 mm was obtained for pipes with a bending radius of 4.16 mm . The relative uncertainty of the measurement of the radius of the bend was 3.00 % .
In [18], a multi-camera system with a working area of 600 × 1200 mm , comprising eight cameras, was introduced. For the key points determined on the pipe, an average standard deviation of 0.025 mm was obtained with a pipe length of 819.922 mm .
Active methods have also been explored, particularly those based on laser scanning. In [19], a 3D model of a pipeline was generated from a point cloud, achieving a mean standard deviation of 3.40 mm .
The study in [20] presents a system for continuous monitoring of the bending angle both during and immediately after the forming process. A laser-based device mounted at the end of the pipe was used for this purpose.
Classical single-view metrology establishes how absolute dimensions can be inferred from a single perspective image given minimal geometric references and calibration constraints [21]. Robust ellipse or circle modeling in perspective is widely used for cylindrical objects and underpins many industrial vision solutions [22]. More recent work explores the combination of geometric models with learning-based ellipse prediction for improved stability [23]. In contrast, deep learning approaches in pipe inspection focus primarily on detecting and segmenting defects in CCTV or radiographic imagery [24,25] and typically do not report the absolute geometric parameters of large bent pipes from a single image. Our model-based, single-camera pipeline complements these efforts by providing explicit parameter estimation (diameter, bend angle and radius, straight section lengths) with accuracy referenced to a CMM.

2. Materials and Methods

The calculations and algorithms described in this work were implemented using Wolfram Mathematica (Version10.0); this is a research prototype, not a finalized engineering implementation.
Image acquisition was carried out with a camera PIXELINK PL–D7715CU (Pixelink, Inc., Ottawa, ON, Canada), featuring a 15 Mpix CMOS sensor ( 4608 × 3228 px resolution), equipped with a TECHSPEC 58–000 fixed focal length lens with a focal length of 8.5 mm .
For the purposes of this study, a laboratory measurement station was prepared on a 1:4 scale, replicating a real marking table used on the production line. The table was made of laser-cut steel sheets to reproduce real working conditions, including the presence of gaps between the table segments and surface imperfections. The dimensions of the laboratory table are 1000 × 1745 mm , and the distance from the camera to the surface of the table is 2300 mm . Figure 1 shows a side view of the measurement station.
We measure the parameters of a bent pipe lying freely on the measuring table based on its external contour observed on the camera image. Consider a vision system that uses two example images taken at the measuring station. The images have a resolution of 4608 × 3228 px and are stored in the RGB color space. Our goal is to determine the parameters of the bent pipe. We assume that the measured object is a combination of cylindrical and toroidal surfaces with a constant radius of the cross-section. This makes it possible to measure the parameters of the object based on the image obtained from one camera setting. It should be mentioned here that this is an approximation; in reality, the arc of the bent pipe consists of many smaller arcs with different radii, and in addition, the pipe undergoes ovalization (change of the shape of the pipe cross section from circular to elliptical).
The parameters subjected to control are marked in Figure 2 and are as follows: bending angle γ, bending radius R, straight sections lengths l 1 , and pipe diameter D.
The desired parameter values can be determined based on the knowledge of the edge points of the pipe determined in the plane containing its centerline (Figure 2). In the case where the pipe with one bent arc lies freely on the measuring table, we obtain the edge points by projecting it straight onto the plane of the measuring table. The edge points—the contour of the pipe—are also visible in the digital photo from the station. However, it should be emphasized that the outline of the pipe observed from the camera point can be interpreted as its central (perspective) projection onto the surface of the table.

2.1. Processing and Segmentation of Images

The segmentation process leads to the determination of identifiable sets of points from a digital image, which in this case are sets of edge points of bent pipes lying freely on the measurement table.
Consider a vision system that utilizes two sample images captured at the measurement station. Both images have a resolution of 4608 × 3228 px and are stored in the RGB color space.
The first step is to remove the background of the image with the pipe by subtracting the preliminary image on which the object under study is not located.
To improve contrast and reduce differences between images, we perform histogram equalization for both images [26]. This method flattens the image histogram while enhancing the details. The transformation is achieved by linearizing the cumulative distribution function of pixel brightness probability in the image and is calculated separately for each RGB color component. The resulting image is shown in Figure 3.
In the next step, we preliminarily identify areas with pipes by calculating the difference between the images. In the resulting image, pipes along with fragments of the measurement table, which are false detections, are visible.
To correct for errors in objects, we apply the morphological closing operation (for the color image [27]). We obtained a color image with distinguishable regions where the bent pipes are located.
Next, we convert the image to grayscale and perform its binarization, with the threshold determined based on the histogram.
The binary image obtained (Figure 4) consists of uniform regions (sets of points), each associated with a single pipe. We can assume that the edges of the pipes are located near the contour of the binary mask; however, it should be emphasized that they may also include the shadow of the pipe. Therefore, we will use them to select the object and reject edges that are not associated with the pipe.
The edge points of the pipe can be accurately determined using the Canny edge detector [28], which returns a binary image with detected edges of thickness 1 px . Furthermore, in the studies conducted [29], it was recognized as the most effective among the applied and tested algorithms. In Figure 5, recognized contours are depicted, which have been thickened for better visibility.
As can be observed, the image displays not only the edges of the pipes but also other objects, such as impurities, on the measurement table. These can be discarded by overlaying the previously determined binary mask image of the pipes onto the image with edges.
Notice that the edge detector has also detected light reflections inside the contours of the pipes. We discard them by applying a shadowed binary mask, which we then invert and overlay onto the edge image again. As a result, we obtain an image in which only the contours of the bent pipes remain (Figure 6).
Finally, the edge points in the pixel coordinates are converted to the metric coordinates expressed in the coordinate system of the measurement table X t Y t Z t . For this purpose, a dedicated calibration model of the measurement station was utilized. This model was developed by the authors due to the impracticality of using traditional calibration methods, such as Zhang’s method with a 2D pattern, for large-scale setups. The industrial measurement table is over 6 m long, which makes it difficult to fabricate and position a sufficiently large and rigid 2D calibration pattern at various angles and distances from the camera. Therefore, the proposed calibration model enables an unambiguous mapping between the pixel coordinates of the image and the metric coordinates of the measurement table, using a 2D pattern placed flat on the table surface and arranged in various positions on the table plane. The model accounts for perspective effects and camera nonlinearities, including lens distortion, and its parameters can be determined uniquely. A comprehensive description and validation of this calibration model is beyond the scope of this paper.

2.2. Determining Pipe Parameters

The pipe is modeled as a composition of cylindrical and toroidal surfaces with a constant cross-section and bend radius in the inspected segment. The method targets dimensional verification of nominal geometry and does not estimate local defects such as cross-sectional ovalization, wrinkling, or gradually varying bend radii.
The determination of the parameters of the bent pipes is divided into three stages: (1) determination of two pairs of parallel lines (projections of straight segments of the pipe); (2) determination of curves that represent the projection of a torus fragment; (3) fitting of the pipe parameters using the analytical model presented in the work [1].

2.2.1. Modification of the Hough Transform

An effective method to reduce errors is to fit a line or curve to the data obtained. For this purpose, the line equations were determined using an algorithm based on the Hough transform [30]. In the case of a line, its position will be determined in polar coordinates.
x cos θ + y sin θ = ρ .
The plot of this equation for a single point is a sinusoid. Angle θ [ 0 , π ] and distance ρ [ ρ max , ρ max ] , where the value of ρ max is the distance from the origin of the coordinate system to the farthest point (for an image, this is the length of the diagonal).
By solving Equation (1) for a chosen image point ( x , y ) , we determine the distance ρ to the line with the inclination angle θ ^ 1 passing through this point. We round the obtained value of ρ to the nearest discrete value ρ ^ j , and then we increment the value of the accumulator cell A h corresponding to the determined pair of parameters θ ^ 1 , ρ ^ j by one. We perform these calculations for all the points on the image. Then, we repeat the scheme for the remaining discrete values of the line inclination angle θ ^ i .
We can find the parameters of the lines by searching for local maxima, where the value corresponds to the number of points lying on that line. Notice that the projection of a straight segment of a pipe lying on the table consists of a pair of parallel lines, thus having the same inclination angle θ ^ i but different distances ρ ^ i , 1 and ρ ^ i , 2 . Such a pair of lines can be found, for example, by solving the following task:
max θ ^ i , ρ ^ i , 1 , ρ ^ i , 2 ( Π h ( θ ^ i , ρ ^ i , 1 ) + Π h ( θ ^ i , ρ ^ i , 2 ) ) ,
assuming that the distance between the lines | ρ ^ i , 1 ρ ^ i , 2 | is sufficiently large (e.g., | ρ ^ i , 1 ρ ^ i , 2 | > δ ρ , where δ ρ is not greater than the nominal diameter D of the examined pipes).
During the search for pairs of lines, points close to the line within a distance η were additionally considered, and the matching index was defined as a function:
g ( θ ^ i ) = max ρ ^ i , 1 , ρ ^ i , 2 ( j = η η Π h ( θ ^ i , ρ ^ i , 1 + j ) + j = η η Π h ( θ ^ i , ρ ^ i , 2 + j ) )
The parameter η was derived from the effective pixel size at the working distance to reduce the impact of image noise on line fitting. The separation threshold δ ρ is set below the minimum nominal pipe diameter in the inspected family to reject spurious parallel pairs.
By solving Equation (3) for a sample pipe with parameters η = 0.1 mm and δ ρ = 10.0 mm , the quality index curve can be obtained as shown in Figure 7. Two maxima are visible for the angles θ 1 and θ 2 . Furthermore, in the algorithm, it was assumed that the difference between the angles | θ 1 θ 2 | should be greater than the minimum bending angle δ θ occurring in production, which is 0.5 °.
The result of the described algorithm is the parameters of two pairs of parallel lines ( θ 1 , ρ 1 , 1 , ρ 1 , 2 ) and ( θ 2 , ρ 2 , 1 , ρ 2 , 2 ) , which are visible in the Hough plane and are marked in Figure 8. The two pairs of parallel lines determined have been overlaid on the edges of the pipe in Figure 9.

2.2.2. Determination of the Diameter and Bending Angle of the Pipe

The next task is to determine the centerline for the cylindrical segments of the pipe.
To determine the parameters of the pipe, we first seek the equations of the centerlines of the two cylindrical segments of the pipe. Consider a cylindrical segment of the pipe with an angle of inclination θ 1 . Consider three planes: the table plane π 1 and two tangent planes to the cylinder passing through the camera point π 2 , π 3 , and then the perpendicular section to the three described planes passing through the camera point C (Figure 10).
Our goal is to determine the radius of the circle inscribed in the triangle A B C and the coordinate ρ 1 of the orthogonal projection of the center of the circle on the table plane, using the fact that the coordinates of the points A and B are equal to ρ 1 , 1 and ρ 1 , 2 , respectively. We have the following:
r 1 = | AB | z c | AB | + | BC | + | CA | ,
where | AB | = | ρ i , 1 ρ i , 2 | , | BC | = z c 2 + ρ 1 , 2 2 , | CA | = z c 2 + ρ 1 , 1 2 .
Similarly, we will determine the radius value r 2 . Of course, in reality, the radius of the pipe at both ends is the same. Therefore, we can assume that
r = r 1 + r 2 2 .
From Figure 10, we can also deduce the method for determining the coordinate ρ 1 . We have (assuming r 1 = r )
ρ 1 = ρ 1 , 1 + r cot 1 2 BAC
Similarly, we will determine the centerline parameter of the second cylindrical segment.
As a result of the calculations, we obtained the parameters of the orthogonal projection of the centerlines on the table plane for both cylindrical segments of the pipe ( θ 1 , ρ 1 ) and ( θ 2 , ρ 2 ) , as shown in Figure 11.
Of course, on the lines passing through the centerline of the cylindrical segments of the pipe, we can describe the bent pipe in four different orientations (Figure 12). We will make the choice based on the midpoint of the pipe outline P n , which is the result of the arithmetic mean of the edge points of the pipe P e ; let us denote it as follows:
P n = x n y n = i = i n p P e , i n p ,
where i is the ordinal number of the edge point and n p denotes the total number of these points.
Next, for the parameters of the centerlines ( θ 1 , ρ 1 ) and ( θ 2 , ρ 2 ) , we will adopt new labels: ( θ H , ρ H ) for the line with a greater inclination angle and ( θ L , ρ L ) for the line with a smaller inclination angle.
Using Equation (1), we determine the distances ρ n , H and ρ n , L to the lines that pass through the midpoint P n at angles θ H and θ L .
Based on the values obtained, we can determine the assessment of the bending angle.
γ = θ H θ L for ρ n , H > ρ H ρ n , L > ρ L π ( θ H θ L ) for ρ n , H > ρ H ρ n , L < ρ L θ H θ L for ρ n , H < ρ H ρ n , L < ρ L π ( θ H θ L ) for ρ n , H < ρ H ρ n , L > ρ L ,
and determine the inclination angle of the orthogonal projection of the centerline of the pipe at the starting point P 0 relative to the O X axis:
β 1 = θ L π / 2 for ρ n , H > ρ H ρ n , L > ρ L θ H π / 2 for ρ n , H > ρ H ρ n , L < ρ L θ L + π / 2 for ρ n , H < ρ H ρ n , L < ρ L θ H + π / 2 for ρ n , H < ρ H ρ n , L > ρ L .

2.2.3. Identification of the Bending Radius of the Pipe

To determine the bending radius R of the pipe, consider the perspective projection of its bent segment, described by the complex equations of the analytical model: Equation (12) in Ref. [1]. Note that the center of the torus segment O 1 lies on the bisector of the adjacent angle γ formed by the lines lying on the centerline of the two cylindrical parts of the pipe (Figure 13), and is also offset from them by a distance R. We will determine the position of the point O 1 based on the real perspective projection of the bent pipe edge. Let us assume that the distance of point O 1 from the centerline, i.e., the value R, belongs to a certain interval [ R min , R max ] . By discretizing the interval with a step δ R , we obtain a sequence of values R ^ i .
Whenever the value of R ^ i changes, it is necessary to recalculate the parameters of the mathematical model. For simplicity, assume that the lengths of the straight sections l 1 = 0 and l 2 = 0 (their correct values will be determined in subsequent steps). Based on Figure 13, we determine the point.
P 1 = P s d cos β 1 sin β 1 , d = R ^ tan γ 2 ,
where d is the offset distance along the centerline and P s is the intersection point of the centerlines of both cylindrical segments of the pipe with parameters ( θ 1 , ρ 1 ) and ( θ 2 , ρ 2 ) .
Next, define two accumulators A 1 and A 2 as vectors with initial values set to zero, where the cell index i is associated with the discrete values R ^ i . For each edge point, we calculate the distance from this point to the two theoretical edge lines determined from the analytical model. If this distance is less than δ R , we increase the value of the accumulator A 1 , i or A 2 , i accordingly. The value by which we increase the accumulators is 1 when the points coincide, and decreases linearly to zero once the distance δ R between them is reached.
Finally, we determine the index i * , which is the solution to the task.
max i = A 1 , i + A 2 , i ,
and then we adopt the final assessment of the bending radius of the pipe as
R = R ^ i * .
Figure 14 shows the change in the matching assessment indicator A 1 , i + A 2 , i determined for the adopted sequence of R ^ i values of the investigated bending radius of the pipe. The comparison of the fitted bent arc to the measured edge points of the pipe is presented in Figure 15, where the centerline of the pipe arc, its starting and ending points P 1 and P 2 , and the bending center of the pipe O 1 are also marked.

2.2.4. Identification of the Lengths of Pipe Segments

The remaining parameters sought are the lengths of the straight segments of the pipe, denoted l 1 and l 2 . Let us begin by making a rough estimate of these lengths. To achieve this, we will fit two lines to the edge points at the ends of the pipe with parameters ( θ l , 1 , ρ l , 1 ) and ( θ l , 2 , ρ l , 2 ) , which (ideally) intersect with the lines passing through the centerline of the cylindrical segments of the pipe at right angles, meaning that their inclinations are
θ l , 1 = θ 1 ± π 2 , θ l , 2 = θ 2 ± π 2 .
The remaining parameters of the sought lines—the distances ρ ^ l , 1 and ρ ^ l , 2 —are found by searching for local maxima on the Hough plane Π h ( θ , ρ ) as described in Section 2.2.1 and depicted in Figure 16. Additionally, we will consider points lying at a distance η from the line by solving the following task:
max ρ ^ l , i ( j = η η Π h ( θ l , i , ρ ^ l , i + j ) ) .
Before solving the task, remember to reset the previously identified local maxima and their closest neighborhood on the Hough plane Π h ( θ , ρ ) .
In Figure 16, the parameter values for the determined lines that pass through the edge points at the ends of the pipe are marked. These lines are also shown in Figure 17.
Based on them, we will determine the intersection points with the already known lines representing segments of the centerline of the pipe and consider them as approximations of points P 0 , P 3 , representing the positions of the extreme transverse sections of the pipe.
Therefore, the approximate lengths of the straight segments of the pipe are as follows:
l ˜ 1 = | P ˜ 0 P 1 | , l ˜ 2 = | P 2 P ˜ 3 | .
Continuing with the task, we will determine the final estimate of the length of the pipe segments. Let us start by determining the length of the first straight segment of the pipe, denoted as l 1 . To achieve this, we will again apply the mathematical model Equation (12) in Ref. [1] to determine the projection fragment of the perspective for the first end of the pipe and then to assess its fit to the measured edge points.
Let us assume that the length of the segment l 1 is sought within a certain discrete interval l ^ 1 = [ l ^ min , l ^ max ] with a discretization step δ l = 0.1 mm , where the approximate length of the segment l ˜ 1 is one of the elements of the sequence l ^ 1 .
Furthermore, let us define the accumulator A 1 as a vector with initial zero values, where its elements are associated with discrete values l ^ 1 , i .
Each time the value of l ^ 1 , i changes, we assume a new position for the point P 0 , which defines the beginning of the centerline in the pipe model. Let us express this as follows:
P 0 = P 1 cos β 1 sin β 1 l ^ 1 , i .
For each edge point located at the beginning of the pipe, let us calculate its distance from the pipe contour segment determined by the mathematical projection model Equation (12) described in Ref. [1]. If this distance is less than δ l , we increase the corresponding cell of the accumulator A 1 by a value of the range 0 , 1 , which is inversely proportional to the distance between points in the range 0 , δ l .
After evaluating the fit for all values in the interval l ^ 1 , we determine the index of the cell i * for which the accumulator A 1 reaches its maximum value. Finally, let us adopt the measured length of the first segment.
l 1 = l ^ 1 , i * .
In Figure 18, the contents of the accumulator A 1 and the solution sought are presented. The comparison between the fit outline of the beginning of the pipe and the edge points of the pipe is shown in Figure 19.
The following is a note on visualization. In a single-view perspective projection of a thick object, the centerline point P 0 need not lie on the visible outer contour due to finite thickness and viewing geometry. The observed offset in Figure 19 is consistent with the projection of the pipe end (in red) relative to the detected edge (in blue).
The last parameter sought is the length of the second segment of the pipe, denoted as l 2 . We seek it in a manner analogous to the length of the first segment already presented. However, this time we do not specify the position of the end point of the centerline of the pipe P 4 because, in the mathematical model, the position of this point is an output value.
The calculated values of the matching indicator for the sequence of values l ^ 2 , i are stored in the cells i of a new accumulator A 2 . Then, we again search for the index of the cell i * for which the value stored in the accumulator is highest. Finally, we adopt the length of the second segment as follows:
l 2 = l ^ 2 , i * ,
where the index i * is the solution to the optimization problem max i ( A 2 , i ) .
For the discussed example, the content obtained from the accumulator A 2 is shown in Figure 20. The final fitting segment of the tube along with the last point P 3 on the centerline of the pipe is shown in Figure 21.
We have determined all the parameters of the pipe with a single bend: the diameter of the pipe D , the bending radius R , the bending angle γ , and the lengths of the cylindrical segments of the pipe l 1 and l 2 . The theoretical outline of the pipe calculated from the mathematical model was compared with the measured edge points of the pipe, presented in Figure 22.
The final result for the example discussed is presented in Figure 23. The figure shows the undistorted camera image with the pipe, the theoretical perspective projection of the pipe edge calculated using the analytical model (shown in red), and the determined pipe parameters. The parameters shown are the pipe diameter D = 62.2 mm , the bending angle γ = 89.95 °, the bending radius R = 238.6 mm , the lengths of the cylindrical segments of the pipe l 1 = 99.6 mm and l 2 = 295.0 mm , and the total pipe length l m = 769.2 mm .
Similarly, parameters can be determined for pipes with two bends in the same plane.

3. Results and Discussion

In this research paper, the authors addressed the issue of controlling the bending parameters of large-diameter pipes. This involves the bending angle and radius and also determining straight sections, which is carried out by algorithms of modeling using methods such as photogrammetry and digital image processing. All proposed algorithms were implemented and used. For this purpose, a single-camera vision measurement system was built and checked by comparing its measurement results with the CMM machine results. The system showed high accuracy and repeatability of the measurements, which is sufficient for heavy industry. In Table 1 are results for the accuracy of the proposed vision system compared to the measurement performed on the Zeiss Prismo Navigator CMM. Notably, the bending radius exhibits a standard deviation of 0.87 mm . Compared with the literature review and the fact that only one camera exists in the system, the result is the advantage of the designed system.
The method of determining the shape of the pipe is shown based on the perspective projection and modified Hough transform. The vast majority of the paper describes the algorithms for determining the straight elements of the bent pipe and the correct detection of the pipe ends. It is worth mentioning that this element of the measurement is difficult to estimate due to the smooth transition between the straight section and the bending curve and the contour noise.
The presented work together with the work [1] is a complete and detailed mathematical description of the measurement system with respect to perspective modeling and identification of measurement parameters.
The measurement accuracy achieved with the proposed single-view vision system is lower than that offered by advanced multicamera solutions. However, the algorithms implemented exhibit strong resistance to image noise, which is particularly advantageous in industrial environments. Importantly, for applications in the heavy industry, the level of measurement inaccuracy remains acceptable, as dimensional tolerances depend on the scale of the inspected components. In the case of large-scale bent pipes, allowable deviations typically amount to several millimeters, which aligns with the precision provided by the developed system.
Future research should consider the application of lenses with a higher modulation transfer function (MTF) to improve image fidelity. In addition, developing a method for shadow removal under pipes could further enhance the reliability and accuracy of the inspection process.

Author Contributions

Conceptualization, D.J. and K.B.; methodology, K.B. and D.J.; software, K.B.; validation, D.J., K.B., and J.Z.; formal analysis, K.B.; investigation, K.B.; resources, J.Z. and D.S.P.; data curation, K.B.; writing—original draft preparation, K.B.; writing—review and editing, D.J. and J.Z.; visualization, K.B. and D.S.P.; supervision, D.J.; project administration, K.B.; funding acquisition, D.J. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The raw data supporting the conclusions of this article will be made available by the authors on request.

Acknowledgments

The authors acknowledge Chemar Rurociągi Sp. z o.o. for providing pipe samples for the research.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Borkowski, K.; Janecki, D.; Zwierzchowski, J. Model of Perspective Distortions for a Vision Measuring System of Large-Diameter Bent Pipes. In Proceedings of the International Conference on Computational Science (ICCS 2023), Prague, Czech Republic, 3–5 July 2023; Springer: Berlin/Heidelberg, Germany, 2023; pp. 595–609. [Google Scholar] [CrossRef]
  2. Giancola, S.; Valenti, M.; Sala, R. A Survey on 3D Cameras: Metrological Comparison of Time-of-Flight, Structured-Light and Active Stereoscopy Technologies; Springer: Berlin/Heidelberg, Germany, 2018. [Google Scholar]
  3. Schwenke, H.; Neuschaefer-Rube, U.; Pfeifer, T.; Kunzmann, H. Optical methods for dimensional metrology in production engineering. CIrP Ann. 2002, 51, 685–699. [Google Scholar] [CrossRef]
  4. Ratajczyk, E.; Woźniak, A. Współrzędnościowe Systemy Pomiarowe; Oficyna Wydawnicza Politechniki Warszawskiej: Warszawa, Poland, 2016. [Google Scholar]
  5. Ratajczyk, E. Wyniki badań dokładności współrzędnościowych ramion pomiarowych. Pomiary Automatyka Robotyka 2017, 21, 57–62. [Google Scholar] [CrossRef]
  6. Li, W.; Hou, D.; Luo, Z.; Mao, X. 3D measurement system based on divergent multi-line structured light projection, its accuracy analysis. Optik 2021, 231, 166396. [Google Scholar] [CrossRef]
  7. Salvi, J.; Pages, J.; Batlle, J. Pattern codification strategies in structured light systems. Pattern Recognit. 2004, 37, 827–849. [Google Scholar] [CrossRef]
  8. Deng, H.X.; Wang, J.; Zhang, J.; Liang, C.J.; Ma, M.C.; Zhong, X.; Yu, L.D. A stereovision measurement for large deformation of light structures. Measurement 2019, 136, 387–394. [Google Scholar] [CrossRef]
  9. Yin, Z.; Xiong, J. Stereovision measurement of layer geometry in wire and arc additive manufacturing with various stereo matching algorithms. J. Manuf. Processes 2020, 56, 428–438. [Google Scholar] [CrossRef]
  10. Martini, M.G.; Beghi, M.G.; Genta, G. Measurement of Ovality in Pipes Using Structured Light. In Proceedings of the IMEKO TC14 Symposium on New Trends for Measurement and Instrumentation, Merida, Mexico, 21–24 November 2007; pp. 51–56. [Google Scholar]
  11. Wang, Y.; Zhang, X.; Su, Y.; Lei, Y. Polarization structured light 3D depth image sensor for scenes with reflective surfaces. Nat. Commun. 2023, 14, 7262. [Google Scholar] [CrossRef]
  12. Jin, P.; Liu, J.; Liu, S.; Wang, X. A new multi-vision-based reconstruction algorithm for tube inspection. Int. J. Adv. Manuf. Technol. 2017, 93, 2021–2035. [Google Scholar] [CrossRef]
  13. Liu, S.; Jin, P.; Liu, J.; Wang, X.; Sun, P. Accurate measurement method for tube’s endpoints based on machine vision. Chin. J. Mech. Eng. 2017, 30, 152–163. [Google Scholar] [CrossRef]
  14. Wang, X.; Liu, J.; Liu, S.; Jin, P.; Wu, T.; Wang, Z. Accurate radius measurement of multi-bend tubes based on stereo vision. Measurement 2018, 117, 326–338. [Google Scholar] [CrossRef]
  15. Sun, J.; Zhang, Y.; Cheng, X. A high precision 3D reconstruction method for bend tube axis based on binocular stereo vision. Opt. Express 2019, 27, 2292–2304. [Google Scholar] [CrossRef] [PubMed]
  16. Huang, H.; Liu, J.; Liu, S.; Jin, P.; Wu, T.; Zhang, T. Error analysis of a stereo-vision-based tube measurement system. Measurement 2020, 157, 107659. [Google Scholar] [CrossRef]
  17. Cheng, X.; Sun, J.; Zhou, F.; Xie, Y. Shape from apparent contours for bent pipes with constant diameter under perspective projection. Measurement 2021, 182, 109787. [Google Scholar] [CrossRef]
  18. Pai, W.; Liang, J.; Zhang, M.; Tang, Z.; Li, L. An advanced multi-camera system for automatic, high-precision and efficient tube profile measurement. Opt. Lasers Eng. 2022, 154, 106890. [Google Scholar] [CrossRef]
  19. Son, H.; Kim, C. Automatic segmentation and 3D modeling of pipelines into constituent parts from laser-scan data of the built environment. Autom. Constr. 2016, 68, 203–211. [Google Scholar] [CrossRef]
  20. Ha, T.; Ma, J.; Blindheim, J.; Welo, T.; Ringen, G.; Wang, J. In-line springback measurement for tube bending using a laser system. Procedia Manuf. 2020, 47, 766–773. [Google Scholar] [CrossRef]
  21. Criminisi, A.; Reid, I.D.; Zisserman, A. Single View Metrology. Int. J. Comput. Vis. 2000, 40, 123–148. [Google Scholar] [CrossRef]
  22. Fitzgibbon, A.W.; Pilu, M.; Fisher, R.B. Direct Least Squares Fitting of Ellipses. IEEE Trans. Pattern Anal. Mach. Intell. 1999, 21, 476–480. [Google Scholar] [CrossRef]
  23. Zins, M.; Simon, G.; Berger, M.O. Object-Based Visual Camera Pose Estimation From Ellipsoidal Model and 3D-Aware Ellipse Prediction. Int. J. Comput. Vis. 2022, 130, 3021–3045. [Google Scholar] [CrossRef]
  24. Yussuf, A.N.; Tran, M.D.; La, H.M.; James, D.E. Leveraging Deep Learning Techniques for Condition Assessment of Stormwater Pipe Network. J. Civ. Struct. Health Monit. 2024, 14, 565–584. [Google Scholar] [CrossRef]
  25. Tyystj"arvi, T.; Virkkunen, I.; Fridolf, P.; Rosell, A.; Barsoum, Z. Automated Defect Detection in Digital Radiography of Aerospace Welds Using Deep Learning. Weld. World 2022, 66, 789–799. [Google Scholar] [CrossRef]
  26. Cheng, H.D.; Shi, X. A simple and effective histogram equalization approach to image enhancement. Digit. Signal Process. 2004, 14, 158–170. [Google Scholar] [CrossRef]
  27. Benavent, X.; Dura, E.; Vegara, F.; Domingo, J. Mathematical morphology for color images: An image-dependent approach. Math. Probl. Eng. 2012. [Google Scholar] [CrossRef]
  28. Canny, J. A computational approach to edge detection. IEEE Trans. Pattern Anal. Mach. Intell. 1986, PAMI-8, 679–698. [Google Scholar] [CrossRef]
  29. Czechowicz, A.; Mikrut, S. Analiza przydatności algorytmów detekcji krawędzi w zastosowaniach fotogrametrii bliskiego zasięgu. Arch. Fotogram. Kartogr. Teledetekcji 2006, 16, 135–146. [Google Scholar]
  30. Hart, P.E.; Duda, R. Use of the Hough transformation to detect lines and curves in pictures. Commun. ACM 1972, 15, 11–15. [Google Scholar] [CrossRef]
Figure 1. Side view of the laboratory measurement station. The surface of the table is designed to replicate the segmented marking table used in real industrial conditions.
Figure 1. Side view of the laboratory measurement station. The surface of the table is designed to replicate the segmented marking table used in real industrial conditions.
Sensors 25 05420 g001
Figure 2. Parameters of the bent pipe—bending angles γ , bending radius R , lengths of straight sections l 1 , l 2 , pipe diameter D = 2 r , initial point of the centerline P 0 , the slope of the centerline at point P 0 to axis X : β 1 .
Figure 2. Parameters of the bent pipe—bending angles γ , bending radius R , lengths of straight sections l 1 , l 2 , pipe diameter D = 2 r , initial point of the centerline P 0 , the slope of the centerline at point P 0 to axis X : β 1 .
Sensors 25 05420 g002
Figure 3. Camera image of the pipe acquired at the measurement station after histogram equalization.
Figure 3. Camera image of the pipe acquired at the measurement station after histogram equalization.
Sensors 25 05420 g003
Figure 4. Binary masks of the pipes obtained through image segmentation, including background subtraction, morphological processing, and binarization.
Figure 4. Binary masks of the pipes obtained through image segmentation, including background subtraction, morphological processing, and binarization.
Sensors 25 05420 g004
Figure 5. Camera image after edge detector.
Figure 5. Camera image after edge detector.
Sensors 25 05420 g005
Figure 6. Detected pipe edges in the image, obtained using an edge detector and selected by filtering within the regions of the binary pipe masks.
Figure 6. Detected pipe edges in the image, obtained using an edge detector and selected by filtering within the regions of the binary pipe masks.
Sensors 25 05420 g006
Figure 7. The matching indicator for a pair of parallel lines depends on the angle θ .
Figure 7. The matching indicator for a pair of parallel lines depends on the angle θ .
Sensors 25 05420 g007
Figure 8. The Hough plane, showing the number of points lying on a line with an inclination angle θ and a distance ρ from the origin of the coordinate system. The detected two pairs of parallel lines with parameters ( θ 1 , ρ 1 , 1 , ρ 1 , 2 ) and ( θ 2 , ρ 2 , 1 , ρ 2 , 2 ) are marked on the plot.
Figure 8. The Hough plane, showing the number of points lying on a line with an inclination angle θ and a distance ρ from the origin of the coordinate system. The detected two pairs of parallel lines with parameters ( θ 1 , ρ 1 , 1 , ρ 1 , 2 ) and ( θ 2 , ρ 2 , 1 , ρ 2 , 2 ) are marked on the plot.
Sensors 25 05420 g008
Figure 9. Matched pairs of parallel lines to the edge points of cylindrical segments of the bent pipe.
Figure 9. Matched pairs of parallel lines to the edge points of cylindrical segments of the bent pipe.
Sensors 25 05420 g009
Figure 10. The cross-section of the pipe with visible edge points A and B from camera point C and the point on the centerline M .
Figure 10. The cross-section of the pipe with visible edge points A and B from camera point C and the point on the centerline M .
Sensors 25 05420 g010
Figure 11. The orthogonal projection of the determined centerlines (dashed lines) for cylindrical segments of the pipe with parameters ( θ 1 , ρ 1 ) , ( θ 2 , ρ 2 ) , and the bisector of the angle between them with their intersection point P s .
Figure 11. The orthogonal projection of the determined centerlines (dashed lines) for cylindrical segments of the pipe with parameters ( θ 1 , ρ 1 ) , ( θ 2 , ρ 2 ) , and the bisector of the angle between them with their intersection point P s .
Sensors 25 05420 g011
Figure 12. Four pipe configurations determined based on the centerlines with parameters ( θ H , ρ H ) and ( θ L , ρ L ) .
Figure 12. Four pipe configurations determined based on the centerlines with parameters ( θ H , ρ H ) and ( θ L , ρ L ) .
Sensors 25 05420 g012
Figure 13. The cross-section of the pipe with the centerline and the bending center point O 1 lying on the bisector of the angle adjacent to the bending angle of the pipe γ .
Figure 13. The cross-section of the pipe with the centerline and the bending center point O 1 lying on the bisector of the angle adjacent to the bending angle of the pipe γ .
Sensors 25 05420 g013
Figure 14. The matching indicator of the edge points of the pipe to the theoretical outline of the bent arc determined from the perspective model.
Figure 14. The matching indicator of the edge points of the pipe to the theoretical outline of the bent arc determined from the perspective model.
Sensors 25 05420 g014
Figure 15. Comparison between the determined outline of the perspective projection of the bent arc (in red) and the edge points of the pipe (in blue).
Figure 15. Comparison between the determined outline of the perspective projection of the bent arc (in red) and the edge points of the pipe (in blue).
Sensors 25 05420 g015
Figure 16. The Hough plane with the determined parameters of the lines ( θ l , 1 , ρ l , 1 ) and ( θ l , 2 , ρ l , 2 ) passing through the edge points at the ends of the pipe (in red), and the previously determined parameters of the lines passing through the edge points of the cylindrical sections of the bent pipe (in blue).
Figure 16. The Hough plane with the determined parameters of the lines ( θ l , 1 , ρ l , 1 ) and ( θ l , 2 , ρ l , 2 ) passing through the edge points at the ends of the pipe (in red), and the previously determined parameters of the lines passing through the edge points of the cylindrical sections of the bent pipe (in blue).
Sensors 25 05420 g016
Figure 17. Approximate positions of the pipe endpoints, P ˜ 0 and P ˜ 3 , determined based on lines (in red) passing through the edge points (in blue) at the pipe ends. Both lines are defined by direction vectors (in gray) with leading angles θ l , 1 and θ l , 2 .
Figure 17. Approximate positions of the pipe endpoints, P ˜ 0 and P ˜ 3 , determined based on lines (in red) passing through the edge points (in blue) at the pipe ends. Both lines are defined by direction vectors (in gray) with leading angles θ l , 1 and θ l , 2 .
Sensors 25 05420 g017
Figure 18. The trend of the matching indicator calculated from the mathematical model’s outline of the beginning of the pipe to the edge points of the pipe as the length l 1 changes.
Figure 18. The trend of the matching indicator calculated from the mathematical model’s outline of the beginning of the pipe to the edge points of the pipe as the length l 1 changes.
Sensors 25 05420 g018
Figure 19. Comparison between the outline of the perspective projection for the beginning of the pipe (in red) and the edge points of the pipe (in blue).
Figure 19. Comparison between the outline of the perspective projection for the beginning of the pipe (in red) and the edge points of the pipe (in blue).
Sensors 25 05420 g019
Figure 20. The trend of the matching indicator of the perspective projection outline fragment of the end of the pipe to the edge points of the pipe.
Figure 20. The trend of the matching indicator of the perspective projection outline fragment of the end of the pipe to the edge points of the pipe.
Sensors 25 05420 g020
Figure 21. Comparison between the outline of the perspective projection for the end of the pipe (in red) and the edge points of the pipe (in blue).
Figure 21. Comparison between the outline of the perspective projection for the end of the pipe (in red) and the edge points of the pipe (in blue).
Sensors 25 05420 g021
Figure 22. Comparison between the edge points of the pipe (in blue) and the calculated perspective projection of the pipe from the analytical model (in red).
Figure 22. Comparison between the edge points of the pipe (in blue) and the calculated perspective projection of the pipe from the analytical model (in red).
Sensors 25 05420 g022
Figure 23. Undistorted camera image showing the pipe, the perspective projection of the pipe edge calculated using the analytical model (in red), and the determined pipe parameters.
Figure 23. Undistorted camera image showing the pipe, the perspective projection of the pipe edge calculated using the analytical model (in red), and the determined pipe parameters.
Sensors 25 05420 g023
Table 1. The results of the measuring system accuracy series of measurements of a reference pipe compared to the reference values measured by a Zeiss Prismo Navigator CMM.
Table 1. The results of the measuring system accuracy series of measurements of a reference pipe compared to the reference values measured by a Zeiss Prismo Navigator CMM.
CMM ValueAverage ValueStandard DeviationRelative std. dev.
Pipe diameter D [ mm ] 60.8 61.1 0.46 0.76 %
Bending angle γ [ ° ] 89.9 89.8 0.29 0.32 %
Bending radius R [ mm ] 238.6 238.4 0.87 0.36 %
Length of section 1 l 1 [ mm ] 100.9 101.7 1.79 1.77 %
Length of section 2 l 2 [ mm ] 296.4 295.5 2.21 0.75 %
Length of the pipe l m [ mm ] 771.5 770.8 1.82 0.24 %
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Borkowski, K.; Janecki, D.; Zwierzchowski, J.; Pietrala, D.S. Geometric Parameter Identification of Large Bent Pipes Using a Single-View Vision System. Sensors 2025, 25, 5420. https://doi.org/10.3390/s25175420

AMA Style

Borkowski K, Janecki D, Zwierzchowski J, Pietrala DS. Geometric Parameter Identification of Large Bent Pipes Using a Single-View Vision System. Sensors. 2025; 25(17):5420. https://doi.org/10.3390/s25175420

Chicago/Turabian Style

Borkowski, Krzysztof, Dariusz Janecki, Jarosław Zwierzchowski, and Dawid Sebastian Pietrala. 2025. "Geometric Parameter Identification of Large Bent Pipes Using a Single-View Vision System" Sensors 25, no. 17: 5420. https://doi.org/10.3390/s25175420

APA Style

Borkowski, K., Janecki, D., Zwierzchowski, J., & Pietrala, D. S. (2025). Geometric Parameter Identification of Large Bent Pipes Using a Single-View Vision System. Sensors, 25(17), 5420. https://doi.org/10.3390/s25175420

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Article metric data becomes available approximately 24 hours after publication online.
Back to TopTop