Three-dimensional detection system based on real-time color projection enhancement
The 3D inspection system enhanced by real-time color projection solves the problems of time-consuming manual registration and difficulty in error localization in traditional 3D inspection, and achieves accurate correspondence and intuitive display of error data with the actual part under test.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HANGZHOU INSVISION TECH CO LTD
- Filing Date
- 2026-04-30
- Publication Date
- 2026-07-14
AI Technical Summary
In traditional 3D inspection, the registration of 3D mesh models and CAD models relies on manual operation, which is time-consuming and has low accuracy. Error data is difficult to locate quickly and correspond to the actual part to be tested.
A three-dimensional inspection system based on real-time color projection enhancement is adopted. The signed deviation error data is calculated by the data processing module, the spatial transformation relationship between the grid coordinate system and the physical coordinate system is established by the coordinate registration module, and the error chromatogram is directly displayed on the surface of the workpiece through the enhancement display module.
It achieves a precise correspondence between error data and the actual test piece, reduces the difficulty of interpreting results, reduces judgment errors caused by misreading data, and directly identifies error areas through color distribution.
Smart Images

Figure CN122391175A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial inspection technology, and more specifically, to a three-dimensional inspection system based on real-time color projection enhancement. Background Technology
[0002] Traditional 3D inspection processes first involve acquiring a 3D mesh model of the workpiece using 3D scanning equipment. This mesh model is then imported into CAD analysis software, and registration between the mesh model and the standard CAD model is performed manually. This process relies heavily on operator experience, is time-consuming, and prone to inaccuracies due to human error. Next, the deviation data between the 3D mesh model and the CAD model is calculated. However, this data is typically presented as numerical tables or annotations on a virtual 3D model. Inspectors must repeatedly adjust the viewing angle and query corresponding values in the software to determine the error distribution. This makes it difficult to quickly locate out-of-tolerance areas and directly correlate the virtual error data with the physical surface of the actual workpiece. Summary of the Invention
[0003] In view of the shortcomings of the existing technology, the purpose of this invention is to provide a three-dimensional inspection system based on real-time color projection enhancement.
[0004] To achieve the above objectives, the present invention provides the following technical solution:
[0005] A 3D inspection system based on real-time color projection enhancement includes a data processing module, a coordinate registration module, and an enhanced display module.
[0006] The data processing module is used to register the three-dimensional mesh model of the test piece with the CAD model, calculate the signed deviation error data of the three-dimensional mesh model relative to the CAD model, and generate the corresponding error chromatogram based on the signed deviation error data.
[0007] The coordinate registration module obtains the global field information of the test part in the physical space based on the physical marker points on the surface of the test part;
[0008] A consistent matching relationship is obtained by processing the information of the entire field.
[0009] The spatial offset between the grid coordinate system and the physical coordinate system is determined based on the consistent matching relationship. The orientation correction basis is formed based on the spatial offset. The grid coordinate system is then oriented globally according to the orientation correction basis, so that the oriented grid coordinate system and the physical coordinate system maintain the same orientation.
[0010] Positional coupling between the grid coordinate system and the physical coordinate system is achieved by pointing in the same direction. After positional coupling, fixed spatial transformation rules are generated. Based on the spatial transformation rules, the grid coordinate system and the physical coordinate system are docked to establish spatial transformation relationships.
[0011] The enhanced display module aligns the error chromatogram with the surface of the test piece based on spatial transformation.
[0012] Preferably, the enhanced display module includes a projection display unit and a measuring pen unit;
[0013] The projection display unit is used to display the error chromatogram on the surface of the test piece in a color projection manner;
[0014] When the projection display effect is poor, the measuring pen unit displays the corresponding signed deviation error value by pressing the position on the surface of the part to be measured.
[0015] Preferably, the enhanced display module further includes a pose acquisition unit, which is used to acquire the real-time pose of the object coordinate system;
[0016] The projection display unit projects the error chromatogram onto the surface of the test piece in real time based on the real-time pose and spatial transformation relationship.
[0017] Preferably, the process of processing the entire field information to obtain a consistent matching relationship includes the following steps:
[0018] Based on the global field information, determine the spatial occupancy characteristics of the part under test, build a stable spatial reference for the physical coordinate system based on the spatial occupancy characteristics, extract the continuous physical features on the surface of the part under test using the stable spatial reference, and use the continuous physical features as the transmission carrier for coordinate system docking.
[0019] Based on the transmission carrier, the orientation information of the physical space is transmitted to the space where the grid coordinate system is located to obtain the initial orientation connection. Based on the initial orientation connection, the corresponding spatial characteristics of the grid coordinate system are determined so that the corresponding spatial characteristics and the continuous physical characteristics of the physical space maintain a consistent matching relationship.
[0020] Preferably, it further includes:
[0021] Multiple sets of gray code patterns are projected by a projection device, and the camera captures the gray code patterns and decodes them to obtain a mapping lookup table between the projected pixels and the camera pixels.
[0022] The verification unit is used to project the test mark pattern and calculate the alignment error between the projected test mark pattern and the actual mark point;
[0023] When the alignment error exceeds a preset threshold, the recalibration trigger unit triggers the projection calibration module to perform on-site recalibration to update the mapping lookup table.
[0024] Preferably, the measuring pen unit includes a pen body, a pose calculation unit, and an error sampling unit;
[0025] The pen body is provided with marking points for identification;
[0026] The pose calculation unit is used to identify marker points through the camera and calculate the six degrees of freedom pose of the measuring pen in the physical coordinate system to obtain the spatial coordinates of the pen tip.
[0027] When the pen tip trigger mechanism is pressed, the error sampling unit searches for the nearest neighbor point in the three-dimensional mesh model using the pen tip coordinates, reads the signed deviation error value corresponding to the nearest neighbor point, and displays the signed deviation error value on the pen tip display screen.
[0028] Preferably, the error sampling unit is used to calculate the distance between the spatial coordinates of the pen tip and the nearest vertex in the three-dimensional mesh model;
[0029] If the distance exceeds the threshold, a relocation prompt will be issued.
[0030] Preferably, calculating the signed deviation error data of the 3D mesh model relative to the CAD model specifically includes the following steps:
[0031] The surface of the three-dimensional mesh model of the test piece is regularized to obtain the regularized three-dimensional mesh surface;
[0032] The CAD model is divided into several continuous surface layers along a preset direction, and the reference surface of each surface layer is determined.
[0033] The normalized 3D mesh surface is matched with the reference surface of each surface layer to determine the reference surface corresponding to each normalized point on the 3D mesh surface, and the normal of the reference surface corresponding to each normalized point is obtained.
[0034] Based on the regular point and its corresponding reference surface normal, a perpendicular line is drawn on the corresponding reference surface to obtain the projection point of the regular point on the reference surface, and the spatial connection between the regular point and the projection point is determined.
[0035] Positive and negative deviations are obtained based on the direction of the spatial connection and the normal of the reference surface;
[0036] The deviation amplitude is obtained by calculating the spatial distance between the regularized point and the projected point. The signed deviation error data is obtained based on the deviation amplitude, positive deviation, and negative deviation.
[0037] Preferably, the positive and negative deviations are obtained based on the direction of the spatial connection and the normal of the reference surface, specifically including the following steps:
[0038] If the direction of the spatial connection line is consistent with the normal of the reference surface, then the deviation corresponding to the regular point is determined to be a positive deviation.
[0039] If the direction of the spatial connection is inconsistent with the normal of the reference surface, then the deviation corresponding to the regular point is determined to be a negative deviation.
[0040] Preferably, generating a corresponding error chromatogram based on the signed bias error data specifically includes the following steps:
[0041] The signed bias error data is processed into layers to obtain error intervals; a color level is assigned to each error interval.
[0042] Extract the surface area of the test piece corresponding to each error interval, and assign the corresponding color level to the surface area corresponding to each error interval.
[0043] The surface areas after color gradation are blended to form a continuous and complete error chromatogram that matches the surface contour of the test piece.
[0044] Compared with the prior art, the present invention has the following beneficial effects:
[0045] In this invention, the coordinate registration module establishes a spatial transformation relationship between the grid coordinate system and the physical coordinate system based on physical marker points on the surface of the workpiece under test (DUT). This ensures that the virtual error data precisely corresponds to the actual position of the DUT, avoiding deviations caused by manual alignment. It guarantees a perfect match between the error chromatogram and the DUT surface, ensuring that error areas correspond to actual out-of-tolerance areas. By aligning the error chromatogram with the DUT surface and displaying it, the error range of different areas can be directly identified through the color distribution on the DUT surface, eliminating the need to interpret complex numerical tables or 3D model data. This reduces the difficulty of interpreting results and minimizes judgment errors caused by misreading data. Attached Figure Description
[0046] Figure 1 A schematic diagram of a three-dimensional detection system based on real-time color projection enhancement is provided for embodiments of the present invention;
[0047] Figure 2 This is a schematic diagram illustrating the steps for obtaining an error chromatogram in a three-dimensional detection system based on real-time color projection enhancement, as provided in an embodiment of the present invention. Detailed Implementation
[0048] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0049] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0050] Secondly, the term "an embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places throughout this specification does not necessarily refer to the same embodiment, nor is it a single embodiment or an embodiment selectively excluded from other embodiments.
[0051] Reference Figures 1-2 As shown.
[0052] The embodiments further illustrate the three-dimensional detection system based on real-time color projection enhancement proposed in this invention.
[0053] A 3D inspection system based on real-time color projection enhancement includes a data processing module, a coordinate registration module, and an enhanced display module.
[0054] The data processing module is used to register the 3D mesh model of the test piece with the CAD model, calculate the signed deviation error data of the 3D mesh model relative to the CAD model, and generate the corresponding error chromatogram based on the signed deviation error data.
[0055] The coordinate registration module acquires the global field information of the test part in the physical space based on the physical marker points on the surface of the test part;
[0056] The process of processing the entire field information to obtain a consistent matching relationship includes the following steps:
[0057] Based on the global field information, determine the spatial occupancy characteristics of the part under test, build a stable spatial reference for the physical coordinate system based on the spatial occupancy characteristics, extract the continuous physical features on the surface of the part under test using the stable spatial reference, and use the continuous physical features as the transmission carrier for coordinate system docking.
[0058] Based on the transmission carrier, the orientation information of the physical space is transmitted to the space where the grid coordinate system is located to obtain the initial orientation connection. Based on the initial orientation connection, the corresponding spatial characteristics of the grid coordinate system are determined so that the corresponding spatial characteristics and the continuous physical characteristics of the physical space maintain a consistent matching relationship.
[0059] The spatial offset between the grid coordinate system and the physical coordinate system is determined based on the consistent matching relationship. The orientation correction basis is formed based on the spatial offset. The grid coordinate system is then oriented globally according to the orientation correction basis, so that the oriented grid coordinate system and the physical coordinate system maintain the same orientation.
[0060] Positional coupling between the grid coordinate system and the physical coordinate system is achieved by pointing in the same direction. After positional coupling, fixed spatial transformation rules are generated. Based on the spatial transformation rules, the grid coordinate system and the physical coordinate system are docked to establish spatial transformation relationships.
[0061] First, the spatial positioning characteristics of the test part are determined based on the global field information, such as the overall outline of the test part and the spatial distance and angular relationship between each marker point. Based on these spatial positioning characteristics, a stable spatial reference for the physical coordinate system is built. This reference is based on the distribution of the physical marker points to establish the positioning framework of the test part in the physical space. The continuous physical features of the test part surface are extracted using the stable spatial reference, such as the edges and curvature of the test part surface. These continuous physical features are used as the transmission carrier for coordinate system docking to realize the transmission of the spatial orientation information of the physical object.
[0062] Based on the transmission carrier, the orientation information of the physical space is transmitted to the space where the grid coordinate system is located to obtain the initial orientation connection state. In this state, the grid coordinate system and the physical coordinate system have established a preliminary correspondence. According to the initial orientation connection, the corresponding spatial features of the grid coordinate system are determined. For example, the grid coordinate system and the grid nodes corresponding to the physical marker points and continuous physical features are matched with the continuous physical features of the physical space, thus completing the preliminary feature alignment.
[0063] The spatial offset between the grid coordinate system and the physical coordinate system is determined based on the consistent matching relationship. For example, the positional and angular deviations of the two coordinate systems in the X, Y, and Z axes are used to form the orientation correction criteria. For example, the positional deviation values ΔX, ΔY, ΔZ and the angular deviation values Δα, Δβ, Δγ are used to perform global orientation normalization of the grid coordinate system according to the orientation correction criteria. That is, by correcting the position of the coordinate values of the grid coordinate system X'=X+ΔX, Y'=Y+ΔY, Z'=Z+ΔZ, and adjusting the angles α'=α+Δα, β'=β+Δβ, γ'=γ+Δγ, the normalized grid coordinate system and the physical coordinate system maintain the same orientation and eliminate the orientation deviation between the two.
[0064] Positional coupling between the grid coordinate system and the physical coordinate system is achieved by pointing in the same direction. After positional coupling, fixed spatial transformation rules are generated. The spatial transformation rules include position correction parameters and angle correction parameters. According to these spatial transformation rules, the grid coordinate system and the physical coordinate system are docked, a stable spatial transformation relationship is established, and the mapping between the grid coordinate system and the physical coordinate system is realized, providing a reliable coordinate basis for error projection and detection work.
[0065] The enhanced display module aligns the error chromatogram with the surface of the test piece based on spatial transformation.
[0066] The enhanced display module includes a projection display unit and a measuring pen unit;
[0067] The projection display unit is used to display the error chromatogram on the surface of the test piece in color projection.
[0068] When the projection display effect is poor, the measuring pen unit displays the corresponding signed deviation error value by pressing the position on the surface of the part to be measured.
[0069] The enhanced display module also includes a pose acquisition unit, which is used to acquire the real-time pose of the physical coordinate system;
[0070] The projection display unit projects the error chromatogram onto the surface of the workpiece in real time based on the real-time pose and spatial transformation relationship.
[0071] The projection display unit directly projects the generated error chromatogram onto the surface of the part under test in color. For example, when inspecting mechanical parts, different colors in the error chromatogram correspond to different deviation ranges. The projection display unit projects these colors onto the corresponding areas of the part, allowing inspectors to directly identify the locations with larger errors by observing the color distribution on the part's surface.
[0072] When the surface material of the part under test absorbs light, or when the ambient light is too strong, resulting in poor projection display, the inspector can use the measuring pen unit to press on a specific location on the surface of the part under test, thereby displaying the signed deviation error value corresponding to that location. If the surface of a metal part is highly reflective, and the projected color is not clear enough, the inspector can press on the edge of a hole on the part with the measuring pen, and the measuring pen can directly display the specific deviation value of that edge position relative to the CAD model.
[0073] The enhanced display module also includes a pose acquisition unit, which acquires the pose information of the workpiece in the physical coordinate system in real time. When the position or angle of the workpiece changes, or when the position of the testing equipment moves, the pose acquisition unit promptly captures these changes and updates the pose data. At this time, the projection display unit, combined with the real-time pose provided by the pose acquisition unit and the established spatial transformation relationship, adjusts the projection content of the error chromatogram in real time to ensure that the error chromatogram is always aligned with the surface of the workpiece. For example, if the inspector needs to view the error of a large workpiece from different angles, after moving the testing equipment, the pose acquisition unit synchronously updates the workpiece's pose, and the projection display unit will also adjust the projection angle and range accordingly, so that the error chromatogram always fits the actual surface of the workpiece.
[0074] Also includes:
[0075] Multiple sets of gray code patterns are projected by a projection device, and the camera captures the gray code patterns and decodes them to obtain a mapping lookup table between the projected pixels and the camera pixels.
[0076] The verification unit is used to project the test mark pattern and calculate the alignment error between the projected test mark pattern and the actual mark point.
[0077] When the alignment error exceeds a preset threshold, the recalibration trigger unit triggers the projection calibration module to perform on-site recalibration to update the mapping lookup table.
[0078] Multiple sets of gray code patterns are projected onto the space where the part under test is located by a projection device. These gray code patterns are black and white striped patterns with encoding rules; different combinations of gray codes correspond to different pixel positions on the projection device. A camera captures these projected gray code patterns and then decodes them. By identifying the encoded information of the gray codes, a correspondence is established between the projected pixels of the projection device and the camera pixels, ultimately forming a mapping lookup table. For example, when inspecting a mechanical housing, the projection device projects multiple sets of gray code patterns to cover the housing surface. The camera captures and decodes these patterns, thus determining which pixel in the camera's image corresponds to a specific pixel on the projection, providing a basis for locating subsequent projected content.
[0079] The verification unit controls the projection device to project test mark patterns. These test mark patterns are graphics with clear shape and positional characteristics, such as a specific cross mark. The position of these projected test mark patterns on the camera screen is then identified, and the position of the physical mark points on the surface of the workpiece under test is simultaneously located. The alignment error between the projected test mark patterns and the physical mark points is obtained by calculating the positional deviation between the two. If the surface of the workpiece under test has circular physical mark points, the center of the projected test mark pattern is the cross. The pixel distance between the center of the cross and the center of the circular mark point in the image is calculated as the quantified result of the alignment error.
[0080] The recalibration trigger unit continuously monitors the alignment error obtained by the verification unit. When the alignment error exceeds a preset threshold, it indicates that the current mapping lookup table can no longer guarantee the alignment of the projection. At this time, the recalibration trigger unit triggers the projection calibration module to perform on-site recalibration. On-site recalibration repeats the process of projecting the gray code pattern and acquiring and decoding data to re-establish the correspondence between projected pixels and camera pixels, thereby updating the mapping lookup table. For example, if the preset alignment error threshold is 2 pixels, when the error obtained in a certain verification reaches 3 pixels, the recalibration trigger unit starts recalibration, and the updated mapping lookup table allows the projected content to be re-aligned with the test piece.
[0081] The measuring pen unit includes the pen body, the pose calculation unit, and the error sampling unit;
[0082] The pen body has markings for identification;
[0083] The pose calculation unit is used to identify marker points through the camera and calculate the six degrees of freedom pose of the measuring pen in the physical coordinate system to obtain the spatial coordinates of the pen tip.
[0084] When the pen tip trigger mechanism is pressed, the error sampling unit searches for the nearest neighbor point in the three-dimensional mesh model using the pen tip coordinates, reads the signed deviation error value corresponding to the nearest neighbor point, and displays the signed deviation error value on the pen tip display screen.
[0085] The pen's surface has markings for identification. These markings are typically high-contrast patterns that are easily captured by a camera, such as multiple black and white squares. These markings are used to locate the measuring pen, essentially assigning it an identifier so the camera can quickly pinpoint its location.
[0086] When the measuring pen is near the part under test, the camera continuously captures the marked points on the pen body. Based on the image information of these marked points, the pose calculation unit calculates the six-degree-of-freedom pose of the measuring pen in the physical coordinate system using the PnP algorithm, including position parameters in three translational directions and attitude parameters in three rotational directions. These pose parameters are then used to derive the spatial coordinates of the pen tip in the physical coordinate system. For example, when inspecting the casing of an electronic component, the inspector holds the measuring pen close to the casing surface. After the camera identifies the marked points on the pen body, the pose calculation unit calculates that the pen tip is currently at a specific three-dimensional spatial position above the casing.
[0087] When an inspector presses the tip of the measuring pen onto the surface of the part under test, the pen tip's trigger mechanism is activated. At this point, the error sampling unit retrieves the calculated spatial coordinates of the pen tip and searches for the nearest neighbor point (NNN) in the 3D mesh model of the part under test. The error sampling unit reads the signed deviation error value corresponding to this NNN, which is directly displayed on the pen's screen for real-time monitoring. For example, if an inspector presses the pen on a latch position on an electronic component's casing, the error sampling unit finds the nearest neighbor point corresponding to that position in the 3D mesh model, reads the deviation value of that point relative to the CAD model (e.g., 0.02 mm), and displays this value on the pen's screen, allowing the inspector to quickly understand the error at that location.
[0088] The error sampling unit is used to calculate the distance between the spatial coordinates of the pen tip and the nearest vertex in the 3D mesh model;
[0089] If the distance exceeds the threshold, a relocation prompt will be issued.
[0090] After the pen tip trigger mechanism is pressed, the error sampling unit obtains the spatial coordinates of the pen tip in the physical coordinate system and simultaneously accesses the 3D mesh model data of the test piece. The 3D mesh model is a digital model composed of numerous vertices, each with corresponding spatial coordinates. The error sampling unit calculates the distance between the pen tip's current spatial coordinates and all vertices in the 3D mesh model, selecting the vertex with the smallest distance as the nearest vertex, thus obtaining the distance value between the pen tip's coordinates and that nearest vertex.
[0091] For example, when inspecting a part, the inspector uses a measuring pen to press on a groove on the surface of the part. The error sampling unit obtains the spatial coordinates of the pen tip, then compares them with the coordinates of all vertices in the groove area of the 3D mesh model, calculates the distance between the pen tip and these vertices, finds the vertex with the shortest distance, and records the distance value.
[0092] The error sampling unit compares this distance value with a preset threshold. This threshold is set according to the required detection accuracy; for example, a threshold of 0.5 mm means that the reliability of the sampling result decreases when the distance between the pen tip and the nearest vertex exceeds 0.5 mm. If the calculated distance exceeds this threshold, it indicates that the pen tip's position deviates from the effective area of the test piece corresponding to the 3D mesh model, or that the pen's positioning is off. The error sampling unit then issues a repositioning prompt, reminding the inspector to adjust the pen's position and repeat the tapping operation to ensure that subsequent sampling error values are accurate and valid.
[0093] The calculation of the signed deviation error data of the 3D mesh model relative to the CAD model includes the following steps:
[0094] The surface of the three-dimensional mesh model of the test piece is regularized to obtain the regularized three-dimensional mesh surface;
[0095] The CAD model is divided into several continuous surface layers along a preset direction, and the reference surface of each surface layer is determined.
[0096] The normalized 3D mesh surface is matched with the reference surface of each surface layer to determine the reference surface corresponding to each normalized point on the 3D mesh surface, and the normal of the reference surface corresponding to each normalized point is obtained.
[0097] Based on the regular point and its corresponding reference surface normal, a perpendicular line is drawn on the corresponding reference surface to obtain the projection point of the regular point on the reference surface, and the spatial connection between the regular point and the projection point is determined.
[0098] The positive and negative deviations are obtained based on the direction of the spatial connection and the normal of the reference surface, specifically including the following steps:
[0099] If the direction of the spatial connection line is consistent with the normal of the reference surface, then the deviation corresponding to the regular point is determined to be a positive deviation.
[0100] If the direction of the spatial connection is inconsistent with the normal of the reference surface, then the deviation corresponding to the regular point is determined to be a negative deviation.
[0101] The deviation amplitude is obtained by calculating the spatial distance between the regularized point and the projected point. The signed deviation error data is obtained based on the deviation amplitude, positive deviation, and negative deviation.
[0102] The first step is to perform surface regularization on the 3D mesh model of the part under test. This 3D mesh model is a digital model obtained by scanning the part under test, and it often exhibits uneven distribution of mesh vertices and an uneven surface. Surface regularization optimizes and adjusts these mesh vertices, such as smoothing and homogenizing vertex spacing, ultimately resulting in a more regular 3D mesh surface with a reasonable vertex distribution. Taking the 3D mesh model of a curved part as an example, after regularization, the mesh vertices on its surface are evenly distributed across the curved surface, avoiding situations where local vertices are too dense or too sparse.
[0103] The CAD model is layered and reference surfaces are determined. The CAD model is divided into several continuous surface layers along a preset direction, which is usually determined based on the structural characteristics of the part under test; for example, the preset direction for shaft parts is axial. After the division, the reference surface corresponding to each surface layer is determined. The reference surface is the standard reference surface for that surface layer. For example, if a surface layer corresponds to a cylindrical surface, then that cylindrical surface is the reference surface for that layer.
[0104] Next is the matching of the 3D mesh surface with the reference surface. The normalized 3D mesh surface is matched with the reference surface of each surface layer, and the reference surface corresponding to each normalized point on the 3D mesh surface is determined one by one. The normal of the reference surface corresponding to each normalized point is obtained. The normal is the direction vector perpendicular to the surface of the reference surface. For example, when the reference surface is a plane, the normal is the direction perpendicular to the plane; when the reference surface is a sphere, the normal is the direction from the center of the sphere to that point.
[0105] Based on the regularized point and its corresponding reference surface normal, a perpendicular line is drawn on the corresponding reference surface. The direction of this perpendicular line is consistent with the reference surface normal, ultimately obtaining the projection point of the regularized point on the reference surface, and determining the spatial connection between the regularized point and the projection point. For example, if the reference surface corresponding to a certain regularized point is a plane with a vertically upward normal, then the intersection of the perpendicular line drawn from the regularized point in the vertically downward direction with the reference plane is the projection point, and the line segment between the two is the spatial connection.
[0106] By comparing the direction of the spatial connection with the normal of the reference surface, if the direction of the spatial connection is consistent with the normal of the reference surface, the deviation corresponding to the regularization point is determined to be a positive deviation; if the direction of the spatial connection is inconsistent with the normal of the reference surface, it is determined to be a negative deviation. For example, if the normal of the reference surface is vertically upward, and the spatial connection points from the projection point to the regularization point in a vertically upward direction, it is a positive deviation; if the direction of the spatial connection is vertically downward, it is a negative deviation.
[0107] The deviation amplitude is obtained by calculating the spatial distance between the regularized point and the projected point. The deviation amplitude is then assigned a corresponding sign based on whether it is a positive or negative deviation (e.g., a positive value for a positive deviation and a negative value for a negative deviation), thus obtaining the signed deviation error data for each regularized point. For example, if the spatial distance between a regularized point and the projected point is 0.2 mm, and it is determined to be a positive deviation, then the signed deviation error data for that regularized point is +0.2 mm; if it is determined to be a negative deviation, then the signed deviation error data for that regularized point is -0.2 mm.
[0108] The process of generating a corresponding error chromatogram based on signed bias error data includes the following steps:
[0109] The signed bias error data is processed into layers to obtain error intervals; a color level is assigned to each error interval.
[0110] Extract the surface area of the test piece corresponding to each error interval, and assign the corresponding color level to the surface area corresponding to each error interval.
[0111] The surface areas after color gradation are blended to form a continuous and complete error chromatogram that matches the surface contour of the test piece.
[0112] The first step involves stratifying and assigning color levels to the error data. All signed deviation error data from regularized points are stratified, dividing the data into several continuous error intervals based on the numerical range of the error. These intervals are set according to the required detection accuracy or industry standards. For example, the error can be divided into intervals of less than -0.5 mm, -0.5 mm to 0 mm, 0 mm to 0.5 mm, and greater than 0.5 mm. A corresponding color level is assigned to each error interval, following the principle of high visual differentiation. For instance, dark blue represents the error interval less than -0.5 mm, light blue represents the interval from -0.5 mm to 0 mm, light green represents the interval from 0 mm to 0.5 mm, and dark green represents the interval greater than 0.5 mm. Different colors visually distinguish different error ranges.
[0113] The process involves assigning color levels to areas corresponding to error intervals. The surface region of the workpiece corresponding to each error interval is extracted, and all regularized points belonging to the same error interval on the 3D mesh surface are integrated into the corresponding surface region. The color level assigned to that error interval is then applied to the surface region accordingly. If the error of regularized points on the edge region of a mechanical part is between 0 mm and 0.5 mm, then that edge region is assigned a light green color level, allowing inspectors to quickly identify the error range of that area through color.
[0114] Because the surface areas corresponding to different error ranges exhibit abrupt boundary transitions, a fusion process is applied to each surface area after applying color levels. This smooth transition makes the connection between different color areas more natural. Simultaneously, the fusion process conforms to the surface contour of the part under test, ensuring that the final error color spectrum is continuous and complete, perfectly matching the actual shape of the part. For example, for parts with curved surfaces, the fusion process ensures that the color transition in the curved areas follows the curvature of the surface, preventing color breaks or shape deviations. The final error color spectrum covers the surface of the part under test, thus demonstrating the error distribution in each area.
[0115] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0116] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0117] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A three-dimensional inspection system based on real-time color projection enhancement, characterized in that, It includes a data processing module, a coordinate registration module, and an enhanced display module: The data processing module is used to register the three-dimensional mesh model of the test piece with the CAD model, calculate the signed deviation error data of the three-dimensional mesh model relative to the CAD model, and generate the corresponding error chromatogram based on the signed deviation error data. The coordinate registration module obtains the global field information of the test part in the physical space based on the physical marker points on the surface of the test part; A consistent matching relationship is obtained by processing the information of the entire field. The spatial offset between the grid coordinate system and the physical coordinate system is determined based on the consistent matching relationship. The orientation correction basis is formed based on the spatial offset. The grid coordinate system is then normalized globally according to the orientation correction basis, so that the normalized grid coordinate system and the physical coordinate system maintain the same orientation. Positional coupling between the grid coordinate system and the physical coordinate system is achieved by pointing in the same direction. After positional coupling, fixed spatial transformation rules are generated. Based on the spatial transformation rules, the grid coordinate system and the physical coordinate system are docked to establish spatial transformation relationships. The enhanced display module aligns the error chromatogram with the surface of the test piece based on spatial transformation.
2. The three-dimensional inspection system based on real-time color projection enhancement according to claim 1, characterized in that, The enhanced display module includes a projection display unit and a measuring pen unit; The projection display unit is used to display the error chromatogram on the surface of the test piece in a color projection manner; When the projection display effect is poor, the measuring pen unit displays the corresponding signed deviation error value by pressing the position on the surface of the part to be measured.
3. The three-dimensional inspection system based on real-time color projection enhancement according to claim 2, characterized in that, The enhanced display module also includes a pose acquisition unit, which is used to acquire the real-time pose of the physical coordinate system; The projection display unit projects the error chromatogram onto the surface of the test piece in real time based on the real-time pose and spatial transformation relationship.
4. The three-dimensional inspection system based on real-time color projection enhancement according to claim 1, characterized in that, The process of processing the entire field information to obtain a consistent matching relationship includes the following steps: Based on the global field information, determine the spatial occupancy characteristics of the part under test, build a stable spatial reference for the physical coordinate system based on the spatial occupancy characteristics, extract the continuous physical features on the surface of the part under test using the stable spatial reference, and use the continuous physical features as the transmission carrier for coordinate system docking. Based on the transmission carrier, the orientation information of the physical space is transmitted to the space where the grid coordinate system is located to obtain the initial orientation connection. According to the initial orientation connection, the corresponding spatial characteristics of the grid coordinate system are determined, so that the corresponding spatial characteristics and the continuous physical characteristics of the physical space maintain a consistent matching relationship.
5. The three-dimensional inspection system based on real-time color projection enhancement according to claim 1, characterized in that, Also includes: Multiple sets of gray code patterns are projected by a projection device, and the camera captures the gray code patterns and decodes them to obtain a mapping lookup table between the projected pixels and the camera pixels. The verification unit is used to project the test mark pattern and calculate the alignment error between the projected test mark pattern and the actual mark point. When the alignment error exceeds a preset threshold, the recalibration trigger unit triggers the projection calibration module to perform on-site recalibration to update the mapping lookup table.
6. The three-dimensional detection system based on real-time color projection enhancement according to claim 2, characterized in that, The measuring pen unit includes a pen body, a pose calculation unit, and an error sampling unit; The pen body is provided with marking points for identification; The pose calculation unit is used to identify marker points through the camera and calculate the six-degree-of-freedom pose of the measuring pen in the physical coordinate system to obtain the spatial coordinates of the pen tip. When the pen tip trigger mechanism is pressed, the error sampling unit searches for the nearest neighbor point in the three-dimensional mesh model using the pen tip coordinates, reads the signed deviation error value corresponding to the nearest neighbor point, and displays the signed deviation error value on the pen tip display screen.
7. The three-dimensional inspection system based on real-time color projection enhancement according to claim 6, characterized in that, The error sampling unit is used to calculate the distance between the spatial coordinates of the pen tip and the nearest vertex in the three-dimensional mesh model; If the distance exceeds the threshold, a relocation prompt will be issued.
8. The three-dimensional inspection system based on real-time color projection enhancement according to claim 1, characterized in that, The calculation of the signed deviation error data of the 3D mesh model relative to the CAD model includes the following steps: The surface of the three-dimensional mesh model of the test piece is regularized to obtain the regularized three-dimensional mesh surface; The CAD model is divided into several continuous surface layers along a preset direction, and the reference surface of each surface layer is determined. The normalized 3D mesh surface is matched with the reference surface of each surface layer to determine the reference surface corresponding to each normalized point on the 3D mesh surface, and the normal of the reference surface corresponding to each normalized point is obtained. Based on the regular point and its corresponding reference surface normal, a perpendicular line is drawn on the corresponding reference surface to obtain the projection point of the regular point on the reference surface, and the spatial connection between the regular point and the projection point is determined. Positive and negative deviations are obtained based on the direction of the spatial connection and the normal of the reference surface; The deviation amplitude is obtained by calculating the spatial distance between the regularized point and the projected point. The signed deviation error data is obtained based on the deviation amplitude, positive deviation, and negative deviation.
9. The three-dimensional inspection system based on real-time color projection enhancement according to claim 8, characterized in that, The positive and negative deviations are obtained based on the direction of the spatial connection and the normal of the reference surface, specifically including the following steps: If the direction of the spatial connection line is consistent with the normal of the reference surface, then the deviation corresponding to the regular point is determined to be a positive deviation. If the direction of the spatial connection is inconsistent with the normal of the reference surface, then the deviation corresponding to the regular point is determined to be a negative deviation.
10. The three-dimensional detection system based on real-time color projection enhancement according to claim 1, characterized in that, The process of generating a corresponding error chromatogram based on signed bias error data includes the following steps: The signed bias error data is processed into layers to obtain error intervals; a color level is assigned to each error interval. Extract the surface area of the test piece corresponding to each error interval, and assign the corresponding color level to the surface area corresponding to each error interval. The surface areas after color gradation are blended to form a continuous and complete error chromatogram that matches the surface contour of the test piece.