Obstacle space contact boundary extraction method and device and electronic equipment
By performing three-dimensional grid processing and fast Fourier transformation on tool point clouds and artifact point clouds, combined with convolutional calculations, the contact boundary of the point clouds in obstacle space is determined and extracted, and the problems of high computational complexity and inaccurate boundary extraction in traditional methods are solved, and efficient and accurate contact boundary extraction is achieved.
Patent Information
- Application Number
- CN202510185712.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-20
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2045-02-20
AI Technical Summary
The traditional method based on Minkowski and is too complex to process high-resolution point cloud data, resulting in the extraction of contact boundaries becoming extremely time-consuming, and the result includes a large number of redundant points that cannot accurately extract the contact boundaries.
By obtaining tool point cloud and artifact point cloud, three-dimensional grid construction and meshing are carried out respectively. The obstacle space point cloud in the obstacle space is determined using three-dimensional fast Fourier transform and convolution calculation, and boundary extraction is performed to obtain the contact boundary.
It significantly reduces the complexity of boundary extraction, quickly generates obstacle space point clouds, realizes accurate contact boundary extraction, and improves computing efficiency and boundary accuracy.
Smart Images

Figure CN119672256A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of three-dimensional point cloud processing, and in particular to a method, a device and an electronic device for extracting contact boundaries of an obstacle space. Background Art
[0002] In Additive Manufacturing (AM), support materials are mainly used to support overhanging structures, prevent deformation and collapse during the manufacturing process, and improve the printing quality of parts. However, the removal of support materials has become an indispensable part of the post-processing technology flow of AM. In order to achieve efficient support structure removal, it is first necessary to accurately extract the boundary information of the support structure.
[0003] Extracting the boundary of the support structure is a key step in the subsequent removal of trajectory planning and path design. Currently, the widely used boundary extraction technologies include three-dimensional geometric analysis and calculation methods based on configuration space (C-space). Among them, the boundary extraction method based on configuration space uses the Minkowski Sum to map all feasible posture sets of moving objects such as robots and tools into the configuration space, so that obstacles and motion restrictions can be represented uniformly. However, when there is a lot of point cloud data on the workpiece surface or the tool shape is more complex, the calculation of the three-dimensional Minkowski sum will greatly increase the computational complexity, making the extraction of contact boundaries extremely time-consuming. The traditional method based on the Minkowski sum has too high computational complexity when processing high-resolution point cloud data, and the result contains a large number of redundant points that cannot accurately extract the contact boundary. Summary of the invention
[0004] The purpose of the embodiments of the present invention is to provide a method, device and electronic device for extracting contact boundaries of an obstacle space, so as to reduce the complexity of boundary extraction.
[0005] In a first aspect, the present invention provides a method for extracting contact boundaries of an obstacle space, the method comprising: Acquire a tool point cloud and a workpiece point cloud, wherein the workpiece point cloud includes a point cloud of a target workpiece and a point cloud of a supporting material located below the target workpiece; Constructing a three-dimensional grid and performing gridding processing based on the tool point cloud and the workpiece point cloud respectively, wherein the three-dimensional grid includes a plurality of grid cells, each of which has a grid identifier, and the grid identifier indicates whether a three-dimensional point falls into the corresponding grid cell; Performing three-dimensional fast Fourier transform based on the grid identifiers of the tool point cloud and the workpiece point cloud to obtain transformation results, and calculating the convolution of the transformation results of the tool point cloud and the workpiece point cloud; Determine an obstacle space point cloud in the obstacle space according to the convolution; Boundary extraction is performed on the obstacle space point cloud to obtain a contact boundary.
[0006] In an optional embodiment, the method further comprises: Obtaining a pre-stored model point cloud of the target workpiece, and extracting a model boundary of the model point cloud; The model boundary and the contact boundary are compared to determine the boundary of the support material.
[0007] In an optional embodiment, the tool point cloud includes tool point clouds of the tool in a plurality of different postures; The step of determining an obstacle space point cloud in the obstacle space according to the convolution comprises: Obtaining convolutions corresponding to tool point clouds of the tool in various different postures, and determining corresponding obstacle space point clouds based on the convolutions; The union of the obstacle space point clouds corresponding to a plurality of different postures is determined to obtain the obstacle space point cloud in the obstacle space.
[0008] In an optional implementation, the step of determining an obstacle space point cloud in the obstacle space according to the convolution comprises: Performing a three-dimensional inverse fast Fourier transform based on the convolution to obtain a restored voxel point; An obstacle space point cloud in the obstacle space is determined according to the obtained multiple voxel points.
[0009] In an optional embodiment, each of the voxel points has a corresponding voxel identifier; The step of determining an obstacle space point cloud in the obstacle space according to the obtained multiple voxel points comprises: Screening out voxel points whose voxel identifiers meet preset requirements from among multiple voxel points; An obstacle space point cloud in the obstacle space is determined based on the screened voxel points.
[0010] In an optional implementation, the step of extracting the boundary of the obstacle space point cloud to obtain the contact boundary includes: Slicing the obstacle space point cloud in sequence in the vertical direction to obtain a plurality of slice point clouds; For each of the slice point clouds, project each three-dimensional point in the slice point cloud onto a two-dimensional plane to obtain a projection point; Perform boundary processing based on the projection points in the two-dimensional plane to determine boundary points; The boundary points in the two-dimensional plane corresponding to each of the slice point clouds are restored to the obstacle space to obtain the contact boundary.
[0011] In an optional implementation, the step of performing boundary processing based on the projection points in the two-dimensional plane to determine the boundary points includes: Processing the projection points in the two-dimensional plane to obtain a grid image; Performing morphological processing on the raster image to eliminate noise points in the raster image; Extracting each connected domain in the raster image and performing smoothing processing on each connected domain; Determine boundary points based on the processed raster image.
[0012] In an optional embodiment, the step of constructing a three-dimensional mesh and performing meshing processing based on the tool point cloud includes: Constructing a three-dimensional grid including a plurality of grid cells based on the three-dimensional points in the tool point cloud, wherein each of the three-dimensional points falls into one of the grid cells; For each of the grid cells, if a three-dimensional point falls into the grid cell, a grid point is set for the grid cell, and the grid identifier of the grid cell is set to 1; if no three-dimensional point falls into the grid cell, no grid point is set for the grid cell, and the grid identifier of the grid cell is set to 0.
[0013] In a second aspect, the present invention provides an obstacle space contact boundary extraction device, the device comprising: An acquisition module, used for acquiring a tool point cloud and a workpiece point cloud, wherein the workpiece point cloud includes a point cloud of a target workpiece and a point cloud of a supporting material located below the target workpiece; A processing module, used to construct a three-dimensional grid and perform gridding processing based on the tool point cloud and the workpiece point cloud respectively, wherein the three-dimensional grid includes a plurality of grid cells, each of which has a grid identifier, and the grid identifier indicates whether a three-dimensional point falls into the corresponding grid cell; A calculation module, used for performing three-dimensional fast Fourier transform based on the grid identifiers of the tool point cloud and the workpiece point cloud to obtain transformation results, and calculating the convolution of the transformation results of the tool point cloud and the workpiece point cloud; A determination module, configured to determine an obstacle space point cloud in the obstacle space according to the convolution; The extraction module is used to extract the boundary of the obstacle space point cloud to obtain the contact boundary.
[0014] In a third aspect, the present invention provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, and when the processor executes the computer program, the steps of the method described in any one of the aforementioned implementation modes are implemented.
[0015] The present invention provides a method, device and electronic device for extracting contact boundaries in an obstacle space. After obtaining a tool point cloud and a workpiece point cloud, a three-dimensional grid is constructed and gridding is performed based on the tool point cloud and the workpiece point cloud, respectively. The three-dimensional grid includes a plurality of grid units and each has a grid identifier. A three-dimensional fast Fourier transform is performed based on the grid identifiers of the tool point cloud and the workpiece point cloud to obtain a transformation result, and the convolution of the transformation results of the tool point cloud and the workpiece point cloud is calculated. The obstacle space point cloud in the obstacle space is determined according to the convolution, and the boundary of the obstacle space point cloud is extracted to obtain the contact boundary. This solution can significantly reduce the processing complexity by gridding the point cloud and using the fast Fourier transform to convert the space domain to the frequency domain, quickly generate the obstacle space point cloud, and then realize boundary extraction. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments of the present invention are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0017] Figure 1 A flowchart of a method for extracting contact boundaries of an obstacle space provided by an embodiment of the present invention; Figure 2 A schematic diagram of a target workpiece and a supporting material in an embodiment of the present invention; Figure 3 for Figure 1 A flowchart of the sub-steps included in S12; Figure 4 A flow chart of a method for determining a support material boundary in a method for extracting a contact boundary of an obstacle space provided by an embodiment of the present invention; Figure 5 for Figure 1 A flowchart of the sub-steps included in S14; Figure 6 for Figure 5 A flowchart of the sub-steps included in S142; Figure 7 for Figure 1 A flowchart of the sub-steps included in S15; Figure 8 for Figure 7 A flowchart of the sub-steps included in S153; Fig. 9 A functional module block diagram of an obstacle space contact boundary extraction device provided by an embodiment of the present invention; Fig.10 This is a structural block diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0018] The technical solutions in the embodiments of the present invention will be described below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0019] See also Figure 1 , is a flow chart of an obstacle space contact boundary extraction method provided by an embodiment of the present invention. The obstacle space contact boundary extraction method can be executed by an obstacle space contact boundary extraction device. The obstacle space contact boundary extraction device can be implemented by software and / or hardware and can be configured in an electronic device. The electronic device can be a computer device, or a controller, processor, etc. in a robot. The detailed steps of the obstacle space contact boundary extraction method are introduced as follows.
[0020] S11, obtaining tool point cloud and workpiece point cloud.
[0021] The workpiece point cloud includes a point cloud of a target workpiece and a point cloud of a supporting material located below the target workpiece.
[0022] S12, constructing a three-dimensional grid and performing gridding processing based on the tool point cloud and the workpiece point cloud respectively.
[0023] The three-dimensional grid includes a plurality of grid units, each of which has a grid identifier, and the grid identifier indicates whether a three-dimensional point falls into the corresponding grid unit.
[0024] S13, performing three-dimensional fast Fourier transform based on the grid identifiers of the tool point cloud and the workpiece point cloud to obtain transformation results, and calculating the convolution of the transformation results of the tool point cloud and the workpiece point cloud.
[0025] S14, determining an obstacle space point cloud in the obstacle space according to the convolution.
[0026] S15, performing boundary extraction on the obstacle space point cloud to obtain a contact boundary.
[0027] In this embodiment, tool point clouds and workpiece point clouds in pre-stored CAD model formats or other model formats may be obtained, and the formats of the tool point clouds and workpiece point clouds are converted into a standard three-dimensional point cloud format.
[0028] Among them, combined with reference Figure 2 The workpiece point cloud includes the point cloud of the target workpiece and the point cloud of the support material located under the target workpiece for supporting the target workpiece. The tool point cloud refers to the point cloud of the tool used to remove the support material in the additive manufacturing post-processing process.
[0029] Firstly, the tool point cloud and workpiece point cloud are mean downsampled to reduce the number of three-dimensional points in the point cloud, thereby accelerating the subsequent algorithm processing.
[0030] On this basis, the tool point cloud and the workpiece point cloud are respectively constructed into 3D meshes. When constructing the 3D mesh, the spatial range of the 3D mesh needs to be sufficient to completely envelop the 3D points of the tool point cloud and the workpiece point cloud.
[0031] For tool point cloud, each 3D point in the tool point cloud can fall into one of the grid cells in the 3D grid. And each grid cell in the 3D grid may have one or more 3D points falling into the grid cell, or may have no 3D points falling into the grid cell. In addition, the same is true for workpiece point cloud.
[0032] Based on the situation of the three-dimensional points falling into each grid unit, a grid identifier can be set for each grid unit. For example, if a three-dimensional point falls into the grid unit, the grid identifier is 1, otherwise the grid identifier is 0. In this way, the situation of the three-dimensional points in each grid unit can be characterized by the grid identifier of the grid unit.
[0033] Specifically, see Figure 3 In this embodiment, the steps of constructing a three-dimensional mesh based on the tool point cloud and performing meshing processing can be implemented in the following ways: S121, constructing a three-dimensional grid including a plurality of grid units based on the three-dimensional points in the tool point cloud, wherein each of the three-dimensional points falls into one of the grid units.
[0034] S122: For each of the grid cells, if a three-dimensional point falls into the grid cell, a grid point is set for the grid cell, and a grid identifier of the grid cell is set to 1.
[0035] S123: If no three-dimensional point falls into the grid unit, no grid point is set for the grid unit, and the grid identifier of the grid unit is set to 0.
[0036] In this embodiment, the resolution of the three-dimensional grid may be d, where d represents the size of each grid unit, and the size of d may be dynamically adjusted according to the boundary calculation accuracy requirement.
[0037] Project each 3D point in the workpiece point cloud into the 3D grid, group all 3D points according to the number of the grid unit to which they are projected, and form structured grid data. For any 3D point P (x, y, z), the grid unit number to which it belongs can be calculated according to the projection rule shown below:
[0038] Where i, j, and k represent the numbers of the grid cells in the x-axis, y-axis, and z-axis directions, respectively; d is the resolution of the three-dimensional grid; and [∙] represents a rounding operation.
[0039] That is, for a three-dimensional point P (x, y, z), if the three-dimensional point falls into a certain grid unit, the grid unit will have a grid point, and the grid identifier of the grid unit is 1. The position of each grid point can be located at the position of the common intersection of adjacent three-dimensional grids.
[0040] In addition, the gridding processing method for the tool point cloud is consistent with the gridding processing method for the workpiece point cloud mentioned above, and will not be described in detail here.
[0041] In this way, for the workpiece point cloud A and the tool point cloud B, after the two point clouds are meshed, the three-dimensional voxel data can be obtained respectively. and The three-dimensional voxel data includes multiple voxel values, each of which is the grid identifier of the grid unit, that is, 1 or 0.
[0042] On this basis, three-dimensional fast Fourier transform is performed based on the grid identification of tool point cloud and workpiece point cloud respectively to obtain their representation in the frequency domain, which can be characterized as follows:
[0043]
[0044] in, represents the three-dimensional fast Fourier transform, , Represents 3D voxel data and The data size and shape of the transformed results after three-dimensional fast Fourier transform are respectively , Similarly, each element represents the amplitude and phase of each frequency component in the form of a complex number.
[0045] After converting the workpiece point cloud and tool point cloud into representations in the frequency domain, the representations of the two in the frequency domain are convolved. The calculation method is to convert and By performing point-by-point multiplication, the resulting convolution can be characterized as follows:
[0046] in, is the approximate representation of the Minkowski sum in the frequency domain, and its data shape and size are similar to and Similarly, each element contains frequency domain information, consisting of amplitude and phase.
[0047] Based on the convolution results obtained, the degree of overlap between the workpiece point cloud and the tool point cloud at all possible positions in the three-dimensional space can be determined, which represents the shape of the obstacle space between the workpiece and the support material when the tool approaches the workpiece and the support material. This shape is composed of point clouds, that is, the obstacle space point cloud.
[0048] If the support material needs to be removed by tools later, the boundary of the obstacle space point cloud needs to be determined to facilitate the planning of the tool's operation path. Therefore, the boundary of the obstacle space point cloud is extracted to obtain the contact boundary. The contact boundary serves as the basis for the subsequent tool operation path planning.
[0049] The obstacle space point cloud determined by the above method is actually the point cloud outside the whole composed of the target workpiece and the support material. In the post-processing of additive manufacturing, only the support material needs to be removed. Therefore, please refer to Figure 4 The obstacle space contact boundary extraction method provided in this embodiment may further include the following steps: S21, obtaining a pre-stored model point cloud of the target workpiece, and extracting a model boundary of the model point cloud.
[0050] S22, comparing the model boundary and the contact boundary to determine the boundary of the support material.
[0051] The model point cloud of the target workpiece is pre-stored in the database. The model boundary of the model point cloud can be determined based on the position information of each 3D point in the model point cloud. The model boundary is compared with the contact boundary determined above. The part of the contact boundary that overlaps with the model boundary is the boundary of the target workpiece, and the other boundary parts are the boundaries of the support material.
[0052] In this way, the working path of the tool is planned based on the determined boundary of the supporting material to achieve the removal of the supporting material.
[0053] When determining the obstacle space point cloud in the obstacle space based on the convolution of the tool point cloud and the workpiece point cloud, the convolution of the tool point cloud and the workpiece point cloud is frequency domain information, which can be represented as amplitude and phase. Therefore, it is necessary to restore the frequency domain information to the information of the point in the three-dimensional space. Figure 5 In this embodiment, it can be implemented in the following ways: S141, performing a three-dimensional inverse fast Fourier transform based on the convolution to obtain restored voxel points.
[0054] S142, determining an obstacle space point cloud in the obstacle space according to the obtained multiple voxel points.
[0055] In this embodiment, the convolution is subjected to a three-dimensional inverse fast Fourier transform to obtain an approximate voxel point cloud in the obstacle space, which can be expressed as: :
[0056] in, represents the three-dimensional inverse fast Fourier transform, Actually and The convolution result represents the spatial relationship between two point sets, and its physical meaning is and The degree of overlap of all possible positions in three-dimensional space is used to construct the Minkowski sum. That is, based on the obtained It can be determined and The degree of overlap of all possible positions in three-dimensional space, that is, the state of all possible contact positions of the tool point cloud and the workpiece point cloud, the shape of which is composed of the obstacle space point cloud.
[0057] From the above, we can know that in a 3D grid, each grid cell may have a 3D point falling into it, or may not have a 3D point falling into it. The falling situation of the 3D point can be represented by the grid mark. In the approximate voxel point cloud in the obstacle space obtained above, there may also be some points where there are no voxel points. Based on this, please refer to Figure 6 In this embodiment, the step of determining the obstacle space point cloud in the obstacle space according to the obtained multiple voxel points can be implemented in the following manner: S1421, filter out voxel points whose voxel identifiers meet preset requirements from among the multiple voxel points.
[0058] S1422, determining an obstacle space point cloud in the obstacle space based on the screened voxel points.
[0059] In this embodiment, the voxel identifier is similar to the above-mentioned grid identifier, and is used to characterize whether the corresponding voxel point has a real three-dimensional point. The preset requirement can be set based on the setting of the above-mentioned grid identifier. For example, when the grid identifier is 1, it indicates that the corresponding grid unit has a three-dimensional point falling into it, and when the grid identifier is 0, it indicates that the corresponding grid unit has no three-dimensional point falling into it. Accordingly, the preset requirement can be that the voxel identifier is greater than 0.
[0060] Based on this, voxel points with voxel identification greater than 0 can be screened out to form an obstacle space point cloud in the obstacle space, which is characterized as follows:
[0061] in, express voxel identification.
[0062] The obstacle space point cloud should be a point cloud formed on the periphery of the workpiece point cloud when the tool approaches the workpiece point cloud in a variety of different postures. Therefore, in this embodiment, the tool point cloud obtained above includes the tool point cloud in a variety of different postures. When determining the obstacle space point cloud in the obstacle space, it can be achieved by the following methods: The convolution corresponding to the tool point cloud of the tool in various different postures is obtained, the corresponding obstacle space point cloud is determined based on the convolution, and the union of the obstacle space point clouds corresponding to the multiple different postures is determined to obtain the obstacle space point cloud in the obstacle space.
[0063] In this embodiment, the obstacle space point cloud determined by the tool point cloud in different positions is obtained in the above manner. The obtained multiple obstacle space point clouds are combined to obtain the final obstacle space point cloud.
[0064] On this basis, see Figure 7 , perform boundary extraction on the obstacle space point cloud to determine the contact boundary. In this embodiment, this step can be implemented in the following way: S151, slicing the obstacle space point cloud in sequence in the vertical direction to obtain a plurality of slice point clouds.
[0065] S152: For each of the slice point clouds, project each three-dimensional point in the slice point cloud onto a two-dimensional plane to obtain a projection point.
[0066] S153, performing boundary processing based on the projection points in the two-dimensional plane to determine boundary points.
[0067] S154, restoring the boundary points in the two-dimensional plane corresponding to each of the slice point clouds to the obstacle space to obtain a contact boundary.
[0068] In this embodiment, the obstacle space point cloud is sliced in the vertical direction according to a set fixed height interval h, so as to divide multiple three-dimensional points in the obstacle space point cloud into multiple slice point clouds, and then each slice point cloud is processed separately.
[0069] When slicing the obstacle space point cloud, it can be characterized as follows:
[0070] Where k is the slice number, Represents a slice point cloud within a height range, h represents the height interval, and the default value is 1.
[0071] For each slice point cloud, the slice point cloud can be mapped from the three-dimensional space (i.e., obstacle space) to the two-dimensional plane, and each three-dimensional point in the slice point cloud is mapped to a projection point on the two-dimensional plane. The boundary is extracted on the two-dimensional plane, and then the boundary extracted from the two-dimensional plane is restored to the three-dimensional space to determine the boundary of the slice point cloud in the three-dimensional space. By combining the boundaries of multiple slice point clouds in the three-dimensional space, the boundary of the obstacle space point cloud in the three-dimensional space, i.e., the contact boundary, can be obtained.
[0072] See also Figure 8 In this embodiment, when performing boundary extraction based on projection points in a two-dimensional plane to determine boundary points, it can be achieved in the following manner: S1531, processing the projection points in the two-dimensional plane to obtain a grid image.
[0073] S1532: Perform morphological processing on the raster image to eliminate noise points in the raster image.
[0074] S1533, extract each connected domain in the raster image, and perform smoothing processing on each connected domain.
[0075] S1534, determining boundary points based on the processed raster image.
[0076] In this embodiment, the projection points mapped onto the two-dimensional plane are processed as images, and the projection points in the two-dimensional plane are processed to obtain a grid image. For example, a grid image can be initialized, and each projection point in the two-dimensional plane is traversed, and the projection points are converted into a grid coordinate system, and then the corresponding grid positions are marked, for example, marked as 1, indicating that there is a point at the corresponding grid position. In this way, a grid image in the grid coordinate system is obtained.
[0077] In order to eliminate the noise points in the point cloud, the raster image can be subjected to morphological processing. Among them, the morphological processing performed on the raster image includes erosion processing, dilation processing, opening and closing operation processing, etc. Erosion processing can be used to reduce the foreground object in the raster image (the location where the projection point exists), and dilation processing can be used to enlarge the foreground object in the image. Through erosion processing and dilation processing, the purpose of removing small objects in the raster image and smoothing the boundaries of larger objects can be achieved.
[0078] In addition, the opening operation is an operation of first corroding and then dilating, which can achieve the effects of the above-mentioned corroding and dilating processes, and at the same time keep the overall shape and approximate size unchanged.
[0079] The closing operation is an operation of dilation followed by erosion, which can be used to fill small holes in foreground objects in a raster image, connecting disconnected adjacent parts while keeping the state and approximate size of the object unchanged.
[0080] In addition, the raster image is subjected to boundary smoothing. Specifically, the raster image is subjected to connected domain analysis to identify and mark all connected domains. For each connected domain, the boundary pixels of the connected domain are extracted. The boundary pixels are pixels whose neighborhood has at least one neighboring pixel belonging to a different connected domain or to the background. The extracted boundaries are subjected to smoothing processing, such as median filtering processing, Gaussian filtering processing, etc.
[0081] In this way, through the above method, the noise points in the point cloud can be filtered out, and the boundary of the point cloud can be smoothed to make the boundary more complete.
[0082] Optionally, in addition to the above-mentioned boundary extraction method, a convex hull operation or an alpha shape algorithm may also be used to realize the extraction of the two-dimensional boundary, which will not be described in detail in this embodiment.
[0083] On this basis, the boundary points of the raster image after the above processing can be extracted. The boundary points extracted from the two-dimensional plane are restored to the obstacle space. Specifically, the boundary points can be restored from the two-dimensional space based on the height z of the boundary points in the original obstacle space. Recover to Obstacle Space , which can be characterized as follows:
[0084] Each slice point cloud is processed in the above manner. Finally, the boundaries of all slice point clouds are Connect them in order of height to obtain the contact boundaries in the complete obstacle space.
[0085] The obstacle space contact boundary extraction method provided in this embodiment discretizes the input three-dimensional point cloud through grid division, effectively compresses the point cloud data scale, and thus improves the calculation efficiency. Among them, the grid size can be adjusted based on demand, thereby achieving a flexible balance between calculation accuracy and efficiency, which can be applied to different application scenarios.
[0086] On this basis, point cloud voxelization and fast Fourier transform are used to realize convolution calculation in the frequency domain, and the obstacle space point cloud is optimized by switching between the frequency domain and the spatial domain and combining threshold processing.
[0087] In addition, the obstacle space point cloud is sliced, each slice point cloud is layered projected and rasterized, and the boundary is refined by combining image morphological processing and connected domain analysis to finally extract a complete and accurate contact boundary.
[0088] The solution provided in this embodiment realizes efficient extraction of three-dimensional contact boundaries in complex point cloud scenes. Compared with traditional methods, the present invention has significant advantages in computational efficiency, robustness and boundary accuracy, and can be widely used in additive manufacturing, robot path planning and collision detection and other fields.
[0089] Based on the same inventive concept, please refer to Fig. 9 , an embodiment of the present invention further provides a functional module diagram of an obstacle space contact boundary extraction device. This embodiment can divide the functional modules of the obstacle space contact boundary extraction device according to the above method embodiment. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present invention is schematic, which is only a logical function division. There may be other division methods in actual implementation.
[0090] For example, when each functional module is divided into corresponding functional modules, Fig. 9 The obstacle space contact boundary extraction device shown is only a schematic diagram of the device. The obstacle space contact boundary extraction device may include an acquisition module, a processing module, a calculation module, a determination module and an extraction module. The functions of each functional module of the obstacle space contact boundary extraction device are described in detail below.
[0091] An acquisition module, used for acquiring a tool point cloud and a workpiece point cloud, wherein the workpiece point cloud includes a point cloud of a target workpiece and a point cloud of a supporting material located below the target workpiece; A processing module, used to construct a three-dimensional grid and perform gridding processing based on the tool point cloud and the workpiece point cloud respectively, wherein the three-dimensional grid includes a plurality of grid cells, each of which has a grid identifier, and the grid identifier indicates whether a three-dimensional point falls into the corresponding grid cell; A calculation module, used for performing three-dimensional fast Fourier transform based on the grid identifiers of the tool point cloud and the workpiece point cloud to obtain transformation results, and calculating the convolution of the transformation results of the tool point cloud and the workpiece point cloud; A determination module, used to determine an obstacle space point cloud in the obstacle space according to the convolution; The extraction module is used to extract the boundary of the obstacle space point cloud to obtain the contact boundary.
[0092] It can be understood that the above-mentioned acquisition module, processing module, calculation module, determination module and extraction module can be used to execute the above-mentioned S11 to S15. The detailed implementation method of the acquisition module, processing module, calculation module, determination module and extraction module can refer to the relevant contents of the above-mentioned S11 to S15.
[0093] In a possible implementation, the above extraction module may also be used for: Obtaining a pre-stored model point cloud of the target workpiece, and extracting a model boundary of the model point cloud; The model boundary and the contact boundary are compared to determine the boundary of the support material.
[0094] In a possible implementation, the tool point cloud includes tool point clouds of the tool in a plurality of different postures; the above-mentioned determination module may be used to: Obtaining convolutions corresponding to tool point clouds of the tool in various different postures, and determining corresponding obstacle space point clouds based on the convolutions; The union of the obstacle space point clouds corresponding to a plurality of different postures is determined to obtain the obstacle space point cloud in the obstacle space.
[0095] In a possible implementation, the above-mentioned determination module may be used to: Performing a three-dimensional inverse fast Fourier transform based on the convolution to obtain a restored voxel point; An obstacle space point cloud in the obstacle space is determined according to the obtained multiple voxel points.
[0096] In a possible implementation, each of the voxel points has a corresponding voxel identifier; The above determination module can be specifically used for: Screening out voxel points whose voxel identifiers meet preset requirements from among multiple voxel points; An obstacle space point cloud in the obstacle space is determined based on the screened voxel points.
[0097] In a possible implementation, the extraction module may be used to: Slicing the obstacle space point cloud in sequence in the vertical direction to obtain a plurality of slice point clouds; For each of the slice point clouds, project each three-dimensional point in the slice point cloud onto a two-dimensional plane to obtain a projection point; Perform boundary processing based on the projection points in the two-dimensional plane to determine boundary points; The boundary points in the two-dimensional plane corresponding to each of the slice point clouds are restored to the obstacle space to obtain the contact boundary.
[0098] In a possible implementation, the extraction module may be used to: Processing the projection points in the two-dimensional plane to obtain a grid image; Performing morphological processing on the raster image to eliminate noise points in the raster image; Extracting each connected domain in the raster image and performing smoothing processing on each connected domain; Determine boundary points based on the processed raster image.
[0099] In a possible implementation, the processing module may be used to: Constructing a three-dimensional grid including a plurality of grid cells based on the three-dimensional points in the tool point cloud, wherein each of the three-dimensional points falls into one of the grid cells; For each of the grid cells, if a three-dimensional point falls into the grid cell, a grid point is set for the grid cell, and the grid identifier of the grid cell is set to 1; if no three-dimensional point falls into the grid cell, no grid point is set for the grid cell, and the grid identifier of the grid cell is set to 0.
[0100] See also Fig.10 , is a block diagram of an electronic device provided in an embodiment of the present invention, and the electronic device may be a computer device communicating with a robot, or a controller, a processor, etc. in a robot. The electronic device includes a memory, a processor, and a communication module. The memory, the processor, and the communication module are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, these components may be electrically connected to each other via one or more communication buses or signal lines.
[0101] The memory is used to store computer programs or data. The memory can be, but is not limited to, random access memory (RAM), read only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc.
[0102] The processor is used to read / write data or programs stored in the memory, and execute the obstacle space contact boundary extraction method provided by any embodiment of the present invention.
[0103] The communication module is used to establish a communication connection between the electronic device and other communication terminals through the network, and is used to send and receive data through the network.
[0104] It should be understood that Fig.10 The structure shown is only a schematic diagram of the structure of the electronic device. The electronic device may also include Fig.10More or fewer components as shown, or with Fig.10 Different configurations are shown.
[0105] Furthermore, an embodiment of the present invention also provides a computer-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are executed, the obstacle space contact boundary extraction method provided in the above embodiment is implemented.
[0106] Specifically, the computer-readable storage medium can be a general storage medium, such as a mobile disk, a hard disk, etc. When the computer program on the computer-readable storage medium is executed, the above-mentioned obstacle space contact boundary extraction method can be executed. Regarding the process involved when the computer-readable storage medium and its executable instructions are executed, reference can be made to the relevant description in the above-mentioned method embodiment, which will not be described in detail here.
[0107] In the embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0108] In addition, the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0109] Furthermore, the functional modules in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.
[0110] It should be noted that if the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.
[0111] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any such actual relationship or order between these entities or operations.
[0112] The above description is only an embodiment of the present invention and is not intended to limit the protection scope of the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for extracting contact boundaries of obstacle spaces, characterized in that: The method comprises: Acquire a tool point cloud and a workpiece point cloud, wherein the workpiece point cloud includes a point cloud of a target workpiece and a point cloud of a supporting material located below the target workpiece; Constructing a three-dimensional grid and performing gridding processing based on the tool point cloud and the workpiece point cloud respectively, wherein the three-dimensional grid includes a plurality of grid cells, each of which has a grid identifier, and the grid identifier indicates whether a three-dimensional point falls into the corresponding grid cell; Performing three-dimensional fast Fourier transform based on the grid identifiers of the tool point cloud and the workpiece point cloud to obtain transformation results, and calculating the convolution of the transformation results of the tool point cloud and the workpiece point cloud; Determine an obstacle space point cloud in the obstacle space according to the convolution; Boundary extraction is performed on the obstacle space point cloud to obtain a contact boundary.
2. The obstacle space contact boundary extraction method according to claim 1, characterized in that: The method further comprises: Obtaining a pre-stored model point cloud of the target workpiece, and extracting a model boundary of the model point cloud; The model boundary and the contact boundary are compared to determine the boundary of the support material.
3. The obstacle space contact boundary extraction method according to claim 1, characterized in that: The tool point cloud includes tool point clouds of the tool in multiple different positions; The step of determining an obstacle space point cloud in the obstacle space according to the convolution comprises: Obtaining convolutions corresponding to tool point clouds of the tool in various different postures, and determining corresponding obstacle space point clouds based on the convolutions; The union of the obstacle space point clouds corresponding to a plurality of different postures is determined to obtain the obstacle space point cloud in the obstacle space.
4. The obstacle space contact boundary extraction method according to claim 1, characterized in that: The step of determining an obstacle space point cloud in the obstacle space according to the convolution comprises: Performing a three-dimensional inverse fast Fourier transform based on the convolution to obtain a restored voxel point; An obstacle space point cloud in the obstacle space is determined according to the obtained multiple voxel points.
5. The obstacle space contact boundary extraction method according to claim 4, characterized in that: Each of the voxel points has a corresponding voxel identifier; The step of determining an obstacle space point cloud in the obstacle space according to the obtained multiple voxel points comprises: Screening out voxel points whose voxel identifiers meet preset requirements from among multiple voxel points; An obstacle space point cloud in the obstacle space is determined based on the screened voxel points.
6. The obstacle space contact boundary extraction method according to claim 1, characterized in that: The step of extracting the boundary of the obstacle space point cloud to obtain the contact boundary comprises: Slicing the obstacle space point cloud in sequence in the vertical direction to obtain a plurality of slice point clouds; For each of the slice point clouds, project each three-dimensional point in the slice point cloud onto a two-dimensional plane to obtain a projection point; Perform boundary processing based on the projection points in the two-dimensional plane to determine boundary points; The boundary points in the two-dimensional plane corresponding to each of the slice point clouds are restored to the obstacle space to obtain the contact boundary.
7. The obstacle space contact boundary extraction method according to claim 6, characterized in that: The step of performing boundary processing based on the projection points in the two-dimensional plane to determine the boundary points comprises: Processing the projection points in the two-dimensional plane to obtain a grid image; Performing morphological processing on the raster image to eliminate noise points in the raster image; Extracting each connected domain in the raster image and performing smoothing processing on each connected domain; Determine boundary points based on the processed raster image.
8. The obstacle space contact boundary extraction method according to claim 1, characterized in that: The steps of constructing a three-dimensional mesh based on the tool point cloud and performing meshing processing include: Constructing a three-dimensional grid including a plurality of grid cells based on the three-dimensional points in the tool point cloud, wherein each of the three-dimensional points falls into one of the grid cells; For each of the grid cells, if a three-dimensional point falls into the grid cell, a grid point is set for the grid cell, and the grid identifier of the grid cell is set to 1; if no three-dimensional point falls into the grid cell, no grid point is set for the grid cell, and the grid identifier of the grid cell is set to 0.
9. An obstacle space contact boundary extraction device, characterized in that: The device comprises: An acquisition module, used for acquiring a tool point cloud and a workpiece point cloud, wherein the workpiece point cloud includes a point cloud of a target workpiece and a point cloud of a supporting material located below the target workpiece; A processing module, used to construct a three-dimensional grid and perform gridding processing based on the tool point cloud and the workpiece point cloud respectively, wherein the three-dimensional grid includes a plurality of grid cells, each of which has a grid identifier, and the grid identifier indicates whether a three-dimensional point falls into the corresponding grid cell; A calculation module, used for performing three-dimensional fast Fourier transform based on the grid identifiers of the tool point cloud and the workpiece point cloud to obtain transformation results, and calculating the convolution of the transformation results of the tool point cloud and the workpiece point cloud; A determination module, configured to determine an obstacle space point cloud in the obstacle space according to the convolution; The extraction module is used to extract the boundary of the obstacle space point cloud to obtain the contact boundary.
10. An electronic device comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Slice and supporting point acquisition method of complex anisotropic body parameterized model
CN109571961A
Support detection method and device and storage medium
CN112102313A
Obstacle detection method and device and electronic equipment
CN114994706A
Obstacle detection method based on high-precision map
CN115861966A
Barrier and pothole multi-target clustering method based on road point cloud
CN116469082A