Mechanical part object scanning point cloud defect simulation method considering multiple factors
Through the multi-factor consideration of point cloud defect simulation method for scanning point clouds by mechanical parts, common missing or damage situations in the acquisition of point cloud data by mechanical parts are simulated, and diverse defect simulation data are generated, which solves the problem of lack of effective simulation methods in the existing technology, and improves the efficiency and economicality of point cloud defect processing.
Patent Information
- Application Number
- CN202510513451.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-23
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2045-04-23
AI Technical Summary
During the acquisition process of point cloud data of mechanical parts, there are often missing or damaged due to reflections, blind spots, marking points and bottoms, and there is a lack of effective simulation methods.
A multi-factor-considered point cloud defect simulation method is used to generate diverse defect simulation data by constructing point cloud rays, simulating defect conditions such as reflections, blind spots, marking points and bottom missing.
It provides a richer and diverse benchmark data set, which can effectively simulate common missing or corruption situations in the actual point cloud acquisition process, enhance the realistic and complexity of point cloud loss processing, and reduce the cost and time limits in the actual acquisition process.
Smart Images

Figure CN120064318A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method for simulating point cloud defects, belonging to the field of computer vision, and specifically to a method for simulating point cloud defects of mechanical part physical scans considering multiple factors. Background Art
[0002] In the actual acquisition process, the point cloud data of mechanical parts often has missing or damaged situations due to various factors. If the reflectivity of the workpiece surface material is high, there will be holes in the scanned point cloud in the reflective area; if the workpiece surface is complex or has depressions, the point cloud will be missing due to blind spots during scanning; if identification points are attached to the workpiece surface before scanning, there will be holes in the scanned point cloud at the identification points; if the workpiece is placed on the workbench surface and only one side is scanned, the bottom point cloud will be missing. The above situations often occur simultaneously, resulting in defects and missing in the scanned point cloud. However, there is currently a lack of an effective defect simulation method for simulating the above situations. Summary of the Invention
[0003] In order to solve the problems in the background art, the present invention provides a method for simulating point cloud defects of mechanical part physical scans considering multiple factors. The method of the present invention can provide a more abundant and diverse benchmark data set for the testing and optimization of point cloud completion algorithms, can simulate the common missing or damaged situations in the actual point cloud acquisition process, and provides new ideas and methods for point cloud missing processing, and can provide strong support for the research and technological development in related fields.
[0004] The technical solution adopted by the present invention is as follows: The method for simulating point cloud defects of mechanical part physical scans considering multiple factors of the present invention includes: Step S1: Obtain the defect-free scanned point cloud of the mechanical part physical object, construct point cloud rays under a single viewing angle, obtain the visible points in the defect-free scanned point cloud according to the point cloud rays, and thus construct the single-viewing-angle visible point cloud.
[0005] Step S2: Obtain the reflection intensity of each visible point in Step S1, obtain the non-reflective points among each visible point according to the reflection intensity, and obtain the simulated reflective defect point cloud.
[0006] Step S3: Obtain the visible points under multiple viewing angles according to each visible point cloud in Step S1, and thus construct the multi-viewing-angle visible point cloud. Intersect and merge the multi-viewing-angle visible point cloud and the reflective defect point cloud to obtain the simulated blind spot defect point cloud.
[0007] Step S4: Set several defect centers in the blind spot defect point cloud and remove the defect circles to obtain the identification defect point cloud, and then remove the bottom defect points to obtain the finally simulated defect point cloud.
[0008] The described step S1 is as follows: Step S11: Generate a spaced light source and view point on the defect-free scanned point cloud of the mechanical part, and irradiate the defect-free scanned point cloud with the light source.
[0009] Step S12: Starting from the view point, construct rays from the view point to each point in the defect-free scanned point cloud respectively, and then normalize the ray directions of each ray.
[0010] Step S13: For each normalized ray and the point in the defect-free scanned point cloud that the ray passes through, determine the nearest intersection point between the normalized ray and the defect-free scanned point cloud, so as to obtain the first distance D between the starting point of the normalized ray and the nearest intersection point, and at the same time obtain the second distance d between the starting point and the point in the defect-free scanned point cloud that the normalized ray passes through. If the first distance D is equal to the second distance d, retain the current point as a visible point; if the first distance D is less than the second distance d, remove the current point as an invisible point.
[0011] In the described step S11, according to the surrounding size of the initial complete three-dimensional point cloud model, obtain the centroid of the point cloud. Taking the centroid of the defect-free scanned point cloud as the center of the circle, generate a spherical shell area with a region larger than the defect-free scanned point cloud at a preset first radius R. The generated light source and view point are located in the spaced area between the defect-free scanned point cloud and the spherical shell area to avoid the light source and view point being too close to or too far from the point cloud.
[0012] In the described step S2, arrange the reflection intensities of each visible point in order of magnitude, and remove the visible points whose reflection intensities exceed the preset reflection threshold, and retain the remaining non-reflective points.
[0013] In the described step S3, rotate the view point around the centroid of the single-view-point visible point cloud for one week, so as to generate a number of new view points evenly spaced on the same circle around the single-view-point visible point cloud. For each new view point, obtain a number of visible points according to the same operations as in step S1 for the single view point. The visible points under each new view point are merged by intersection and then constructed into a multi-view-point visible point cloud.
[0014] In the described step S4, obtain the curvature of each point in the blind area defect point cloud, select the points with curvature lower than the preset curvature threshold as the defect centers, and at the same time the distance between each two defect centers is greater than the preset distance threshold. For each defect center, generate a defect circle at a preset second radius with the defect center as the center of the circle and remove it to simulate the scanning defect caused by attaching identification points. The preset second radius is the radius of the attached identification point.
[0015] In the blind area defect point cloud, for each point, obtain the local neighborhood of the point through nearest neighbor search, and then obtain the curvature of the point.
[0016] In step S4, in the marked defective point cloud, points with z-axis coordinates in the range of ±z´ are removed, including points with z = 0, where z´ is a preset range value less than 1, determined according to the order of magnitude of the point cloud model size, so as to remove the bottom defective points. A coordinate system is established with the contact point where the mechanical part is placed on the workbench as the origin.
[0017] The electronic device of the present invention includes: a memory and a processor coupled to each other, wherein the memory stores program data, and the processor calls the program data to execute the method as described above.
[0018] The readable storage medium of the present invention stores program data thereon, and when the program data is executed by a processor, the method as described above is implemented.
[0019] The beneficial effects of the present invention are: The method of the present invention can simulate common missing or damaged situations in the actual process of obtaining point clouds. By simulating typical defects, including surface reflection holes, scanning blind spots, scanning identification point holes, and bottom missing of workpieces, it can cover a wider range of scenarios, provide diverse defect simulations, enhance the reality and complexity of point cloud missing processing, reduce the possible cost and time limitations in the actual acquisition process, improve the efficiency and economy of point cloud processing, and can provide strong support for the research and technological development in related fields. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 is a schematic flowchart of the method of the present invention; Figure 2 is a schematic diagram of the simulation of defective scanning point clouds caused by reflection; Figure 3 is a schematic diagram of the simulation of defective scanning point clouds caused by scanning blind spots; Figure 4 is a schematic diagram of the simulation of defective scanning point clouds caused by attached identification points; Figure 5 is a schematic diagram of the simulation of defective scanning point clouds with bottom missing. DETAILED DESCRIPTION OF THE INVENTION
[0021] Exemplary embodiments will be described in detail herein, and examples thereof are shown in the accompanying drawings. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. On the contrary, they are merely examples of methods consistent with some aspects of the present invention as detailed in the appended claims. The terms used in the present invention are for the purpose of describing specific embodiments only and are not intended to limit the present invention. The singular forms "a", "the", and "said" used in the present invention and the appended claims are also intended to include the plural forms unless the context clearly dictates otherwise. It should also be understood that the term "and / or" used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
[0022] As Figure 1 shown, this example provides a method for simulating the defect of the scanned point cloud of mechanical parts considering multiple factors, which specifically includes the following steps: First, obtain the defect-free scanned point cloud of the mechanical part. In a specific embodiment of the present invention, the original point cloud is obtained by sampling based on a mesh model. Therefore, the coordinate system of the point cloud is defined relative to the mesh model. Initialize and calculate the point cloud to obtain the size of the bounding box of the point cloud model (0.55676186, 0.64289296, 0.67855352) and the centroid coordinates of the point cloud (0.27859916, 0.3216921, 0.2979903); then construct point cloud rays under a single view point. Generate a spaced light source and view point on the defect-free scanned point cloud of the mechanical part. When generating the light source and view point, it is necessary to obtain the centroid of the point cloud according to the initial complete three-dimensional point cloud model bounding size. With the centroid of the defect-free scanned point cloud as the center, generate a spherical shell region with a region larger than the defect-free scanned point cloud at a preset first radius R. The defect-free scanned point cloud is included in the spherical shell region. Specifically, when implemented, the preset first radius R is taken as 3. Specifically, when implemented, the coordinates of the light source are (3.40833147, 2.40880656, 1.32348524), and the coordinates of the view point are (0.17890525, 1.1228733, -0.61864617). The generated light source and view point are located in the spaced region between the defect-free scanned point cloud and the spherical shell region to avoid the light source and view point being too close or too far from the point cloud.
[0023] Irradiate the defect-free scanned point cloud with a light source. Starting from the viewpoint, construct rays from the viewpoint to each point in the defect-free scanned point cloud, and then normalize the ray directions of each ray. For each normalized ray and the points in the defect-free scanned point cloud that the ray passes through, determine the closest intersection point between the normalized ray and the defect-free scanned point cloud, thereby obtaining the first distance D between the starting point of the normalized ray and the closest intersection point, and at the same time obtaining the second distance d between the starting point and the points in the defect-free scanned point cloud that the normalized ray passes through. If the first distance D is equal to the second distance d, i.e., D = d, then the current point is considered visible, and the current point is retained as a visible point. If the first distance D is less than the second distance d, i.e., D < d, then the current point is considered invisible, and the current point is removed as an invisible point. The visible points in the defect-free scanned point cloud obtained according to the point cloud rays are constructed into a single-viewpoint visible point cloud.
[0024] Then obtain the reflection intensity of each visible point in the single-viewpoint visible point cloud. By considering factors such as lighting conditions and surface reflection, use the light source, observer position, and object surface normal to calculate the specular reflection intensity, thereby simulating the point cloud defect caused by specular reflection. Reflection intensity L Specifically as follows: L =( K s I / r 2 )max(0, cos α ) p Wherein, K s represents the light absorption rate of the point, set to 0.5; I / r 2 represents the light intensity reaching the point from the light source, I represents the light source intensity, set to 1; r represents the distance from the light source to the point; α represents the angle between the angular bisector of the line of sight and the incident light and the normal; p represents the exponent for accelerating attenuation, set to 20.
[0025] After calculating the reflection intensity of each point in the visible part of the point cloud, obtain the non-specular reflection points among the visible points according to the specular reflection intensity. Arrange the reflection intensities of each visible point in descending order, and take the top 5% of the sorted part as the specular reflection part to be removed, that is, remove the visible points with reflection intensities exceeding the preset reflection threshold as specular reflection points, and retain the remaining non-specular reflection points. As Figure 2 shown, in the specific implementation of the present invention, it is possible to obtain the defect of the scanned point cloud caused by the specular reflection on the physical surface of the mechanical part simulated by the nut point cloud model, and finally remove it.
[0026] Then, based on each visible point cloud in the single-viewpoint visible point cloud, visible points are obtained under multiple viewpoints. By combining the point cloud data acquired from different viewpoints, visible point clouds with different scanning angles and viewpoint characteristics are generated, thereby simulating the scanning blind area defect caused by complex surfaces. The viewpoint is rotated around the center of gravity of the single-viewpoint visible point cloud for one week, thereby generating 20 new viewpoints evenly spaced on the same circle around the single-viewpoint visible point cloud. They are evenly distributed at intervals on the unit circumference in the (x, y) direction. For each new viewpoint, a number of visible points are obtained according to the same operation as that of the single viewpoint. The visible points under each new viewpoint are merged by intersection to construct a multi-viewpoint visible point cloud. The multi-viewpoint visible point cloud and the reflective defect point cloud are merged by intersection to obtain a simulated blind area defect point cloud. As Figure 3 shown, in the specific implementation of the present invention, it is possible to obtain the scanning point cloud defect caused by the scanning blind area due to the complex surface of the mechanical part or environmental restrictions during the physical scanning of the mechanical part simulated by the nut point cloud model, and finally remove it.
[0027] The curvature of each point in the blind area defect point cloud is obtained. In the specific implementation of the present invention, for each point, the local neighborhood of the point is obtained through nearest neighbor search, and then the curvature of the point is obtained. The points with curvature lower than the preset curvature threshold are selected as the defect centers. The threshold is set as the lower quartile of all curvatures. Randomly select the low-curvature points below the threshold as the circular defect centers. At the same time, the distance between every two defect centers is greater than the preset distance threshold. Specifically, the distance between the defect centers is set to be greater than 0.06. For each defect center, a defect circle is generated and removed with the defect center as the center and under the preset second radius. The preset second radius is the radius of the attached identification point. Specifically, a circular defect circle area is constructed and removed according to the radius of 0.03 during implementation to obtain the identification defect point cloud. By dividing the low-curvature area, reasonably distributed circular defects are generated, thereby simulating the hole defect at the position where the attached scanning identification point is located, that is, simulating the scanning defect caused by the attached identification point. As Figure 4 shown, in the specific implementation of the present invention, it is possible to obtain the scanning point cloud defect caused by the attached identification point on the surface of the mechanical part simulated by the nut point cloud model, and finally remove it.
[0028] Finally, the bottom defect points need to be removed. In the identification defect point cloud, the points with the z-axis coordinate in the range of ±z´ are removed, including the points with z = 0. z´ is a preset range value less than 1, which is determined according to the order of magnitude of the point cloud model size. Specifically, during implementation, z´ takes the value of 0.01, thereby removing the bottom defect points. Specifically, when implementing, the contact point where the mechanical part is placed on the workbench is used as the origin to establish a coordinate system. By limiting the range of the z coordinate, the defect area in contact with the workbench surface is simulated, and the finally simulated defect point cloud is obtained. As Figure 5As shown, in the specific implementation of the present invention, it is possible to obtain the missing scanned point cloud defect at the bottom of the mechanical part physical object caused by the bottom contact with the workbench surface simulated by the nut point cloud model, and finally remove it.
[0029] The present invention also designs a mechanical part physical object scanned point cloud defect simulation system considering multiple factors. The mechanical part physical object scanned point cloud defect simulation system includes a data acquisition module, a single-viewpoint visible point cloud construction module, a reflective defect point cloud construction module, a blind area defect point cloud construction module, and a final defect point cloud construction module. The data acquisition module acquires the defect-free scanned point cloud of the mechanical part physical object and displays it on the display. The single-viewpoint visible point cloud construction module constructs a point cloud ray under a single viewpoint, obtains the visible points in the defect-free scanned point cloud according to the point cloud ray, thereby constructs a single-viewpoint visible point cloud, and displays it on the display. The reflective defect point cloud construction module obtains the reflection intensity of each visible point, obtains the non-reflective points among each visible point according to the reflection intensity, obtains the simulated reflective defect point cloud, and displays it on the display. The blind area defect point cloud construction module obtains the visible points under multiple viewpoints according to each visible point cloud, thereby constructs a multi-viewpoint visible point cloud, performs an intersection merge on the multi-viewpoint visible point cloud and the reflective defect point cloud, obtains the simulated blind area defect point cloud, and displays it on the display. The final defect point cloud construction module sets several defect centers in the blind area defect point cloud and removes the defect circles to obtain the marked defect point cloud, then removes the bottom defect points to obtain the finally simulated defect point cloud, and displays it on the display.
[0030] The method for simulating the scanned point cloud defect of the mechanical part physical object considering multiple factors of the present invention can simulate the common missing or damaged situations in the actual point cloud acquisition process, can provide a more abundant and diverse benchmark data set for the test and optimization of the point cloud completion algorithm. By simulating typical defects, including surface reflective holes, scanning blind areas, scanning identification point holes, and the bottom missing of the workpiece, it can cover a wider range of scenarios, provide diverse defect simulations, enhance the reality and complexity of point cloud missing processing, reduce the cost and time limitations that may be faced in the actual acquisition process, improve the efficiency and economy of point cloud processing, provide new ideas and methods for point cloud missing processing, and provide strong support for the research and technological development in related fields.
[0031] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention.
[0032] Those skilled in the art should understand that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, optical storage, etc.) containing computer-usable program code. The solutions in the embodiments of the present application can be implemented in various computer languages. The present application is described according to the flowcharts of the methods, systems, and computer program products of the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in the process Figure 1 one process or multiple processes and / or blocks Figure 1 These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including instruction means, and the instruction means implements the functions specified in the process Figure 1 one process or multiple processes and / or blocks Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process. Thus, the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in the process Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0033] Although the preferred embodiments of the present application have been described, those skilled in the art can make additional changes and modifications to these embodiments once they learn the basic creative concepts. Therefore, the present invention is intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0034] Obviously, those skilled in the art can make various changes and variations to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the equivalent technology of the present invention, the present application is also intended to include these changes and variations.
Claims
1. A method for simulating defect of physical scanning point cloud of mechanical parts considering multiple factors, characterized in that: include: Step S1: obtaining a defect-free scanning point cloud of a physical mechanical part, and constructing a point cloud ray under a single viewpoint, obtaining visible points in the defect-free scanning point cloud according to the point cloud ray, and thus constructing a single viewpoint visible point cloud; Step S2: obtaining the reflection intensity of each visible point in step S1, obtaining the non-reflective points among the visible points according to the reflection intensity, and obtaining a simulated reflection defect point cloud; Step S3: Obtain visible points under multiple viewpoints according to each visible point cloud in step S1, thereby constructing a multi-viewpoint visible point cloud, and intersecting and merging the multi-viewpoint visible point cloud and the reflective defect point cloud to obtain a simulated blind spot defect point cloud; Step S4: setting a number of defect centers in the blind area defect point cloud and removing defect circles to obtain a marked defect point cloud, and then removing the bottom defect points to obtain the final simulated defect point cloud.
2. The method for simulating defect of physical scanning point cloud of mechanical parts considering multiple factors according to claim 1 is characterized in that: The step S1 is as follows: Step S11: generating an interval light source and viewpoint on the defect-free scanning point cloud of the actual mechanical part, and irradiating the defect-free scanning point cloud with the light source; Step S12: Taking the viewpoint as the starting point, construct rays from the viewpoint to each point in the defect-free scanning point cloud, and then normalize the ray directions of each ray; Step S13: For each normalized ray and the point in the defect-free scanning point cloud through which it passes, determine the nearest intersection point between the normalized ray and the defect-free scanning point cloud, thereby obtaining a first distance D between the starting point of the normalized ray and the nearest intersection point, and at the same time obtain a second distance d between the starting point and the point in the defect-free scanning point cloud through which the normalized ray passes. If the first distance D is equal to the second distance d, retain the current point as a visible point; if the first distance D is less than the second distance d, remove the current point as an invisible point.
3. The method for simulating defect of physical scanning point cloud of mechanical parts considering multiple factors according to claim 2 is characterized in that: In the step S11, a spherical shell area is generated with the center of gravity of the defect-free scanning point cloud as the center of the circle under a preset first radius R, and the area is larger than the area of the defect-free scanning point cloud. The generated light source and viewpoint are located in the interval area between the defect-free scanning point cloud and the spherical shell area.
4. The method for simulating defect of physical scanning point cloud of mechanical parts considering multiple factors according to claim 1, characterized in that: In the step S2, the reflection intensities of the visible points are arranged in order of magnitude, and the visible points whose reflection intensities exceed a preset reflection threshold are removed as reflective points, and the remaining non-reflective points are retained.
5. The method for simulating defect of physical scanning point cloud of mechanical parts considering multiple factors according to claim 1, characterized in that: In the step S3, the viewpoint is rotated around the center of gravity of the single-viewpoint visible point cloud, so as to generate a number of new viewpoints evenly spaced on the same circle around the single-viewpoint visible point cloud. For each new viewpoint, a number of visible points are obtained according to the same operation as the single viewpoint in step S1, and the visible points under each new viewpoint are intersected and merged to construct a multi-viewpoint visible point cloud.
6. The method for simulating defect of physical scanning point cloud of mechanical parts considering multiple factors according to claim 1, characterized in that: In the step S4, the curvature of each point in the blind spot defect point cloud is obtained, and the point whose curvature is lower than the preset curvature threshold is selected as the defect center. At the same time, the distance between every two defect centers is greater than the preset distance threshold. For each defect center, a defect circle is generated and removed at a preset second radius with the defect center as the center of the circle.
7. The method for simulating defect of physical scanning point cloud of mechanical parts considering multiple factors according to claim 6, characterized in that: In the blind area defect point cloud, for each point, the local neighborhood of the point is obtained through nearest neighbor search, and then the curvature of the point is obtained.
8. The method for simulating defect of physical scanning point cloud of mechanical parts considering multiple factors according to claim 1, characterized in that: In the step S4, in the marked defect point cloud, points with z-axis coordinates in the range of ±z' are removed, where z' is a preset range value less than 1, thereby removing the bottom defect points.
9. An electronic device, characterized in that: include: A memory and a processor coupled to each other, wherein the memory stores program data, and the processor calls the program data to execute the method according to any one of claims 1 to 8.
10. A computer-readable storage medium having program data stored thereon, characterized in that: When the program data is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Mask generation method for simulating incomplete point clouds based on saliency characteristics
CN111783798A
Point cloud data generation method and device, equipment and storage medium
CN117034579A
Industrial part three-dimensional point cloud repairing method and device based on deep learning
CN117671131A
Mirror surface defect detection system imaging simulation method based on structured light field
CN119198725A
A point cloud reflection intensity simulation method, medium and device
CN119758290A