A point cloud splicing method and device for complex cavity type parts
By using a hierarchical partitioning and improved ICP algorithm, combined with a large-stroke ball screw slide and a multi-degree-of-freedom scanning device, the problems of automated point cloud acquisition and field of view occlusion for complex cavity-type parts were solved, achieving efficient and accurate point cloud stitching and machining allowance acquisition.
Patent Information
- Application Number
- CN202211286132.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-20
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2042-10-20
AI Technical Summary
Existing 3D scanning equipment has a low degree of automation when scanning complex cavity parts. Manual handheld scanners are inefficient and inconsistent, and the problem of field of view occlusion is serious, resulting in poor point cloud data quality and difficulty in obtaining machining allowance quickly and accurately.
A hierarchical and partitioned point cloud acquisition method is adopted. The sampling points are adjusted by calculating the normal vector of the center point of the camera's field of view and the curvature threshold. The improved ICP algorithm is combined with point cloud stitching. A large-stroke lead screw slide and a multi-degree-of-freedom scanning device are used to realize automated point cloud data acquisition and accurate stitching.
It improves the scanning efficiency and point cloud data quality of complex cavity parts, simplifies the installation structure, and realizes automated 3D point cloud data acquisition and processing technology planning for cavity parts.
Smart Images

Figure CN115641419B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field related to three-dimensional scanning, and more particularly to a point cloud splicing method and device for complex cavity parts. BACKGROUND
[0002] The current three-dimensional scanning equipment includes handheld three-dimensional scanners and line structure light cameras and surface structure light cameras. For three-dimensional scanning of complex cavity parts, since the inner cavities have complex features such as cavities, bosses, and ribs, the current method is to manually use a handheld three-dimensional scanner to scan the inner cavities of such parts to obtain point cloud data. The above point cloud acquisition method has low automation, and at the same time, it requires a person to hold a three-dimensional scanner and translate and rotate in the cavity in multiple directions, so it can only be used for obtaining point cloud data of the inner cavities of large-size cavity parts, and small-size parts cannot meet the requirements in space; in addition, the point cloud data obtained by manually holding a three-dimensional scanner to scan large-size cavity parts has poor consistency, which brings inconvenience to the subsequent point cloud processing.
[0003] The current three-dimensional scanning equipment or system only focuses on whether the object to be measured can be scanned during the point cloud scanning process. When the object contains a large number of features, it is inevitable to frequently change the scanning direction, and at the same time, the scanning path has a large number of reciprocating and overlapping, resulting in low efficiency of point cloud scanning; for the CAD model of the cavity part, a point cloud scanning path planning method is proposed to realize fast and accurate scanning of the cavity part and obtain accurate machining allowance.
[0004] The current commonly used point cloud scanning is carried out in layers and regions, that is, after completing the scanning of a certain layer, the adjacent layer is scanned. For scanning of cavity parts, the path can be obtained, in order to realize the approximate perpendicularity of the camera field of view and the surface of the part and obtain better point cloud scanning quality, the direction of the camera field of view should be approximately coincident with the normal vector of the center point of the field of view. In order to achieve this goal, when the features of each layer of the part are obtained, the camera must be moved in the vertical direction, so that the camera position during scanning is approximately located on the normal vector of the scanning area. The camera position for each layer of scanning points is obtained, and it can be seen that the camera must complete the vertical movement to meet the scanning requirements; however, such a sampling path is long and the efficiency is low. When the part is layered by the cross-section passing through the axis, a plurality of centripetal layers are obtained. At this time, if the sampling area is sampled from top to bottom according to the region sampling sequence, there are obviously more reciprocating paths for surfaces with large curvature changes.
[0005] Therefore, it is urgent to design an automated point cloud acquisition device for complex cavity parts of various sizes. Point cloud data acquisition for small-sized parts can be achieved by reducing the size of the end effector, while a long-stroke lead screw slide can meet the large-range positional transformation requirements during scanning of large-sized parts. Simultaneously, the long-stroke lead screw slide can also meet the positional transformation requirements during scanning of the outer wall of the cavity, allowing for the acquisition of the entire 3D point cloud set of the part in a single setup. However, due to the limited field of view of the structured light camera and the complex features of cavity parts, field-of-view occlusion problems are inevitable. Therefore, layered and partitioned acquisition of point cloud data is considered. The acquired patchy point cloud sets are stitched together to obtain a unified point cloud set, thereby enabling reverse modeling and ultimately completing the part's machining process planning. Summary of the Invention
[0006] To address the above-mentioned deficiencies or improvement needs of existing technologies, this invention provides a point cloud stitching method and apparatus for complex cavity-type parts, solving the problems of field-of-view occlusion and point cloud stitching in the internal point cloud scanning of complex cavity parts.
[0007] To achieve the above objectives, according to one aspect of the present invention, a point cloud stitching method for complex cavity-like parts is provided, the method comprising the following steps:
[0008] S1 acquires the curvature of the part under test, constructs a scanning layering strategy, and layers the part under test. Based on the camera's field of view, it calculates the total number of layers m and the number of camera positions n in each layer. m Determine the total number of layers m and the number of camera positions per layer n. m To determine if the preset conditions are met, adjust m and n. m The value is adjusted until the preset adjustment is met;
[0009] S2 divides each layer into n m Each scan region is defined, and the coordinates p of the center point of each scan region are determined. ij and normal vector Calculate the camera depth of field D under different layering strategies; construct the coordinates and pose of the camera position and the p ij , The relationship between D and the camera position is used to calculate the coordinates and pose of the camera position.
[0010] S3 connects all camera positions according to different hierarchical strategies, establishes an objective function for the total length and sampling time of the camera sampling trajectory formed by connecting all camera positions, and calculates the minimum value of the objective function to obtain the optimal sampling trajectory.
[0011] S4 scans according to the optimal sampling trajectory to obtain point cloud data of all sampling areas, converts all point cloud data to the base coordinate system by using the homogeneous transformation matrix between camera poses, realizes coarse stitching, and performs fine stitching on the point cloud data according to a preselected algorithm, so as to realize the stitching of the point cloud data.
[0012] Further preferably, in step S1, the stratification strategy is performed as follows:
[0013] When , height direction stratification is adopted, that is, m layers are obtained by uniform division along the height direction;
[0014] When , if , stratification is performed according to the height; otherwise, circumferential stratification is adopted, that is, m layers are obtained by uniform division along the circumference,
[0015] wherein r1 and r2 are the maximum distance and the minimum distance of the inner cavity of the part to be measured from the ideal rotating shaft respectively; c is a constant greater than 1, and h is the axial height of the part to be measured.
[0016] Further preferably, in step S1, the number of layers and the number of camera sites per layer are calculated according to the following relationship:
[0017] When stratification is performed according to the height:
[0018] When circumferential stratification is performed:
[0019] wherein is the average field of view of the camera, r m is the maximum value of the radius of the mth layer part, and [] represents the integer function.
[0020] Further preferably, in step S1, the preset condition is:
[0021] When height stratification is adopted,
[0022] When circumferential stratification is adopted,
[0023] wherein max() is a function for obtaining the maximum value in m groups of data, 1.1 and 0.9 are safety control coefficients, and
[0024] Further preferably, in step S1, after calculating the number of camera sites n m for each layer, for the part to be measured at a position where the curvature is greater than a preset curvature threshold, the number of sampling points is increased, that is, the number of camera sites n m is increased.
[0025] Further preferably, in step S2, the camera depth of field D is calculated according to the following relationship:
[0026] According to the height layering, when , otherwise
[0027] According to the circumferential layering, when , otherwise
[0028] where d min is the minimum depth of field corresponding to the minimum field of view y1xw1 of the camera.
[0029] Further preferably, in step S2, the coordinates of the camera sites are calculated according to the following relationship:
[0030]
[0031] where p ij-center is the coordinate of the center point of the divided scanning area, i.e., the center point of the field of view of each camera; is the average value of the unit normal vector within the σ neighborhood of the center point p ij-center of the field of view;
[0032] The pose of the camera needs to be adjusted according to the direction of the structured light incidence, and the direction of the structured light incidence is opposite to the direction of the normal vector .
[0033] Further preferably, in step S3, the total length of the trajectory and the sampling time are respectively calculated according to the following:
[0034] When layering according to height:
[0035]
[0036]
[0037] When layering according to circumference:
[0038]
[0039]
[0040] where p ij = (x ij , y ij , z ij ) and p ij+1 = (x ij+1 , y ij+1 , z ij+1 ) are two adjacent camera sites in the mth layer; k and nk the number of layers and the number of camera sites when being layered according to the height difference of the camera sites; Δs is the total distance of the camera moving between adjacent two sampling points, when being layered according to the height, when being layered according to the circumference, v is the uniform motion speed of the camera; t is the total time of acceleration and deceleration between adjacent two sites of the camera; s is the total distance of acceleration and deceleration; Δt is the total time of completing the posture adjustment and completing the scanning at the camera site.
[0041] Further preferably, in step S4, the preselected algorithm is the improved ICP algorithm, and the corresponding objective function is as follows:
[0042]
[0043]
[0044] f = (1 - a) f1(R, t) + a f2(q k+1 ,C k )
[0045] wherein a ∈ [0, 1], a is the weight value of the objective function f2(q k+1 ,C k ) of the point and line registration, which can be adjusted according to different point cloud set characteristics; n in f1(R, t) is the number of the nearest point pairs, p i is a point in the target point cloud P, q i is the nearest point in the source point cloud Q corresponding to p i , R is a rotation matrix, and t is a translation vector; p i in f2(R k+1 ,t k+1 ) represents the i-th sampling point, p j1i is the nearest neighbor matching point of the sampling point under the reference, n i is the normal vector of the two nearest neighbor matching points, R k+1 , t k+1 represents the transformation parameter.
[0046] According to another aspect of the present application, a device for performing the point cloud splicing method described above is provided, which comprises a rotary workbench, a frame cubic table, a motion mechanism and a camera, wherein,
[0047] The rotary workbench is used for clamping the workpiece to be measured, the frame cubic table is arranged outside the rotary workbench and is used for fixing the motion mechanism, the motion mechanism is used for carrying the camera to move in the X, Y, Z and pitch directions, and the camera is used for photographing the point cloud data of the complex cavity type part.
[0048] Overall, compared with the prior art, the above technical solutions conceived by the present application have the following beneficial effects:
[0049] 1. The present application obtains camera scanning sites by layering and partitioning the cavity type part, and plans the movement path of the sampling points, thereby avoiding a large amount of reciprocating and overlapping of the scanning path caused by layering and partitioning the sampling area in sequence, and significantly improving the scanning efficiency, especially for the part to be measured with large surface curvature variation;
[0050] 2. The present application considers the influence of the surface curvature of the part to be measured on the scanning process when layering and partitioning, increases the sampling partition at the position exceeding the curvature threshold, and at the same time, determines the incident direction of the camera structured light by calculating the normal vector of the neighborhood of the center point of the scanning field of view, which can improve the point cloud hole problem caused by large curvature occlusion and improve the scanning quality;
[0051] 3. The present application realizes rough stitching of point cloud by using the pose transformation relationship between camera sites, and improves the ICP algorithm to fully utilize the obtained data to realize fine stitching, thereby improving the point cloud stitching precision, comparing with the CAD model, realizing accurate acquisition of the machining allowance of the complex cavity type part blank, and facilitating the machining process planning of the cavity type part;
[0052] 4. The point cloud stitching device of the present application realizes automatic acquisition of point cloud data of the cavity type part, and the large working range and small size of the end scanning structure can meet the needs of various working scenes, at the same time, simplifies the installation structure, and can obtain the three-dimensional point cloud data of the whole part by one-time installation. BRIEF DESCRIPTION OF DRAWINGS
[0053] Figure 1 is a flow chart of a point cloud stitching method of a complex cavity type part constructed according to the preferred embodiment of the present application;
[0054] Figure 2 is a horizontal development diagram of sampling point distribution and camera site path planning after layering according to height according to the preferred embodiment of the present application;
[0055] Figure 3 is a schematic diagram of camera site distribution and camera site path planning after layering according to circumference according to the preferred embodiment of the present application;
[0056] Figure 4 is a structural schematic diagram of a point cloud stitching device constructed according to the preferred embodiment of the present application;
[0057] Figure 5 is a camera structure schematic diagram constructed according to the preferred embodiment of the present application;
[0058] Figure 6is a top view of a rotary table constructed according to a preferred embodiment of the present application;
[0059] Figure 7 is a front view of a workpiece mounted on a rotary table constructed according to a preferred embodiment of the present application:
[0060] Figure 8 is a structural schematic diagram of a rotation pair constructed according to a preferred embodiment of the present application;
[0061] Figure 9 is a structural schematic diagram of a special-shaped complex cavity part constructed according to a preferred embodiment of the present application;
[0062] Figure 10 is a scanning trajectory schematic diagram of a point cloud scanning device constructed according to a preferred embodiment of the present application in Figure 9 a cavity.
[0063] In all the drawings, the same reference signs are used to represent the same elements or structures, wherein:
[0064] 1-linear guide rail, 2-internal hexagonal screw, 3-frame cubic table, 4-first motor, 5-rotary table, 6-workpiece, 7-square nut, 8-vacuum chuck, 9-first coupling, 10-first screw sliding table, 11-third sliding block, 12-three-dimensional camera, 13-L-shaped camera mounting plate, 14-rotary displacement table, 15-fourth motor, 16-conical overhanging mounting plate, 17-first sliding block, 18-second motor, 19-second coupling, 20-third screw sliding table, 21-second sliding block, 22-third coupling, 23-third motor, 24-second screw sliding table, 25-guide rail sliding block. DETAILED DESCRIPTION
[0065] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application is further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application. In addition, the technical features involved in each embodiment of the present application described below can be combined with each other as long as they do not conflict with each other.
[0066] As Figure 4As shown, the point cloud splicing auxiliary device for complex cavity parts provided by the embodiment of the application comprises a linear guide rail 1, a first screw rod sliding table 10 parallel to the linear guide rail 1, a frame cubic table 3, a cross sliding table mechanism, the cross sliding table mechanism comprising a second screw rod sliding table 24 and a third screw rod sliding table 20, a rotary displacement table 14, and a rotary workbench 5, wherein the linear guide rail 1 and the first screw rod sliding table 10 are fixedly installed on the frame cubic table 3, the first screw rod sliding table 10 can drive the second screw rod sliding table 24 of the cross sliding table mechanism to move horizontally along the linear guide rail 1, the third screw rod sliding table 20 on the cross sliding table can move along the axis of the second screw rod sliding table 24, the third sliding block 11 is connected to a conical overhanging mounting plate 16, the fourth motor 15 and the rotary displacement table 14 are installed on the conical overhanging mounting plate 16, the rotary displacement table 14 is fixedly connected to the three-dimensional camera 12 through an L-shaped camera mounting plate 13, and the workpiece 6 is fixedly installed on the rotary workbench 5 through a radially adjustable vacuum chuck 8 and can be driven to rotate circumferentially in the horizontal plane.
[0067] The position and posture of the three-dimensional camera 12 in space are adjusted through the adjustment of the three moving pairs and one rotating pair, so that the three-dimensional point cloud data of the inner cavity and the outer wall of the complex cavity part can be acquired by the camera.
[0068] As shown in the drawings, Figure 4 the first motor 4 and the second motor 18 drive the first screw rod sliding table 10 and the second screw rod sliding table 24 to move through the first coupling 9 and the second coupling 19, so as to adjust the positions of the first sliding block 17 and the second sliding block 21 and realize the movement of the device in two orthogonal directions in the horizontal plane; one end of the second screw rod sliding table 24 is installed on the first screw rod sliding table 10, and the other end is installed below a guide rail sliding block 25, the guide rail sliding block 25 is matched with the linear guide rail 1, the linear guide rail 1 is fixed on the frame cubic table 3 through an internal hexagonal screw 2, the guide rail sliding block 25 and the first sliding block 17 move synchronously, and the frame cubic table 3 is spliced by profiled materials through T-shaped nuts and profiled material connectors and has a cubic frame structure as a whole.
[0069] As shown in the drawings, Figure 4 the third screw rod sliding table 20 can move linearly under the drive of the second screw rod sliding table 24, the conical overhanging mounting plate 16 is connected to the third sliding block 11, the third motor 23 drives the third screw rod sliding table 20 to move through the third coupling 22, the position of the third sliding block 11 is adjusted, and the upward and downward movement of the mounting plate and the three-dimensional camera 12 is realized.
[0070] As shown in the drawings, Figure 4 and 5As shown, the fourth motor 15 and the rotary displacement table 14 are mounted on the conical overhanging mounting plate 16, the fourth motor 15 rotates to drive the rotary displacement table 14 to rotate in the vertical plane where the conical overhanging mounting plate 16 is located, the rotary displacement table 14 is fixedly connected with the three-dimensional camera 12 through the L-shaped camera mounting plate 13, to ensure the synchronous movement of the three-dimensional camera 12 in the vertical plane, and to realize the adjustment of the pitch angle of the three-dimensional camera 12. The installation of the fourth motor 15, the rotary displacement table 14 and the three-dimensional camera 12 is as shown in Figure 8 As shown, the rotary displacement table 14 is internally provided with a worm and gear structure, the conical overhanging mounting plate 16 is used to extend the three-dimensional camera 12 and other components into the cavity of the workpiece 6, and the three-dimensional camera 12 can emit a planar array laser to obtain point cloud data in the field of view.
[0071] As shown in Figure 6 and 7 As shown, the rotary workbench 5 is circumferentially provided with a plurality of vacuum suction cups 8 in the circumferential mounting groove, the vacuum suction cups 8 can be radially adjusted through the square nuts 7 in the radial mounting groove, and the workpiece 6 is placed first by radially adjusting the square nuts 7, so that the plurality of vacuum suction cups 8 are adjusted to be directly below the bottom surface of the workpiece 6 to be placed. After the workpiece 6 is placed, the workpiece 6 is fixed by the vacuum suction cups 8 to adsorb the bottom surface of the workpiece 6 along the direction perpendicular to the table surface, and the rotary workbench 5 rotates to drive the workpiece 6 to rotate in the horizontal plane.
[0072] The working process of the sheet point cloud set acquisition of the auxiliary device for the point cloud splicing of the complex cavity type part will be described below:
[0073] As shown in Figure 9 When the sheet point cloud set of the inner cavity and the outer wall of the complex cavity type part is acquired, the pose of the three-dimensional camera needs to be adjusted, including adjusting the three-dimensional camera to be inside the workpiece cavity and outside the workpiece, adjusting the up-down movement of the camera, adjusting the pitch angle of the camera, and rotating the workpiece by the rotary workbench. The specific working process is as follows:
[0074] (1) The first motor and the second motor drive the first lead screw sliding table and the second lead screw sliding table to move respectively, so that the auxiliary device end, including the third lead screw sliding table to the three-dimensional camera part, moves to the upper part of the workpiece cavity in the horizontal plane;
[0075] (2) The third motor drives the third lead screw sliding table to move in the vertical direction, drives the connecting plate and the three-dimensional camera to move in the vertical direction, and stops at a proper position inside the workpiece cavity, as shown in Figure 10 The three-dimensional camera takes a picture to obtain a sheet point cloud set of the workpiece in space;
[0076] (3) The rotary workbench drives the workpiece to rotate intermittently in the horizontal plane, and the three-dimensional camera takes a picture in the intermittent time to obtain the circumferential scanning point cloud data of the workpiece at this height;
[0077] (4) In step (3), when the workpiece is scanned circumferentially, there is a visual field blind area caused by the blocking of the camera's field of view by the concave-convex features. A fourth motor drives the rotary displacement table to rotate in the vertical plane to adjust the pitch angle of the camera, as shown in Figure 5 , to obtain the point cloud data of the visual field blind area in step (3);
[0078] (5) Through the shooting of steps (3) and (4), the point cloud data collection for the same height of the workpiece cavity is completed. The third motor is rotated to move the third sliding table in the vertical direction, stop at an appropriate height, repeat steps (3) and (4), and obtain the point cloud data at that height. Through multiple movements in the height direction, the point cloud data at different height layers in the vertical direction of the workpiece is obtained;
[0079] (6) The first motor, the second motor, and the third motor drive the corresponding lead screw sliding table to lift the end device (including the overhanging plate to the three-dimensional camera part) from the inner cavity of the workpiece to a suitable distance from the outer wall of the workpiece. The third motor drives the third lead screw sliding table to move in the vertical direction, drives the connecting plate and the three-dimensional camera to move in the vertical direction, and stops at an appropriate position, as shown in Figure 4 . Repeat the point cloud acquisition strategy of steps (3), (4), and (5) to realize the full-scan of the outer wall of the workpiece.
[0080] As shown in Figure 1 , the following will introduce how to collect and splice point cloud data using the above device.
[0081] I. The main steps of the scanning method are as follows:
[0082] (1) First, use CAD software to obtain the curvature of the part to be measured;
[0083] (2) According to the calculation of the recommended formula, select the layering strategy: as mentioned earlier, there are two kinds of layering by height and layering by circumference. Through the selection of layering strategy, m layers are obtained, and the number of camera sites in each layer is n m (subscript m represents the number of layers);
[0084] The path planning strategy is as follows: there are two layering schemes, layering by height and layering by circumference. The selection of layering is related to the length-diameter ratio of the cavity part. Let the axial height of the part to be measured be h, the maximum and minimum distances of the inner cavity of the part to be measured from the ideal shaft be r1 and r2, respectively. When (c is a constant greater than 1. When c is large, it means that the curvature changes greatly in the height direction, so the layering by height planning strategy is selected. When , the value of is judged. When , the layering by height planning strategy is selected, otherwise the layering by circumference planning strategy is selected.
[0085] m and n m are solved as follows:
[0086] When layered according to height:
[0087] When layered according to circumference:
[0088] (3) Adjust the number n of scanning areas of each layer according to the curvature distribution of the part to be measured m When subdividing each layer scanning area, set the curvature threshold K max , increase the sampling points for the area exceeding the curvature threshold K max , and use the bisection method to divide the sampling area equally, thereby increasing the total number n of sampling areas of this layer m , avoiding the phenomenon of point cloud void caused by large curvature and curvature mutation, thereby causing the phenomenon of point cloud void;
[0089] (4) Determine whether the values of m and n m satisfy the following conditions, and adjust the values of m and n m until the following relationship is satisfied, the depth of field DOF of the camera is the surface data that the camera can collect in one scanning, the depth of field range of the camera is [d min , d max ], the minimum and maximum fields of view corresponding to the depth of field d min and d max of the camera are y1xw1 and y2xw2, generally the field of view of the camera is not square, i.e. y1≠w1, y2≠w2, the layering in step (2) and the determination of the camera site of each layer need to meet the following requirements to realize reasonable field of view:
[0090] ① When layered according to height,
[0091] Where r m is the maximum value of the points in the mth layer of the part to the ideal axis of the part;
[0092] ② When layered according to circumference,
[0093] Where the max() function of formula (1) and (2) is to find the maximum value in m groups of data; 1.1 and 0.9 are safety control coefficients to make the camera depth appropriate and ensure the scanning quality.
[0094] (5) Divide each layer into n m scanning areas, after layering and zoning, a total of n scanning areas are obtained, and the center of each scanning area is the center point p ij-centerIts three-dimensional coordinates are obtained through a theoretical model; during scanning, the center point p of the camera's field of view is... ij-center Along the center point p of the camera's field of view ij-center The average normal vector within the σ-neighborhood The offset distance D should satisfy d min ≤D≤d max This ensures the scanning quality within the field of view, meaning that surface data within the field of view can be effectively acquired. D can be obtained in the following way:
[0095] because
[0096] ① When highly layered, when hour, otherwise
[0097] ② When circumferential stratification occurs, when hour, otherwise
[0098] (6) Determine the position and orientation of the camera: First, determine the camera position p ij (where i and j are both positive integers, representing the position of the j-th camera point in the i-th layer), and the three-dimensional coordinates are represented as p. ij (x ij ,y ij ,z ij ), obtain the center point p of the camera's field of view. ij-center The average value of the unit normal vector in the σ neighborhood From point p ij-center Coordinates, average value of unit normal vector The camera position p can be obtained by calculating the camera depth of field D. ij coordinates Then determine the camera's pose, which needs to be adjusted according to the incident direction of the structured light and the average value of the unit normal vector. In the opposite direction;
[0099] (7) After the layering and the sampling points of the entire part are determined, path planning is performed on the sampling points. In this path planning, the connection between sampling points (the camera's movement path) is not carried out according to the layering situation described above. The total distance of all sampling points traversed by the camera is set as S. cam Let the time taken for the entire sampling process be T. cam Depending on the layering method, the following calculations can be performed:
[0100] ① Planning based on height stratification:
[0101] like Figure 2As shown, after all the camera sites are acquired, the camera sites are re-layered according to the different heights of the camera sites, k layers are obtained, and the number of camera sites in each layer is n k , the vertical line of the ideal rotation axis of the camera site is passed, and the angle between the vector and the x-axis is calculated to re-layer the sampling point p ij The circumferential ordering is obtained Therefore, we have
[0102]
[0103] where Δs1 represents the total distance of the part moving between adjacent two layers of sampling points, and it is known that
[0104] When the camera moves between two sampling points, it is generally composed of three stages of acceleration, uniform speed, and deceleration. Let the total time of acceleration and deceleration between each two points be t, the distance of acceleration and deceleration be s, and the uniform speed of the camera be v. After the camera moves to a certain camera site, the total time of posture adjustment and scanning completion is Δt, then we have
[0105]
[0106] ② Circumferential layering planning:
[0107] As shown in Figure 3 , the difference from ① is that the scanning method when layering in the circumferential direction is to complete the scanning of this layer first, and then move circumferentially. The scanning path is to sort the z coordinates of the n m camera sites p ij (x ij , y ij , z ij ) in each layer from large to small to obtain The direction of camera movement is related to the number of layers. Here, it is set that when the number of layers m is odd, the direction is from top to bottom, and when the number of layers m is even, the direction is from bottom to top, so we get
[0108]
[0109] where Δs2 represents the total distance of the part moving between adjacent two layers of sampling points, and it is known that
[0110] The speed of the camera, the acceleration and deceleration time, the posture adjustment and scanning time, and other parameters are the same as in ①, and we have
[0111]
[0112] Based on the different layering strategies ① and ②, objective functions for height-based layering strategies can be established using equations (1), (3), and (4), or objective functions for circumferential layering strategies can be established using equations (2), (5), and (6). Both objective functions can guarantee that the total distance S of camera movement is maximized under this layering method. cam Total time T for point cloud scanning cam To achieve the minimum size, the point cloud is acquired quickly and accurately, providing data preparation for subsequent point cloud stitching;
[0113] II. The point cloud stitching process is as follows:
[0114] When determining the camera position, a reasonable field of view is obtained through equations (1) and (2), and safety factors of 1.1 and 0.9 are set. This ensures that there is an overlap between the point cloud sets obtained from adjacent fields of view, which can guarantee the data quality obtained by point cloud stitching, because the premise of stitching is that there must be a certain degree of overlap between the point cloud sets.
[0115] The main steps of point cloud stitching are as follows:
[0116] (1) Based on the point cloud stitching path planning method, obtain the camera position, camera pose, and camera movement path. Complete the camera movement according to the planned camera movement path. When the camera moves to a specific position, determine the camera position based on the camera's field of view center point p. ij-center The average normal vector within the σ-neighborhood Adjust the camera's orientation, the direction of structured light incidence, and... In the opposite direction, after adjustment, start scanning to obtain a patchy point cloud;
[0117] (2) Repeat the steps in (1) and complete the acquisition of point cloud data at all camera locations according to the planned scanning path. As can be seen from the scanning partitioning strategy, it is possible to acquire... Each point cloud is obtained along with the camera scanning position and camera pose (average normal vector). One-to-one correspondence;
[0118] (3) Establish a reference coordinate system Oxyz using the first camera position and camera attitude. The point cloud data acquired by this camera position is in the reference coordinate system and does not require transformation. By establishing the remaining... The pose relationship between the camera position and camera pose when acquiring the point cloud and the first camera position and camera pose is obtained, yielding the homogeneous transformation matrix between poses:
[0119]
[0120] In the formula, R is the rotation matrix and p is the translation vector;
[0121] (4) Perform coarse stitching of point clouds by transforming pose relationships: based on the obtained... a homogeneous transformation matrix T ij , the remaining point cloud sets are transformed to the reference coordinate system Oxyz, and the coordinate systems of the point cloud sets are unified, and are all converted to the reference coordinate system Oxyz;
[0122] (5) The point cloud sets are precisely spliced by a point cloud precise registration algorithm: the classic ICP algorithm cannot fully utilize the point cloud data obtained in actual scanning through point-to-point matching. On the basis of point-to-point registration of the ICP algorithm, point-to-line matching is added, the objective function f1(R,t) of point-to-point registration and the objective function f2(q k+1 ,C k ) of point-to-line registration are linearly combined, a new registration algorithm objective function is obtained based on ICP, f1(R,t) and f2(q k+1 ,C k ) and f are respectively expressed as follows:
[0123]
[0124] Where n is the number of the nearest point pairs, p i is a point in the target point cloud P, q i is the nearest point in the source point cloud Q corresponding to p i , R is a rotation matrix, and t is a translation vector;
[0125]
[0126] Where p i represents the i-th sampling point, is the nearest neighbor of the sampling point in the reference, n i is the normal vector of the two nearest neighbor matching points, R k+1 , t k+1 represents the transformation parameters;
[0127] f = (1-α)f1(R,t) + αf2(q k+1 ,C k ) α∈[0,1] (10)
[0128] In the formula, α is the weight of the objective function f2(q k+1 ,C k ) of point-to-line registration, and α can be adjusted according to different point cloud set characteristics. When the curvature of the part to be measured in the field of view is large, α should be reduced, so as to weaken the influence of local optimization on point cloud splicing to a certain extent;
[0129] (6) The point cloud sets are precisely spliced by the precise registration method, and after the splicing is completed, the overlapping area points are removed through data fusion to obtain the point cloud data of the whole part, and the point cloud data splicing is completed.
[0130] It is to be understood that the above description is intended to be illustrative and not restrictive. Many other embodiments will be apparent to those of skill in the art upon reading and understanding the above description. The scope of the application should, therefore, be determined with reference to the appended claims, along with the full scope of equivalents to which such claims are entitled.
Claims
1. A point cloud stitching method for complex cavity type parts, characterized in that, The method comprises the following steps: S1 obtaining the curvature of the part to be measured, constructing a scanning layering strategy and layering the part to be measured, calculating the total number of layers obtained by layering according to the field of view range of the camera and the number of camera sites per layer ; determining whether the total number of layers and the number of camera sites per layer satisfy the preset condition, adjusting the values of and until the preset adjustment is satisfied; S2 divide each layer into scanning areas, determine the coordinates of the center point of each scanning area and normal vector , calculate the corresponding camera depth of field under different layering strategies ; build the relationship between the coordinates and pose of the camera site and the , and , and calculate the coordinates and pose of the camera site accordingly; S3: connecting all camera sites according to different layering strategies, establishing a target function of the total length of the camera sampling track and the sampling time formed by connecting all camera sites, and calculating the minimum value of the target function to obtain an optimal sampling track; S4: scanning according to the optimal sampling track to obtain point cloud data of all sampling areas, converting all point cloud data to a base coordinate system by using a homogeneous transformation matrix between camera poses to realize coarse stitching, and performing fine stitching on the point cloud data according to a preselected algorithm to realize the stitching of the point cloud data; In step S1, the layering strategy is performed according to the following: When height direction, i.e. to obtain layers by dividing the height direction. When If , a high degree of stratification is employed; Otherwise, the circumferential layering is adopted, i.e. the circumferential direction is equally divided into layers; wherein, , are the maximum and minimum distances between the inner cavity of the part under test and the ideal rotation axis, respectively; is a constant greater than 1, is the axial height of the part under test; In step S1, when calculating the number of camera sites of each layer Afterwards, for the part to be measured, where the curvature is greater than the preset curvature threshold, the sampling points are increased, i.e. the number of camera sites is increased ; In step S4, the preselected algorithm is an improved ICP algorithm, and the corresponding target function is as follows: in, , The objective function for point-line registration The weights can be adjusted according to different point aggregation characteristics. When the curvature of the part under test is large within the field of view, the weights should be reduced. ; middle The number of nearest neighbor pairs. Let P be a point in the target point cloud. For source point cloud Q and The corresponding nearest point, Let be a rotation matrix. It is a translation vector; middle Indicates the first One sampling point, The nearest neighbor matching point of the sampling point under the reference. Let the normal vectors of the two nearest neighbor matching points be _____. Indicates the transformation parameters.
2. The point cloud stitching method of complex cavity type parts according to claim 1, wherein, In step S1, the number of layers and the number of camera sites per layer are calculated according to the following relationship: When stratified by height: , ; When circumferentially layered: , ; wherein, is the total number of layers obtained by layering, is the axial height of the part to be measured, and are the average fields of view in the vertical and horizontal directions of the camera, respectively, , and are the minimum and maximum fields of view in the vertical direction of the camera, respectively, and are the minimum and maximum fields of view in the horizontal direction of the camera, respectively; is the number of camera sites per layer, is the maximum value of the radius of the part in the layer, is the maximum distance of the inner cavity of the part to be measured from the ideal rotation axis, and [ ] denotes the integer function.
3. The point cloud stitching method of complex cavity type parts according to claim 1 or 2, characterized in that, In step S1, the preset condition is: When employing high stratification, ; When employing circumferential layering, ; in, The total number of layers obtained by layering. The axial height of the part to be measured is... and These represent the minimum and maximum field of view of the camera in the vertical direction, respectively. and These represent the minimum and maximum field of view of the camera in the horizontal direction, respectively. The number of camera positions per layer. For the first The maximum radius of the layered part. This represents the maximum distance between the inner cavity of the part under test and the ideal axis of rotation. In order to obtain The function of the maximum value in the set of data, with 1.1 and 0.9 being safety control coefficients.
4. The point cloud stitching method of complex cavity type parts according to claim 1 or 2, characterized in that, In step S2, the camera depth of field is calculated according to the following relation: When the height is stratified, when , ; Otherwise ; When the circumferential layers are divided, , ; otherwise ; in, and These represent the minimum field of view of the camera in the horizontal and vertical directions, respectively. The number of camera positions per layer. For the first The maximum radius of the layered part. The total number of layers obtained by layering. The axial height of the part to be measured is... This represents the maximum distance between the inner cavity of the part under test and the ideal axis of rotation. Minimum field of view for the camera The corresponding minimum depth of field, In order to obtain A function that finds the maximum value in a set of data.
5. The point cloud stitching method of complex cavity type parts according to claim 1 or 2, characterized in that, In step S2, the coordinates of the camera site are calculated in accordance with the following relationship: in, The coordinates of the center point of the scanning area are used to divide the area, i.e., the center point of the field of view of each camera; Center of vision of The average value of the unit normal vectors within the neighborhood; Camera depth of field, which is the distance between the camera and the center of the field of view. The distance; The pose of the camera needs to be adjusted according to the direction of the structured light incidence, which is opposite to the direction of the normal vector .
6. The point cloud stitching method of complex cavity type parts according to claim 1 or 2, characterized in that, In step S3, the total length of the trajectory and the sampling time are calculated as follows, respectively: When layering according to height: When layering according to the circumferential direction: wherein, and are the first layer or the second two adjacent camera sites in the first layer; and are the number of layers and the number of camera sites when the height is layered according to the height difference of the camera sites; is the total distance of the camera moving between the sampling points of the adjacent two layers, when the height is layered, when the circumferential layering is layered, , is the axial height of the part to be measured, , are the maximum distance and the minimum distance of the inner cavity of the part to be measured from the ideal rotating shaft, respectively, is the camera depth of field; is the uniform motion speed of the camera; is the total time of acceleration and deceleration between the adjacent two sites of the camera motion; is the total distance of acceleration and deceleration; is the total time of completing the posture adjustment and completing the scanning at the camera site.
7. An apparatus for patching using the patching method of any one of claims 1-6, wherein, The device comprises a rotary workbench, a frame cubic table, a motion mechanism, and a camera, wherein The rotary workbench is used to clamp a workpiece to be measured, the frame cubic table is arranged outside the rotary workbench and is used to fix the motion mechanism, the motion mechanism is used to carry the camera to move in the X, Y, Z, and pitch directions, and the camera is used to shoot point cloud data of a complex cavity part.
Citation Information
Patent Citations
Parameterization numerical control machining method and system for aviation large thin-wall non-rigid part
CN114115123A
Three-dimensional reconstruction method and device for aircraft radome processing blank, medium and equipment
CN114611248A