An applied method for railway wheel profile measurements due to wear using image processing techniques

Accurate wear prediction on railway wheels and evolution of railway wheels profile can affect the maintenance planning. The objective of this paper is to provide a new applied method for measuring the railway wheel profile with photographing from the railway wheel to measure by image processing techniques. The aim of this new applied method is to measure the wheel profile using images taken from railway wheels and compare it with the original plan. For this purpose, images were taken by using a camera. In this study, all automatic correction options were turned off and brightness and contrast were in normal conditions. The pixel data is converted to double-type data and are placed in the range of zero and one. Then, the input image which is usually as a three-channel or RGB image is converted to a single channel or gray surface image. Images taken from wheel profiles are processed using image processing techniques. Then the lines, curves and shapes in the image are extracted as cross-sectional and continuous curves. The new applied method results by image processing method obtained show good agreement with those achieved in field measurements.


Introduction
In many railway systems, fleet and infrastructure inspections are done manually. Therefore, the use of the old model, which on the one side, due to human error and in some cases the lack of accurate inspection by the inspector, leads to accidents and heavy damages [1]. On the other hand, slow process of manually inspection, reduces efficiency and increases costs. Hence some of the railway systems with technological advances made in this field are using automation system for fault diagnosis in order to increase safety, reduce costs and increase efficiency based on equipping and needs assessment [2]. The interaction between wheel and rail and the relevant phenomena such as wear is one of the most important issues in the railway systems which many researches and activities are done each year [3]. This is because of that the inappropriate contact between wheel and rail always causes severe damage to the wheels and the train [4]. By considering the cost of maintenance in the railway systems around the world, we find that many expenses spent on the purchase, replacement and installation of wheel and rail in the railway systems [5]. The railway wheels have a specific geometry and incompatibility of it with the geometric characteristics of rail profile can cause significant negative consequences, such as severe wear of wheel and rail and dynamical instability of vehicle, because the stability of vehicle and passenger comfort is dependent on wheel and rail wear [6]. With development of the technology of industrial products, needs for automatic measurements methods while maintaining the required accuracy is felt [7,8]. One of the most efficient approaches is use of machine vision in the measurement [9]. Machine vision systems which are based on image processing techniques that have simple required tools are capable to increase system accuracy using effective tricks of software and efficient algorithms available. The advantages of this method is to be a non-contact measurement method. Measurements through contact with the piece, when small, may cause a probable relative move due to contact slide, which can lead to error in the measurement. In addition, if a piece is soft or rigid, it may affect the measurement results. The volume of data obtained by machine vision-based measurement methods about specimens are far greater than the volume of data obtained by other techniques. These methods also take less time to process. Another advantage of the noncontact property of these methods is their ability to be examined on moving production, maintenance and repair lines and conveyors [10].
Compared with mechanical methods, measurement techniques based on computer vision techniques are relatively new. In these methods the specimen is placed under view of one or more cameras. If the three-dimensional characteristic of the specimen is considered, at least two cameras must be used, but for flat specimen or specimens that is considered their external border, the measurement can be done with one camera. In the method that presented by Geiser using an appropriate lighting system, the precision has been achieved between 1 and 10 microns [11]. However, in such a system the length of specimens does not exceed 5 cm. In addition, only the length and diameter of the cylinder-shaped specimens with a radial symmetry are measured. Xu and Wendel also introduced a system that is supposed to define the geometric faults in the image, and the system's task is determining the exact location of this fault [12]. Sometimes it is needed to take an image from different angles. An example of these cases can be found in reference [13]. In this case, a rotating base is used and by rotating the base, images can be taken from various angles of the specimen. All of the above-mentioned cases can be carried out using one camera. Using two or even three cameras in measurement is prevalent that these cameras work in parallel with each other [14]. This matter increases capability of the system, and certainly needs more accurate and stronger software methods.
Many research has been done to determine the railway wheel profile due to wear. But a new applied method for railway wheel profile measurements due to wear using image processing techniques has not been under sufficient attention in railway systems. This paper provides the new method for measuring and evaluating the railway wheel profile using the image processing techniques. The remainder of the paper is structured as follows: In the following section, we investigate a large group of relevant literature and discuss the reasonable mechanisms driving our results. Section 2 gives a brief description of profile measurement methods for measuring the railway wheel profile. Section 3 reports experimental programme and method for measuring wheel profile. Section 4 gives a detailed description of image processing method for measuring wheel profile. In Sect. 5 gives a detailed description of the data obtained in the image processing method. Finally, Sect. 6 is the conclusion of the paper.

Review of profile measurement methods
Different areas of the wheel profile are mentioned in Fig. 1 and some of them are introduced as follows [15].
The flange angle is the angle of the flange that connects the inner corner to the toe of the flange. To avoid the derailment phenomenon, this amount is recommended to be between 68 and 70 degrees. Conicity angle is the internal angle and external rolling contact part of wheel profiles. High amount of conicity increases handling and increases probability of instability at high speeds. Upper and lower limits for the amount of conicity angle depend on geometry and kinematic features of the vehicle. Upper limit is to avoid instability of the vehicle and lower limit is suitable for arc traverse [13]. Equivalent conicity for optimized profile of the wheels must be as much as possible in the range of (0.2-0.4). Conicity values must be proportional to the following factors: vehicle design (for the passing of the curve and having stability at high speeds), working conditions of performance and line conditions (number and severity of the curvature in the line).
The vertical distance between top of the flange and horizontal line passing of the reference point is the flange height. To minimize the amount of wear and have a safety course, flange height is considered 28 mm. The curvature radius of the inner corner of flange is called flange root radius. This value is 12.7 mm in most standard profiles. The lower values lead to two-point contacts and greater values create higher contact stresses that forms cracks in this area. Also, wheel reference point is a point on the rolling surface of the wheel which its horizontal distance behind the wheel is 70 mm. The dimensions and sizes of wheels are evaluated related to their reference point. The relationship between general characteristics of wheel profiles and dynamic phenomena is shown in Table 1 [15]. The railway wheel parameters used in railway system is shown in the Fig. 2.
Calipri is a universal handheld gauge for fast non-contact recording of geometrical data of objects of nearly any shape. With this device, this parameters is measured in approximately 5 s: wheel profile, wheel diameter gauge and wheel clearance gauge. All measurement  Table 1 Relationship between general characteristics of wheel profiles and dynamic phenomena [15] Geometric characteristics of profile Probable dynamic complications and problems Targets in the design and operation and profile data are made available for processing in the XML format or CSV format. All measurements can be visualized and analyzed. The creation of individual reports constitutes another feature (Fig. 3). This entails sending measurement data in a clear presentation directly to a printer or else generating a PDF document. Calipri laser device measure various parameters of wheel profile including height, width, rail profile and wheel diameter. After measurement, the device attempted to draw the profile and report the probable failure according to the original dimension of the profile. The main characteristics obtained by Calipri laser device are shown in Fig. 4.

Experimental programme and method for measuring wheel profile
In this study, taking images of wheel was performed in an experimental position without using the base. The result showed that this method has errors. So, in order to show the ability of the new applied method and reduce errors for obtaining the best position for imaging, image processing of the wheel was done in 10 different positions by using the camera stand. Figure 5 shows the experimental test setup and a schematic of the position of the camera stand relative to the wheel, where the distance from the center of the camera lens to the ground with a height of wheel (A) are equal. Taking image was done in 3 different positions and different angels. Classification of images is shown in Table 2.

Image processing method for measuring wheel profile
First, images were taken by using a camera. Given that most digital cameras have automatic color and brightness options, in this study, all automatic correction options were turned off and brightness and contrast were in normal conditions. In this study, the images with sizing 960*540 pixels are used, which this size and characteristics of camera was the same in all images such as instantaneous and noninstantaneous imaging. The corresponding pattern, which is oval in the image, is extracted from the image. The gradient descent method was used to obtain the ideal oval and minimize the error. Also, the error function defined as the pixel error square of the calibration pattern. The error function is as follow: where, a and b are half the diameter of the large and small ellipses, respectively. Also, (x 0 , y 0 ) are the coordinates of the center of the ellipse, and (x k , y k ) are the coordinates of the pixels of the extraction edges. These pixels are located close to the oval environment with good approximation [16].
There are different edge detection methods, including the first-order differential method, the second-order differential method, the gradient operator method, and the logarithm operator method. In this paper, Roberts edge detection operator uses the first-order differential method, which uses a spatial differential to detect the edge. Roberts edge detection operator is by the following formula: where f (x, y) is the gray value of the input image with the correct pixel coordinates [17].
Oxyz is the camera's coordinate frame. where is a scale factor, A is the real camera parameter matrix and R s and t s are the Durran matrix and the vector return of the conversion coordinates from O s x s y s z s to Oxyz, respectively. Equation (4) can be written as follows: where H s is the homogeneous matrix from the light plate to the image plate. r 1 s is the i column vector of R s . After accessing the images and extracting the center points of the light strip from the wheel profile, the threedimensional coordinates of the wheel profile points in the camera coordinates frame can be obtained by Eq. (5) [18].
The distance between the laser source and the wheel is measured with a laser meter. But sometimes the distance from the faulty part of the wheel can be the same as the healthy part of the rail. The fuzzy system can produce incorrect results in this field. Therefore, angle information is required with distance information. Vibration and noise can affect the data at the time of measurement. Filtering eliminates vibration and noise. The Gaussian filter is used to remove image noise. The following equation uses a gray image for each pixel [19]: where G represents the input image, x and y are the image coordinates and is the standard deviation. A simple meaning of the edge is the boundary where light level changes are high. An ideal edge is an edge that lighting changes occur suddenly. But in practice the edges does not appear in this form, and lighting changes occur from one level to other level gradually. There are several reasons that cause it, which can be outlined as follows: ambient and imaging system noise, scattering light at the edges, poor lighting which leads to light weakness in some areas and strength in other areas or causes light reflection on some of the surfaces or makes the shadow in some areas, angel and curvature of some edges, sampling and quantization error. In addition to existing the edge, this issue causes that determining the edge location is also of great importance. The primary methods of edge detection are based on the first and second-order derivatives. But the basis of these methods is on the use of derivatives, application of these methods increase or boosts the noise. Because noise and edge are both components of the high frequency of image. There are other methods to determine location of the edge which act on the basis of the integration. This act weakens the noise of the images. Some of these methods are based on the adaptation model. By using these methods, the edge can be estimated with less accuracy than the pixel size. In the edge detection method, model adaptation takes place using gray levels moments [20]. In this paper, images are taken with appropriate lighting conditions, A few simple pre-processing is done. At first, the pixel data is converted to double-type data and are placed in the range of zero and one. Then, the input image which is usually as a three-channel or RGB image is converted to a single channel or gray surface image and finally 3 × 3 Gaussian filter is used with sigma 0.95. In the new applied method, the objects edges in the image have been used which are the most important feature of lower level of image qualifier. After applying the Gaussian filter, the image gradient is calculated using Sobel filter. In general, the size and angle of the gradient vector at each pixel of the image g (x, y): R2 → R, are calculated according to the Eqs. (7,8): In order to determine the upper geometry of the railway wheel, the following algorithm is proposed. This algorithm is presented in seven steps which are shown in Fig. 6. Each step of the algorithm is described below.
An image of the side view of wheel is taken (Fig. 7). At this point, the angle of the camera and the distance between camera and wheel is not important, because this is for the initial validation of the algorithm.
The image taken using the camera at the first step is the outline of the wheel. This is despite the fact that the issue defined in this study, is only taking image from the top of wheel profile. By limiting the image of wheel in a limited space the image processing can be done more easily for the desired geometry (Fig. 8). By determining the coefficients available in the edge detection algorithm, the upper curve is shown by green color in Fig. 9. As shown in Fig. 10 shows the actual scale obtained in the previous, which results in the actual coordinates of the wheel profile.

Results and discussion
According to the data obtained in the new applied method, the size of three parts of the most important indicators of the profile is obtained based on the Fig. 11. Table 3 shows a comparison between the results obtained from the new applied method and Calipri laser device.
This method of measuring has some errors. As shown in Table 3, only the error of flange width is about 11% and other parameters errors are acceptable. Based on experimental position for taking images and need to , (x, y) = tan −1 g x g y .
identify the causes of errors and reducing it, the new applied method for determining the optimal position of taking images is presented. The experimental tests results in 10 different locations and measurement errors are shown in Table 4. Figures 12,   Fig. 6 The steps of the new applied method   The results show that the best position to use the camera to minimize errors is situation No. 1 in the Table 4. By increasing the base height up to 2 cm (position No. 8 in Table 4), error of flange height decreased by 0.08% and error of flange width reduced by 0.01%, while the error of profile width is increased. To verify the measurements, photographing can be done in both positions. Table 5 presents a comparison between the new applied method results with the original size of wheel.

Conclusion
In this study a low cost approach based on edge detection theories in image processing techniques is proposed. Results were obtained based on the use of experimental method and image processing techniques. The fact that it is only necessary to have an experimental parameter to determine the railway wheel profile is an important and significant subject. Based on the numerical analysis and experimental tests, the new applied method for profile measurements due to wear is obtained in railway wheel, which has a considerable accuracy. The effect of wear in railway wheel on its contact condition to rail, contact stress field and corresponding effect of rolling contact fatigue are also considered. In the new applied method, geometrical specifications of the railway wheel profile are developed in seven steps. A Comparative study with Calipri laser device is considered to evaluate the capabilities of the proposed system. The comparison between numerical results and experimental tests shows that although the error rate with respect to the result of using Calipri laser device is between 0.5 and 3% (this is considered negligible in industrial application), but considerable reduction is observable with respect to the cost. This shows that the new applied method can be used as an alternative method in the railway systems. In the continuation of this study, it is recommended to improve the efficiency of the proposed method such as using a linear laser light source so that the curvature boundaries of the wheel profile are completely differentiated and can be installed on camera, designing a base and fixing the camera in the repair station, designing methods and equipment for continuous shooting of railway wheels without the need for the presence of technicians, designing a new algorithm that can measure all the dimensions and parameters required for wheels. Also, by generalization of application of this method in railway brake pads, hopefully more desirable results can be obtained.     Publisher's Note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.