1 Introduction

The increasing construction of underwater structures entails a growing need for manufacturing and testing methods. Welding is one essential technique to join two or more component parts. It is mostly applied in a dry environment but can also be conducted underwater by a professional diver. Applications for underwater welding range from repairing and manufacturing ships, pipelines, barges to all kind of underwater steel constructions. Furthermore, underwater welding is used in other fields to set up and maintain structures underwater, e.g. nuclear power stations and mining.

Underwater welding can be separated in two main types: wet and dry welding. Dry welding is applied through so-called “habitats”, which are basically hyperbaric chambers. These are deployed to provide a dry environment in which the diver can execute different dry welding techniques. The dry welding technique is considered to produce higher quality compared to wet welding. However, since dry welding is costly and not reasonable to use in every case, the versatile and cost-effective wet welding can be performed. A special electrode can be used to create an electronic arc and to fill material in the joint. Due to the cold water, the weld might cool down too quickly, which could result in cracks.

Independent of the location and production technique, most of all welds need to be tested thoroughly. Several guidelines and standardisations regulate the preparation, the welding process and the examination of welds. To test welds, different techniques might be employed. The methods of dye penetrant inspection, magnetic particle inspection, ultrasonic testing, spectroscopy testing have their strengths and weaknesses regarding flexibility, effectivity and costs. Besides those, the method of visual testing (VT) is one of the most efficient techniques to inspect welding joints, especially in underwater environments. Obviously, only the surface can be tested using VT. According to applicable regulations, the visual testing must be carried out with the inspectors (i.e. a diver under water) eyes. However, helpful tools, e.g. an endoscope, may be used in some cases. Those tools are used to look at the weld rather than measuring geometries.

Photogrammetry synergises the looking and the measuring and, thus, might be a helpful method in visual testing task. We developed a monocular photogrammetric system, which is capable to provide high-quality image data of welding lines. Using these data, a 3D reconstruction of the welding line can be computed via least-squares image matching (LSM), which can be used for automated (virtual) visual testing. Thus, making the inspection task less subjective, more accurate and comprehensively documented.

The outline of this work is as follows. Related work is consolidated with reference to multimedia photogrammetry and 3D measurement techniques on welds. Then, the monocular system and its methodology are introduced. In addition, a simple but effective method for adjusting an industrial camera in an underwater dome port pressure housing is presented. In Sect. 4, turbidity experiments, in which different datasets under varying water turbidity conditions are acquired, are presented. Those experiments are analysed and discussed before a conclusion and an outlook close this paper.

2 Related Work

Photogrammetry taking more than one optical medium into account is known as multimedia photogrammetry. Underwater photogrammetry in particular is an increasing field of interest in both research and economy. Its application area ranges from deep sea surveying to shallow water applications in fresh and seawater in disciplines of marine biology (Burns et al. 2015; Mohamed et al. 2020), archaeology (Drap et al. 2015; Bruno et al. 2019), industry (Kim and Eustice 2013; Menna et al. 2019) or fish farming (Torisawa et al. 2011; Shortis et al. 2013). In comparison to single-media photogrammetry where some applications feature several hundreds of metres of acquisition distance, i.e. remote sensing, in multimedia photogrammetry under water, the acquisition distance usually is limited due to scattering of the water.

A general challenge in underwater photogrammetry is the refraction of light when travelling through multiple media, usually air, acryl/glass (port), and water. For acquiring image data under water, a camera is commonly mounted in an underwater pressure housing. Depending on the depth of the aimed application, thus the prevailing pressure under water, different materials and mechanical structures need to be utilised. Two types of ports are generally distinguished. Either flat ports, to whose normal direction the cameras are mostly aligned parallel, or hemispherical (dome) ports are used. Menna et al. (2017a) show the characteristics of those ports and elaborate the optical characteristics in Menna et al. (2017b).

In Kahmen et al. (2020), synthetic datasets are simulated to analyse the imperfect mathematical modelling of flat ports. If the optical refraction is explicitly modelled, as described by Kotowski (1987) and implemented in a universal approach by Mulsow (2010, 2014), the interface parameters (thickness, refractive index) can be calibrated as well, as also shown in (Jordt-Sedlazeck and Koch 2012; Sedlazeck and Koch 2011) in the field of computer vision.

The calibration of dome port pressure housings is investigated in Menna et al. (2016) and Nocerino et al. (2016). Due to the use of hemispherical separating surfaces, the optical path of rays resembles the case in air, which means that no additional mathematical modelling is necessary. Nevertheless, in Menna et al. (2016) it is stated that in practice residual deviations in the parameters of the photogrammetric calibration occur due to imperfect alignment of the entrance pupil of the lens and the dome centre. Furthermore, Kunz and Singh (2008) simulate 3D reconstruction errors which occur due to the image rays not intersecting in a single point, as assumed by the perspective model, and point out that unmodelled refractions might cause accumulated inconsistencies for large overlapping reconstructions. To realise a good alignment, Menna et al. (2016) show how to recover the optical characteristics of a camera lens and dome port system via reverse engineering. In contrast, She et al. (2019) show a simplified principle using a chessboard target and a special water tank with a dome port mounted on the outside. These authors also present a method to quantify remaining alignment errors and take them into account in order to improve residual errors.

Image acquisition and processing are essential parts of the challenge of applying optical measurement techniques under water. Due to the turbidity of the water, absorption and scattering of light rays occur, resulting in contrast reduction and colour distortion. Absorption and scattering occur due to slit, algae and other decaying materials. However, methods exist for artificially creating controlled turbidity conditions using Maaloxan® (Stephan 2016). The term turbidity is defined as reduction in the transparency of a liquid caused by the presence of undissolved substances in the international norm for water quality (ISO 7027-1 2016). Particles larger than 2 µm in the water column are total suspended solids (TSS), particles smaller than 2 µm are considered as total dissolved solids (TDS). TDS are reported as a part per million (ppm), while TSS are quantified by the nephelometric turbidity unit (NTU) or Formazin Nephelometric Unit (FNU) which are numerically equal (Fondriest Environmental 2014). Besides dissolved and suspended particles, the term of water clarity or transparency can be found in literature (e.g. Effler 1988; Kulshreshtha and Shanmugam 2015). The transparency is quantified by the Secchi distance (Tyler 1968) which describes the maximum distance a human eye can discern a white disk lowered into the water.

Skinner et al. (2017) present a method for distance-dependent compensation of light loss by integrating a cost function into the photogrammetric bundle adjustment. The authors in Mangeruga et al. (2018) and Wang et al. (2019) analyse underwater image enhancement algorithms using quantitative parameters for brightness, image entropy and gradients as in Qing et al. (2016). The evaluations show differences in the resulting metrics for different algorithms and the authors point out that enhancement algorithms need to be selected by image content and purpose of analyses. In Gallo et al. (2019), the performance of image enhancement methods is analysed with reference to 3D reconstruction algorithms based on feature points (Structure from Motion). Even though, no external reference is present, the reconstruction process can be optimised with respect to adjustment parameters (e.g. reprojection error) in high turbid waters using image enhancement methods. Optimised image quality can additionally be achieved by special illumination. As examples, Schechner et al. (2001) and Treibitz and Schechner (2009) use the polarisation state of the light to separate the object signal from the backscatter signal of the water particles. Nocerino et al. (2016) describe the influences of the medium water and recommend indirect illumination to reduce backscatter from particles.

To inspect weld seams, several regulations exist. The major standard regarding the visual inspection task in Europe is the European norm EN 13018 (2016), which describes general principles of visual testing. It defines the direct VT just with the eyes of the inspector and the indirect VT with the help of instruments such as a magnifying glass or an endoscope. To classify welds under water, the international norm ISO 5817 (2014) encloses assessment groups of irregularities on fusion-welded joints in steel, nickel, titanium and their alloys (beam welding excluded). The system introduced in this work aims to classify welds according to the assessment groups of this norm with a resolution of ≤ 0.05 mm and an accuracy of ~ 0.1 mm.

Little research has been performed on 3D measurement techniques on welds so far. Neill (2016) describes a system which, based on photogrammetric image mapping (stereo matching), records the geometry of the weld seam directly after the welding process with a resolution of approx. 1 mm. The optimisation of area-based image mapping procedures for the measurement of weld seams is investigated in Kahmen et al. (2019) on the basis of real data. In Nietiedt et al. (2019), orientation and matching methods are analysed using synthetic data. The study of Rodriguez-Martin et al. (2017) compares a 3D scanner based on structured light with reference data from a coordinate measuring machine. The authors in Rodríguez-Martín et al. (2015) present a macroscopic reconstruction method for welds. In Rodriguez-Martin and Rodriguez-Gonzalvez (2018) a concept for the integration of photogrammetric 3D data into the training process for visual inspection of welds is presented. The reconstruction of welds under water was first conducted by Ekkel et al. (2015) with the help of a laser-based stereo system applied in the laboratory.

Literature includes systems for weld measurements in air and under water. However, a high-resolution system which also works under poor turbidity conditions cannot be found. Also, the analysis of performance of algorithms in relation with turbidity mostly is done for specific sites in the sea, thus not comparable and findings often cannot be generalised. The presence of port pressure housings can become critical when the optical path is not modelled explicitly resp. the dome port is not aligned accurately as shown for synthetic and real data in many publications. The system presented in the following is capable to acquire high-quality images with respect to illumination and resolution. By using controlled laboratory conditions, the turbidity can be regularised and quantified. In contrast to most articles, we quantify the quality of the 3D reconstruction by an external reference which assesses the whole reconstruction process.

3 Measuring System and Methodology

3.1 System Components

The monocular system has been designed to reconstruct hollow welding seams and butt joints. It consists of a slidable camera mounted on a frame of aluminium profiles. The aluminium frame can be mounted on steel structures with the help of magnets. The angle of mounting can range from 180° (butt joint) to less than 90° (hollow joint, see Fig. 1, right). The camera is mounted in a 3″ acryl enclosure on an aluminium component, which can be adjusted along the longitudinal axis within the enclosure (see Fig. 1, middle). The acryl tube is covered with a hemispherical acryl port. Those and other components can be found on Bluerobotics.com (2021). Just in front of the dome, two 24 V LED-strips illuminate the weld with high power white light of approx. 45° from the optical axis to illuminate the weld in an eccentric way and reduce backscattering as recommended by Nocerino et al. (2016). The monochromatic camera of type Basler Ace acA2040-25gm (Baslerweb 2021) is combined with a Cinegon 1.9/10 lens (Schneider-Kreuznach 2021) resulting in a field of view of 54°. The camera is operated via Power over Ethernet (PoE). Thus, only one cable for the camera and one for the illumination are needed. Since Gigabit Ethernet supplies a bandwidth of 1000 Mbit/s over up to 100 m cable length, the system could theoretically work using such long cables. However, the system presented in this work is equipped with 20 m cables only.

Fig. 1
figure 1

Monocular weld inspection system. Left: reference frame with circular targets. Middle: industrial camera in underwater pressure housing with dome port and two LED-illumination units. Right: prototype with slidable housing observing a hollow seam

Separated from the camera and its mounting frame, a reference frame (see Fig. 1, left) is part of the system. Photogrammetric circular targets of 1 mm in diameter have been attached to the frame. The frame can flexibly be placed and attaches through magnetic straps.

3.2 Dome Port Alignment

From a mechanical point of view, it is comparably easy to mount a camera in a rotationally symmetric form on a plane orthogonal to the optical axis. The more challenging part is to align the dome port centre and the lens entrance pupil accurately along the longitudinal axis.

Menna et al. (2016) describe how to find the position of the lens entrance pupil (along the optical axis), by measuring the deviation of inner and outer dome surfaces from an ideal spherical shell and quantifying the misalignment between the centre of curvature of the dome surfaces and entrance pupil of the lens. The principle needs two cameras, a macro-slide and, for the reconstruction of the dome surfaces (inner and outer radius), a high-resolution 3D scanner. Thus, it is a complex but accurate method, which quantifies misalignment errors rather than adjusting them.

She et al. (2019) propose a mechanical alignment adjustment procedure based on an underwater/above-water observation of a chessboard target. Besides a regular chessboard, a special water tank with a dome port mounted outside and a construction to move the camera along the optical axis are needed. Furthermore, the remaining offset from the dome centre can be quantified using detected chessboard targets.

The method proposed in this work combines the ideas of the referred principles. The centre of the dome and the entrance pupil are aligned mechanically. The only components required are the longitudinal location of the entrance pupil and some simple reverse engineering. The position of the entrance pupil can be determined by the principle described by Menna et al. (2016) or alternatively be taken from the data sheet of the lens, if available. Figure 2 shows all components of the pressure housing. The industrial camera is mounted on a plate between two rotationally symmetric rings. The mount can be shifted longitudinally through the tube and be clamped with two O-rings in any position. Due to this construction, the lens can only be moved along the optical axis. Misalignment errors on a plane orthogonal to the optical axis cannot be corrected.

Fig. 2
figure 2

Exploded drawing of the components of the underwater housing. From left to right: Dome port, lens alignment shell, retaining flange, O-ring flange, lens, slidable camera mount and camera, acrylic tube, O-ring flange, end cap

The lens alignment shell (LAS) has been designed using 3D models provided by the manufacturer of the dome port. The radius of the shell equals the inner radius of the dome port, so it fits exactly in the dome. The distance of the outer lens enclosure to the entrance pupil is known from the lens datasheet and, respectively, considered in the design of the shell. Thus, the entrance pupil (EP) of the lens is in the radial centre of the shell. Since the centre of the shell equals the centre of the dome port, the entrance pupil will also do in longitudinal position.

Figure 3 shows a cross section of the components in different steps. First the outer enclosure of the lens is cased inside the shell and clamped with two screws (Fig. 3a, b). After assembling the shell on the lens, the dome port and its flange are superimposed (Fig. 3c) and pushed towards the tube to slide the whole system of lens, camera and its mount into the acrylic tube (Fig. 3d). Once the flange fits to the outer plane of the tube (camera pushed all the way into the tube), the camera mount can be clamped. After the port is aligned and the camera is clamped in the tube, the shell can in principle be removed from the lens by just removing the dome, dissembling the shell and mounting the dome again. However, the shell has an open end, hence enabling image acquisition with the mounted shell as well (see also Fig. 4). This is particularly useful when verifying the adjustment by observing a chessboard target in half-underwater-half-in-air setup (see Fig. 5).

Fig. 3
figure 3

Cross section of the front end of the housing with mount, camera, lens and lens alignment shell (LAS). First, only the camera is mounted (a). Second, the LAS (black) covers the lens (b), the dome port and its flange are superimposed (c) and all components are pushed in the tube and the mount is clamped (d)

Fig. 4
figure 4

Camera on mount (a). LAS mounted on the lens (b). Camera mount clamped in the acrylic tube with the LAS and the dome port mounted on the lens (c)

Fig. 5
figure 5

Left: Half submerged camera observing the chessboard target. Right: Image of the camera showing a displacement of approx. three pixels at the image boarder at the water surface in the vertical middle of the image

Figure 5 shows the camera submerged half way to observe a chessboard target. As stated by She et al. (2019) in case of perfect alignment of lens and dome port, the lines of the chessboard would not bend at the water surface. The image shows that there is almost no displacement of the line through the water surface after the described alignment process has been conducted. However, a small displacement at the image boarder can be observed which indicates a marginal misalignment of the entrance pupil (too far from dome port). Empirical tests showed that a displacement of approx. three pixels at the image border can be reached in the presented setup. Following experiments are conducted with this remaining alignment error along the optical axis.

The proposed methodology depends on the production accuracy of the dome port and the shell and, thus, is limited in accuracy. Any technology and material are imaginable for production of the shell. In this work, the shell was 3D printed with polylactic acid; thus, no costly manufacturing was needed. The accuracy of the alignment is not investigated any further in this work. Residual misalignment errors can be absorbed by camera calibration parameters using a set of photogrammetric standard distortion parameters, e.g. by Brown (1971).

3.3 Workflow

To be able to perform image matching, a certain overlap within acquired images needs to be realised. Since the space is limited and the acquisition distance is short, a mechanically fixed stereo system using such pressure housings would not lead to any reasonable overlap at all. Therefore, a monocular system was developed in order to realise any quasi-stereo baseline of flexible length starting from 0 mm by a shifted camera. The workflow, described in the following, is visualised in Fig. 6.

Fig. 6
figure 6

Abstracted workflow. After calculating the exterior orientation of each image acquired (blue), a number of k keyframes is selected and filtered (grey) before the matching takes place (green). LSM is conducted between neighbouring images of the keyframes in order to calculate forward intersection (FI) with corresponding image points. A number of p point clouds are calculated and registered via ICP

First, the camera is slid along the weld and images are acquired at 5 Hz at ~ 0.3 m/min translation speed, and ~ 75 mm acquisition distance, which can be considered as a practicable acquisition configuration. This results in a distance between acquisition positions of approx. 1 mm. These images are used to determine the exterior orientation (EO) of each camera in a robust and redundant network via bundle adjustment. Prior calibrated distances on the reference frame and prior calibrated interior orientation of the camera are integrated as constraints.

A grid of certain baseline (e.g. 10 mm) between keyframes is selected (see Fig. 7, marked red) automatically, whereat the selection of blurred images is excluded. In addition, when occlusions by floating particles are critical, images are also excluded. Since the image sequence is very dense, neighbouring images can be used instead and arbitrary baselines and overlaps can be realised.

Fig. 7
figure 7

Sketch of the acquisition principle. The camera is slid along the weld observing the weld bed and the reference targets. Keyframes (marked red) are selected automatically for further processing

The keyframes are filtered with the adaptive Wallis filter (1976) in order to modify the contrast in local image areas before conducting LSM (Grün 1985) between them. Necessary approximated values are obtained from semi-global block matching (SGBM) from OpenCV after Hirschmüller (2008). As stated in literature, e.g. (Gaiani et al. 2016; Kahmen et al. 2019), the Wallis filter can improve image matching results.

To calculate a dense point cloud of the weld surface, corresponding image points are forward intersected to obtain 3D coordinates of those corresponding pairs of image coordinates. Between each pair of keyframes, a point cloud is calculated. Overlapping point clouds then are registered using iterative closest points (ICP) algorithm (Besl and McKay 1992) in order to generate a point cloud representing the whole weld.

4 Turbidity Experiments

To evaluate the quality and feasibility of the 3D reconstruction process under different water conditions, datasets of varying turbidity were recorded. The turbidity was artificially generated mixing Maaloxan® and water. All experiments were conducted in a water tank in the laboratory. A wet welded hollow joint between two steel plates of 13 mm in width was used as a test object for all analysis in this work.

4.1 Camera Calibration

The camera was calibrated using a 3D calibration fixture consisting of ~ 400 circular targets with a diameter of 1 mm (Fig. 8). Four pillars were equipped with targets outside the XY-plane to represent the third dimension. 16 variably arranged images were acquired for each individual calibration setup. In this work, three setups were analysed (see Sect. 5.1). First, the camera was calibrated without the dome port in air. Second, the dome port was mounted and the optical system was again calibrated in air and third, in addition under water. The points on the calibration fixture were introduced as unknown tie points; thus, the position of the targets was derived as part of self-calibration. Furthermore, predefined distances representing each coordinate direction were introduced to define scale within the network as recommended by Luhmann et al. (2020).

Fig. 8
figure 8

Camera inside dome port housing observing the illuminated calibration fixture (in air) from close range of approximately 70 mm

4.2 Reference Data

The reference data were acquired by the 3D profilometer VR3200 (KEYENCE 2021), as shown in Fig. 9. Approximately 50 mm of the weld was scanned to be compared with calculated point clouds underlying different turbidity. The area scanned by the reference system is welded in poor quality with imperfections such as excess weld reinforcements, pores and scratches. Those imperfections cause a geometrically inhomogeneous surface with depth changes, which is challenging for the macroscopic setup of the measuring system due to the limited depth of field, perspective changes and specular reflections.

The main parameters of the reference data are (KEYENCE 2021):

Resolution: 10 µm.

Accuracy width measurement: ± 5 µm.

Accuracy height measurement: ± 3 µm.

Since the resolution of the 3D profilometer is 5 times higher than the target resolution of 0.05 mm (ground sample distance) and the accuracy is more than 10 times higher than the target accuracy of 0.1 mm, the 3D reconstruction is suitable as a reference for a geometrical 3D comparison.

Fig. 9
figure 9

Acquisition of reference data. Top left: Keyence VR3200 capturing images of the hollow weld. Top right: Projected stripes on the weld. Bottom: Reference data in a projective view

4.3 Experimental Setup

The hollow weld was placed under water and observed by the camera following the described procedure (Sect. 3.3) to reconstruct the surface of the weld (see Fig. 10). Besides the photogrammetric system, two low-cost turbidity sensors (DFROBOT 2021; Keyestudio 2021) were placed floating at the water surface (see. Fig. 11) to quantify the level of turbidity. Precisely, one sensor monitors the total suspended solids (TSS), one the total dissolved solis (TDS).

Fig. 10
figure 10

Experimental setup. Turbidity sensors float at the surface, mounted to a wooden plate (marked red). The imaging system observes the hollow weld in a water tank. The water level is 230 mm in height. The white laminated paper is clearly visible at the bottom of the tank in clear water

Fig. 11
figure 11

Low-cost turbidity sensors float at the surface and measure under water. Blue marked: Sensor to measure total suspended solids (TSS). Green marked: Sensor to measure total dissolved solids (TDS)

Furthermore, the visibility through water was measured. The term “visibility” in this work describes the distance at which the white laminated paper could be discerned by eyes. Thus, similar to the principle of Secchi (see Sect. 2), the visible range could be determined. It differs from a classical Secchi distance, since no sunlight and no disc of standard material and dimension were used. In the lab, artificial light penetrates the water column. However, the measured visibility can be considered as an approximation to the Secchi distance. Since the water level was at 230 mm height due to limited space in the water tank, the visibility distance could only be determined precisely below 230 mm. The visibility was below 230 mm and decreased from 180 mm in dataset 6 to 140 mm in dataset 8 (see Tab. 1), which is comparable to the lowest recorded Secchi distances around the globe according to the database in Seafarers et al. (2017).

Table 1 Datasets 1–8 and their percentage of Maaloxan®, TDS, TSS and visibility readings

4.4 Datasets

Table 1 shows the parameters of the datasets recorded in this work. Dataset 1 represents the clear water dataset, thus offering the best conditions for image acquisition. In contrast, dataset 8 represents the dataset of highest turbidity with a percentage of 0.105% Maaloxan®. The utilised portions of Maaloxan® are similar to the ones of Stephan (2016) and ranges even higher in order to create more turbid water. Figure 12 visualises the readings of the low-cost sensors. The TSS sensor was calibrated at clear tap water (NTU ≈ 0). Thus, the measured TSS represent relative differences between each turbidity stage rather than quantifying the TSS absolutely. It can be seen that the TSS follow a linear trend while the TDS do not show significant variations between the datasets.

Fig. 12
figure 12

Readings of the TSS and TDS sensors

Figure 13 shows the experimental setup under different concentrations of Maaloxan®. For clarity, only every second turbidity stage plus clear water are shown. It can be seen that the white laminated paper is visible in clear water and less/not discernible in turbid water. The scattering and absorbing effect of the mixed water can be observed in the samples. These were illuminated with a torch from below. The clear water almost reflected no light as it passed through it, while the more turbid the water got, the more light was scattered and absorbed by the suspended and dissolved particles. The green frame in Figure 13 marks the area of interest (AOI) that is 3D reconstructed and analysed further in Sect. 5.3. The images of the weld show the loss in contrast. Since the light was absorbed in highly turbid water, the exposure was adapted to acquire images of reasonable brightness. Images shown in Fig. 13 thus have different exposure times.

Fig. 13
figure 13

From top to bottom, the level of turbidity increases. For clarity, only datasets 1, 2, 4, 6, 8 of Table 1 are shown. Left: Water tank in top view, middle: Water samples, illuminated from below, right: Original images of the measuring system of the weld and the reference frame (without Wallis filtering). The area of interest for further analysis is marked green

5 Analysis

5.1 Calibration

The calibration was conducted as described in Sect. 4.1 in three setups. Between each setup, the camera maintained a steady setup regarding position and focus. The calibration results are given in Table 2. The optical system produces a radial symmetric barrel distortion as shown in Fig. 14.

Table 2 Calibrated parameters and their standard deviation of interior orientation for three calibration setups
Fig. 14
figure 14

Radial-symmetric distortion of the three calibration setups of Table 2

It can be seen that the parameters remain almost equal between the different setups, which corresponds to a good adjustment of the camera–dome port system. Nevertheless, some significant changes can be observed. The principal distance c is determined shorter under water, which corresponds to a misalignment of the camera away from the dome. That in turn corresponds to the misalignment observed in the chessboard test (Fig. 5) of three pixels at the image boarder.

The barrel distortion increases slightly for the calibration under water as mainly indicated by changes of A1 in Table 2. The variation of the radial symmetric distortion has the largest effect of the overall distortions. The B-parameters for decentring distortion show a small change of the direction of the asymmetric tangential (decentring) distortion. Note how B2 changes its algebraic sign from air to the air–dome dataset. The effect is intensified by the medium water despite remaining a minor effect. Due to an offset of the entrance pupil with the dome centre in the plane orthogonal to the optical axis, those effects might appear. Also, the small but significant variation of the principal point might be caused by decentring imperfections, which are again intensified by the medium water. The affinity and shear distortions have the smallest effect of all distortion coefficients. The dataset UW–dome shows a different affinity and a change of the direction due to positive C1. C2 was not calibrated significantly for the air datasets. It is worth mentioning that the correlations between C1 and the principal distance are comparably high (~ 0.6); thus, the affinity and shear might be affected by the change of the principal distance under water too.

A well-aligned system of the camera/lens and dome port can be modelled by the distortion model of Brown (1971). Small variations of calibration parameters might be caused by misalignments in the direction of the optical axis (c, A-parameters), by misalignments on the plane orthogonal to the optical axis (principal point, B- and C-parameters) as well as by an anisotropic and geometrically inhomogeneous dome port. When the system was set up under water, the effects of misalignments were intensified due to the higher refractive index of water.

5.2 Bundle Adjustment

For each dataset, the bundle adjustment provides statistics about the inner quality of the network. First, the standard deviation of each object point on the reference frame can be calculated. These are used to calculate the root mean square error (RMSE) which is visualised in Fig. 15. It can be seen that X and Z are less well determinable. X represents the direction along the weld, and is thus critical for the calculated baseline of an image pair; Z mainly represents the acquisition distance to the weld, and is thus critical for scaling. A slight trend can be seen showing less accuracy for more turbid water. However, the trend is only marginal and not strict. In highly turbid water, the targets on the frame can still be measured in the images. The corresponding relative accuracy ranges from 1:36,000 in clear water (dataset 1) to 1:21,000 in turbid water (dataset 6).

Fig. 15
figure 15

RMSE of the object points on the reference frame as a result of the bundle adjustment for all datasets

Furthermore, the quality of the exterior orientations is analysed and visualised in Fig. 16. Again, a marginal trend can be observed showing less accurate exterior orientations in highly turbid water. The trend is again not strict. In datasets 4 and 8, the relative trend is broken, even though the absolute difference to their neighbour datasets is only ~ 1 µm in RMSE in 3D. Note that only 3DOF are presented. The standard deviations of the three angles are similar in relation to that of the three position parameters showing a marginal trend.

Fig. 16
figure 16

RMSE of the exterior orientations as a result of the bundle adjustment for all datasets. Only the three degree of freedom of the position (XYZ) are shown

5.3 3D Reconstruction

The point clouds reconstructed from one image pair of each dataset via LSM are analysed (single point cloud p according to Fig. 7) and compared to the reference. The final result in the reconstruction process could be used to examine digital visual testing on welding lines, and thus needs to feature a certain quality. Since a point cloud is gained from images using homogenous LED illumination, a realistic texture can be mapped onto the 3D points. Figure 17 exemplarily shows the textured point clouds of the area of interest (see Fig. 13) of the datasets 1 and 8 representing the extrema of the stream of data. In the following analyses, only the area of interest is analysed since the reconstruction quality of the reference frame is of no relevance.

Fig. 17
figure 17

Textured point clouds exemplarily shown of dataset 1 with clear water (a) and dataset 8 with a visibility of 140 mm (b)

Geometrical parameters are analysed to quantify the quality level of the monocular system and to see how the reconstruction quality relates to the introduced turbidity. Besides geometrical parameters, statistics of the LSM are analysed and given in Table 3. The ground sample distance is ~ 0.04 mm in each dataset, thus slightly smaller than the target resolution of 0.05 mm.

Table 3 Geometric quality and LSM statistics of the point clouds

First, the roughness for each of the eight point clouds was calculated. The term roughness describes the distance of one point to the best fitting plane of the neighbouring points. Here, a sphere of 0.1 mm radius was used to find neighbouring points. This corresponds to approx. 3 × 3 points on the surface that were used to fit a plane. Hence, the roughness describes the local noise of the calculated point cloud. Note, that potential geometrical variations of the object geometry are included in the roughness as well. It can be seen that the roughness increases with increasing turbidity. Since the geometric object variations remain equal in each dataset, as we used the same part of the same weld in each dataset, the changes in roughness can only be caused by measurement uncertainties. As Figs. 13 and 17 show, the contrast of the images, respectively, texture decreases in highly turbid waters. The texture seams smoothed in the images while the geometry of the physical test object is the same. Even though, the geometric smoothness of the calculated point cloud decreases in highly turbid waters, geometric variations are difficult to perceive in the textured point cloud (Fig. 17). This effect could also interfere with divers underwater testing and distort the visual perception in turbid waters. Therefore, a complete geometric analysis under water is even more essential.

The quality of the LSM is quantified by the standard deviations of translation coefficients a0 and b0. Results imply a negative correlation between high turbidity and the performance of LSM. As observed in the analyses of the bundle adjustment (Sect. 5.2), dataset 4 slightly breaks the trend.

Furthermore, the percentage of pixel is given which did not converge. Due to specular reflections, floating particles or perspective differences, the LSM might not find a minimum within the given thresholds and matching criteria. Here, we used the approximate value of the SGBM instead and declared the pixel as not converged. Figure 18 shows such pixel marked in red. Exemplarily, a small specular reflection is shown in detail. It can be seen that the reflection is more intense in the right image, which leads to differences in grey values between the two images to match. Hence, the LSM does not perform well around the reflection.

Fig. 18
figure 18

Area of interest of the weld (top). Pixels which did not converge in the LSM are marked red. Exemplarily, one area, marked in green, is shown enlarged for the left image (left) and the right image of the stereopair (right). The red pattern differs between left and right image due to rounding effects of corresponding image coordinates

The 3D deviation to the reference mesh is described by two parameters. The parameter RMSxyz (root mean square), quantifies the RMS of the minimised distances between calculated object points and reference mesh after applying the ICP algorithm. The deviations to the reference are visualised in Fig. 19 in colour-coded point clouds. Again, the trend can be seen that higher turbidity leads to less accurate results. Furthermore, the parts of the weld of poor welding quality show higher deviations. However, it is still possible to calculate a point cloud of the weld with an accuracy of 0.11 mm in the water of 140 mm visibility. Points further than the triplicate of the target accuracy of 0.1 mm, thus 0.3 mm, from the reference can be considered as gross matching errors. The percentage of valid points (< 0.3 mm deviation to the reference) is given as last column in Table 3. In dataset 8, 2.6% of forward intersected corresponding points are outside the 0.3 mm threshold.

Fig. 19
figure 19

Colour-coded cloud to mesh deviations from blue (− 0.3 mm distance) to red (0.3 mm distance) for datasets 1, 2, 4 ,6, 8 in correspondence to Fig. 13

In general, the trend of decreasing quality can be seen in the analyses. However, the geometry of the point cloud becomes clearly worse from dataset 6 which was not expected, since the data show a non-linearity in geometrical quality.

5.4 Discussion

The dome port alignment with help of the introduced lens alignment shell can be fulfilled within an adequate accuracy. The calibration parameters are calibrated without explicitly modelling the refractive interfaces and show small variations between calibration setups. Those can partly be explained by the lens misalignments evidenced using the chessboard target.

As in Stephan (2016), the turbidity is artificially created using Maaloxan®. The deployed sensors to monitor the TDS and TSS show that Maaloxan® mixed with water increases the TSS only. The behaviour of the measuring system in water of other kind of turbidity conditions (e.g. dark dissolved particles) cannot be proven. The low-cost sensors are useful to monitor the water parameters. If absolute values of water parameters are needed, a sensible calibration of the sensors is necessary or other sensor types should be used. For relative measurements the low-cost sensors are appropriate. However, as stated by Gillett and Marchiori (2019), individual low-cost sensors feature individual readings. Hence, mixing different individuals of such sensors should be avoided.

The bundle adjustment shows the trend of less accurate results in highly turbid waters. Nevertheless, even in water of poor visibility the circular targets can be measured well in order to calculate exterior orientations and object points. The corresponding relative accuracy ranges from 1:36,000 in clear water to 1:21,000 in turbid water and is in accordance with published data. Shortis (2015; 2019) lists relative accuracy ranges for different publications about underwater applications. The presented accuracy of Menna et al. (2013) is highest with 1:32,000 using a DSLR equipped with a dome port. However, individual accuracies are only comparable to a limited extent, since the optical system (i.e. port), the environmental conditions (e.g. turbidity and water column), the target quality (i.e. size and printing quality in macro-settings) and redundancy (i.e. number and geometrical distribution) differ in each setup.

Besides the quality of the target measurement within the bundle adjustment, the turbidity influences the image matching quality as well. The proposed approach enables a relationship to be established between turbidity and reconstruction quality. The reconstruction quality of the most turbid dataset at 140 mm visibility, 0.11 mm, is twice as low as of the clear water dataset. Still, the turbidity does not influence the point cloud quality as much as expected. Due to the short acquisition distance, the water column in front of the lens is small, which has a positive effect to the systems sensibility for turbidity. The correlation between acquisition distance and reconstruction quality is well known for in air applications. Under water, the turbidity highly affects the photogrammetric measurements in dependence of illumination and acquisition distance. Presented analyses are valid for one specific setup in a specific environment. To generalise findings, an accurate turbidity definition, respectively, repeatable turbidity conditions need to be investigated in systematic configurations of the optical system.

The weld is of poor quality, which makes the reconstruction challenging due to a steep view, high perspective differences and large geometrical changes, which are critical due to the limited depth of field. Regarding the weld, the conditions would be better for real tasks. Up to a visibility of ~ 160 mm (dataset 7), the target accuracy of 0.1 mm can be reached within the described setup.

The analyses show the performance of the system conducting LSM for one pair of images. A meaningful idea of the system is that overlapping single point clouds are registered to one reconstruction of the whole weld. To do so, an appropriate strategy needs to be developed to handle overlapping areas. Disruptions of single point clouds at specific areas can be fixed by use of the data of neighbouring ones. Also, an open question is how to filter point clouds without having a reference available. Several strategies might be useful such as filtering for noise or range or filtering after the LSM output parameters. Here, the redundant overlapping data becomes useful as well, since weighted fitting strategies can be applied.

6 Conclusion and outlook

The presented monocular system is able to reconstruct the surface of the weld in turbid water with high quality. The turbidity is artificially created in the laboratory using Maaloxan® and monitored using low-cost TDS and TSS sensors. Those proved to be useful for relative measurements majorly.

Especially when applied to hollow welds, the small space limits configurational setup possibilities. The designed system has an image scale of ~ 1:7 and an indirect homogenous illumination; thus, the water column is small and particles do affect the image quality only slightly. In air, photogrammetry is a scalable method over any acquisition distance. Underwater, this does not hold true because the optical path needs to travel through water. The photogrammetric quality depends on the height of the water column. In clear water, the dependence on the water column is low. Similar to acquisition in air, the acquisition distance itself does not affect the image quality majorly in clear water. In comparison, image quality is highly correlated with the acquisition distance due to strong absorption and scattering in highly turbid water. This consequently affects the quality of photogrammetric measurements, as well.

The target accuracy of 0.1 mm can be reached in water with a visibility of ~ 160 mm. In general, the system can be declared as capable to conduct digital visual testing on welds under water. Besides high-quality imagery, a realistic textured 3D reconstruction of the surface can be determined in high quality in order to derive testing-relevant geometries of hollow or butt welds. The process of visual testing can be conducted digitally and the inspector can rate the weld, according to the underlaying norm, independent of time and space. Therefore, there is a high potential for objective, accurate, digital and automated visual testing of welding lines under water in the future using photogrammetric systems such as the proposed one.

From a practical point of view, the reference frame might be inconvenient to apply by divers. Hence, in future work the orientation of the system and the point clouds shall be determined without such reference. Methods like visual odometry might be suitable for that task but would presumably not achieve the recorded accuracy. Alternatively, the introduction of a second, mechanically connected, camera could solve the problem of the relative orientation. For that solution, however, more space or small-sized hardware would be needed. The fusion of single point clouds must be implemented in the algorithm in order to get one all-encompassing point cloud from several single ones automatically. Also filtering and registration methods need to be investigated further for this task.

Experiments outside the laboratory will be undertaken to quantify the quality level in more realistic scenarios. Also, the mechanical behaviour and its effect on the measuring under different pressure conditions in greater depths are an open question.