Distorted Laser Spot Center Positioning Based on Captured Image Under Laser-Camera Misalignment in UOWC

The laser spot center positioning is an essential step for camera-based terminal positioning and alignment in a long-distance laser-based underwater optical wireless communication (UOWC) system. In this paper, the laser spot profile distorted by laser-camera misalignment is examined and a principal component analysis (PCA)-based spot center estimation algorithm is proposed. The centroid offset of the distorted laser spot under different deflection angles, transmitted optical powers and camera exposure values is experimentally demonstrated and analyzed. The estimation performance and the impact of the three parameters are also studied. Experimental results show that the proposed PCA-based algorithm significantly outperforms conventional gray centroid-based positioning method under different conditions.


I. INTRODUCTION
U NDERWATER optical wireless communication (UOWC) can simultaneously achieve compromised data rate and transmission distance as compared with underwater acoustic and radio frequency (RF) communication, which becomes a complementary solution for future underwater communication networks [1], [2], [3]. By using high-power, high-modulation bandwidth laser diode (LD), UOWC systems have achieved the data rate over several Gbps [4], [5], [6], and the transmission distance has been extended to hundreds of meters [7], [8], [9]. A practical UOWC system for long transmission distance requires precise transceiver alignment. Traditional acoustic positioning and navigation techniques have been comprehensively investigated and implemented, albeit requiring high cost and large antenna array [10]. Thus, the wide field-of-view (FOV) camera-based alignment emerges as a complementary lowercost solution, which has been widely investigated in atmospheric Manuscript  free-space optical communication (FSO) [11], [12], [13], outdoor vehicular visible light communication (VLC) [14], [15], [16], [17], and underwater optical systems [18], [19], [20], [21], [22], [23]. Negahdaripour et al. proposed an automatic optical station-keeping system for application to submersible vehicles in deep waters by exploiting the information in sea floor images [18]. The light array associated with a single camera was proposed to facilitate the target positioning in an autonomous underwater vehicle (AUV) docking system [19]. Li et al. proposed a reliable vision positioning method using two cameras and four green light-emitting diodes (LEDs) fixed around the station [20]. Lin et al. established a compact, low-power, and low-cost acquisition, pointing, and tracking (APT) system, and the realignment of the optical link was experimentally achieved within 0.04 s [21]. An algorithm utilizing the laser spot image was proposed in [22] for fast and accurate tracking of underwater moving target spot. Unlike traditional optical guiding methods based on LED arrays, four laser diodes forming a wing-light pattern was adopted by Zhang et al. to realize smart optical guiding for autonomous underwater vehicles (AUVs) [23]. Clearly, the performances of the traditional methods of laser spot center extraction, such as centroid method [24], gray gravity method [25], Hough transform method [26], circle fitting method [27], spatial moment method [28] and the Gaussian distribution fitting method [29], hinge mainly on the shape of laser spot. The aforementioned algorithms work well when the laser spot in the captured image is roughly circular or ellipse, and the light intensity of the spot is uniformly distributed. However, they may yield a significant error when laser spot is severely distorted by laser-camera misalignment in the underwater scenario. In this case, the centroid of the laser spot is not the real center of the spot, which causes the positioning performance of the laser spot center to significantly degrade. Our previous work has proposed a Fourier phase based underwater positioning algorithm by leveraging the phase information of the two-dimensional image under turbulence channel [30]. In this paper, the laser spot profile distorted by laser-camera misalignment is examined, based on which a spot center estimation algorithm is proposed using under spot distortion is compared with those of the centroid method, Hough transform method, and previously proposed Fourier phase method under different conditions. Experimental results show that the laser-camera induced misalignment has a detrimental impact on the laser centroid offset, and the proposed PCA-based method outperforms the centroid method [24], the Hough transform method [26], and previously proposed Fourier phase method [30] under all tested conditions. The average estimation error can be confined within 3 pixels by properly adjusting the Ev of camera.

II. MISALIGNMENT-INDUCED LASER SPOT DISTORTION AND PROPOSED POSITIONING ALGORITHM
In the process of laser spot center positioning, the attitude of laser changes due to the terminal movement, which leads to a laser-camera misalignment. In this part, the profile of distorted laser spot will be characterized and a positioning algorithm for the distorted laser spot will be introduced. Fig. 1(a) shows the captured image of the laser spot by a commercial camera in a 50 m swimming pool. Clearly, a long strip shape can be observed for the distorted light spot under misalignment rather than an ideal circle or an oval shape. The light outlet and the light beam show a similar width and brightness since the laser outlet occupies few pixels in the imaging plane. Meanwhile, the grayscale distribution of the distorted laser spot is shown in Fig. 1(b). It is observed that the grayscale along the beam direction has a sudden change at the optical outlet, then maintains the maximum value for a period of time, and decays slowly in the end. Fig. 2 shows the spot images of the distorted laser captured by a camera at the opposite side of the laser separated by a 15 m long water tank under different conditions. Obviously, a spreading from the laser outlet can be observed for deflection angle within 2 • as shown in Fig. 2(a). However, the spreading disappears gradually with the increasing of deflection angle and a distinguishable ray of light emerges eventually. Similar spreading trends can be concluded from the images shown in Fig. 2(b) with the increasing of transmitted optical power, but the spreading becomes stable when the transmitted optical power approaches a certain extent. Fig. 2(c) shows the distorted laser images under different exposure values (Evs), and a significant spreading effect can be observed with the increasing of Ev.

A. Distorted Laser Spot Profile Under Misalignment in UOWC
Obviously, a significant positioning error will be introduced to the conventional centroid-based spot center positioning algorithms considering the aforementioned spreading effect from the laser outlet. Thus, a novel spot center positioning algorithm concerning the characteristics of the distorted laser spot profile is indispensable to gain a higher positioning accuracy.

B. PCA-Based Distorted Spot Center Estimation Algorithm
Clearly, the grayscale changes regularly along the light beam direction from the laser outlet as shown in Fig. 1(b), which can be used to facilitate the laser spot center positioning with higher accuracy. Here, a PCA-based distorted laser spot center estimation algorithm will be detailed associated with the aforementioned spreading induced laser-camera misalignment.
Roughly speaking, the distorted spot center can be estimated according to the gray change information along the light beam direction from the laser outlet, which entails to be firstly determined.
Firstly, the captured image with N pixels width and M pixels height from the camera is Gaussian filtered to reduce the noise as much as possible. After that, the filtered image is converted into a binary image for further processing simplicity. Then, a classical contour extraction algorithm [31] is adopted to obtain the twodimensional coordinates of n contour points, which is denoted as Define ν 1 = (ν x , ν y ) T as the unit vector in the principal direction which entails to be determined. The coordinate matrix H after normalization has the largest energy in the direction of the first principal axis ν 1 . Then, the determination of ν 1 can be expressed as the following optimization problem: Clearly, the optimal ν 1 of Problem (2) is the eigenvector corresponding to the the largest eigenvalue of HH T . Then the angle of the desired principal direction of the beam can be given as Obviously, the principal component of the laser spot corresponds to a straight line through the center point μ with an angle of θ Main , whose equation is denoted by f (x). As shown in Fig. 3, the contour and principal direction of the distorted light spot can be correctly extracted in different scenarios.
The grayscale gradient along the principal direction can be leveraged to further determine the position of the laser outlet. Since the imaging of the laser outlet is completely submerged in the light beam, it is intractable to obtain the accurate position of the laser outlet. Note that the laser outlet occupies few pixels for a long transmission distance, then the mutation point of the grayscale along the principal direction of the light beam can be approximated as the distorted laser spot center.
To fully utilize the pixel information and minimize the estimation error, the following processing is further detailed considering the range of derived θ Main . For instance, Fig. 4 illustrates the determination process of the distorted laser spot center for a small θ Main ∈ [−π/4, π/4]. The red line of the laser spot shown in Fig. 3 can be obtained by incorporating the angle θ Main with the coordinate of the center point μ. The grayscale information is firstly restored along the obtained line of the laser spot. After Gaussian filtering, the impact of background irradiance can be reduced. Then, the differential grayscale after half thresholding along the principal direction from left to right can be represented by where · denotes the rounding down operation, I(x, y) represents the gray value at coordinate (x, y) after half thresholding operation, f (·) represents the line equation of the laser spot with respect to x, and N is the width of the captured image. The differential grayscale results are shown in Fig. 4 and two peaks can be observed along the principal direction. Obviously, the location of the optical outlet cannot be determined by searching the maximum absolute value of D(i) since θ Main varies from −π/2 to π/2 and the optical outlet may be located at either of the two peak positions. In order to accurately distinguish the location of the laser outlet, the points whose difference values exceed the threshold are regarded as the extreme points of gray difference, whose indices along the principal direction from left to right are represented as S m , m = 1, . . . , K. Note that, the grayscale values near the optical outlet will maintain the maximum value along the principal direction as shown in Fig. 3, which can be leveraged to distinguish the actual location from other extreme points. The grayscale values of J pixels in the positive differential grayscale direction at S m are cumulatively summed as where β = sign[D(S m )] denotes the sign of the differentially operated grayscale for index S m , and the cumulative number J can be determined by J = (S K − S 1 )/K . Then, the index of the laser outlet location in S m can be derived by maximizing the cumulative summatioñ and the desired coordinate of laser outlet can be obtained as (Sm, f (Sm) ). The similar determination process of the laser outlet location for θ Main ∈ [−π/2, −π/4) ∪ (π/4, π/2] is similar to the above process for θ Main ∈ [−π/4, π/4], and is thus omitted to avoid redundancy. III. EXPERIMENTAL SETUP Fig. 5 shows the experimental setup. At the transmitter, a pigtailed single-mode fiber 520 nm green LD (Thorlabs, LP520-SF15 A) equipped with a fixed focus collimator (Thorlabs, F220FC-532) is adopted as the light source, whose maximum emitted optical power is 20 mW. The LD is placed on a rotatable platform to investigate the angle tolerance of the proposed algorithm. A water tank with the dimensions of 15 m × 0.8 m × 0.6 m is used to simulate underwater channel while the depth of remaining water is about 0.4 m with initial temperature of 10 • C. At the receiver, a smartphone (Apple, iPhone 13) whose Ev can be adjusted, is employed to acquire the laser spot image, which will be adopted for further offline image processing to estimate the position of the laser spot center.
To calculate the positioning error of the proposed algorithm, a reference position of the laser spot center has to be determined firstly. Clearly, the light spot captured by the camera shows a perfect circle when the LD is pointed at the camera, and the coordinate estimated according to the captured image in the case of laser-camera alignment is regarded as the true position of the laser spot center. Each point in the following figures is an average result of 10 captured images.

IV. RESULTS AND DISCUSSIONS
In this section, experimental results of laser spot offset under different conditions will be provided and the proposed method will be compared with other methods in terms of positioning errors for different deflection angles and transmitted optical powers, including the centroid method [24], the Hough transform method [26], and previously proposed Fourier phase method [30] under different conditions.

A. Laser Spot Offset Under Different Settings
To fully characterize the impact of laser spot center offset distorted by laser-camera misalignment, the deflection angle from the principal optical axis is denoted as θ, and the centroid offset is defined as the deviation of centroid from the real position of laser spot center in the captured image. Before centroid estimation, it is necessary to use threshold T for grayscale image denoising. In this paper, I max is defined as the maximum grayscale value of the captured image, and E(I) is defined as the average grayscale value of the maximum and minimum grayscale values. Then these two values are used as threshold T respectively for comparison.
Figs. 6 and 7 show the centroid offsets under different deflection angle and transmitted optical power (TOP) settings respectively. As shown in Fig. 6, a monotonically decreasing trend of the centroid offset with respect to the deflection angle θ can be observed since the centroid of laser spot shifts to the real center gradually with the disappearance of the outlet spreading. With the increase of transmitted optical power (TOP), a slight increase of the centroid offset can be found due to the more severe spreading effect as revealed in Fig. 7. Meanwhile, the impact of Ev on the centroid offset is also shown in Fig. 7. A slowly rising trend of the centroid offset with respect to the TOP can be observed for higher Ev. However, a noticeable rising trend of the centroid offset with the increase of Ev can be noted from Fig. 7, which indicates that the centroid offset is greatly affected by Ev. In addition, it can be seen from the two figures that the centroid offset can be further reduced by increase the threshold T from E(I) to I max in this scenario, and the maximum grayscale I max is thus adopted to fairly compare the performance of the   Fig. 8 shows the positioning error of the proposed PCAbased distorted spot center estimation method as compared to centroid method, Fourier phase method, and Hough transform method under different deflection angles. Obviously, the proposed method outperforms all other methods under tested conditions, and a decreasing positioning error trend with respect to the deflection angle θ can be observed for other methods since a roughly circle or ellipse of the laser spot gradually emerges. Moreover, a positioning error less than 5 pixels can be observed for the proposed and centroid methods when the deflection angle θ ≥ 3 • , which indicates that the distortion by laser-camera misalignment in UOWC system has to be considered for smaller deflection angles. In addition, the Hough transform method is more sensitive to TOP than the other three methods since it utilizes only the edge profile of the laser spot rather than the intensity of each pixel inside the spot. The right inserts in Fig. 8 show the corresponding positioning instances of the proposed method as compared to those of the other three methods, and similar positioning results of the proposed and centroid methods can be observed under larger deflection angles. Fig. 9 shows the positioning error of the proposed method versus TOP as compared to other three methods under various Evs. It can be seen that the proposed method performs the best for all tested TOP conditions, and slightly degraded performance occurs for higher Ev since a point on the contour in the direction opposite to the deflection direction will be estimated as the spot center according to the principle of proposed method. Besides, a rising and then flattened trend can be noticed for the other three methods since the diffusion of the laser with the increasing of the TOP changes the geometry and intensity distribution of the laser spot, and the camera gets saturated when the TOP increases to a certain level.

V. CONCLUSION
In a camera-based underwater positioning and alignment system, the distortion induced by laser-camera misalignment is detrimental to establishment of a robust UOWC system. Accordingly, this paper explored the characteristics of the laser spot distorted by laser-camera misalignment, and a PCA-based spot center estimation algorithm is proposed by leveraging the profile of laser-camera misalignment induced distortion. The centroid offsets of the distorted laser spot under different deflection angles, transmitted optical powers and camera exposure values were experimentally demonstrated and analyzed. The estimation performance and the impact of the three parameters were also studied. Experimental results show that the centroid offset of light spot is significantly affected by laser-camera misalignment, and the proposed method outperforms the centroid method, Hough transform method, and the Fourier phase method under all tested conditions. The average estimation error is within 3 pixels under proper camera exposure.