A calibration method for combining underwater acoustic and optical information

Through the multi-physics calibration method, the coordinates of the target object detected by the sonar are converted into the pixel coordinates in the optical image, which solves the problems of the existing underwater acousto-optic image registration method such as large calculation amount and accuracy dependent on data quality, and achieves high efficiency. The underwater imaging quality is improved and is suitable for underwater robot operations in different water environments.

CN118397108BActive Publication Date: 2024-08-27OCEAN UNIV OF CHINA
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202410832136.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-26
Publication Date
2024-08-27
Estimated Expiration
2044-06-26

AI Technical Summary

Technical Problem

Existing underwater acoustic and optical image registration methods are computationally intensive and their accuracy depends on data quality. Deep learning-based methods require a large amount of data set training, and the acquisition cost of sonar images is high, which affects the quality of underwater imaging.

Method used

A multi-physics calibration method is used to establish a camera imaging model based on the principle of small hole imaging. The coordinates of the target object detected by sonar are converted into pixel coordinates in the optical image. The internal matrix and distortion matrix of the camera are solved using the checkerboard calibration board and Zhang Zhengyou calibration method. , calculate rotation and translation matrices to achieve the combination of acoustic information and optical information.

Benefits of technology

It improves the quality of underwater imaging, reduces the cost of sonar image acquisition, simplifies the calibration process, improves accuracy and stability, and is suitable for underwater robot operations in different water environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118397108B
    Figure CN118397108B
Patent Text Reader

Abstract

The present invention provides a calibration method for combining underwater acoustic and optical information, and belongs to the field of underwater acoustic and optical imaging technology. The present invention establishes a camera imaging model based on the pinhole imaging principle, uses a chessboard calibration plate as a standard reference, and solves the camera internal matrix #imgabs0# and the distortion matrix through coordinate transformation and maximum likelihood method; according to Zhang Zhengyou calibration method, the function in openCV is used to obtain the rotation matrix and translation matrix between the world coordinate system with sonar as the origin and the camera coordinate system; the imaging model of the camera is used to calculate the conversion relationship between the four coordinate systems, thereby completing the calibration. The sonar image used in the method only needs to be able to obtain the position coordinates of the target object, which reduces the cost of obtaining the sonar image, and the algorithm calculation complexity is not high. Through the establishment of this method, the combination of acoustic information and optical information is realized, and the purpose of improving the underwater imaging quality is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of underwater acoustic and optical imaging, and in particular relates to a calibration method for combining underwater acoustic and optical information. Background Art

[0002] In marine exploration activities, autonomous underwater vehicles (AUV) and remote operated vehicles (ROV) are the main detection tools, usually equipped with sonar and cameras. Sonar is not affected by the turbidity of the water and can detect targets at a relatively long distance. The camera can intuitively obtain high-resolution target images, but due to the scattering of light in seawater and the influence of the medium on its absorption, the optical image is blurred, the color is distorted, and the imaging distance is severely limited. Autonomous underwater vehicles (AUV) and remote operated vehicles (ROV) approach the target and adjust the light brightness according to the target position information and the collected image information. These two imaging technologies are complementary. Therefore, the acoustic-optical fusion technology has developed rapidly in recent years and has been widely used in the underwater field. It is a very potential method to improve the overall imaging capability.

[0003] At present, the main research direction of underwater acoustic and optical fusion is the underwater acoustic and optical image spatial registration algorithm, which is mainly divided into region-based and feature-based registration methods.

[0004] The region-based underwater photoacoustic image registration method mainly uses the grayscale statistical information of the two photoacoustic images to obtain the registration measurement function by searching for its optimal global parameters, thereby realizing the spatial registration of the two images. This traversal search and matching algorithm has high computational complexity and matching accuracy, and the matching accuracy is related to the quality of the original data, requiring a large overlapping area between the images.

[0005] Feature-based registration methods are mainly based on feature descriptor-based registration methods and deep learning-based registration methods. Feature-based registration algorithms are affected by the significant structural differences of underwater acoustic and optical images. For example, if the target object is rotated or has different proportions in the acoustic and optical images, the robustness of the feature descriptor will be reduced and the registration accuracy will be affected. For deep learning-based registration methods, a large number of data sets are required to train a network with strong generalization ability. Therefore, feature-based registration methods require a unified underwater acoustic and optical data set. Underwater optical scene data sets are easy to obtain, while sonar image acquisition experiments are costly. Summary of the invention

[0006] Based on the above problems to be solved urgently, the present invention proposes a multi-physical field calibration method, which converts the coordinates of the target object detected by sonar, that is, the coordinates in the world coordinate system with sonar as the origin, into the pixel coordinates of the target object in the optical image through a camera calibration method, thereby realizing the combination of acoustic information and optical information and achieving the purpose of improving the quality of underwater imaging.

[0007] The present invention proposes a calibration method for combining underwater sound and light information, comprising the following steps:

[0008] Step 1: Establish a camera imaging model based on the pinhole imaging principle, and set the sonar as the origin World coordinate system , camera coordinate system , image physical coordinate system , image pixel coordinate system ;

[0009] Step 2: Use a chessboard calibration plate as a standard reference. By changing its position, the camera collects multiple images. Knowing the size of the chessboard and the size of each grid, establish the relationship between the image physical coordinates of the corner points on the chessboard and the two-dimensional image coordinates of the corresponding image points in the camera coordinate system. After coordinate transformation and maximum likelihood method, solve the camera internal matrix and the distortion matrix;

[0010] Step 3: According to Zhang Zhengyou calibration method, use the solved camera internal matrix And the distortion matrix and the known world coordinates of the target feature points and the pixel coordinates of the target feature points in the image, use the function in openCV to get the rotation matrix and translation matrix between the world coordinate system with the sonar as the origin and the camera coordinate system;

[0011] Step 4: Use the imaging model of the camera to calculate the transformation relationship between the four coordinate systems; that is, derive the mathematical relationship between the coordinates of the feature points of the target object in the world coordinate system and its pixel coordinates on the camera imaging plane, and convert the internal matrix , distortion matrix, rotation matrix and translation matrix are substituted into the relational equation to obtain the coordinates of the target position identified by the known sonar. and the pixel coordinates of the target The mapping relationship between them is established to complete the calibration.

[0012] Preferably, in step 1, the sonar is set as the origin World coordinate system , camera coordinate system , image physical coordinate system , image pixel coordinate system , specifically:

[0013] Sonar is the coordinate origin Establishing the world coordinate system ; 、 and The axis satisfies the right-hand screw rule;

[0014] Set the camera coordinate system , with the camera optical center As the origin of the coordinate system, a straight line passing through the optical center and perpendicular to the imaging plane is drawn axis, Axis and The plane formed by the axes is parallel to the imaging plane to establish the camera coordinate system;

[0015] Set the image physical coordinate system , the image physical coordinate system is established on the two-dimensional imaging surface of the camera, and the origin is the intersection of the camera optical axis and the imaging surface, axis The axes are parallel to the camera coordinate system axis axis;

[0016] Set the image pixel coordinate system ; The image pixel coordinate system takes the upper left corner of the image as the origin, axis The axis is the coordinate axis, the unit of the coordinate axis is pixel, and the horizontal coordinate of the pixel is With vertical coordinate Respectively represent the row and column numbers in the image array.

[0017] Preferably, the specific process of step 2 is:

[0018] A checkerboard calibration plate with known dimensions and grid size is used as a standard reference. To ensure the accuracy of calibration, N images of the checkerboard calibration plate at different positions and angles are collected.

[0019] Use the built-in calibrateCamera function in the openCV library for calibration. The calibration program reads the pixel coordinates and world coordinates of the corner points. The pixel coordinates of the corner points are the pixel coordinates of the corner points in the acquired image; the world coordinates of the corner points are the world coordinates of the corner points in a world coordinate system established with the chessboard calibration plate as the z plane, the upper left corner of the chessboard as the origin, and the length and width of the chessboard as the x and y axes respectively;

[0020] The principle of camera calibration is:

[0021]

[0022]

[0023] in , Respectively and , , Respectively represent the number of pixels per unit distance in the horizontal and vertical directions, Represents the focal length, in the camera coordinate system The pixel coordinates of the intersection of the axis and the image are ;

[0024] During calibration, the world coordinate system The plane is defined on the calibration plate plane. represents the world coordinates of the corner points of the chessboard in this world coordinate system, are the pixel coordinates of the corner points of the chessboard; for The projection matrix; Represents the extrinsic parameter matrix of the camera; and Respectively represent the rotation matrix and translation matrix of the world coordinate system defined during calibration relative to the camera coordinate system; the internal matrix of the camera is calculated according to the maximum likelihood method and the distortion matrix.

[0025] Preferably, the specific process of step 3 is:

[0026] Obtain the world coordinates of the feature points of the target object in the world coordinate system with the sonar as the origin; obtain the pixel coordinates of the feature points of the target object;

[0027] The camera internal parameters are solved The built-in solvePnP function in openCV is used to find the rotation vector and translation matrix using the distortion matrix, the world coordinates of the known target feature points, and the pixel coordinates of the target feature points in the image. , and use the Rodrigues function to convert the rotation vector into a rotation matrix .

[0028] Preferably, the world coordinates of the feature points of the target object in the world coordinate system with the sonar as the origin are obtained by using any one of the following three methods:

[0029] Measuring with a tape measure 、 and The coordinates on the axis represent the world coordinates of the feature points of the target object in the world coordinate system with the sonar as the origin;

[0030] Or use 2D sonar to obtain images, measure polar coordinates, and use a tape measure to obtain The coordinates on the axis are converted into the polar coordinates obtained by the two-dimensional sonar. 、 The world coordinates on the axis, combined The world coordinates on the axis are obtained to obtain the world coordinates of the feature points of the target object in the world coordinate system with the sonar as the origin;

[0031] Or directly use three-dimensional sonar measurement to obtain the world coordinates of the target feature points in the world coordinate system with the sonar as the origin.

[0032] Preferably, the specific process of step 4 is:

[0033] S1, the coordinates of the target position identified by the known sonar Convert to camera coordinates ;

[0034] S2, the homogeneous coordinates of the target position identified by the sonar in the camera coordinate system Convert to homogeneous coordinates in the image's physical coordinate system , through the pinhole camera model:

[0035]

[0036]

[0037] in, is the focal length of the camera;

[0038] S3, derive the coordinates in the camera coordinate system Coordinates in the same pixel coordinate system The relationship between the two is established and the coordinate transformation is completed; including the following processes:

[0039] S31, when converting, first consider the offset, assuming that the camera coordinate system The pixel coordinates of the intersection of the axis and the image are , then the point in the image physical coordinate system is The coordinates of the resulting image in the pixel coordinate system are:

[0040]

[0041] S32, converting physical units and pixel units:

[0042]

[0043] in, 、 Respectively represent the number of pixels per unit distance in the horizontal and vertical directions, focal length The unit is ;

[0044] S33, use 、 express and , we can get:

[0045]

[0046] Get the coordinates in the camera coordinate system The relationship between the coordinates in the pixel coordinate system:

[0047]

[0048] Since the intrinsic parameter matrix of the camera is:

[0049]

[0050] Then we have:

[0051]

[0052] S34, the coordinates in the camera coordinate system Convert to pixel coordinates ; The internal matrix With the obtained camera coordinates Multiply and normalize the resulting matrix by dividing each element by , the first two lines of the matrix are the obtained pixel coordinates; the undistortPoints function in the openCV library function is used to correct the obtained pixel coordinates, and the corrected pixel coordinates are rounded to obtain the final pixel coordinates of the target object. .

[0053] Preferably, the specific process of S1 is:

[0054] Convert the known target's coordinates in the world coordinate system with the sonar as the origin into homogeneous coordinates and transpose them and rotate the matrix and Connect to form a new matrix ,Right now:

[0055]

[0056] in, 、 They are the rotation matrix and translation matrix of the world coordinate system with the sonar as the origin relative to the camera coordinate system, is a 3×3 orthogonal identity matrix with 3 independent variables, is a 3×1 translation matrix, is a 4×4 camera extrinsic parameter matrix;

[0057] According to the relationship between the coordinates of the target position identified by the sonar and the coordinates in the camera coordinate system, the matrix Multiply the homogeneous coordinates of the known target in the world coordinate system with the sonar as the origin to obtain the homogeneous coordinates in the camera coordinate system ; The relationship between the two is:

[0058]

[0059] in, Yes The homogeneous coordinates in the world coordinate system with the sonar as the origin are: Yes Homogeneous coordinates in the camera coordinate system.

[0060] Compared with the prior art, the present invention has the following beneficial effects:

[0061] The experimental results show that by inputting the world coordinates of different checkerboard corner points and visualizing the calculated pixel coordinates, it can be seen that they are basically consistent with the characteristic points of the target object on the image. The accurate acoustic-optical physical field calibration method can be used for new light and acoustic joint detection technology. Specifically, it can be used to calculate the exposure of the target area based on the pixel coordinates of the target in the image, thereby adjusting the energy delivery of the light source, improving the underwater imaging quality, and providing a good light field environment and visual effects for the underwater robot operating system in different water environments.

[0062] The method proposed in the present invention makes full use of the advantages of Zhang Zhengyou's calibration method, avoids the problems of high-precision calibration objects and cumbersome operation, and achieves higher accuracy than other calibration methods, and can also avoid the problem of high cost. The method is simple to make, takes lens distortion into account during the calibration process, increases the accuracy of calibration, and also has good stability. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] Figure 1 It is a schematic diagram of the overall process flow of the present invention.

[0064] Figure 2 Schematic diagram of the camera imaging model.

[0065] Figure 3 Schematic diagram of a chessboard calibration plate in an embodiment.

[0066] Figure 4 It is the image obtained by sonar in the embodiment.

[0067] Figure 5 It is an optical image corresponding to the sonar image in the embodiment.

[0068] Figure 6 This is to read the sonar image of the world coordinates in the world coordinate system with the sonar as the origin in the embodiment.

[0069] Figure 7 This is a result diagram of converting the world coordinates of the first target feature point into pixel coordinates in the embodiment.

[0070] Figure 8 This is a result diagram of converting the world coordinates of the second target feature point into pixel coordinates in the embodiment.

[0071] Fig. 9 This is a result diagram of converting the third corner point into pixel coordinates in the embodiment. DETAILED DESCRIPTION

[0072] The present invention proposes a method for converting the coordinates of a target object detected by sonar (i.e., the coordinates in the world coordinate system with sonar as the origin) into the pixel coordinates of the target object in an optical image. The sonar image used in this method only needs to be able to obtain the position coordinates of the target object, which reduces the cost of obtaining sonar images and the algorithm calculation complexity is not high. By establishing this method, the combination of acoustic information and optical information is achieved to achieve the purpose of improving the quality of underwater imaging. The overall process is as follows Figure 1 As shown:

[0073] Step 1: Establish a camera imaging model based on the pinhole imaging principle, and set the sonar as the origin World coordinate system , camera coordinate system , image physical coordinate system , image pixel coordinate system ;

[0074] Step 2: Use a chessboard calibration plate as a standard reference. By changing its position, the camera collects multiple images. Knowing the size of the chessboard and the size of each grid, establish the relationship between the image physical coordinates of the corner points on the chessboard and the two-dimensional image coordinates of the corresponding image points in the camera coordinate system. After coordinate transformation and maximum likelihood method, solve the camera internal matrix and the distortion matrix;

[0075] Step 3: According to Zhang Zhengyou calibration method, use the solved camera internal matrix And the distortion matrix and the known world coordinates of the target feature points and the pixel coordinates of the target feature points in the image, use the function in openCV to get the rotation matrix and translation matrix between the world coordinate system with the sonar as the origin and the camera coordinate system;

[0076] Step 4: Use the imaging model of the camera to calculate the transformation relationship between the four coordinate systems; that is, derive the mathematical relationship between the coordinates of the feature points of the target object in the world coordinate system and its pixel coordinates on the camera imaging plane, and convert the internal matrix , distortion matrix, rotation matrix and translation matrix are substituted into the relational equation to obtain the coordinates of the target position identified by the known sonar. and the pixel coordinates of the target The mapping relationship between them is established to complete the calibration.

[0077] The invention will be further described below in conjunction with specific embodiments.

[0078] 1. Camera imaging model establishment:

[0079] The camera imaging model established is as follows Figure 2 shown.

[0080] Set the world coordinate system , with the sonar as the coordinate origin Establish the world coordinate system. Axis and The plane formed by the axes is parallel to the ground. Axis perpendicular to Axis and The plane formed by the axes establishes the world coordinate system. 、 and The shaft satisfies the right-hand screw rule.

[0081] Set the camera coordinate system , with the camera optical center As the origin of the coordinate system, a straight line passing through the optical center and perpendicular to the imaging plane is drawn axis, Axis and The camera coordinate system is established by making the plane formed by the axes parallel to the imaging plane.

[0082] Set the image physical coordinate system , the image physical coordinate system is established on the two-dimensional imaging surface of the camera, and the origin is the intersection of the camera optical axis and the imaging surface, axis The axes are parallel to the camera coordinate system axis axis.

[0083] Set the image pixel coordinate system The image pixel coordinate system takes the upper left corner of the image as its origin. axis The axis is the coordinate axis, the unit of the coordinate axis is pixel (pixel), and the horizontal coordinate of the pixel With vertical coordinate Respectively represent the row and column numbers in the image array.

[0084] 2. Solve the camera internal matrix And the distortion matrix:

[0085] The general principle of camera calibration is:

[0086]

[0087]

[0088] in 、 Respectively and , 、 Represents the number of pixels per unit distance in the horizontal and vertical directions respectively , Represents the focal length, in the camera coordinate system The pixel coordinates of the intersection of the axis and the image are For the convenience of calculation, the world coordinate system is calibrated The plane is defined on the calibration plate plane. represents the world coordinates of the corner points of the chessboard in this world coordinate system, are the pixel coordinates of the corner points of the chessboard. for The projection matrix. Represents the extrinsic parameter matrix of the camera. and They represent the rotation matrix and translation matrix of the world coordinate system relative to the camera coordinate system defined during calibration. The specific steps of solving the camera intrinsic parameter matrix using the calibration principle include:

[0089] The calibration plate is made of aluminum oxide and has a checkerboard pattern with 100 corner points. , the side length of each square grid is 20mm. The camera model used is Deepsea IPMSC-3105, and the camera resolution is 1080p. In order to ensure the accuracy of calibration, 14 chessboard calibration plate images at different positions and angles are collected. Figure 3Schematic diagram of the chessboard calibration board.

[0090] The software used for camera calibration is python, and the built-in calibrateCamera function in the openCV library is used for calibration. The calibration program reads the pixel coordinates and world coordinates of the corner points, and calculates the intrinsic parameters and distortion matrix of the camera based on the maximum likelihood estimation.

[0091] Run the calibration program to obtain the calibration results. In this embodiment, the internal parameter matrix is

[0092]

[0093] Save the calibration results in the file camera.pkl.

[0094] 3. Solve the rotation matrix and translation matrix between the world coordinate system with the sonar as the origin and the camera coordinate system:

[0095] According to the camera calibration principle, the rotation matrix between the world coordinate system with the sonar as the origin and the camera coordinate system is solved using the intrinsic parameter matrix and distortion matrix obtained by calibration. and translation matrix The specific steps are:

[0096] S1, obtain the world coordinates of the feature points of the target object in the world coordinate system with the sonar as the origin.

[0097] Use 2D sonar to obtain images. Figure 4 It is an image obtained by sonar.

[0098] Polar coordinates were obtained by measuring with ProViewer software and using a tape measure. The coordinates on the axis are converted into the polar coordinates obtained by the two-dimensional sonar. 、 The world coordinates on the axis, combined The world coordinates on the axis are obtained to obtain the world coordinates of the target feature point in the world coordinate system with the sonar as the origin. The conversion relationship between the polar coordinates and the world coordinates of the target feature point is:

[0099]

[0100] In the formula, It is the distance between the target feature point and the sonar measured by ProViewer software. It is the angle at which the feature point of the target deviates from the central axis of the sonar.

[0101] S2, obtaining the pixel coordinates of the feature points of the target object.

[0102] Use the camera to obtain the optical image corresponding to the sonar image. Figure 5 It is the optical image corresponding to sonar.

[0103] The pixel coordinates of the feature points of the target object are manually selected using Python. The pixel coordinates of each feature point are read 5 times, and the average value is taken to obtain the final pixel coordinates, so as to reduce the error of manual calibration.

[0104] S3, use the solvePnP function built into openCV to find the rotation vector and translation matrix , and use the Rodrigues function to convert the rotation vector into a rotation matrix The rotation vector is:

[0105]

[0106] Convert to rotation matrix:

[0107]

[0108] The translation matrix is:

[0109] 。

[0110] 4. Use the camera's imaging model to calculate the conversion relationship between the four coordinate systems and complete the calibration:

[0111] S1, the coordinates of the target position identified by the known sonar Convert to camera coordinates ;

[0112] Convert the known target's coordinates in the world coordinate system with the sonar as the origin into homogeneous coordinates and transpose them and rotate the matrix and Connect to form a new matrix ,Right now:

[0113]

[0114] in , , They are the rotation matrix and translation matrix of the world coordinate system with the sonar as the origin relative to the camera coordinate system, is a 3×3 orthogonal identity matrix with 3 independent variables, is a 3×1 translation matrix, is a 4×4 camera extrinsic parameter matrix;

[0115] According to the relationship between the coordinates of the target position identified by the sonar and the coordinates in the camera coordinate system, the matrix Multiply the homogeneous coordinates of the known target in the world coordinate system with the sonar as the origin to obtain the homogeneous coordinates in the camera coordinate system ; The relationship between the two is:

[0116]

[0117] in, Yes The homogeneous coordinates in the world coordinate system with the sonar as the origin are: Yes Homogeneous coordinates in the camera coordinate system.

[0118] S2, the homogeneous coordinates of the target position identified by the sonar in the camera coordinate system Convert to homogeneous coordinates in the image's physical coordinate system , through the pinhole camera model:

[0119]

[0120]

[0121] in, is the focal length of the camera;

[0122] S3, derive the coordinates in the camera coordinate system Coordinates in the same pixel coordinate system The relationship between the two is established and the coordinate transformation is completed; including the following processes:

[0123] S31, when converting, first consider the offset, assuming that the camera coordinate system The pixel coordinates of the intersection of the axis and the image are , then the point in the image physical coordinate system is The coordinates of the resulting image in the pixel coordinate system are:

[0124]

[0125] S32, converting physical units and pixel units:

[0126]

[0127] in, 、 Represents the number of pixels per unit distance in the horizontal and vertical directions respectively ,focal length The unit is ;

[0128] S33, use , express and , we can get:

[0129]

[0130] Get the coordinates in the camera coordinate system The relationship between the coordinates in the pixel coordinate system:

[0131]

[0132] Since the intrinsic parameter matrix of the camera is:

[0133]

[0134] Then we have:

[0135]

[0136] S34, the coordinates in the camera coordinate system Convert to pixel coordinates ; The internal matrix With the obtained camera coordinates Multiply and normalize the resulting matrix by dividing each element by , the first two lines of the matrix are the obtained pixel coordinates; the undistortPoints function in the openCV library function is used to correct the obtained pixel coordinates, and the corrected pixel coordinates are rounded to obtain the final pixel coordinates of the target object. .

[0137] V. Experimental results:

[0138] In this embodiment, read Figure 6 The coordinates of the first, second, and third feature points in the sonar image are input in the world coordinate system with the sonar as the origin, and the calculated pixel coordinates are expressed in Figure 7 , Figure 8 , Fig. 9 The calculated pixel coordinates are visualized based on the image, and it can be seen that they are basically consistent with the feature points on the image.

[0139] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

[0140] Although the above describes the specific implementation methods of the present invention, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without creative work are still within the scope of protection of the present invention.

Claims

1. A calibration method for combining underwater sound and light information, characterized in that: The following steps are involved: Step 1: Establish a camera imaging model based on the pinhole imaging principle, and set the sonar as the origin World coordinate system , camera coordinate system , image physical coordinate system , image pixel coordinate system ; Step 2: Use a chessboard calibration plate as a standard reference. By changing its position, the camera collects multiple images. Knowing the size of the chessboard and the size of each grid, establish the relationship between the image physical coordinates of the corner points on the chessboard and the two-dimensional image coordinates of the corresponding image points in the camera coordinate system. After coordinate transformation and maximum likelihood method, solve the camera internal matrix and the distortion matrix; Step 3: According to Zhang Zhengyou calibration method, use the solved camera internal matrix And the distortion matrix and the known world coordinates of the target feature points and the pixel coordinates of the target feature points in the image, use the function in openCV to get the rotation matrix and translation matrix between the world coordinate system with the sonar as the origin and the camera coordinate system; Step 4, using the imaging model of the camera to calculate the transformation relationship between the four coordinate systems; The mathematical relationship between the coordinates of the feature points of the target object in the world coordinate system and their pixel coordinates on the camera imaging plane is derived, and the internal matrix , distortion matrix, rotation matrix and translation matrix are substituted into the relational equation to obtain the coordinates of the target position identified by the known sonar. and the pixel coordinates of the target The mapping relationship between them is established to complete the calibration; The specific process is: S1, the coordinates of the target position identified by the known sonar Convert to camera coordinates ; S2, the homogeneous coordinates of the target position identified by the sonar in the camera coordinate system Convert to homogeneous coordinates in the image's physical coordinate system , through the pinhole camera model: in, is the focal length of the camera; S3, derive the coordinates in the camera coordinate system Coordinates in the same pixel coordinate system The relationship between the two is established and the coordinate transformation is completed; including the following processes: S31, when converting, first consider the offset, assuming that the camera coordinate system The pixel coordinates of the intersection of the axis and the image are , then the point in the image physical coordinate system is The coordinates of the resulting image in the pixel coordinate system are: S32, converting physical units and pixel units: in, 、 Respectively represent the number of pixels per unit distance in the horizontal and vertical directions, focal length The unit is ; S33, use 、 express and , we can get: Get the coordinates in the camera coordinate system The relationship between the coordinates in the pixel coordinate system: Since the intrinsic parameter matrix of the camera is: Then we have: S34, the coordinates in the camera coordinate system Convert to pixel coordinates ; The internal matrix With the obtained camera coordinates Multiply and normalize the resulting matrix by dividing each element by , the first two lines of the matrix are the obtained pixel coordinates; the undistortPoints function in the openCV library function is used to correct the obtained pixel coordinates, and the corrected pixel coordinates are rounded to obtain the final pixel coordinates of the target object. .

2. A calibration method for combining underwater sound and light information according to claim 1, characterized in that: In step 1, the sonar is set as the origin World coordinate system , camera coordinate system , image physical coordinate system , image pixel coordinate system , specifically: Sonar is the coordinate origin Establishing the world coordinate system ; 、 and The axis satisfies the right-hand screw rule; Set the camera coordinate system , with the camera optical center As the origin of the coordinate system, a straight line passing through the optical center and perpendicular to the imaging plane is drawn axis, Axis and The plane formed by the axes is parallel to the imaging plane to establish the camera coordinate system; Set the image physical coordinate system , the image physical coordinate system is established on the two-dimensional imaging surface of the camera, and the origin is the intersection of the camera optical axis and the imaging surface, axis The axes are parallel to the camera coordinate system axis axis; Set the image pixel coordinate system ; The image pixel coordinate system takes the upper left corner of the image as the origin, axis The axis is the coordinate axis, the unit of the coordinate axis is pixel, and the horizontal coordinate of the pixel is With vertical coordinate Respectively represent the row and column numbers in the image array.

3. A calibration method for combining underwater sound and light information as claimed in claim 1, characterized in that: The specific process of step 2 is as follows: A checkerboard calibration plate with known dimensions and grid size is used as a standard reference. To ensure the accuracy of calibration, N images of the checkerboard calibration plate at different positions and angles are collected. The calibration is performed using the built-in calibrateCamera function in the openCV library. The calibration program reads the pixel coordinates and world coordinates of the corner points. The pixel coordinates of the corner points are the pixel coordinates of the corner points in the acquired image; the world coordinates of the corner points are the pixel coordinates of the corner points on the checkerboard calibration board. z The plane takes the upper left corner of the chessboard as the origin, and the length and width of the chessboard are x, y World coordinates in the world coordinate system established by the axis; The principle of camera calibration is: in , Respectively and , , Respectively represent the number of pixels per unit distance in the horizontal and vertical directions, Represents the focal length, in the camera coordinate system The pixel coordinates of the intersection of the axis and the image are ; During calibration, the world coordinate system The plane is defined on the calibration plate plane. represents the world coordinates of the corner points of the chessboard in this world coordinate system, are the pixel coordinates of the corner points of the chessboard; for The projection matrix; Represents the extrinsic parameter matrix of the camera; and Respectively represent the rotation matrix and translation matrix of the world coordinate system defined during calibration relative to the camera coordinate system; the internal matrix of the camera is calculated according to the maximum likelihood method and the distortion matrix.

4. A calibration method for combining underwater sound and light information as claimed in claim 1, characterized in that: The specific process of step 3 is as follows: Obtain the world coordinates of the feature points of the target object in the world coordinate system with the sonar as the origin; obtain the pixel coordinates of the feature points of the target object; The camera internal parameters are solved The built-in solvePnP function in openCV is used to find the rotation vector and translation matrix using the distortion matrix, the world coordinates of the known target feature points, and the pixel coordinates of the target feature points in the image. , and use the Rodrigues function to convert the rotation vector into a rotation matrix .

5. A calibration method for combining underwater sound and light information as claimed in claim 4, characterized in that: The method of obtaining the world coordinates of the feature points of the target object in the world coordinate system with the sonar as the origin is to use any one of the following three methods: Measuring with a tape measure 、 and The coordinates on the axis represent the world coordinates of the feature points of the target object in the world coordinate system with the sonar as the origin; Or use 2D sonar to obtain images, measure polar coordinates, and use a tape measure to obtain The coordinates on the axis are converted into the polar coordinates obtained by the two-dimensional sonar. 、 The world coordinates on the axis, combined The world coordinates on the axis are obtained to obtain the world coordinates of the feature points of the target object in the world coordinate system with the sonar as the origin; Or directly use three-dimensional sonar measurement to obtain the world coordinates of the target feature points in the world coordinate system with the sonar as the origin.

6. A calibration method for combining underwater sound and light information as claimed in claim 1, characterized in that: The specific process of S1 is as follows: Convert the known target's coordinates in the world coordinate system with the sonar as the origin into homogeneous coordinates and transpose them and rotate the matrix and Connect to form a new matrix ,Right now: in, , They are the rotation matrix and translation matrix of the world coordinate system with the sonar as the origin relative to the camera coordinate system, is a 3×3 orthogonal identity matrix with 3 independent variables, is a 3×1 translation matrix, is a 4×4 camera extrinsic parameter matrix; According to the relationship between the coordinates of the target position identified by the sonar and the coordinates in the camera coordinate system, the matrix Multiply the homogeneous coordinates of the known target in the world coordinate system with the sonar as the origin to obtain the homogeneous coordinates in the camera coordinate system ; The relationship between the two is: in, Yes The homogeneous coordinates in the world coordinate system with the sonar as the origin are: Yes Homogeneous coordinates in the camera coordinate system.

Citation Information

Patent Citations

  • Underwater active rotation structured light three-dimensional vision measuring device and measuring method

    CN110763152A

  • Galvanometer scanning system calibration method based on double checkerboards

    CN111536902A

  • Light-sound image fusion method for deep and far sea visual cultivation

    CN115100298A

  • Underwater binocular calibration method

    CN115797460A

  • Transparent object positioning method and device based on monocular color and storage medium

    CN115830103A