1 Introduction

Projected fringes are a full-field method for mapping the topography of surfaces [1,2,3,4,5,6,7,8,9,10,11,12,13]. It consists of imaging the fringes projected onto the surface with subsequent processing of the fringe data. In recent years, it has been combined with phase shift techniques [14,15,16,17,18,19] or Fourier transform methods [20,21,22,23,24,25,26,27].

In this paper we describe an intensity method based on location of the fringe positions with sub-pixel accuracy by means of a zero-crossing algorithm. This method is applied to online measurement of dimensional errors of railroad rails. In the present experiment, the rails moved with a speed of 1–2 m/s. The processing time must therefore be reduced to a minimum.

It seems appropriate to compare our method with phase shift methods which also use projected fringes. Instead of measuring the intensity, these methods are based on measuring the phase.

  1. (1)

    Phase shift methods require at least 3 (5 is most common) separate exposures of each deformation state. In addition, an additional operation for unwrapping the phase maps [28, 29] is required. Therefore, these methods become inferior when recording fast dynamic events. One benefit of our system is that only one single exposure is required for each deformation state.

  2. (2)

    Divergent illumination introduces a non-linear phase into the fringe function, a fact also pointed out by refs [1, 7, 9, 17]. This makes phase methods more prone to errors.

  3. (3)

    Our method is insensitive to image saturation. Saturation results in signal clipping, making the fringes non-sinusoidal. Phase shift methods rely on sinusoidal fringes, and the influence of such clipping is measured in [30].

  4. (4)

    Our method is not dependent on correcting the lenses for image distortion. This is because both the reference and object surface are imaged by the same “distorted” lens.

2 System description

2.1 Theory

The measuring principle is illustrated in Fig. 1. Here, fringes with an inter-fringe distance d are projected onto the xy-plane (the reference surface) under an angle θ1to the z-axis and viewed (by e.g. a camera focused at infinity) under an angle θ2. Also, in the figure is drawn a curve S representing a surface to be measured. From the figure, we see that a fringe positioned at P1 on the xy-plane will be displaced to P2 on S. This displacement is given by

$$ u=z\left(\mathrm{t} an{\theta}_1+\mathit{\tan}{\theta}_2\right) $$
(1)

where z is the height of P2 above the xy-plane.

Fig. 1
figure 1

The measuring principle. θ1= projection angle. θ2= viewing angle

When imaging a grating of period dg, the fringe period on the reference surface is given by

$$ {d}_{x0}={m}_p\frac{d_g}{\cos {\theta}_1} $$
(2)

where mp is the magnification of the projection unit. When putting u = dx0, we find the surface deviation per fringe.

$$ z\ \left( per\ fringe\right)=\frac{m_p{d}_g}{\sin\ {\theta}_1}. $$
(3)

Figure 2 shows a more general situation where the projector emits divergent light, and the camera image the surface at a finite distance along the z-axis. When looking at an arbitrary point x on the xy-plane, we see from the figure that

$$ \tan \kern0.2em {\theta}_1=\frac{l_p\kern0.2em \sin \kern0.2em {\theta}_0+x}{l_p\kern0.2em \cos \kern0.2em {\theta}_0} $$
(4a)
$$ \tan \kern0.2em {\theta}_2=\frac{-x}{l_k} $$
(4b)
Fig. 2
figure 2

Fringe projection geometry

By inserting Eq. (4a) and (4b) into Eq. (1), we get

$$ u=z\left[\frac{l_p\sin {\theta}_0+x}{l_p\cos {\theta}_0}-\frac{x}{l_k}\right]=\frac{z}{\cos {\theta}_0}\left[\sin {\theta}_0+\frac{\left({l}_k-{l}_p\cos {\theta}_0\right)x}{l_p{l}_k}\right] $$
(5)

or

$$ z(x)={\left[\sin {\theta}_0+\frac{\left({l}_k-{l}_p\cos {\theta}_0\right)x}{l_p{l}_k}\right]}^{-1}u $$
(6)

where lk is the distance between the camera lens and the coordinate center and lp is the distance between the projector and the coordinate center. To calibrate the system, one have to measure the quantities lk, lp, and θ0. To determine θ0, it is easiest to measure the distance between the lenses of the projector and the camera, and then calculate θ0 from the resulting triangle.

The relation given in Eq. (4) can be written as

$$ z(x)=S\left({\theta}_0,{l}_k,{l}_p,x\right)\cdotp u(x) $$
(7)

where

$$ S\left({\theta}_0,{l}_k,{l}_p,x\right)=\cos {\theta}_0{\left[\sin {\theta}_0+\frac{\left({l}_k-{l}_p\cos {\theta}_0\right)x}{l_k{l}_p}\right]}^{-1} $$
(8)

is a system function determined by the geometry of the experimental setup. Therefore, S can be used as a look-up table. Notice when the camera and the projector are located at the same height above the reference surface (lk − lp cos θ0 = 0), S becomes equal to1 / tan θ0, i.e. independent of x.

The measurement accuracy is dependent on the accuracy with which the fringe positions are detected. This is done by a zero-crossing algorithm described in [1, p 274]. By this algorithm, the fringe positions are located with sub-pixel accuracy [31].

2.2 Measurement procedure

It starts with calibrating the system as described above. Then the object and reference surfaces are recorded and stored as an array of 512 × 512 pixels, 8-bit deep, i.e. with intensity levels between 0 and 255. Then, the fringe positions on the object and reference images are located, which determines u and calculates z from Eq. (6). The image of the reference surface is stored in memory once and for all. u must be equal to the difference between mutual fringe orders on the reference and the object. In the general case, the zero-order fringe must be located manually. In the present project, this is not a problem. When passing the edge of a defect, |u| will always be less than dx/2. In this situation, the object fringe is always closest to the corresponding reference fringe. The measurement algorithm therefore starts automatically without manual assistance. The calculated topography of the object surface can be stored in computer memory and be displayed as a grey scale-level picture or a contour map.

A simple and reliable test of this system is to image a plane surface before and after a small tilt. Figure 3 shows the result of such a test. A plane surface of about 1 m2 is imaged before and after a rotation angle of about 8 millirads about the vertical axis. From the smoothness of the measured curve, we can conclude that the zero-crossing algorithm works properly. Also, in the diagram is drawn the ideal straight line. The deviation from this line is seen to be less than about 0.1 mm. This deviation is mainly due to small errors in the setup parameters resulting in a minor error in the system function. It should be noted that the projected fringes in this test had the highest possible quality.

Fig. 3
figure 3

Result from measurement of a rotation of a plane. The thick curve displays the measurement; the thin curve is the ideal straight line

3 Experiments

3.1 Experimental setup

Figure 4 shows the experimental setup. The railroad rail is mounted on a slide which can be moved in the x-direction.

Fig. 4
figure 4

The experimental setup

The projector distance lp, the grating period, and the projection angle were selected to give a grating pitch along the rail (the sampling distance) equal to 5 mm. The acquisition time was 40 ms and the processing time was 50 ms, giving a total sampling time T = 90 ms. With a camera field of view equal to w, the speed of the rail must be v < w/T. In our experiment, we set w = 200 mm, which means that the speed must be less than 2.2 m/s. When this condition is fulfilled, the dimensions of the rail will be continuously monitored at a sampling interval of 5 mm in the x-direction. By processing every 12th horizontal line of the image, the sampling interval will be 5 mm also in the y-direction. This means that an array of 512 × 42 pixels are being processed. The result is that the dimensions of the rail will be checked at every point in an array of 40 × 42 points. To visualize the result, every point of the array where the dimension (surface height) deviate from the ideal shape by a magnitude exceeding a selectable threshold, the actual point will lit up on the monitor. In this experiment, this threshold was set to 0.4 mm.

Before the measurement sequence started, a 200 mm long defect-free part of the rail was imaged and stored in memory. This initial image served as the reference for the subsequent images in the online sequence. The contrast of the projected fringes was satisfactory without any preparation of the surface. The speed of the rails was 1–2 m/s.

3.2 Specimen description

Railway rails are produced by a hot rolling process. They can be up to 120 m long and should satisfy very strict tolerances required by international standards. These are related both to straightness and defects on the surface.

Figure 5 shows a cross section of railroad rail with the definition of the head, the web, and the base, and also a section of a railroad rail after the roll forming process is shown.

Fig. 5
figure 5

a The product after the roll forming process. Illustration photo: colourbox.no. b Definition of the different parts. c Cross section of the railroad rail

In this project, 3 samples of rolled railroad rails of different lengths were investigated:

  • Sample A: length = 1000 mm

  • Sample B: length = 500 mm

  • Sample C: length = 460 mm

The location of the defects on the rails is marked in Figs. 6 and 7.

Fig. 6
figure 6

Approximate location of the dimensional error on sample A. Errors no. 2 and no. 3 are shown in Fig. 8. Distances are in cm

Fig. 7
figure 7

Approximate location of the dimensional error on a sample B and b sample C. Distances are in cm

3.3 Experimental results

Some of our results are shown in Figs. 8 and 9. The rails moved with a speed of 1–2 m/s. The measurements are done on the top of the head of the rails.

Fig. 8
figure 8

Dimensional error on sample A. a Error no. 3. b Error no. 2. (The pictures of error nos. 1 and 4 are not included)

Fig. 9
figure 9

Dimensional error on a sample B and b sample C

From Fig. 9, it can be seen that both the position and the shape of the dimensional errors are clearly indicated on the monitor.

4 Discussion

Our results show that we have successfully detected the shape and positions of the dimensional errors on samples of railroad rails. Even small errors such as a small hole of approx. 1 cm (error no. 3 on sample A) and a small notch (error 2 on sample A) are detected. To have continuous inspection, our setup could measure errors with a speed of the rail up to 2.2 m/s. As mentioned in Sec. 3.1, the speed can be increased by increasing the camera field of view. As an example, with a field of view of 500 mm, the speed could be increased up to 5.5 m/s.

It is clear that our experiment has not included the possibility that the rail can move sideways as a whole. We are presently building up a new system where we hopefully can solve this problem. We have however some ideas how to do it. As can be seen in Figs. 8 and 9, fringes are also projected on the base of the rail. These fringes can probably monitor the movement in the z-direction. Our goal in the present experiment was to test if our method was able to detect defects on the head of the rails while moving. This was not self-evident in advance.

5 Conclusion

A method for full-field dimensional control of moving rolled steel profiles is presented. The experimental results were successful in mapping the dimensional errors of the railroad rails online when it moves with a speed of approximately 2 m/s.