A high-precision color three-dimensional curved surface reconstruction method for a spacecraft surface profile
Patent Information
- Application Number
- CN202210689688.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-17
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2042-06-17
AI Technical Summary
然而绝大多数曲面重建仅仅只是重建了物体表面的模型(通过算法重建出了深度信息),忽略了表面原有的彩色纹理信息(并未重建出 RGB颜色信息)
[0152](1)、本发明一种航天器表面外形的高精度彩色三维曲面重建方法:首先将生成的彩色点云由三维点云变换为平面二维点云,设定翻滚角α,俯仰角β,偏航角γ,将彩色点云进行旋转变换。然后根据点云的这个空间位置差异特点,将物体进行分离,设定各个物体点云的圆心和圆域半径,划分出重建点云的空间范围得到二维平面点云。对获得的平面点云利用alphaShape进行边界特征提取获得对应的凸包范围。根据凸包范围,对得到的 N×N个网格点云数据进行判断,筛选出位于凸包范围内的网格点。对于凸包范围内的网格点,通过LLE插值算法生成其深度信息Z值和色彩信息RGB。将LLE算法插值后的深度信息Z和色彩纹理信息RGB添加到平面网格中,使每个网格坐标点都具有几何坐标信息和颜色纹理信息。合并点云数据,选择合适的曲面可视化算法,生成三维彩色曲面,最终实现航天器表面外形的高精度彩色三维曲面重建。
Smart Images

Figure CN115018987B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of spacecraft structural design and assembly measurement technology. More specifically, this invention relates to a high-precision color three-dimensional curved surface reconstruction method for the surface shape of a spacecraft. Background Technology
[0002] With the development of space technology, the design, processing, and assembly levels of various advanced spacecraft are constantly improving, making the need for high-precision three-dimensional feature measurement and reconstruction of spacecraft more urgent. High-precision three-dimensional reconstruction models play an important role in both precise measurement of spacecraft and routine maintenance, inspection, and assembly.
[0003] In recent years, engineers have used cameras to obtain high-resolution images of spacecraft surfaces, reconstructing 3D models of the spacecraft's surface for precise measurements. While higher image resolution results in a larger number of point clouds in the reconstructed model and higher accuracy in surface reconstruction, hardware limitations prevent the resolution of acquired images from increasing indefinitely, limiting the amount of 3D point cloud data obtained. Therefore, how to reconstruct more point clouds under limited hardware conditions to ensure accurate surface reconstruction has become a pressing issue.
[0004] Meanwhile, the point spacing between the reconstructed point cloud datasets also has a crucial impact on the accuracy and effect of surface reconstruction: if the reconstructed point cloud is sparse, scattered, and the point spacing is uneven and too large, the reconstructed surface will appear very rough, resulting in low surface reconstruction accuracy and an inability to reproduce the true surface condition of the spacecraft; if the reconstructed point cloud is too dense, although the reconstruction accuracy may be relatively high, the surface reconstruction time will increase exponentially, making it too inefficient and counterproductive. Therefore, how to improve the problems caused by point spacing in surface reconstruction and find a balance between efficiency and accuracy is a very serious problem at present.
[0005] In addition, during routine maintenance, inspection, and assembly of spacecraft, a surface model constructed solely from three-dimensional spatial data is insufficient to meet the demands of the work. The human eye is far more sensitive to color texture information, which is difficult to discern with the naked eye if it is only three-dimensional spatial information. However, most surface reconstructions merely reconstruct the model of the object's surface (reconstructing depth information through algorithms), ignoring the original color texture information of the surface (failing to reconstruct RGB color information).
[0006] This invention, through its proposed algorithm, expands the original input point cloud dataset to a fixed number of points. While increasing the number of points, it significantly mitigates the problems caused by differences in point spacing, thereby reconstructing a smoother, more accurate surface model. Furthermore, based on the reconstructed depth information, color texture information is reconstructed, resulting in a more delicate surface with richer color information, making both the visualization effect and the overall outline more realistic. Summary of the Invention
[0007] One object of the present invention is to solve at least the above-mentioned problems and / or defects, and to provide at least the advantages described below.
[0008] To achieve these objectives and other advantages according to the present invention, a method for high-precision color three-dimensional surface reconstruction of spacecraft surface shape is provided, comprising the following steps:
[0009] Step S1: Obtain a color point cloud dataset from the color image of the spacecraft surface. Input a color point cloud dataset Pointcloud of size Pointcloud_Count, where the 3D coordinates of the i-th point are... The point cloud color texture is Pointcloud_Color i =[R i G i B i ], i=1,2,...,Pointcloud_Count;
[0010] Step S2: Transform the 3D point cloud into a 2D plane;
[0011] Step S3: Extract the boundary of the two-dimensional planar point cloud;
[0012] Step S4: Point cloud coordinate meshing;
[0013] Step S5: Sequentially determine whether the coordinates of the N×N rectangular grids of each object's point cloud are within the convex hull.
[0014] Step S6: Add depth information Z to each coordinate point of the grid point cloud dataset;
[0015] Step S7: Add color information R to each coordinate point of the grid point cloud dataset;
[0016] Step S8: Add color information G to each coordinate point of the grid point cloud dataset;
[0017] Step S9: Add color information B to each coordinate point in the grid point cloud dataset;
[0018] Step S10: Output three-dimensional color point cloud data with depth information Z and color texture information RGB;
[0019] Step S11: Repeat steps S6 to S10 to output a new 3D color grid point cloud dataset;
[0020] Step S12: Merge the complete 3D color mesh point cloud dataset of the object to be photographed and the original 3D color point cloud dataset, select a suitable surface visualization algorithm, generate a 3D color surface, and output the final 3D color reconstruction model with color texture information.
[0021] Preferably, step S2, which transforms the three-dimensional point cloud into a two-dimensional plane, includes the following specific steps:
[0022] Step S21: Rotate the 3D color point cloud dataset Pointcloud until it is parallel to the XOY plane. After the rotation transformation, the coordinates of the color point cloud dataset Pointcloud become as follows:
[0023] [X′ D ,Y′ D ,Z′ D ,1]=[X D ,Y D Z D ,1]R X (α)R Y (β)R Z (γ)
[0024] In the above formula:
[0025]
[0026]
[0027]
[0028] Where α represents the roll angle along the X-axis, β represents the pitch angle along the Y-axis, and γ represents the yaw angle along the Z-axis, the values of α, β, and γ are set according to the actual spatial position of the object's point cloud. To rotate the point cloud parallel to the XOY plane, usually only the yaw angle γ needs to be set. A straight line is roughly fitted based on the tilted point cloud in 3D space, and its slope is used as the initial value of the yaw angle γ. The angle is continuously adjusted until the point cloud is parallel to the XOY plane. The color point cloud dataset Pointcloud is transformed by rotation to be parallel to the 2D XOY plane, resulting in the transformed color point cloud dataset Pointcloud, where the 3D coordinates of the i-th point are... Color Texture Pointcloud′_Color i =[R i G i B i ];
[0029] Step S22: Separate the object point cloud; assuming the point cloud dataset consists of M object point cloud datasets, distinguish them based on the coordinate differences of each object point cloud dataset Pointcloud′ on the X-axis, and take the midpoint coordinates x1, x2, ..., x of the interval between adjacent object point clouds on the X-axis. M-1 As the dividing point, the M object point clouds after separation are denoted as Pointcloud1, Pointcloud2, ..., Pointcloud. M Its separation formula is:
[0030]
[0031] Among them, the number of object point clouds Pointcloud1 is Pointcloud. 1_ Count, the three-dimensional spatial coordinates of the i1th point are Color texture is Similarly, point clouds of objects M The number is Pointcloud M _Count, the i-th M The three-dimensional spatial coordinates of the points are Color texture is The relationship between the point cloud counts of M objects is Pointcloud_Count = Pointcloud1_Count + ... + Pointcloud M _Count, since the color information is not processed, the color texture of each object's point cloud remains consistent with the original point cloud;
[0032] Step S23: Divide the approximate reconstruction area; based on the point clouds of each object (Pointcloud1, Pointcloud2, ..., Pointcloud...). M Based on the actual location in space, the center and radius of the point cloud of each object are set, using the circular regions c1, c2, ..., c M The approximate XOY spatial range of the reconstructed point cloud is defined, and the formula for dividing the circular region is shown below:
[0033]
[0034] Among them, (x 01 ,y01 ),(x 02 ,y 02 ),…,(x 0M ,y 0M ) are respectively set as Pointcloud1, Pointcloud2, ... Pointcloud M The coordinates of the center of the point cloud in the XOY plane. They are Pointcloud1, Pointcloud2, ... Pointcloud M The radius of the circular region, generating circular regions c1, c2, ..., c M They are Pointcloud1, Pointcloud2, ... Pointcloud M The approximate reconstruction range; construct M new two-dimensional point cloud datasets, and denote the two-dimensional point cloud dataset where the point cloud of object 1 is located within the planar circular region c1 as . Similarly, let the point cloud of object M be located in the planar circular region c. M The two-dimensional point cloud dataset within the range is denoted as Will Pointcloud1, Pointcloud2,…Pointcloud M The X, Y coordinate information and color texture information are sequentially assigned to the two-dimensional point cloud dataset. The process of assigning coordinate information is as follows:
[0035]
[0036] in, This represents the X, Y coordinate information of the point cloud dataset Pointcloud1. If the X, Y coordinates of the i1th point are located within the circular region c1, then it is considered as a two-dimensional point cloud dataset. One data point in Pointcloud1 is used to sequentially update the judgment of each point in Pointcloud1 to obtain... Two-dimensional point cloud dataset within the circular region c1 The number of point clouds is Among them, the first The two-dimensional spatial coordinates of the points are Color texture is The relationship between the number of points in the cloud satisfies Similarly, we can obtain the two-dimensional planar point cloud dataset of objects within their respective circular domains.
[0037] Preferably, the specific steps of step S3, which involves extracting the boundary of the two-dimensional planar point cloud, include:
[0038] Step S31, Set Pointcloudc τ Given the discrete point set P(p1,p2,...,p nu Composed of, among which Input point cloud P(p1,p2,...,p nu Set the value of the radius r;
[0039] Step S32: Traverse any two points in the point cloud and generate line segments for the corresponding two points. Combine the line segments into an edge set E.
[0040] Step S33: Traverse the edge set E, delete the line segments with a side length greater than 2r, and form a new edge set E′ with the remaining line segments;
[0041] Step S34: Traverse each line segment of the edge set E′, starting from the two endpoints p of each line segment. a and p b Given a, b = 1, 2, ..., nu, and radius r, calculate the coordinates of the circle's center. and
[0042] Let line segment p a p b The direction vector is v ab The perpendicular unit vector is u ab line segment p a p b The length is d ab The coordinates of the midpoint of the line segment are According to geometric relations, we have v ab =(x b -x a ,y b -y a ), in From the center of the circle to line segment p a p b The distance is D ab ,but The coordinates of the center of the circle are
[0043] Step S35, if with and Among two circles centered at points P1, P2, ..., Pn, the interior of one circle does not contain the set of points P(p1, p2, ..., pn). nu If there exists a center of a circle such that the distance from any other point to the center is greater than the radius r, then edge p... a p b That is, the boundary edge; if we take and In two circles centered at a given point, the interior of each circle contains a set of points P(p1, p2, ..., p...). nu Any other point in ) indicates p a p b If edge p is a line segment between two points in a point cloud or between an interior point and a boundary point, then... a p b It is not a boundary edge;
[0044] Step S36: Repeat steps S34 to S35 to extract all boundary edges of edge set E′ until all edges are extracted. Complete boundary Ω τ That's all;
[0045] Step S37: Process the point cloud datasets of each object. After steps S31 to S36, the complete boundaries Ω1,…,Ω can be obtained for each. M .
[0046] Preferably, the specific steps of step S4, point cloud coordinate meshing, include:
[0047] Step S41: For the two-dimensional point cloud dataset Find the maximum values in the X and Y directions of the point set. and minimum value Then generate the X vector. and Y vector
[0048] Step S42, with Given the bottom left vertex of the rectangle, generate a rectangle of length [value] on the XOY plane. Width A rectangular region is defined, where |·| represents the magnitude of the vector; then, the length and width of the rectangle are divided into N equal parts, resulting in a total of N×N rectangular grid coordinate points, where This generates the corresponding rectangular grid and outputs the X, Y coordinate matrix of the rectangular grid points.
[0049] Step S43: Process each two-dimensional point cloud dataset Repeat steps S41 to S42 sequentially to generate N×N rectangular grid coordinate points and output the X, Y coordinate matrix of the rectangular grid points.
[0050] Preferably, the specific steps in step S5, which sequentially determine whether the coordinates of the N×N rectangular grids of each object's point cloud are within the convex hull, include:
[0051] Step S51, Step S51, Set the convex hull range Ω τThe two-dimensional point cloud dataset inside is If the coordinate matrix of the X, Y point set... The first in Coordinates of points Then take this point as The data points within the range are updated in coordinates, i.e. like Then no coordinate update is performed; thus, the quantity is... convex hull range Ω τ Two-dimensional point cloud dataset Among them, the first The coordinates of the points are If the constraint between the number of point clouds and the number of grid points is satisfied, i.e. If the number of sampling grid points is set to meet the requirements, then proceed to step S42 to reset a larger N, and execute the subsequent steps of step S42 in sequence until the conditions are met, then proceed to step S52.
[0052] Step S52: Process the point cloud datasets of each object. Repeat step S51 to output the corresponding 2D mesh point cloud dataset within the convex hull.
[0053] Preferably, step S6 involves processing the grid point cloud dataset. The specific steps for adding depth information Z to each coordinate point include:
[0054] Step S61, for point cloud Input by A point cloud dataset consisting of discrete points, for the th discrete point Coordinates of points Within the circular region c τ Inner point cloud dataset In this context, the KNN algorithm is used to search for the k nearest points as the k-neighborhood;
[0055] Step S62: The depth information Z of each grid coordinate point can be regarded as the represented point. The first in Add depth information to each point It can be obtained by linear weighting of its neighborhood information:
[0056]
[0057] in, As a variable to be determined, the k-neighborhood depth information As a known quantity, the weight value needs to be obtained. Only a specific calculation method can achieve interpolation calculation;
[0058] Step S63: Solve for the weight matrix; assuming When the formula in step S62 is known, it can be transformed into a formula for weights. The optimization problem, whose error function can be written as:
[0059]
[0060] in, express Reconstruction coefficients, weights Apply normalization restrictions, i.e. The optimization problem described above can be solved using the Lagrange multiplication method, yielding the following result:
[0061]
[0062] in, Therefore, to find the Lagrange function The partial derivatives can be obtained as follows:
[0063]
[0064] in, Right now λ i Let λ be a constant, and for ease of calculation, let λ be... i =-2, therefore, setting the value of the above expression to 0 yields the following result:
[0065]
[0066] Considering matrix A i In cases where invertibility is not guaranteed, matrix A needs to be recalculated. i Add the corresponding perturbation term, whose expression is as follows:
[0067] A i =A i +eye(k,k)×tr(A i )×num s
[0068] Where eye(k,k) is a k×k dimensional identity diagonal matrix, tr represents the trace of the matrix, and num s It is a very small constant value; corresponding to the first value in the solved grid coordinate dataset. Depth information value of each point The reconstruction coefficient is:
[0069]
[0070] Step S64, then the reconstruction coefficients By normalizing, the depth information value of the i-th point can be obtained. for:
[0071]
[0072]
[0073] in, Represents the reconstruction coefficient Summing each element in the matrix,
[0074] Step S65: Based on the above principles, the entire grid point dataset is finally obtained. depth information global reconstruction matrix w Z Therefore, for the input A point cloud dataset consisting of discrete points have:
[0075]
[0076] in, This represents the k-neighborhood depth value for each grid point.
[0077] Preferably, step S7 involves processing the grid point cloud dataset. The specific steps for adding color information R to each coordinate point include:
[0078] Step S71, for point cloud Input by A point cloud dataset consisting of discrete points, for the th discrete point Coordinates of points Within the circular region c τ Inner point cloud dataset In this context, the KNN algorithm is used to search for the k nearest points as the k-neighborhood;
[0079] Step S72: The color information R of each grid coordinate point can be regarded as the point being represented. The first in Add color information to each point. It can be obtained by linear weighting of its neighborhood information:
[0080]
[0081] in, As a variable to be determined, the k-neighborhood depth information As a known quantity, the weight value needs to be obtained. Only a specific calculation method can achieve interpolation calculation;
[0082] Step S73: Solve for the weight matrix; assuming When the formula in step S72 is known, it can be transformed into a formula for weights. The optimization problem, whose error function can be written as:
[0083]
[0084] in, express Reconstruction coefficients, weights Apply normalization restrictions, i.e. The optimization problem described above can be solved using the Lagrange multiplication method, yielding the following result:
[0085]
[0086] in, Therefore, to find the Lagrange function The partial derivatives can be obtained as follows:
[0087]
[0088] in, Right now λ i Let λ be a constant, and for ease of calculation, let λ be... i =-2, therefore, setting the value of the above expression to 0 yields the following result:
[0089]
[0090] Considering matrix A i In cases where invertibility is not guaranteed, matrix A needs to be recalculated. i Add the corresponding perturbation term, whose expression is as follows:
[0091] A i =A i +eye(k,k)×tr(A i )×num s
[0092] Where eye(k,k) is a k×k dimensional identity diagonal matrix, tr represents the trace of the matrix, and num s It is a very small constant value; corresponding to the first value in the solveable grid coordinate dataset. Color information value of each point The reconstruction coefficient is:
[0093]
[0094] Step S74, then the reconstruction coefficients By normalizing, the color information value of the i-th point can be obtained. for:
[0095]
[0096]
[0097] in, Represents the reconstruction coefficient Summing each element in the matrix,
[0098] Step S75: Based on the above principles, the entire grid point dataset is finally obtained. Color information global reconstruction matrix w R Therefore, for the input A point cloud dataset consisting of discrete points have:
[0099]
[0100] in, This represents the k-neighbor color value of each grid point.
[0101] Preferably, step S8 involves processing the grid point cloud dataset. The specific steps for adding color information G to each coordinate point include:
[0102] Step S81, for point cloud Input by A point cloud dataset consisting of discrete points, for the th discrete point Coordinates of points Within the circular region c τ Inner point cloud dataset In this context, the KNN algorithm is used to search for the k nearest points as the k-neighborhood;
[0103] Step S82: The color information G of each grid coordinate point can be regarded as the point being represented. The first in Add color information to each point. It can be obtained by linear weighting of its neighborhood information:
[0104]
[0105] in, As a variable to be determined, the k-neighborhood color information As a known quantity, the weight value needs to be obtained. Only a specific calculation method can achieve interpolation calculation;
[0106] Step S83: Solve for the weight matrix; assuming When the formula in step S82 is known, it can be transformed into a formula for weights. The optimization problem, whose error function can be written as:
[0107]
[0108] in, express Reconstruction coefficients, weights Apply normalization restrictions, i.e. The optimization problem described above can be solved using the Lagrange multiplication method, yielding the following result:
[0109]
[0110] in, Therefore, to find the Lagrange function The partial derivatives can be obtained as follows:
[0111]
[0112] in, Right now λ i Let λ be a constant, and for ease of calculation, let λ be... i =-2, therefore, setting the value of the above expression to 0 yields the following result:
[0113]
[0114] Considering matrix A i In cases where invertibility is not guaranteed, matrix A needs to be recalculated. i Add the corresponding perturbation term, whose expression is as follows:
[0115] A i =A i +eye(k,k)×tr(A i )×num s
[0116] Where eye(k,k) is a k×k dimensional identity diagonal matrix, tr represents the trace of the matrix, and num s It is a very small constant value; corresponding to the first value in the solveable grid coordinate dataset. Color information value of each point The reconstruction coefficient is:
[0117]
[0118] Step S84, then the reconstruction coefficients By normalizing, the color information value of the i-th point can be obtained. for:
[0119]
[0120]
[0121] in, Represents the reconstruction coefficient Summing each element in the matrix,
[0122] Step S85: Based on the above principles, the entire grid point dataset is finally obtained. Color information global reconstruction matrix w G Therefore, for the input A point cloud dataset consisting of discrete points have:
[0123]
[0124] in, This represents the k-neighbor color value for each grid point.
[0125] Preferably, step S9 involves processing the grid point cloud dataset. The specific steps for adding color information B to each coordinate point include:
[0126] Step S91, for point cloud Input by A point cloud dataset consisting of discrete points, for the th discrete point Coordinates of points Within the circular region c τ Inner point cloud dataset In this context, the KNN algorithm is used to search for the k nearest points as the k-neighborhood;
[0127] Step S92: The color information B of each grid coordinate point can be regarded as the point being represented. The first in Add color information to each point. It can be obtained by linear weighting of its neighborhood information:
[0128]
[0129] in, As a variable to be determined, the k-neighborhood color information As a known quantity, the weight value needs to be obtained. Only a specific calculation method can achieve interpolation calculation;
[0130] Step S93: Solve for the weight matrix; assuming When the formula in step S92 is known, it can be transformed into a formula for weights. The optimization problem, whose error function can be written as:
[0131]
[0132] in, express Reconstruction coefficients, weights Apply normalization restrictions, i.e. The optimization problem described above can be solved using the Lagrange multiplication method, yielding the following result:
[0133]
[0134] in, Therefore, to find the Lagrange function The partial derivatives can be obtained as follows:
[0135]
[0136] in, Right now λ i Let λ be a constant, and for ease of calculation, let λ be... i =-2, therefore, setting the value of the above expression to 0 yields the following result:
[0137]
[0138] Considering matrix A i In cases where invertibility is not guaranteed, matrix A needs to be recalculated. i Add the corresponding perturbation term, whose expression is as follows:
[0139] A i =A i +eye(k,k)×tr(A i )×num s
[0140] Where eye(k,k) is a k×k dimensional identity diagonal matrix, tr represents the trace of the matrix, and num s It is a very small constant value; corresponding to the first value in the solveable grid coordinate dataset. Color information value of each point The reconstruction coefficient is:
[0141]
[0142] Step S94, then the reconstruction coefficients By normalizing, the color information value of the i-th point can be obtained. for:
[0143]
[0144]
[0145] in, Represents the reconstruction coefficient Summing each element in the matrix,
[0146] Step S95: Based on the above principles, the entire grid point dataset is finally obtained. Color information global reconstruction matrix w B Therefore, for the input A point cloud dataset consisting of discrete points have:
[0147]
[0148] in, This represents the k-neighbor color value for each grid point.
[0149] Preferably, wherein the 3D coordinate point set matrix of the 3D color point cloud dataset output in step S10, which contains depth information Z and color texture information RGB, is represented as follows: The color value set matrix for each corresponding coordinate point is represented as follows:
[0150] In step S11, for each grid point cloud dataset Repeat steps S6 to S10, adding depth and color texture information to each grid point in sequence, thereby outputting a new 3D color grid point cloud dataset.
[0151] The present invention has at least the following beneficial effects:
[0152] (1) A high-precision color three-dimensional curved surface reconstruction method for the surface shape of a spacecraft: First, the generated color point cloud is transformed from a three-dimensional point cloud to a planar two-dimensional point cloud. Roll angle α, pitch angle β, and yaw angle γ are set, and the color point cloud is rotated. Then, based on the spatial positional differences of the point cloud, the objects are separated, and the center and radius of each object's point cloud are set to divide the spatial range of the reconstructed point cloud, resulting in a two-dimensional planar point cloud. The obtained planar point cloud is then subjected to boundary feature extraction using alphaShape to obtain the corresponding convex hull range. Based on the convex hull range, the obtained N×N grid point cloud data are judged, and grid points located within the convex hull range are selected. For grid points within the convex hull range, the depth information Z value and color information RGB are generated using the LLE interpolation algorithm. The depth information Z and color texture information RGB after LLE interpolation are added to the planar grid, so that each grid coordinate point has geometric coordinate information and color texture information. The point cloud data are merged, a suitable surface visualization algorithm is selected, and a three-dimensional color surface is generated, ultimately achieving high-precision color three-dimensional curved surface reconstruction of the spacecraft surface shape.
[0153] (2) Based on the original point cloud dataset, the present invention reasonably expands the point cloud and uses more point cloud to reconstruct the surface, making the reconstructed surface smoother and improving the reconstruction effect.
[0154] (3) The present invention adds color and texture information on the basis of conventional surface reconstruction, enriches the surface information of the surface, and makes the reconstructed surface more in line with the actual surface and more intuitive.
[0155] Other advantages, objectives and features of the present invention will become apparent in part from the following description, and in part from those skilled in the art through study and practice of the invention. Attached Figure Description
[0156] Figure 1 A flowchart illustrating the high-precision color three-dimensional surface reconstruction method for spacecraft surface shape provided by the present invention;
[0157] Figure 2 A schematic diagram illustrating the algorithm used to extract the boundary of a two-dimensional planar point cloud.
[0158] Figure 3 This is a schematic diagram of a high-precision color point cloud used in an embodiment of the present invention;
[0159] Figure 4 for Figure 3 Enlarged view of the rectangular region;
[0160] Figure 5 This is a schematic diagram of the two-dimensional planar point cloud effect of object 1 obtained in an embodiment of the present invention;
[0161] Figure 6 This is a schematic diagram of the two-dimensional planar point cloud effect of object 2 obtained in an embodiment of the present invention;
[0162] Figure 7 This is a schematic diagram of the result obtained by extracting boundary features from the two-dimensional planar point cloud of object 1 according to an embodiment of the present invention;
[0163] Figure 8 This is a schematic diagram of the result obtained by extracting the boundary features of the two-dimensional planar point cloud of object 2 according to an embodiment of the present invention;
[0164] Figure 9 This is a schematic diagram of the point cloud reconstruction results of object 1 and object 2 in an embodiment of the present invention. Detailed Implementation
[0165] The present invention will now be described in further detail with reference to the accompanying drawings, so that those skilled in the art can implement it based on the description.
[0166] It should be understood that terms such as “having,” “comprising,” and “including” as used herein do not exclude the presence or addition of one or more other elements or combinations thereof.
[0167] like Figure 1 As shown: A high-precision color three-dimensional surface reconstruction method for the surface shape of a spacecraft according to the present invention includes the following steps:
[0168] Step S1: Obtain a color point cloud dataset from the color image of the spacecraft surface. Input a color point cloud dataset Pointcloud of size Pointcloud_Count, where the 3D coordinates of the i-th point are... The point cloud color texture is Pointcloud_Color i =[R i G i B i ], i=1,2,...,Pointcloud_Count;
[0169] Step S2: Transform the 3D point cloud into a 2D plane;
[0170] Step S3: Extract the boundary of the two-dimensional planar point cloud;
[0171] Step S4: Point cloud coordinate meshing;
[0172] Step S5: Sequentially determine whether the coordinates of the N×N rectangular grids of each object's point cloud are within the convex hull.
[0173] Step S6: Add depth information Z to each coordinate point of the grid point cloud dataset;
[0174] Step S7: Add color information R to each coordinate point of the grid point cloud dataset;
[0175] Step S8: Add color information G to each coordinate point of the grid point cloud dataset;
[0176] Step S9: Add color information B to each coordinate point in the grid point cloud dataset;
[0177] Step S10: Output three-dimensional color point cloud data with depth information Z and color texture information RGB;
[0178] Step S11: Repeat steps S6 to S10 to output a new 3D color grid point cloud dataset;
[0179] Step S12: Merge the complete 3D color mesh point cloud dataset of the object to be photographed and the original 3D color point cloud dataset, select a suitable surface visualization algorithm, generate a 3D color surface, and output the final 3D color reconstruction model with color texture information.
[0180] In the above technical solution, the specific steps of step S2, which transforms the three-dimensional point cloud into a two-dimensional plane, include:
[0181] Step S21: Rotate the 3D color point cloud dataset Pointcloud until it is parallel to the XOY plane. After the rotation transformation, the coordinates of the color point cloud dataset Pointcloud become as follows:
[0182] [X′ D ,Y′ D ,Z′ D ,1]=[X D ,Y D Z D ,1]R X (α)R Y (β)R Z (γ)
[0183] In the above formula:
[0184]
[0185]
[0186]
[0187] Where α represents the roll angle along the X-axis, β represents the pitch angle along the Y-axis, and γ represents the yaw angle along the Z-axis, the values of α, β, and γ are set according to the actual spatial position of the object's point cloud. To rotate the point cloud parallel to the XOY plane, usually only the yaw angle γ needs to be set. A straight line is roughly fitted based on the tilted point cloud in 3D space, and its slope is used as the initial value of the yaw angle γ. The angle is continuously adjusted until the point cloud is parallel to the XOY plane. The color point cloud dataset Pointcloud is transformed by rotation to be parallel to the 2D XOY plane, resulting in the transformed color point cloud dataset Pointcloud, where the 3D coordinates of the i-th point are... Color Texture Pointcloud′_Color i =[R i G i B i ];
[0188] Step S22: Separate the object point cloud; assuming the point cloud dataset consists of M object point cloud datasets, distinguish them based on the coordinate differences of each object point cloud dataset Pointcloud′ on the X-axis, and take the midpoint coordinates x1, x2, ..., x of the interval between adjacent object point clouds on the X-axis. M-1 As the dividing point, the M object point clouds after separation are denoted as Pointcloud1, Pointcloud2, ..., Pointcloud. M Its separation formula is:
[0189]
[0190] Among them, the number of object point clouds Pointcloud1 is Pointcloud. 1_ Count, the three-dimensional spatial coordinates of the i1th point are Color texture is Similarly, point clouds of objects M The number is Pointcloud M _Count, the i-th M The three-dimensional spatial coordinates of the points are Color texture is The relationship between the point cloud counts of M objects is Pointcloud_Count = Pointcloud1_Count + ... + Pointcloud M _Count, since the color information is not processed, the color texture of each object's point cloud remains consistent with the original point cloud;
[0191] Step S23: Divide the approximate reconstruction area; based on the point clouds of each object (Pointcloud1, Pointcloud2, ..., Pointcloud...). M Given the actual location in space, the center and radius of the point cloud for each object are set, using the circular regions c1, c2, ..., c M The approximate XOY spatial range of the reconstructed point cloud is defined, and the formula for dividing the circular region is shown below:
[0192]
[0193] Among them, (x 01 ,y 01 ),(x 02 ,y 02 ),…,(x 0M ,y 0M ) are respectively set as Pointcloud1, Pointcloud2, ... Pointcloud M The coordinates of the center of the point cloud in the XOY plane. They are Pointcloud1, Pointcloud2, ... Pointcloud M The radius of the circular region, generating circular regions c1, c2, ..., c M They are Pointcloud1, Pointcloud2, ... Pointcloud M The approximate reconstruction range; construct M new two-dimensional point cloud datasets, and denote the two-dimensional point cloud dataset where the point cloud of object 1 is located within the planar circular region c1 as . Similarly, let the point cloud of object M be located in the planar circular region c. M The two-dimensional point cloud dataset within the range is denoted as Will Pointcloud1, Pointcloud2,…Pointcloud M The X, Y coordinate information and color texture information are sequentially assigned to the two-dimensional point cloud dataset. The process of assigning coordinate information is as follows:
[0194]
[0195] in, This represents the X, Y coordinate information of the point cloud dataset Pointcloud1. If the X, Y coordinates of the i1th point are located within the circular region c1, then it is considered as a two-dimensional point cloud dataset. One data point in Pointcloud1 is used to sequentially update the judgment of each point in Pointcloud1 to obtain... Two-dimensional point cloud dataset within the circular region c1 The number of point clouds is Among them, the first The two-dimensional spatial coordinates of the points are Color texture is The relationship between the number of points in the cloud satisfies Similarly, we can obtain the two-dimensional planar point cloud dataset of objects within their respective circular domains.
[0196] In the above technical solution, the specific steps of step S3, which involves extracting the boundary of the two-dimensional planar point cloud, include:
[0197] Step S31, Set Pointcloud c τ Given the discrete point set P(p1,p2,...,p nu Composed of, among which Input point cloud P(p1,p2,...,p nu Set the value of the radius r;
[0198] Step S32: Traverse any two points in the point cloud and generate line segments for the corresponding two points. Combine the line segments into an edge set E.
[0199] Step S33: Traverse the edge set E, delete the line segments with a side length greater than 2r, and form a new edge set E′ with the remaining line segments;
[0200] Step S34: Traverse each line segment of the edge set E′, starting from the two endpoints p of each line segment. a and p b Given a, b = 1, 2, ..., nu, and radius r, calculate the coordinates of the circle's center. and The positions of the two centers are as follows Figure 2 As shown;
[0201] Let line segment p a p b The direction vector is v ab The perpendicular unit vector is u ab line segment p a p b The length is d ab The coordinates of the midpoint of the line segment are According to geometric relations, we have v ab =(x b -x a ,y b -y a ), in From the center of the circle to line segment p a p bThe distance is D ab ,but The coordinates of the center of the circle are
[0202] Step S35, if with and Among two circles centered at points P1, P2, ..., Pn, the interior of one circle does not contain the set of points P(p1, p2, ..., pn). nu If there exists a center of a circle such that the distance from any other point to the center is greater than the radius r, then edge p... a p b That is, the boundary edge; if we take and In two circles centered at a given point, the interior of each circle contains a set of points P(p1, p2, ..., p...). nu Any other point in ) indicates p a p b If edge p is a line segment between two points in a point cloud or between an interior point and a boundary point, then... a p b It is not a boundary edge;
[0203] Step S36: Repeat steps S34 to S35 to extract all boundary edges of edge set E′ until all edges are extracted. Complete boundary Ω τ That's all;
[0204] Step S37: Process the point cloud datasets of each object. After steps S31 to S36, the complete boundaries Ω1,…,Ω can be obtained respectively. M .
[0205] In the above technical solution, the specific steps of step S4, point cloud coordinate meshing, include:
[0206] Step S41: For the two-dimensional point cloud dataset Find the maximum values in the X and Y directions of the point set. and minimum value Then generate the X vector. and Y vector
[0207] Step S42, with Given the bottom left vertex of the rectangle, generate a rectangle of length [value] on the XOY plane. Width A rectangular region is defined, where |·| represents the magnitude of the vector; then, the length and width of the rectangle are divided into N equal parts, resulting in a total of N×N rectangular grid coordinate points, where This generates the corresponding rectangular grid and outputs the X, Y coordinate matrix of the rectangular grid points.
[0208] Step S43: Process each two-dimensional point cloud dataset Repeat steps S41 to S42 sequentially to generate N×N rectangular grid coordinate points and output the X, Y coordinate matrix of the rectangular grid points.
[0209] In the above technical solution, the specific steps of step S5, which sequentially determines whether the coordinates of the N×N rectangular grids of each object's point cloud are within the convex hull, include:
[0210] Step S51: Set the convex hull range Ω τ The two-dimensional point cloud dataset inside is If the coordinate matrix of the X, Y point set The first in Coordinates of points Then take this point as The data points within the range are updated in coordinates, i.e. like Then no coordinate update is performed; thus, the quantity is... convex hull range Ω τ Two-dimensional point cloud dataset Among them, the first The coordinates of the points are If the constraint between the number of point clouds and the number of grid points is satisfied, i.e. If the number of sampling grid points is set to meet the requirements, then proceed to step S42 to reset a larger N, and execute the subsequent steps of step S42 in sequence until the conditions are met, then proceed to step S52.
[0211] Step S52: Process the point cloud datasets of each object. Repeat step S51 to output the corresponding 2D mesh point cloud dataset within the convex hull.
[0212] In the above technical solution, step S6 involves processing the grid point cloud dataset. The specific steps for adding depth information Z to each coordinate point include:
[0213] Step S61, for point cloud Input by A point cloud dataset consisting of discrete points, for the th discrete point Coordinates of points Within the circular region c τ Inner point cloud dataset In this context, the KNN algorithm is used to search for the k nearest points as the k-neighborhood;
[0214] Step S62: The depth information Z of each grid coordinate point can be regarded as the represented point. The first in Add depth information to each point It can be obtained by linear weighting of its neighborhood information:
[0215]
[0216] in, As a variable to be determined, the k-neighborhood depth information As a known quantity, the weight value needs to be obtained. Only a specific calculation method can achieve interpolation calculation;
[0217] Step S63: Solve for the weight matrix; assuming When the formula in step S62 is known, it can be transformed into a formula for weights. The optimization problem, whose error function can be written as:
[0218]
[0219] in, express Reconstruction coefficients, weights Apply normalization restrictions, i.e. The optimization problem described above can be solved using the Lagrange multiplication method, yielding the following result:
[0220]
[0221] in, Therefore, to find the Lagrange function The partial derivatives can be obtained as follows:
[0222]
[0223] in, Right now λ i Let λ be a constant, and for ease of calculation, let λ be... i =-2, therefore, setting the value of the above expression to 0 yields the following result:
[0224]
[0225] Considering matrix A i In cases where invertibility is not guaranteed, matrix A needs to be recalculated. i Add the corresponding perturbation term, whose expression is as follows:
[0226] A i =A i +eye(k,k)×tr(A i)×num s
[0227] Where eye(k,k) is a k×k dimensional identity diagonal matrix, tr represents the trace of the matrix, and num s It is a very small constant value; corresponding to the first value in the solved grid coordinate dataset. Depth information value of each point The reconstruction coefficient is:
[0228]
[0229] Step S64, then the reconstruction coefficients By normalizing, the depth information value of the i-th point can be obtained. for:
[0230]
[0231]
[0232] in, Represents the reconstruction coefficient Summing each element in the matrix,
[0233]
[0234] Step S65: Based on the above principles, the entire grid point dataset is finally obtained. depth information global reconstruction matrix w Z Therefore, for the input A point cloud dataset consisting of discrete points have:
[0235]
[0236] in, This represents the k-neighborhood depth value for each grid point.
[0237] In the above technical solution, step S7 involves processing the grid point cloud dataset. The specific steps for adding color information R to each coordinate point include:
[0238] Step S71, for point cloud Input by A point cloud dataset consisting of discrete points, for the th discrete point Coordinates of points Within the circular region c τ Inner point cloud dataset In this context, the KNN algorithm is used to search for the k nearest points as the k-neighborhood;
[0239] Step S72: The color information R of each grid coordinate point can be regarded as the point being represented. The first in Add color information to each point. It can be obtained by linear weighting of its neighborhood information:
[0240]
[0241] in, As a variable to be determined, the k-neighborhood depth information As a known quantity, the weight value needs to be obtained. Only a specific calculation method can achieve interpolation calculation;
[0242] Step S73: Solve for the weight matrix; assuming When the formula in step S72 is known, it can be transformed into a formula for weights. The optimization problem, whose error function can be written as:
[0243]
[0244] in, express Reconstruction coefficients, weights Apply normalization restrictions, i.e. The optimization problem described above can be solved using the Lagrange multiplication method, yielding the following result:
[0245]
[0246] in, Therefore, to find the Lagrange function The partial derivatives can be obtained as follows:
[0247]
[0248] in, Right now λ i Let λ be a constant, and for ease of calculation, let λ be... i =-2, therefore, setting the value of the above expression to 0 yields the following result:
[0249]
[0250] Considering matrix A i In cases where invertibility is not guaranteed, matrix A needs to be recalculated. i Add the corresponding perturbation term, whose expression is as follows:
[0251] A i =A i +eye(k,k)×tr(A i)×num s
[0252] Where eye(k,k) is a k×k dimensional identity diagonal matrix, tr represents the trace of the matrix, and num s It is a very small constant value; corresponding to the first value in the solveable grid coordinate dataset. Color information value of each point The reconstruction coefficient is:
[0253]
[0254] Step S74, then the reconstruction coefficients By normalizing, the color information value of the i-th point can be obtained. for:
[0255]
[0256]
[0257] in, Represents the reconstruction coefficient Summing each element in the matrix,
[0258] Step S75: Based on the above principles, the entire grid point dataset is finally obtained. Color information global reconstruction matrix w R Therefore, for the input A point cloud dataset consisting of discrete points have:
[0259]
[0260] in, This represents the k-neighbor color value for each grid point.
[0261] In the above technical solution, step S8 involves processing the grid point cloud dataset. The specific steps for adding color information G to each coordinate point include:
[0262] Step S81, for point cloud Input by A point cloud dataset consisting of discrete points, for the th discrete point Coordinates of points Within the circular region c τ Inner point cloud dataset In this context, the KNN algorithm is used to search for the k nearest points as the k-neighborhood;
[0263] Step S82: The color information G of each grid coordinate point can be regarded as the point being represented. The first in Add color information to each point. It can be obtained by linear weighting of its neighborhood information:
[0264]
[0265] in, As a variable to be determined, the k-neighborhood color information As a known quantity, the weight value needs to be obtained. Only a specific calculation method can achieve interpolation calculation;
[0266] Step S83: Solve for the weight matrix; assuming When the formula in step S82 is known, it can be transformed into a formula for weights. The optimization problem, whose error function can be written as:
[0267]
[0268] in, express Reconstruction coefficients, weights Apply normalization restrictions, i.e. The optimization problem described above can be solved using the Lagrange multiplication method, yielding the following result:
[0269]
[0270] in, Therefore, to find the Lagrange function The partial derivatives can be obtained as follows:
[0271]
[0272] in, Right now λ i Let λ be a constant, and for ease of calculation, let λ be... i =-2, therefore, setting the value of the above expression to 0 yields the following result:
[0273]
[0274] Considering matrix A i In cases where invertibility is not guaranteed, matrix A needs to be recalculated. i Add the corresponding perturbation term, whose expression is as follows:
[0275] A i =A i +eye(k,k)×tr(A i )×nums
[0276] Where eye(k,k) is a k×k dimensional identity diagonal matrix, tr represents the trace of the matrix, and num s It is a very small constant value; corresponding to the first value in the solveable grid coordinate dataset. Color information value of each point The reconstruction coefficient is:
[0277]
[0278] Step S84, then the reconstruction coefficients By normalizing, the color information value of the i-th point can be obtained. for:
[0279]
[0280]
[0281] in, Represents the reconstruction coefficient Summing each element in the matrix,
[0282] Step S85: Based on the above principles, the entire grid point dataset is finally obtained. Color information global reconstruction matrix w G Therefore, for the input A point cloud dataset consisting of discrete points have:
[0283]
[0284] in, This represents the k-neighbor color value for each grid point.
[0285] In the above technical solution, step S9 involves processing the grid point cloud dataset. The specific steps for adding color information B to each coordinate point include:
[0286] Step S91, for point cloud Input by A point cloud dataset consisting of discrete points, for the th discrete point Coordinates of points Within the circular region c τ Inner point cloud dataset In this context, the KNN algorithm is used to search for the k nearest points as the k-neighborhood;
[0287] Step S92: The color information B of each grid coordinate point can be regarded as the point being represented. The first in Add color information to each point. It can be obtained by linear weighting of its neighborhood information:
[0288]
[0289] in, As a variable to be determined, the k-neighborhood color information As a known quantity, the weight value needs to be obtained. Only a specific calculation method can achieve interpolation calculation;
[0290] Step S93: Solve for the weight matrix; assuming When the formula in step S92 is known, it can be transformed into a formula for weights. The optimization problem, whose error function can be written as:
[0291]
[0292] in, express Reconstruction coefficients, weights Apply normalization restrictions, i.e. The optimization problem described above can be solved using the Lagrange multiplication method, yielding the following result:
[0293]
[0294] in, Therefore, to find the Lagrange function The partial derivatives can be obtained as follows:
[0295]
[0296] in, Right now λ i Let λ be a constant, and for ease of calculation, let λ be... i =-2, therefore, setting the value of the above expression to 0 yields the following result:
[0297]
[0298] Considering matrix A i In cases where invertibility is not guaranteed, matrix A needs to be recalculated. i Add the corresponding perturbation term, whose expression is as follows:
[0299] A i =A i +eye(k,k)×tr(A i )×nums
[0300] Where eye(k,k) is a k×k dimensional identity diagonal matrix, tr represents the trace of the matrix, and num s It is a very small constant value; corresponding to the first value in the solveable grid coordinate dataset. Color information value of each point The reconstruction coefficient is:
[0301]
[0302] Step S94, then the reconstruction coefficients By normalizing, the color information value of the i-th point can be obtained. for:
[0303]
[0304]
[0305] in, Represents the reconstruction coefficient Summing each element in the matrix,
[0306] Step S95: Based on the above principles, the entire grid point dataset is finally obtained. Color information global reconstruction matrix w B Therefore, for the input A point cloud dataset consisting of discrete points have:
[0307]
[0308] in, This represents the k-neighbor color value of each grid point.
[0309] In the above technical solution, the characteristic is that the three-dimensional coordinate point set matrix of the three-dimensional color point cloud dataset output in step S10, which contains depth information Z and color texture information RGB, is represented as follows: The color value set matrix for each corresponding coordinate point is represented as follows:
[0310] In step S11, for each grid point cloud dataset Repeat steps S6 to S10, adding depth and color texture information to each grid point in sequence, thereby outputting a new 3D color grid point cloud dataset.
[0311] Example:
[0312] In this example, by Figure 3 , Figure 4 As shown in the high-precision color point cloud, the point cloud consists of M=2 objects. This color point cloud uses only discrete points, revealing only the approximate shape and texture, and cannot accurately display the original appearance of the objects. Therefore, a surface reconstruction algorithm is needed to establish geometric relationships between the points and restore the surface shape of the model. According to the surface reconstruction algorithm flow in this paper, the generated color point cloud is first transformed from a 3D point cloud into a planar 2D point cloud. The roll angle α=0, pitch angle β=0, and yaw angle are set to... The colored point cloud is rotated and transformed. Then, based on the spatial difference in the point cloud, the two objects are separated: object 1 point cloud x < 0 and object 2 point cloud x > 0. The center of the point cloud of object 1 is set as... Circular radius R c1 =36, the center of the object's 2-point cloud is Circular radius R c2 =34 delineates the spatial extent of the reconstructed point cloud to obtain a two-dimensional planar point cloud. and Its effect is as follows Figure 5 , Figure 6 As shown.
[0313] The obtained planar point cloud is used to extract boundary features using alphaShape to obtain the corresponding convex hull range. The radius is set to 2 for the point cloud. The radius is set to 4. Since the number of point clouds of the separated objects is 1... The number of object point clouds 2 is The number of generated grid points must be greater than the number of point clouds corresponding to the objects to ensure that the reconstruction accuracy is not reduced. Therefore, based on the distribution of the 2D color point cloud, the maximum and minimum values in the X and Y axes of the point sets for the two objects are calculated respectively, generating the corresponding X and Y vectors. A rectangular region composed of the two vector magnitudes is generated on the XOY plane, and then the length and width of the rectangle are divided into 400 equal parts, thus generating a total of 160,000 gridded coordinate points of 400×400. It is determined that all gridded coordinate points are within the convex hull, i.e. The result is as follows Figure 7 , Figure 8 As shown.
[0314] For grid points within the convex hull, depth information (Z-values) and color information (RGB) for 160,000 grid coordinate points are generated using the LLE interpolation algorithm. The number of selected neighboring points during grid interpolation is set to 4. i =A i +eye(k,k)×tr(A i )×num s , The constant value num in s =0.001. The depth information Z and color texture information RGB, interpolated by the LLE algorithm, are added to the planar mesh, ensuring that each mesh point has both geometric coordinate and color texture information. After merging the point cloud data, the 3D surface is drawn using surf(X,Y,Z,C). The reconstruction result is as follows: Figure 9 As shown in the figure, the surface reconstruction algorithm based on local linear embedded mesh has good results. The surface is smooth, and the reconstructed 3D model can not only preserve the original texture information of the object well, but also clearly distinguish the original color and text of the photographed object, and can more realistically restore the surface contour shape of the object without producing holes that would cause loss of point cloud information.
[0315] The number of devices and processing scale described herein are for the purpose of simplifying the description of the invention. Applications, modifications, and variations of the invention will be readily apparent to those skilled in the art.
[0316] Although embodiments of the present invention have been disclosed above, they are not limited to the applications listed in the specification and embodiments. They can be applied to various fields suitable for the present invention. For those skilled in the art, other modifications can be easily made. Therefore, without departing from the general concept defined by the claims and their equivalents, the present invention is not limited to the specific details and illustrations shown and described herein.
Claims
1. A method for high-precision color three-dimensional surface reconstruction of spacecraft surface shape, characterized in that, Includes the following steps: Step S1: Obtain a color point cloud dataset from color images of the spacecraft surface. The input number is... Pointcloud _ Count Colored point cloud dataset Pointcloud , of which i The three-dimensional coordinates of the points are Pointcloud _ Location i =[ X i D , Y i D , Z i D The point cloud color texture is... Pointcloud _ Color i =[ R i , G i , B i ], i =1,2,..., Pointcloud _ Count ; Step S2: Transform the 3D point cloud into a 2D plane; Step S3: Extract the boundary of the two-dimensional planar point cloud; Step S4: Point cloud coordinate meshing; Step S5: Sequentially determine the point cloud of each object. N × N Whether the coordinates of each rectangular grid are within the convex hull; Step S6: Add depth information Z to each coordinate point of the grid point cloud dataset; Step S7: Add color information R to each coordinate point of the grid point cloud dataset; Step S8: Add color information G to each coordinate point of the grid point cloud dataset; Step S9: Add color information B to each coordinate point in the grid point cloud dataset; Step S10: Output three-dimensional color point cloud data with depth information Z and color texture information RGB; Step S11: Repeat steps S6 to S10 to output a new 3D color grid point cloud dataset; Step S12: Merge the complete 3D color mesh point cloud dataset of the object to be photographed and the original 3D color point cloud dataset, select a suitable surface visualization algorithm, generate a 3D color surface, and output the final 3D color reconstruction model with color texture information.
2. The high-precision color three-dimensional curved surface reconstruction method for spacecraft surface shape as described in claim 1, characterized in that, The specific steps in step S2, which transforms the three-dimensional point cloud into a two-dimensional plane, include: Step S21: Process the 3D color point cloud dataset. Pointcloud Perform a rotation transformation to transform it to the same level as... XOY Planar parallel, color point cloud dataset Pointcloud After rotation transformation, the coordinates of its dataset become the following form: [ X ′ D , Y ′ D , Z ′ D ,1]=[ X D , Y D , Z D ,1] R X ( α ) R Y ( β ) RZ ( γ ) In the above formula: in, α Indicates along X The roll angle of the axis of rotation, β Indicates along Y The pitch angle of the axis of rotation. γ Indicates along Z Yaw angle of axis rotation, α , β , γ The numerical value is set according to the actual spatial position of the object's point cloud, and the rotation to... XOY In general, for parallel planes, only the yaw angle needs to be set. γ The size is sufficient; fit the distribution of the tilted point cloud in three-dimensional space to a straight line, and use the slope of the straight line as the yaw angle. γ The initial value is used to continuously adjust the angle size so that the point cloud and XOY Plane parallelism; color point cloud dataset Pointcloud Transform by rotation to two dimensions XOY After parallelizing the planes, we obtain the transformed color point cloud dataset. Pointcloud , of which i The three-dimensional coordinates of the points are Pointcloud ′ _Location i = [ X ′i D , Y ′i D , Z ′i D Color texture Pointcloud ′_ Color i =[ R i , G i , B i ]; Step S22: Separate the object point cloud; assuming the point cloud dataset consists of... M It consists of point cloud datasets of various objects, based on the point cloud datasets of each object. Pointcloud 'exist X To differentiate between coordinate differences on the axis, the midpoint of the interval range between adjacent object point clouds on the axis is taken. x 1, x 2,… x M-1 As the dividing point, after separation M The point clouds of the objects are denoted as follows: Pointcloud 1 , Pointcloud 2 Pointcloud M Its separation formula is: Among them, object point clouds Pointcloud The number of 1s is Pointcloud 1_ Count , No. i The three-dimensional spatial coordinates of a point are Pointcloud 1_ Color texture is Pointcloud 1_ , i 1=1,2,..., Pointcloud 1_ Count Similarly, point clouds of objects Pointcloud M The quantity is Pointcloud M _ Count , No. i M The three-dimensional spatial coordinates of the points are Pointcloud M _ Color texture is Pointcloud 2_ , i M =1,2,…, Pointcloud M _ Count , M The relationship between the number of points in the point cloud of an object is as follows: Pointcloud _ Count=Pointcloud 1_ Count+...+Pointcloud M _ Count Since the color information was not processed, the color texture of each object's point cloud remained consistent with the original point cloud. Step S23: Divide the reconstruction area; based on the point cloud of each object... Pointcloud 1, Pointcloud 2,…, Pointcloud M Based on the actual location in space, the center and radius of the point cloud of each object are set, and the circular domain is used. c 1, c 2,…, c M Separately divide the reconstructed point cloud XOY The formula for dividing a spatial region into circular domains is shown below: in,( x 01 , y 01 ), ( x 02 , y 02 ),…, ( x 0M , y 0M ) are set respectively Pointcloud 1, Pointcloud 2,… Pointcloud M Point cloud location XOY The coordinates of the center of the circle in the plane. They are respectively Pointcloud 1, Pointcloud 2,… Pointcloud M The radius of the circular region, the generated circular region c 1, c 2,…, c M They are respectively Pointcloud 1, Pointcloud 2,… Pointcloud M The scope of reconstruction; construction M A new two-dimensional point cloud dataset is provided, where the point cloud of object 1 is located within a planar circular region. c A two-dimensional point cloud dataset within a range of 1 is denoted as Pointcloud 1 c Similarly, set the object M Point clouds are located in a planar circular region c M The two-dimensional point cloud dataset within the range is denoted as Pointcloud M c ,Will Pointcloud 1, Pointcloud 2,…, Pointcloud M of X , Y Coordinate information and color texture information are sequentially assigned to the two-dimensional point cloud dataset. Pointcloud 1 c , Pointcloud 2 c ,…, Pointcloud M c The process of assigning coordinate information is as follows: Wherein, point cloud dataset is represented. Pointcloud 1 of X , Y Coordinate information, if the i-th point X , Y Coordinates are located in the circular region c 1. Then it is used as a two-dimensional point cloud dataset. Pointcloud 1 c One data point, and sequentially complete the process. Pointcloud 1. Update the judgment at each point to obtain Pointcloud 1 c Two-dimensional point cloud dataset within a circular region Pointcloud 1 c The number of point clouds is Pointcloud 1 c _Count , of which i 1 c The two-dimensional spatial coordinates of the points are Color texture is , i 1 c =1,2,..., Point Cloud 1 c _Count The relationship between the number of points in the cloud satisfies Point Cloud 1_ Count ≥ Point Cloud 1 c _ Count Similarly, we can obtain the two-dimensional planar point cloud dataset of objects within their respective circular domains. Point Cloud 1 c , Point Cloud 2 c ,…, Point Cloud M c .
3. The high-precision color three-dimensional curved surface reconstruction method for spacecraft surface shape as described in claim 2, characterized in that, The specific steps of extracting the boundary of a two-dimensional planar point cloud in said step S3 include: Step S31, set Pointcloudc τ From discrete point set P ( p 1, p 2,..., p nu Composed of, among which nu = Point Cloud τ c _ Count , τ =1,2,..., M Input point cloud P ( p 1, p 2,..., p nu Set radius r The value; Step S32: Traverse any two points in the point cloud, and generate line segments for the corresponding two points. Combine the line segments into an edge set. E ; Step S33: Traverse the edge set E Delete the ones with a side length greater than 2 r The line segments are used to form a new set of edges. E ′; Step S34: Traverse the edge set E Each line segment of the triangle is composed of its two endpoints. p a and p b , a , b =1,2,…, nu And the radius calculation of the center coordinates and ; Let line segment p a p b The direction vector is v ab The vertical unit vector is u ab line segment p a p b The length is d ab The coordinates of the midpoint of the line segment are According to geometric relationships, we have v ab =( x b - x a , y b - y a ), ,in The center of the circle to the line segment p a p b The distance is D ab ,but The coordinates of the center of the circle are , ; Step S35, if with and Of two circles centered at a given point, one circle contains no set of points inside it. P ( p 1, p 2,..., p nu For any other point in the circle, there exists a center such that the distance from any other point to that center is greater than the radius. r Then the edge p a p b That is, the boundary edge; if we take and In two circles centered at a given point, the interior of each circle contains a set of points. P ( p 1, p 2,..., p nu Any other point in ) indicates p a p b If the line segment between two points in a point cloud or between an interior point and a boundary point is a line segment, then the edge... p a p b It is not a boundary edge; Step S36: Repeat steps S34 to S35 to extract the edge set. E All boundary edges of ′, until extracted Point Cloud τ c Complete boundary Ω τ That's all; Step S37: Process the point cloud datasets of each object. Point Cloud 1 c ,…, Point Cloud M c After steps S31 to S36, the complete boundaries Ω1,…,Ω can be obtained for each. M .
4. The high-precision color three-dimensional surface reconstruction method for spacecraft surface shape as described in claim 3, characterized in that, The specific steps of gridding point cloud coordinates in said step S4 include: Step S41: For the two-dimensional point cloud dataset Point Cloud τ c , τ =1,2,..., M Find the point set X , Y The maximum value corresponding to the axis direction is max( X c Dτ ), max( Y c Dτ ) and minimum value min( X c Dτ ), min( Y c Dτ ), and then generate X vector sum vector ; Step S42, with (min( X c Dτ ),min( Y c Dτ )) is the bottom left vertex of the rectangle, in XOY Generate a length of on the plane , width is A rectangular region, where |·| represents the magnitude of the vector; then the length and width of the rectangle are respectively... N If divided equally, a total of [number] will be generated. N × N A rectangular grid of coordinate points, of which N × N > Point Cloud τ c _ Count This generates the corresponding rectangular mesh and outputs the rectangular mesh points. X , Y Point set coordinate matrix [ X V Dτ , Y V Dτ ]; Step S43: Process each two-dimensional point cloud dataset Point Cloud 1 c ,…, Point Cloud M c Repeat steps S41 to S42 sequentially to generate the corresponding results. N × N Output the coordinates of a rectangular grid point. X , Y Point set coordinate matrix [ X V D1 , Y V D1 ],…,[ X V DM , Y V DM ].
5. The high-precision color three-dimensional surface reconstruction method for spacecraft surface shape as described in claim 4, characterized in that, Step S5 sequentially determines the point clouds of each object. N × N The specific steps for determining whether the coordinates of a rectangular grid are within the convex hull include: Step S51, Step S51, Set the convex hull range Ω τ The two-dimensional point cloud dataset inside is Point Cloud τ Ω , τ =1,2,…, M ,like X , Y Point set coordinate matrix [ X V Dτ , Y V Dτ The first in ] i τ V Coordinates of points , i τ V =1,2,..., N × N Then take this point as Point Cloud τ Ω The data points within the range are updated in coordinates, i.e. ,like , i τ V =1,2,..., N × N If the coordinates are not updated, then the quantity is obtained as follows: Point Cloud τ Ω _ Count convex hull range Ω τ Two-dimensional point cloud dataset Point Cloud τ Ω , of which i τ Ω The coordinates of the points are If the constraint between the number of point clouds and the number of grid points is satisfied, i.e. N × N ≥ Point Cloud τ Ω _ Count > Point Cloud τ c _ Count If the number of sampling grid points is set correctly, the requirement is met; otherwise, proceed to step S42 to reset a larger number. N The subsequent steps of step S42 are executed sequentially until the condition is met, then step S52 is executed. Step S52: Process the point cloud datasets of each object. Point Cloud 1 c ,…, Point Cloud M c Repeat step S51 to output the corresponding 2D mesh point cloud dataset within the convex hull. Point Cloud 1 Ω ,…, Point Cloud M Ω .
6. The high-precision color three-dimensional surface reconstruction method for spacecraft surface shape as described in claim 5, characterized in that, Step S6 involves processing the grid point cloud dataset. Point Cloud 1 Ω , Point Cloud 2 Ω ,…, Point Cloud M Ω The specific steps for adding depth information Z to each coordinate point include: Step S61, for point cloud Point Cloud τ c , i =1,2,..., M Input by Point Cloud τ Ω _ Count A point cloud dataset consisting of discrete points, for the _n_th ... i τ Ω Coordinates of points , i τ Ω =1,2,..., Point Cloud τ c _ Count Within the circular region c τ Inner point cloud dataset Point Cloud τ c The KNN algorithm is used to search for the nearest neighbor. k Each point as k - Neighborhood; Step S62: Depth information for each grid coordinate point Z All can be considered as points to be represented. Point Cloud τ Ω The first in i τ Ω Add depth information to each point It is obtained by linear weighting of its neighborhood information: in, As a quantity to be demanded. k - Neighborhood depth information As a known quantity, the weight value needs to be obtained. Only a specific calculation method can achieve interpolation calculation; Step S63: Solve for the weight matrix; assuming When known, the formula in step S62 is transformed into a formula for weights. The optimization problem has an error function written as: in, express Reconstruction coefficients, weights Apply normalization restrictions, i.e. ; A i = Q i T * Q i , To address the aforementioned optimization problem, the Lagrange multiplication method is used for calculation, yielding the following result: in, Therefore, to find the Lagrange function The partial derivatives yield: in, λ i ′=-1 / 2, that is , λ i Let be a constant, and for ease of calculation, let... λ i =-2, therefore, setting the value of the above expression to 0 yields the following result: Considering the matrix A i In cases where invertibility is not guaranteed, it is necessary to adjust the matrix. A i Add the corresponding perturbation term, whose expression is as follows: A i = A i + eye ( k , k )× tr ( A i )× num s in, eye ( k , k )yes k × k A 3D unit diagonal matrix tr Represents the trace of a matrix. num s It is a constant value; corresponding to the first value in the grid coordinate dataset. i τ Ω Depth information value of each point The reconstruction coefficient is: Step S64, then the reconstruction coefficients Perform normalization to obtain the first... i Depth information value of each point for: in, Represents the reconstruction coefficient Summing each element in the matrix ; Step S65: Finally, the entire grid point dataset is obtained. Point Cloud τ Ω depth information Z Dτ Ω Global reconstruction matrix w Z Therefore, for the input Point Cloud τ Ω _ Count A point cloud dataset consisting of discrete points Point Cloud τ Ω have: in, Represents each grid point k - Neighborhood depth value.
7. The high-precision color three-dimensional surface reconstruction method for the shape of a spacecraft as described in claim 5, characterized in that, Step S7 involves processing the grid point cloud dataset. Point Cloud 1 Ω , Point Cloud 2 Ω ,…, Point Cloud M Ω The specific steps for adding color information R to each coordinate point include: Step S71, for point cloud Point Cloud τ c , i =1,2,..., M Input by Point Cloud τ Ω _ count A point cloud dataset consisting of discrete points, for the _n_th ... i τ Ω Coordinates of points , i τ Ω =1,2,..., Point Cloud τ c _ Count Within the circular region c τ Inner point cloud dataset Point Cloud τ c The KNN algorithm is used to search for the nearest neighbor. k Each point as k - Neighborhood; Step S72: Color information for each grid coordinate point R All can be considered as points to be represented. Point Cloud τ Ω The first in i τ Ω Add color information to each point. It is obtained by linear weighting of its neighborhood information: in, As a quantity to be demanded. k - Neighborhood depth information As a known quantity, the weight value needs to be obtained. Only a specific calculation method can achieve interpolation calculation; Step S73: Solve for the weight matrix; assuming When known, the formula in step S72 is transformed into a formula for weights. The optimization problem has an error function written as: in, express Reconstruction coefficients, weights Apply normalization restrictions, i.e. ; A i = Q i T * Q i , To address the aforementioned optimization problem, the Lagrange multiplication method is used for calculation, yielding the following result: in, Therefore, to find the Lagrange function The partial derivatives yield: in, λ i ′=-1 / 2, that is , λ i Let be a constant, and for ease of calculation, let... λ i =-2, therefore, setting the value of the above expression to 0 yields the following result: Considering the matrix A i In cases where invertibility is not guaranteed, it is necessary to adjust the matrix. A i Add the corresponding perturbation term, whose expression is as follows: A i = A i + eye ( k , k )× tr ( A i )× num s in, eye ( k , k )yes k × k A 3D unit diagonal matrix tr Represents the trace of a matrix. num s It is a constant value; corresponding to the first value in the grid coordinate dataset. i τ Ω Color information value of each point The reconstruction coefficient is: Step S74, then the reconstruction coefficients Perform normalization to obtain the first... i Color information value of each point for: in, Represents the reconstruction coefficient Summing each element in the matrix, ; Step S75: Finally, the entire grid point dataset is obtained. pcd τ Ω Color information R Dτ Ω Global reconstruction matrix w R Therefore, for the input pcd τ Ω _ count A point cloud dataset consisting of discrete points pcd τ Ω have: in, Represents each grid point k - Neighborhood color values.
8. The high-precision color three-dimensional surface reconstruction method for spacecraft surface shape as described in claim 5, characterized in that, Step S8 involves the grid point cloud dataset. Point Cloud 1 Ω , Point Cloud 2 Ω ,..., Point Cloud M Ω The specific steps for adding color information G to each coordinate point include: Step S81, for point cloud Point Cloud τ c , i =1,2,..., M Input by Point Cloud τ Ω _ Count A point cloud dataset consisting of discrete points, for the _n_th ... i τ Ω Coordinates of points , i τ Ω =1,2,…, Point Cloud τ c _ Count Within the circular region c τ Inner point cloud dataset Point Cloud τ c The KNN algorithm is used to search for the nearest neighbor. k Each point as k - Neighborhood; Step S82: The color information G of each grid coordinate point can be regarded as the point being represented. Point Cloud τ Ω The first in i τ Ω Add color information to each point. It is obtained by linear weighting of its neighborhood information: in, As a quantity to be demanded. k - Neighboring color information As a known quantity, the weight value needs to be obtained. Only a specific calculation method can achieve interpolation calculation; Step S83: Solve for the weight matrix; assuming When known, the formula in step S82 is transformed into a formula for weights. The optimization problem has an error function written as: in, express Reconstruction coefficients, weights Apply normalization restrictions, i.e. ; A i = Q i T * Q i , To address the aforementioned optimization problem, the Lagrange multiplication method is used for calculation, yielding the following result: in, Therefore, to find the Lagrange function The partial derivatives yield: in, λ i ′=-1 / 2, that is , λ i Let be a constant, and for ease of calculation, let... λ i =-2, therefore, setting the value of the above expression to 0 yields the following result: Considering the matrix A i In cases where invertibility is not guaranteed, it is necessary to adjust the matrix. A i Add the corresponding perturbation term, whose expression is as follows: A i = A i + eye ( k , k )× tr ( A i )× num s in, eye ( k , k )yes k × k A 3D unit diagonal matrix tr Represents the trace of a matrix. num s It is a constant value; corresponding to the first value in the grid coordinate dataset. i τ Ω Color information value of each point The reconstruction coefficient is: Step S84, then the reconstruction coefficients Perform normalization to obtain the first... i Color information value of each point for: in, Represents the reconstruction coefficient Summing each element in the matrix, ; Step S85: Finally, the entire grid point dataset is obtained. Point Cloud τ Ω Color information G Dτ Ω Global reconstruction matrix w G Therefore, for the input Point Cloud τ Ω _ Count A point cloud dataset consisting of discrete points Point Cloud τ Ω have: in, Represents each grid point k - Neighborhood color values.
9. The high-precision color three-dimensional surface reconstruction method for spacecraft surface shape as described in claim 5, characterized in that, Step S9 involves processing the grid point cloud dataset. Point Cloud 1 Ω , Point Cloud 2 Ω ..., Point Cloud M Ω The specific steps for adding color information B to each coordinate point include: Step S91, for point cloud Point Cloud τ c , i =1,2,..., M Input by Point Cloud τ Ω _ Count A point cloud dataset consisting of discrete points, for the _n_th ... i τ Ω Coordinates of points , i τ Ω =1,2,..., Point Cloud τ c _ Count Within the circular region c τ Inner point cloud dataset Point Cloud τ c The KNN algorithm is used to search for the nearest neighbor. k Each point as k - Neighborhood; Step S92: The color information of each grid coordinate point can be regarded as the point being represented. Point Cloud τ Ω The first in i τ Ω Add color information to each point. It is obtained by linear weighting of its neighborhood information: in, As a quantity to be demanded. k - Neighboring color information As a known quantity, the weight value needs to be obtained. Only a specific calculation method can achieve interpolation calculation; Step S93: Solve for the weight matrix; assuming When known, the formula in step S92 is transformed into a formula for weights. The optimization problem has an error function written as: in, express Reconstruction coefficients, weights Apply normalization restrictions, i.e. ; A i = Q i T * Q i , To address the aforementioned optimization problem, the Lagrange multiplication method is used for calculation, yielding the following result: in, Therefore, to find the Lagrange function The partial derivatives yield: in, λ i ′=-1 / 2, that is , λ i Let be a constant, and for ease of calculation, let... λ i =-2, therefore, setting the value of the above expression to 0 yields the following result: Considering the matrix A i In cases where invertibility is not guaranteed, it is necessary to adjust the matrix. A i Add the corresponding perturbation term, whose expression is as follows: A i = A i + eye ( k , k )× tr ( A i )× num s in, eye ( k , k )yes k × k A 3D unit diagonal matrix tr Represents the trace of a matrix. num s It is a constant value; corresponding to the first value in the grid coordinate dataset. i τ Ω Color information value of each point The reconstruction coefficient is: Step S94, then the reconstruction coefficients Perform normalization to obtain the first... i Color information value of each point for: in, Represents the reconstruction coefficient Summing each element in the matrix, ; Step S95: Finally, the entire grid point dataset is obtained. Point Cloud τ Ω Color information B Dτ Ω Global reconstruction matrix w B Therefore, for the input Point Cloud τ Ω _ Count A point cloud dataset consisting of discrete points Point Cloud τ Ω have: in, Represents each grid point k - Neighborhood color values.
10. The high-precision color three-dimensional surface reconstruction method for spacecraft surface shape as described in any one of claims 5 to 9, characterized in that, The output of step S10 is a matrix representing the three-dimensional coordinate point set in the three-dimensional color point cloud dataset containing depth information Z and color texture information RGB. Point Cloud τ Ω _ Location =[ X Dτ Ω , Y Dτ Ω , Z Dτ Ω The color value set matrix for each coordinate point is represented as follows: Point Cloud τ Ω _ Location =[ R τ Ω , G τ Ω , B τ Ω ]; In step S11, for each grid point cloud dataset Point Cloud 1 Ω ,…, Point Cloud M Ω Repeat steps S6 to S10, adding depth and color texture information to each grid point in turn, thereby outputting a new 3D color grid point cloud dataset. Point Cloud 1 Ω , Point Cloud 2 Ω ,…, Point Cloud M Ω .