A method for measuring the spatial posture of an underwater precast block
By extracting and verifying local key planes, and combining adaptive parameters and geometric feature template matching, the problem of accuracy in underwater irregular block attitude measurement was solved, achieving efficient, safe and precise block engagement control in breakwater construction.
Patent Information
- Application Number
- CN202611127190.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-28
- Publication Date
- 2026-11-24
AI Technical Summary
Existing technologies include underwater manual measurement which is highly dangerous, and traditional sonar algorithms cannot accurately extract the complete 6-DOF attitude of irregular blocks. Furthermore, they are susceptible to interference from local point cloud noise and block rollover, making it impossible to achieve precise interlocking between blocks.
By extracting local key planes and verifying geometric features, the center coordinates and three-dimensional rotation angle of the precast block are retrieved. Adaptive parameters and geometric feature template matching are used to calculate the complete 6-DOF attitude of the precast block, including pitch angle, roll angle and yaw angle.
It achieves high-precision attitude measurement of irregular blocks, improves the automation and safety of the construction process, ensures precise interlocking between blocks, and adapts to the usability of algorithms under different hydrological conditions and equipment.
Smart Images

Figure CN123156218A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of underwater sonar measurement and marine engineering computer vision technology, and is particularly applicable to the accurate measurement and construction quality control of the underwater spatial attitude (position, pitch, roll, yaw) of revetment blocks (such as triangular blocks, pyramidal blocks, ACCROPODE blocks, etc.) in breakwater engineering. Background Technology
[0002] Breakwater revetment blocks are the core structure of port and coastal engineering. Their underwater installation spatial attitude directly determines the interlocking degree between blocks, the overall stability of the revetment, and the wave-damping effect. With the increase in deep-water, high-wave, and strong-current marine engineering projects, the requirements for the measurement accuracy, real-time performance, and automation of the block's three-dimensional attitude have significantly increased. Currently, breakwater construction in China still largely relies on the traditional model of "filling + diver verification + underwater total station / GNSS positioning".
[0003] However, traditional methods suffer from the following serious problems: 1. Underwater manual measurement by divers: Relying on underwater ropes, angle measurement, and visual orientation estimation by frogmen, this method is extremely inefficient, costly, and carries significant safety risks. It can only perform sampling inspections and cannot provide block-by-block, full-coverage, and real-time monitoring of the construction process. 2. Waterborne total station / GNSS + lifting device attitude estimation: This method can only determine the surface position and tilt angle of the lifting device. Due to the influence of underwater currents, the block and the lifting device often exhibit relative twisting or tilting, making it impossible to directly obtain the true underwater 6-DOF attitude of the block. 3. Existing sonar-based 3D scanning is mostly used for macroscopic topographic surveying or volume estimation, without specifically optimizing the algorithm for attitude calculation of the revetment blocks. The main reason is that the underwater block structure is complex, sonar scan data suffers from severe multipath effects and noise, and single-view sonar can only acquire local surface point clouds. How to accurately calculate the complete 6-DOF attitude of the overall structure (especially the key orientation angle that determines the interlocking quality of the blocks) under local point cloud information containing a large amount of noise is a major technical challenge. Summary of the Invention
[0004] To address the challenges of existing technologies, such as the high risk of underwater manual measurement, the inability of traditional sonar algorithms to accurately extract the complete 6-DOF attitude of irregular blocks, and susceptibility to local point cloud noise and block rollover interference, this invention proposes a method for measuring the spatial attitude of underwater prefabricated blocks. This method innovatively extracts the complete center coordinates and three-dimensional rotation angles of the prefabricated block through the extraction of local key planes and geometric feature verification, exhibiting extremely high noise resistance and strong adaptability. To solve the aforementioned technical problems, this invention provides a method for measuring the spatial attitude of underwater prefabricated blocks, mainly including the following steps: Step S1: Acquire underwater sonar point cloud data of the prefabricated block and preprocess the point cloud data using a statistical outlier filtering algorithm to obtain a target point cloud P; Step S2: Divide the target point cloud P into multiple voxel blocks using a spatial voxel partitioning method, and perform adaptive region growing fitting based on the angle between the normal vectors and distance features between adjacent voxel blocks to extract multiple planar point cloud sets of the prefabricated block; Step S3: Calculate the center point of each planar point cloud, select candidate top surfaces according to the Z-axis height of the center point, and then... Step S4: Select the normal vector of the top surface to generate a rotation matrix, and rotate the candidate top surface point cloud to the horizontal reference plane; Step S5: Extract the boundary point cloud of the rotated candidate top surface, fit the boundary line using an iterative clustering algorithm and extract the geometric descriptor of the plane, and match the geometric descriptor with the features of the three-dimensional design model of the prefabricated block to verify and determine the real top surface; Step S6: Based on the center point, normal vector, and design height of the prefabricated block after verification, calculate the three-dimensional spatial center coordinates, pitch angle, and roll angle of the prefabricated block; and calculate the yaw angle of the prefabricated block based on the principal feature line of the boundary of the real top surface, and finally output the complete 6-DOF spatial attitude of the prefabricated block.
[0005] Preferably, in step S2, the target point cloud is segmented into segments with a size of A voxel block, where A is the known side length of any face in the prefabricated block design model; select any voxel block. The normal vector of the voxel block is calculated using the principal component analysis (PCA) algorithm. .
[0006] Preferably, the adaptive region growing and fitting in step S2 specifically includes finding small patches based on spatial index structure. For each of the four adjacent small blocks, calculate the normal vector of each of the four adjacent small blocks. The included angles; if all four included angles are less than the adaptive angle threshold. Then it is determined For a planar basic block; wherein, the Dynamically set according to the angular resolution of the sonar equipment; fitting plane equation Iterate through the target points, calculate the distances from each point to the plane equation, and select points whose distances are less than or equal to an adaptive distance threshold. The points are included in the set of points in the plane point cloud, where The noise standard deviation is set based on the underwater sonar scan data.
[0007] Preferably, in step S4, the specific steps for fitting the boundary lines and verifying the true top surface are as follows: Project the rotated point cloud of the undetermined top surface onto the XY plane, and extract the boundary points of the planar point cloud using the Alpha Shapes algorithm; select the initial four clustering lines from the boundary point cloud using the RANSAC algorithm; calculate the vertical distance from each boundary point to the current four clustering lines, divide the point clusters according to the nearest neighbor principle, and iteratively update the line equations for each point cluster using the least squares method until the parameters converge, and output the four best-fitted boundary lines; calculate the adjacent included angles and length ratios of the above four boundary lines to generate a geometric descriptor; compare it with the theoretical features of the top surface in the three-dimensional design model of the precast block; if the match is successful, it is determined to be the true top surface; if the match fails (e.g., the block flips over and the side is mistakenly identified as the top surface), select the second highest plane in the height ranking, and iteratively execute steps S3 to S4 until the true highest top surface is found.
[0008] Preferably, calculating the complete 6-DOF spatial attitude of the precast block in step S5 specifically involves: obtaining the overall design height of the precast block. Move the highest center point of the true top surface downwards along its unit normal vector. Distance is used to obtain the three-dimensional spatial center coordinates of the entire precast block. The pitch and roll angles of the prefabricated block are obtained by directly mapping the unit normal vector of the real top surface; a preset principal feature edge (such as the longest edge) is selected from the four boundary lines of the real top surface, and its projection direction vector on the horizontal plane is obtained. Through the arctangent function The yaw angle was calculated.
[0009] Compared with existing technologies, this invention has the following significant advantages: First, it overcomes the limitations of traditional methods that can only determine the center point and normal vector. Second, by deeply exploring the characteristics of the top surface boundary, this invention accurately calculates the yaw angle representing the orientation of the block, which is of decisive guiding significance for the precise interlocking and assembly of irregular facing blocks (such as twisted king-shaped blocks). Third, this invention introduces adaptive angle and distance thresholds bound to sonar hardware performance, replacing traditional fixed hard parameters, effectively overcoming the problems of severe multipath effects and high dispersion of underwater sonar point clouds, and ensuring the usability of the algorithm under different hydrological conditions and different equipment. Fourth, this invention innovatively adopts a "geometric feature template matching" strategy. When the block tilts or overturns underwater, causing the non-top surface to become the "highest surface," the algorithm can automatically identify the "false top surface" through geometric descriptors such as aspect ratio and included angle, and probe downwards to find the "true top surface," greatly improving the fault tolerance and universality under complex working conditions. Attached Figure Description
[0010] To more clearly illustrate the technical solutions of the embodiments disclosed in this invention, the accompanying drawings of the embodiments will be briefly described below. These drawings are for illustrative purposes only and are not intended to limit the scope of protection of this invention.
[0011] Figure 1 This is a flowchart of the overall algorithm for a method for measuring the spatial attitude of an underwater prefabricated block according to the present invention.
[0012] Figure 2 This is a schematic diagram of the boundary cloud map of the underwater prefabricated block spatial attitude measurement method of the present invention.
[0013] Figure 3 This is a schematic diagram illustrating the principle of underwater prefabricated block attitude calculation and geometric projection of the present invention. Detailed Implementation
[0014] The present invention will now be described in further detail and in complete form with reference to the accompanying drawings and specific embodiments. Those skilled in the art will understand that the following embodiments are for illustrative purposes only and are not intended to limit the scope of protection of the present invention.
[0015] This invention proposes a technical method for inverting the overall 6-DOF attitude of a structure using local key plane information, primarily targeting complex and irregular revetment blocks in breakwater engineering. The specific implementation steps are as follows: Step S1: Data Acquisition and Preprocessing Underwater point cloud data of the precast blocks is acquired by scanning from a top-down angle using multibeam sonar mounted on a lifting device or underwater robot. To meet the needs of engineering construction guidance, the collected raw point cloud data, combined with surface GNSS / RTK and compass data, has been converted to the engineering global coordinate system (such as the CGCS2000 coordinate system) at the data level. Addressing issues such as high noise levels and interference from suspended matter in the water, a statistical outlier filtering algorithm is used to process the raw point cloud, removing free noise points to obtain the target point cloud P.
[0016] Step S2: Adaptive parameter planar point cloud segmentation and extraction Step S21: Divide the target point cloud P into small blocks using the spatial voxel partitioning method, and set the voxel size. (Where A is the theoretical side length of any face of the pre-embedded block, ensuring that the feature is not excessively fragmented). Step S22: Select any voxel block. The normal vector of the small block is calculated using the principal component analysis (PCA) algorithm. .
[0017] Step S23: Use the KD-tree spatial index to find the smaller block. For each of the four adjacent small blocks, calculate the normal vector of each of the four small blocks. The included angle Step S24: Set the adaptive plane tolerance threshold. In practice, It is not a fixed value, but is dynamically set according to the angular resolution and ranging accuracy of the sonar equipment used (e.g., set to...). If all four included angles are less than Then it is determined It is a planar basic block; if it does not meet the requirements, a new small block is selected as the basic block. .
[0018] Step S25: Fitting plane equation Calculate the distance from each point in the point cloud P to the plane. Set an adaptive distance threshold. (in The standard deviation of sonar ranging noise, for example, is 2 cm. (For distances less than or equal to...) Points greater than or equal to a certain value are assigned as interior points (Plan_i), and those greater than a certain value are assigned as exterior points. This process is iterated until all planes are segmented, forming a set of planar point clouds. .
[0019] Step S3: Find the highest plane and perform an orthogonal rotation. Step S31: Traverse the planar point cloud set and calculate the center point of each face. Sort all center points in descending order of Z-axis height, and select the plane containing the highest center point as the "undetermined top face". Step S32: Let the unit normal vector extracted from the undetermined top face be... The target's orientation is parallel to the XY plane (i.e., the Z-axis unit vector). ).
[0020] Calculate the axis of rotation ; Calculate the rotation angle Generate the three-dimensional rotation matrix R using the formula for rotation vectors along arbitrary axes: (Where K is an antisymmetric matrix constructed based on vector k) Multiply the point cloud of the undetermined top surface by the rotation matrix R so that the normal vector of the plane is parallel to the Z-axis, which facilitates the subsequent two-dimensional contour extraction.
[0021] Step S4: Geometric template verification of real and fake top surfaces (anti-tipping mechanism) During riprap construction, the blocks may tilt severely or even overturn, and the highest surface extracted in step S3 may be a side or a sharp corner. Therefore, verification is required. Step S41: Project the rotated point cloud onto the XY plane, extract boundary points using the Alpha Shapes algorithm, and calculate the midpoint.
[0022] Step S42: Boundary Line Clustering Fitting. To prevent non-convergence caused by random selection, the RANSAC algorithm is preferentially used to initialize four main direction clustering lines in the boundary point cloud. Then, the perpendicular distance from all boundary points to the lines is calculated, and the points are divided into four clusters according to the nearest neighbor assignment principle. The least squares method is used to update the line equations for the points within each cluster. When the point cluster assignment no longer changes or the line parameters converge (deviation...), the clustering is complete. ), outputting four optimal fitting boundary lines.
[0023] Step S43: Calculate the included angles and side length ratios of the four boundary lines to generate the "geometric feature descriptor" for the current plane. Compare this descriptor with the CAD design drawings of the precast blocks. For example, for a rectangular top surface facing block, determine whether its adjacent included angles are within the specified range. Within the specified range, and with an aspect ratio error not exceeding 10%. If this condition is met, it is confirmed as the "true top surface"; if the difference is large, it is determined to be a side surface, and the process returns to step S31, selecting the second-highest plane for re-verification until the true highest flat top surface is found.
[0024] Step S5: Complete 6-DOF Spatial Attitude Calculation of the Precast Block After successfully locking the "real top surface", the final attitude calculation is performed (combined with...) Figure 2 As shown): (1) Three-dimensional coordinate calculation: Obtain the vertical height from the center of the block to the top surface according to the design drawings. Translate the highest center point of the actual top surface downwards along the unit normal vector. The distance can be used to obtain the three-dimensional spatial coordinates of the centroid of the precast block. (2) Pitch and roll angles: The unit normal vector of the true top surface. It directly reflects the tilt state of the block. By analyzing the normal vector, the current pitch and roll angles of the prefabricated block can be obtained. (3) Yaw angle: Extracting the orientation of the block is the key to whether the blocks can interlock. From the four boundary lines output in step S42, select the longest edge (or the feature edge specified in the design) as the "main direction baseline". Let the direction vector of this baseline be projected onto the XY plane of the world coordinate system as The formula for calculating the yaw angle of the precast block is: Thus, this method successfully obtained the complete 6-DOF attitude of the precast block in the global coordinate system. The data is output to the construction monitoring platform in real time, enabling high-precision automated quality control of the underwater installation of breakwater revetment blocks.
[0025] Example 2: A method for measuring the spatial attitude of underwater precast blocks mainly includes the following steps: Step S1: Precast block point cloud data acquisition. The precast block point cloud is acquired by sonar from any top-down angle. The precast block point cloud is processed by the statistical outlier filtering algorithm to obtain point cloud P. Step S2: Extract the highest plane of the prefabricated structural block; Step S21: Divide the precast block point cloud P into small blocks using the spatial voxel division method. The size of the voxel is V=A / 10, where A is the side length of any face of the precast block.
[0026] Step S22: Select any small block bi and use the PCA algorithm to calculate the normal vector vi of the small block; Step S23: Calculate the four small blocks adjacent to the small block bi. If the four small blocks are not satisfied, reselect bi and calculate the normal vectors vi1, vi2, vi3, and vi4 of the four small blocks respectively. Calculate the angles θ1, θ2, θ3, and θ4 between vi1, vi2, vi3, vi4 and vi respectively. Step 24: If θ1, θ2, θ3, and θ4 are all less than Δ, then bi is considered a planar basic block. If θ1, θ2, θ3, and θ4 are not all less than Δ, then Δ = 0.5, and a new small block is selected as bi. Step S25: Fit the plane equation bi_plan of bi, and calculate the points in P that are less than or equal to 1 cm from bi_plan as Plan_i, and the points in P that are greater than 1 cm from bi_plan as Plan_e.
[0027] Step S26: Using Plan_e as the reference, execute S21-S25 until all planar point cloud extraction is completed, forming a planar point cloud set Plan={Plan_i, i=0, 1, 3, 4......}.
[0028] Step S3: Precast Block Spatial Attitude Measurement Step S31: Traverse the planar point cloud set Plan, calculate the center point of each face, sort the center points of each face in descending order of Z-axis height, determine the highest center point (x, y, zmax), and take the plane containing the highest center point as the undetermined top face.
[0029] Step S32: Transform the point cloud to a plane parallel to xy based on vi.
[0030] The original plane is tilted; let the unit normal vector of vi be... The target's orientation is a plane parallel to the XY plane, with the corresponding standard normal vector being the unit vector along the Z-axis. The input normal vector needs to be normalized first to eliminate the interference of the magnitude on the rotation calculation: Rotation axis calculation: Rotation angle calculation: Generate a 3D rotation matrix using the formula for rotation vectors along arbitrary axes. The formula is as follows: In the formula, It is a 3-order identity matrix; For the axis of rotation Constructed antisymmetric matrix: For any point in the original point cloud Coordinates after rotation: at this time, This refers to a planar point cloud with its normal vector parallel to the Z-axis.
[0031] Step S33: Determine if the undetermined top surface is the true top surface. Due to the tilting of the precast block, the extracted top surface may be a side surface. The following algorithm is used to determine the top surface.
[0032] Step 33-1: First, Projecting onto the xy plane, the Alpha Shapes algorithm is used to extract the boundary points of the planar point cloud, and the midpoint c of the projected boundary points is calculated. Step 33-2: Extract the four boundary point clouds.
[0033] A. Initialize four boundary lines. Randomly select four pairs of non-overlapping two-dimensional points from the input boundary point cloud, each pair containing two non-coincident points; solve for a unique line from each pair of points to generate four initial clustering lines: The superscript (0) represents the 0th iteration (initial state).
[0034] B. Point cloud clustering assignment Clustering is performed on all boundary points using the perpendicular distance from a point to a straight line as the basis for clustering.
[0035] For any point pi in the point cloud, calculate its perpendicular distance to the current four clustering lines: di1,di2,di3,di4 Following the nearest neighbor assignment principle, the point is assigned to the cluster of points corresponding to the lines with the smallest distances, as defined mathematically below: After completing this round of allocation, we obtain four temporary point clusters corresponding to the four boundaries: C1, C2, C3, and C4.
[0036] C. Point Cluster Validity Verification. To avoid fitting failures with single points or sparse point clusters, a minimum valid point count threshold is set (recommended threshold: 5). If the number of points in a cluster is less than the threshold, it is considered an abnormal allocation, the previous round of line parameters is retained, and no update is performed.
[0037] D. Linear Equation Update Slope-intercept form for fitting straight lines to points within a cluster: And convert it to the general standard form of a straight line: After completing the fitting and updating of all clusters, output a new set of four boundary lines: ,in This represents the current iteration round.
[0038] E. Iterative Convergence Criterion Three termination conditions are set, and iteration will stop when any one of them is met, balancing convergence stability and computational efficiency.
[0039] Judgment 1: No change in point cluster allocation. The cluster numbers of all point cloud points in this round are completely consistent with those in the previous iteration. The point cloud segmentation results no longer change, the judgment result is stable, and the iteration is terminated.
[0040] Criterion 2: Line parameter threshold convergence. Calculate the total parameter deviation of the four lines before and after iterative updates to measure the degree of convergence. Set convergence accuracy threshold If the total deviation Once the parameters of the line are determined to be stable, the iteration stops.
[0041] Decision 3: Maximum number of iterations as a safety net. Set the maximum number of iterations. If the iteration reaches the upper limit and still fails to converge, the iteration is forcibly terminated, and the current optimal segmentation result is output.
[0042] F. Edge splitting Loop through steps B, C, D, E: Point cloud clustering assignment → Least squares line update → Convergence condition determination After the iteration terminates, the output consists of four stable clusters of boundary points and four optimally fitted boundary lines.
[0043] Step 33-3: Find the true highest plane. Calculate the center points c1, c2, c3, and c4 of the four boundary point clouds. Construct vectors c-c1, c-c2, c-c3, and c-c4 pointing from c to c1, c2, c3, and c4 respectively. Calculate the angle between the vector and the X-axis, and number the four sides according to the angle. Since the prefabricated block mainly consists of the positive direction and trapezoidal planes, where the square sides are the top surface and the trapezoidal sides are the sides, calculating the angle between two adjacent sides can determine whether it is a square. When the angles between all adjacent sides are similar, it is a square top surface; when the angles between all adjacent sides differ significantly, it is a trapezoidal top surface. Refer to step S23 for the judgment condition settings. If it is a square top surface, directly execute step S34; otherwise, select the plane with the second height in step S31 and iteratively execute steps S32 and S33 until the highest plane is found. Figure 2 As shown, Step S34: Calculate the normal vector v = (vx, vy, vz) of the top surface p_top. Based on the design information, obtain the overall height d of the precast block. Move the highest center point downwards along the unit normal vector by a distance d / 2 to obtain the current center point (xmid, ymid, zmid) of the entire block, thus obtaining the spatial orientation (xmid, ymid, zmid, vx, vy, vz) of the entire block. The calculation formula is as follows: The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for measuring the spatial attitude of underwater precast blocks, characterized in that, Includes the following steps: Acquire underwater sonar point cloud data of the prefabricated block, and perform filtering preprocessing on the point cloud data to obtain the target point cloud; The target point cloud is divided into multiple voxel blocks using the spatial voxel partitioning method. Region growing and fitting are performed based on the angle between the normal vectors and the distance features between adjacent voxel blocks to extract multiple planar point cloud sets of the prefabricated block. The center point of each planar point cloud is calculated, and candidate top surfaces are selected according to the height of the center point. The candidate top surface is then rotated to a horizontal reference plane based on its normal vector. The boundary point cloud of the rotated candidate top surface is extracted, the boundary line is fitted, and the geometric features of the plane are extracted. This is then matched with the features of the three-dimensional design model of the prefabricated block to verify the true top surface. Based on the verified center point of the real top surface, the normal vector, and the design height of the precast block, the three-dimensional spatial center coordinates, pitch angle, and roll angle of the precast block are calculated; and the yaw angle of the precast block is calculated based on the boundary line of the real top surface, outputting the complete 6-DOF spatial attitude of the precast block.
2. The method for measuring the spatial attitude of an underwater precast block according to claim 1, characterized in that, The filtering preprocessing of the point cloud data specifically involves using a statistical outlier filtering algorithm to process the original sonar point cloud, removing noise points caused by underwater multipath effects and suspended objects, and obtaining the target point cloud P.
3. The method for measuring the spatial attitude of an underwater precast block according to claim 1, characterized in that, The method of segmenting the target point cloud into multiple voxel blocks using spatial voxel partitioning specifically involves dividing the target point cloud into blocks of size [size missing]. A voxel block, where A is the known side length of any face in the prefabricated block design model; Select any voxel piece The normal vector of the voxel block is calculated using the principal component analysis (PCA) algorithm. .
4. The method for measuring the spatial attitude of an underwater precast block according to claim 3, characterized in that, The region growing and fitting based on the angle and distance features of the normal vectors between adjacent voxel blocks specifically includes: finding blocks based on a spatial index structure. For each of the four adjacent small blocks, calculate the normal vector of each of the four adjacent small blocks. The included angles; if all four included angles are less than the adaptive angle threshold. Then it is determined For a planar basic block; wherein, the Dynamically set according to the angular resolution of the sonar equipment; fitting The plane equation is calculated, and the distances from each target point to this plane equation are traversed and the cloud computing points are selected. Points with distances less than or equal to an adaptive distance threshold are considered. The points are included in the set of points in the plane point cloud, where The noise standard deviation is set based on the underwater sonar scan data.
5. The method for measuring the spatial attitude of an underwater precast block according to claim 1, characterized in that, The process of selecting candidate top surfaces and rotating them to a horizontal reference plane specifically includes: calculating the center point of each planar point cloud, sorting the center points from largest to smallest according to their Z-axis height, and selecting the plane containing the highest center point as the undetermined top surface; and then calculating the unit normal vector of the undetermined top surface. unit normal vector of the Z-axis The cross product yields the axis of rotation. And perform a dot product to calculate the rotation angle. A three-dimensional rotation matrix R is generated using the arbitrary axis rotation vector formula. The point cloud coordinates of the undetermined top surface are multiplied by the rotation matrix R so that the normal vector of the undetermined top surface is parallel to the Z-axis.
6. The method for measuring the spatial attitude of an underwater precast block according to claim 1, characterized in that, The extraction of the boundary point cloud of the candidate top surface after rotation specifically involves projecting the rotated point cloud of the top surface to be determined onto the XY plane, using the AlphaShapes algorithm to extract the boundary points of the planar point cloud, and calculating the midpoint of the projected boundary points. .
7. The method for measuring the spatial attitude of an underwater precast block according to claim 6, characterized in that, The fitted boundary line specifically employs a clustering assignment iterative algorithm, including using the RANSAC algorithm or randomly selecting four initial clustering lines from the boundary point cloud; calculating the vertical distance from each boundary point to the current four clustering lines; and dividing the boundary points into the point clusters corresponding to the lines with the smallest distances according to the nearest neighbor principle. The equation of the line is updated using the least squares method for each point within a point cluster; Iteratively perform point cluster assignment and line equation update until the point cluster assignment no longer changes or the deviation of the line parameter change is less than the convergence accuracy threshold, and output four stable sets of boundary point clusters and four optimally fitted boundary lines.
8. The method for measuring the spatial attitude of an underwater precast block according to claim 7, characterized in that, The process of matching the surface with the features of the three-dimensional design model of the precast block to verify the true top surface specifically includes calculating the adjacent included angles or length ratios of the four optimal fitting boundary lines to generate a geometric descriptor; comparing the geometric descriptor with the theoretical geometric features of each surface in the pre-imported three-dimensional design model of the precast block; if the matching result is the top surface of the precast block, then the current plane is determined to be the true top surface. If the matching result is the side of the precast block, select the second tallest plane in the height sorting, and return to perform the top surface rotation and verification steps until the true highest top surface is found.
9. The method for measuring the spatial attitude of an underwater precast block according to claim 1, characterized in that, The calculation of the three-dimensional spatial center coordinates, pitch angle, and roll angle of the precast block specifically involves obtaining the overall height based on the design information of the precast block. Move the center point of the true top surface downwards along its unit normal vector. Distance is used to obtain the three-dimensional spatial center coordinates of the precast block. The unit normal vector of the real top surface is directly mapped to the pitch and roll angles of the prefabricated block.
10. A method for measuring the spatial attitude of an underwater precast block according to claims 8 and 9, characterized in that, The calculation of the yaw angle of the precast block based on the boundary lines of the real top surface specifically involves selecting the longest principal feature edge from the four optimally fitted boundary lines of the verified real top surface, and obtaining the projection direction vector of this principal feature edge on the XY plane. The angle between the projection direction vector and the positive X-axis of the coordinate system is calculated using the arctangent function and used as the yaw angle of the precast block. By combining the three-dimensional spatial center coordinates, pitch angle, and roll angle, the 6-DOF spatial attitude of the prefabricated block is generated.
