## 3 Materials and Methods
### Absolute Coordinate Estimation of the Target Combined with Camera Attitude  
The following study will provide a detailed description of the coordinate transformation process based on camera attitude. Through a multi-step transformation, the relative coordinates obtained from stereo vision (i.e., coordinates in the carrier coordinate system) will be converted to determine the precise position of the target on Earth. First, the relative coordinates of the target ship are converted to the east--north--up (ENU) coordinate by using the camera attitude information to accurately extract the target's position information relative to the carrier. Subsequently, through further coordinate mapping, it is converted to the Earth-centered, Earth-fixed (ECEF) coordinate, and finally, the conversion to the World Geodetic System 1984 (WGS-84) coordinate system is realized, i.e., the latitude and longitude coordinates of the target are obtained, and each coordinate system is shown in Figure 7. This conversion process can extract the accurate latitude and longitude coordinates of the target on the Earth's surface, which is the basis for realizing the global positioning of the target location. This part will introduce this conversion process in detail. Specifically, the transformation from the carrier coordinate system (i.e., the world coordinate system assumed in the previous text) to the ENU coordinate system is accomplished through the camera's attitude angles. The ENU coordinate system is a local coordinate system centered at the position of the camera, with the \(X_{ENU}\)-axis pointing east, the \(Y_{ENU}\)-axis pointing north, and the \(Z_{ENU}\)-axis pointing up. When there is an attitude angle of the shipboard camera, it is necessary to rotate the point \(P_{w}(X_{w},Y_{w},Z_{w})\) under the carrier coordinate system around the \(Y_{w}\) axis by the roll angle \(\gamma\), around the \(X_{w}\) axis by the pitch angle \(\theta\), and around the \(Z_{w}\) axis by the yaw angle \(-\psi\), in order to obtain the point \(P_{ENU}(X_{ENU},Y_{ENU},Z_{ENU})\) under the ENU coordinate system. The transformation from the carrier coordinate system to the ENU coordinate system can be expressed as follows:  
\[R_{CN}= \begin{bmatrix}\cos\psi\cos\gamma+\sin\psi\sin\theta\sin\gamma&\sin\psi \cos\theta&\cos\psi\sin\gamma-\sin\psi\sin\theta\cos\gamma\\ -\sin\psi\cos\gamma+\cos\psi\sin\theta\sin\gamma&\cos\psi\cos\theta&-\sin\psi \sin\gamma-\cos\psi\sin\theta\cos\gamma\\ -\cos\theta\sin\gamma&\sin\theta&\cos\theta\cos\gamma\end{bmatrix}  \tag{13}\]  
Figure 7: Illustration of coordinate system conversion. \[ \begin{bmatrix}X_{ENU}\\ Y_{ENU}\\ Z_{ENU}\end{bmatrix} =R_{CN} \begin{bmatrix}X_{w}\\ Y_{w}\\ Z_{w}\end{bmatrix}  \tag{14}\]  
Here, \(R_{CN}\) represents the rotation matrix for transforming from the carrier coordinate system to the ENU coordinate system. The ECEF coordinate system has its origin at the center of the Earth, represented by mutually orthogonal X, Y, and \(Z\) axes. The transformation relationship between point \(P_{ENU}(X_{ENU},Y_{ENU},Z_{ENU})\) in the ENU coordinate system and point \(P_{ECEF}(X_{ECEF},Y_{ECEF},Z_{ECEF})\) in the ECEF coordinate system involves the real-time latitude (\(lat\)) and longitude coordinates (\(lon\)) of the ship itself, as well as the coordinates of the ship's position in the ECEF coordinate system denoted as \((L_{ECEF},L_{ECEF},L_{ECEF})\). The transformation relation is as follows:  
\[ \begin{bmatrix}X_{ECEF}\\ Y_{ECEF}\\ Z_{ECEF}\end{bmatrix} = \begin{bmatrix}-\sin(lon)&-\cos(lon)\sin(lat)&\cos(lon) \cos(lat)\\ \cos(lon)&-\sin(lon)\sin(lat)&\sin(lon)\cos(lat)\\ 0&\cos(lat)&\sin(lat)\end{bmatrix}\begin{bmatrix}X_{ENU}\\ Y_{ENU}\\ Z_{ENU}\end{bmatrix} + \begin{bmatrix}L_{ECEF}\\ L_{ECEF}\\ L_{ECEF}\end{bmatrix}  \tag{15}\]  
Finally, the WGS-84 coordinate system is used to express the position of a point on Earth in terms of geodetic latitude \(B\), geodetic longitude \(L\), and geodetic height \(H\).