A mapping method between stereogram and plane view and its application
By constructing the coordinate system conversion relationship between the body diagram and the plan view, the mapping matrix M is used to accurately display feature points on the three-dimensional digital model on the plan view, solving the problem that the feature points cannot be accurately marked in the existing technology and improving work Efficiency and accuracy of product quality assessment.
Patent Information
- Application Number
- CN202111497816.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-09
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2041-12-09
AI Technical Summary
The existing three-dimensional drawing software cannot effectively map feature points on the three-dimensional digital model to the plan view, resulting in the inability to accurately label the feature points on the product during high-precision production and processing, and cannot meet the needs of high-precision product quality evaluation.
By constructing the conversion relationship between the spatial coordinate system where the body diagram is located and the local coordinate system where the plan view is located, the mapping matrix M is used to convert the coordinates of three-dimensional points into two-dimensional coordinates to achieve the precise display of feature points on the plan view.
It improves the efficiency of operators to view and evaluate product feature points, is suitable for industrial production and inspection fields, and meets the needs of high-precision product quality evaluation.
Smart Images

Figure CN114140572B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of visual measurement, and in particular to a mapping method of a stereogram and a plane view and an application thereof. Background Art
[0002] In the process of high-precision production and processing, when the product processing is completed, it is necessary to evaluate the processing quality of the product and check whether the points at specific positions on the product surface meet the requirements, such as holes, edge points, plane pit points / convex points on the product, hereinafter referred to as feature points; currently, the three-dimensional digital model (stereograph) of the product is usually used to guide operators to evaluate the feature points, but because the feature points are scattered on various components of the product, if only relying on the digital model display, each time the operator checks the feature points, it is necessary to rotate, translate, zoom and other operations on the digital model, which is time-consuming and labor-intensive, and is not suitable for assembly lines with batch manufacturing characteristics, such as automobile production lines. In order to automatically and intuitively display information to operators, it is necessary to use product digital models to generate plane views, such as top view, left view, right view and rear view. Since the combination of these plane views resembles the shape of a butterfly, the collection of these geometric views is also called a butterfly diagram in engineering. Production line operators can directly refer to the butterfly diagram to view specific feature points on the workpiece without any operation. However, since the current three-dimensional drawing software (AutoCAD, 3DMAX, PRO / E, Solidworks, CATIA, UG) can only display the object to be tested in a plane (such as a six-sided view), it is impossible to obtain the mapping relationship between the three-dimensional view and each two-dimensional plane view, that is, it is impossible to accurately map the feature points on the digital model to the plane view. Therefore, the current butterfly diagram can only display the feature points but cannot accurately mark the position of the feature points, which cannot meet the needs of high-precision product quality assessment. Summary of the invention
[0003] In order to solve the above technical problems, the present invention provides a mapping method for a stereoscopic image and a plane view and its application, by constructing a conversion relationship between the spatial coordinate system where the stereoscopic image is located and the local coordinate system where the plane view is located; the mapping relationship between the coordinates of any point on the three-dimensional digital model and the two-dimensional coordinates on the plane view is obtained, and the feature points on the three-dimensional digital model can be accurately displayed on the two-dimensional plane view; it is convenient for operators to view, detect, and evaluate the feature points on the product, thereby improving work efficiency.
[0004] A method for mapping a stereogram to a plane view, wherein the plane view is: any one of the six views corresponding to the stereogram or a plane view artificially intercepted after the stereogram is rotated and scaled;
[0005] The three-dimensional coordinate system constructed in the plane view is recorded as the local coordinate system; the object in the plane view is recorded as the object to be measured; the spatial coordinate system where the stereogram is located is recorded as the absolute coordinate system, which is pre-set in the three-dimensional mapping software;
[0006] The mapping matrix M is constructed in the following way:
[0007]
[0008] Wherein, R represents the rotation transformation matrix of the local coordinate system relative to the absolute coordinate system, which is output by the three-dimensional mapping software;
[0009] Q represents the three-dimensional coordinates of the origin of the local coordinate system in the absolute coordinate system;
[0010] W1 represents the X-axis coordinate component of the point at the upper left corner of the minimum circumscribed rectangle of the object to be measured in the local coordinate system;
[0011] W2 represents the Y-axis coordinate component of the point at the lower right corner of the minimum circumscribed rectangle of the object to be measured in the local coordinate system;
[0012] s represents the scaling factor of the object to be measured in the plan view relative to the object to be measured in the original stereo view;
[0013] d represents the perspective distance of the plane view relative to the stereogram, which is a constant parameter in the 3D mapping software;
[0014] Through the mapping matrix M, the coordinates of the two-dimensional point (u, v) corresponding to the three-dimensional point (X, Y, Z) on the plane view are established, and the three-dimensional point is displayed on the plane view:
[0015]
[0016] Preferably, the origin of the local coordinate system is set at the geometric center of the object to be measured, and the local coordinate system is established with the plane view as the xOy plane and the z axis perpendicular to the screen and outward.
[0017] Furthermore, the perspective distance d is obtained by:
[0018] Import regular solid geometric figures into the 3D drawing software, use them to generate plane views, and read the perspective distance d from the 3D drawing software.
[0019] The present invention also discloses a method for matching feature points using the above-mentioned mapping method of stereogram and plane view, wherein the feature points include: holes, edge points, plane pit points / convex points and defect points on the object to be tested;
[0020] include:
[0021] 1) Pre-set the spatial coordinate system in the 3D drawing software and record it as the absolute coordinate system; import the 3D digital model of the whole workpiece into the 3D drawing software;
[0022] The following method is used to obtain the plane view I where the object to be measured is located, and the three-dimensional coordinate system constructed in the plane view I is recorded as the local coordinate system:
[0023] According to the position of the object to be tested in the three-dimensional digital model, determine the name of the view corresponding to the six-surface view, and record the view as plane view I; or rotate and scale the three-dimensional digital model, display the object to be tested at a screen position that is easy to view, intercept the object to be tested, and record the intercepted plane as plane view I;
[0024] 2) Construct the mapping matrix M using the following method:
[0025]
[0026] Wherein, R represents the rotation transformation matrix of the local coordinate system relative to the absolute coordinate system, which is output by the three-dimensional mapping software;
[0027] Q represents the three-dimensional coordinates of the origin of the local coordinate system in the absolute coordinate system;
[0028] W1 represents the X-axis coordinate component of the point at the upper left corner of the minimum circumscribed rectangle of the object to be measured in the local coordinate system;
[0029] W2 represents the Y-axis coordinate component of the point at the lower right corner of the minimum circumscribed rectangle of the object to be measured in the local coordinate system;
[0030] s represents the scaling factor of the object to be measured in the plan view relative to the object to be measured in the original stereo view;
[0031] d represents the perspective distance of the plane view relative to the stereogram, which is a constant parameter in the 3D mapping software;
[0032] According to the coordinates (X, Y, Z) of the feature point in the absolute coordinate system, combined with the mapping matrix M, the two-dimensional coordinates (u, v) of the feature point on the plane view I are obtained and displayed on the plane view I:
[0033]
[0034] Further, the integral workpiece is a car body, and the object to be tested is one or more of a front cover, a top cover, a rear cover, a left side panel, a left front door, a left rear door, a right side panel, a right front door, a right rear door, and a rear cover.
[0035] Further, according to the position of the feature point in the workpiece, the component to which the feature point belongs is determined, and the component is recorded as the object to be measured;
[0036] When the object to be tested is a front cover, a top cover or a rear cover of a car, the plane view I is a top view;
[0037] When the object to be measured is the left side wall, left front door, or left rear door of a car, the plane view I is a left view;
[0038] When the object to be measured is the right side wall, right front door, or right rear door of a car, the plane view I is a right view;
[0039] When the object to be tested is a rear cover of a car, the plane view I is a rear view.
[0040] Furthermore, when the feature point is a defect point on the object to be tested, it is acquired through the point cloud collected by the three-dimensional vision sensor, and the point cloud is stored in the absolute coordinate system, and then displayed on the digital model, combined with the mapping matrix M, to obtain the two-dimensional coordinates of the defect point on the plane view I.
[0041] The method of the present invention constructs a conversion relationship between the spatial coordinate system where the stereogram is located and the local coordinate system where the plane view is located; that is, the mapping relationship between the coordinates of any point in the three-dimensional digital model / absolute coordinate system and the two-dimensional coordinates on the plane view is known, and the characteristic points on the three-dimensional digital model can be accurately displayed on the two-dimensional plane view; when used, the plane view corresponding to the object to be tested is displayed to the operator, and the characteristic points are marked in the view for the operator to observe; the method is convenient and effective, suitable for industrial production and detection fields, and is convenient for operators to view, detect and evaluate the characteristic points on the product, thereby improving work efficiency.
[0042] This method can be used to perform random inspection on workpieces, randomly selecting several workpieces that have been processed; the operator observes the plane view I to check whether the feature point exists at the corresponding position of the inspected workpiece, further measures the feature coordinates, and compares them with the three-dimensional digital model to determine whether the inspected workpiece has qualified processing quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 A schematic diagram showing defect feature points in a three-dimensional digital model of a vehicle body in Example 2;
[0044] Figure 2 This is a schematic diagram showing the defect feature points corresponding to the butterfly diagram in Example 2;
[0045] Figure 3 A schematic diagram showing the defect feature points in Example 2 corresponding to the artificially cut plane view I;
[0046] Figure 4 A schematic diagram showing the mounting holes in the vehicle body three-dimensional digital model in Example 2;
[0047] Figure 5 A schematic diagram showing the mounting holes in the butterfly diagram in Example 2;
[0048] Figure 6This is a schematic diagram of the mounting holes in Example 2 corresponding to the artificially cut plan view I. DETAILED DESCRIPTION
[0049] The technical solution of the present invention is described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0050] Example 1
[0051] A method for mapping a stereogram to a plane view, wherein the plane view can be: any one of the six views corresponding to the stereogram, or: a plane view manually intercepted after rotating and scaling the stereogram;
[0052] The three-dimensional coordinate system constructed in the plane view is recorded as the local coordinate system; the object in the plane view is recorded as the object to be measured; the spatial coordinate system where the stereogram is located is recorded as the absolute coordinate system, which is pre-set in the three-dimensional mapping software;
[0053] The mapping matrix M is constructed in the following way:
[0054]
[0055] Where R represents the rotation transformation matrix of the local coordinate system relative to the absolute coordinate system, which is output by the 3D mapping software;
[0056] Q represents the three-dimensional coordinates of the origin of the local coordinate system in the absolute coordinate system;
[0057] W1 represents the X-axis coordinate component of the point at the upper left corner of the minimum circumscribed rectangle of the object to be measured in the local coordinate system;
[0058] W2 represents the Y-axis coordinate component of the point at the lower right corner of the minimum circumscribed rectangle of the object to be measured in the local coordinate system;
[0059] s represents the scaling factor of the object to be measured in the plan view relative to the object to be measured in the original stereo view;
[0060] d represents the perspective distance of the plane view relative to the stereogram, which is a constant parameter in the 3D mapping software;
[0061] Through the mapping matrix M, the coordinates of the two-dimensional point (u, v) corresponding to the three-dimensional point (X, Y, Z) on the plane view are established, and the three-dimensional point is displayed on the plane view:
[0062]
[0063] To facilitate the solution, as a preferred implementation, the origin of the local coordinate system is set at the geometric center of the object to be measured, and the local coordinate system is established with the plane view as the xOy plane and the z axis perpendicular to the screen and outward.
[0064] Among them, the perspective distance d is obtained by the following method:
[0065] Import regular solid geometric figures into the 3D drawing software, use them to generate plane views, and read the perspective distance d from the 3D drawing software.
[0066] Example 2
[0067] A method for matching feature points using a mapping method between a stereogram and a plane view, wherein the feature points include: holes, edge points, plane pit points / convex points and defect points on the object to be tested;
[0068] Specifically include:
[0069] 1) Pre-set the spatial coordinate system in the 3D drawing software and record it as the absolute coordinate system; import the 3D digital model of the whole workpiece into the 3D drawing software;
[0070] The following method is used to obtain the plane view I where the object to be measured is located, and the three-dimensional coordinate system constructed in the plane view I is recorded as the local coordinate system:
[0071] According to the position of the object to be tested in the three-dimensional digital model, determine the name of the view corresponding to the six-surface view, and record the view as plane view I; or rotate and scale the three-dimensional digital model, display the object to be tested at a screen position that is easy to view, intercept the object to be tested, and record the intercepted plane as plane view I;
[0072] 2) Construct the mapping matrix M using the following method:
[0073]
[0074] Where R represents the rotation transformation matrix of the local coordinate system relative to the absolute coordinate system, which is output by the 3D mapping software;
[0075] Q represents the three-dimensional coordinates of the origin of the local coordinate system in the absolute coordinate system;
[0076] W1 represents the X-axis coordinate component of the point at the upper left corner of the minimum circumscribed rectangle of the object to be measured in the local coordinate system;
[0077] W2 represents the Y-axis coordinate component of the point at the lower right corner of the minimum circumscribed rectangle of the object to be measured in the local coordinate system;
[0078] s represents the scaling factor of the object to be measured in the plan view relative to the object to be measured in the original stereo view;
[0079] d represents the perspective distance of the plane view relative to the stereogram, which is a constant parameter in the 3D mapping software;
[0080] According to the coordinates (X, Y, Z) of the feature point in the absolute coordinate system, combined with the mapping matrix M, the two-dimensional coordinates (u, v) of the feature point on the plane view I are obtained and displayed on the plane view I:
[0081]
[0082] In this embodiment, the whole workpiece is a painted automobile body; the characteristic points are defect points on the top cover, rear cover, left side panel, left front door, and left rear door;
[0083] During implementation, the surface point cloud of each object to be tested is first collected through a 3D visual sensor (3D scanner), the point cloud is stored in an absolute coordinate system, and the defect position is obtained by combining point cloud processing and then displayed on the digital model. Figure 1 The dot position marked in the middle, the specific defects are bulges, dust and foreign matter generated during the painting process, etc.
[0084] Knowing the coordinates of each defect position on the digital model (the coordinates of the feature point in the absolute coordinate system (X, Y, Z)), combined with the mapping matrix M, the two-dimensional coordinates of the defect point on the plane view I can be obtained and marked on the plane view I accordingly; the plane view I can be: Figure 2 Butterfly diagram (top view, left view, right view and back view) as shown or Figure 3 The plane view corresponding to the object to be tested is shown; wherein Figure 3 The plane view I is captured after the digital model is manually rotated and scaled to display the object under test at a convenient screen position. Figures 1 to 3 Display it to the operator and mark the coordinates of the defect points in the view to facilitate the operator to observe and handle the defect points.
[0085] As another embodiment of the present invention, the characteristic point may also be a rearview mirror mounting hole on the left front door;
[0086] like Figure 4 As shown in the figure, the coordinates of the rearview mirror mounting hole on the digital model (the coordinates of the characteristic hole in the absolute coordinate system (X, Y, Z)) are known, and combined with the mapping matrix M, the two-dimensional coordinates of the rearview mirror mounting hole on the plane view I can be obtained, and the corresponding coordinates are marked as shown in Figure 5 Left view as shown or Figure 6 The artificially cut-out plan view I of the left front door is shown.
[0087] When using, Figures 4-5 Display it to the operator and mark the installation hole coordinates in the view to facilitate the operator to detect and evaluate the accuracy of the installation position and improve work efficiency.
[0088] The foregoing description of the specific exemplary embodiments of the present invention is presented for the purpose of illustration and description. The foregoing description is not intended to be exhaustive, nor is it intended to limit the present invention to the precise form disclosed, and it is apparent that many changes and variations are possible in light of the above teachings. The exemplary embodiments are selected and described to explain the specific principles of the present invention and its practical application, so that other technicians in the field can realize and utilize the various exemplary embodiments of the present invention and its different selected forms and modified forms. The scope of the present invention is intended to be limited by the appended claims and their equivalents.
Claims
1. A method for mapping a stereogram to a plane view, wherein the plane view is: any one of the six views corresponding to the stereogram or a plane view artificially intercepted after the stereogram is rotated or scaled; The three-dimensional coordinate system constructed in the plane view is recorded as the local coordinate system; the object in the plane view is recorded as the object to be measured; the spatial coordinate system where the stereogram is located is recorded as the absolute coordinate system, which is pre-set in the three-dimensional mapping software; It is characterized in that The mapping matrix M is constructed in the following way: Wherein, R represents the rotation transformation matrix of the local coordinate system relative to the absolute coordinate system, which is output by the three-dimensional mapping software; Q represents the three-dimensional coordinates of the origin of the local coordinate system in the absolute coordinate system; W1 represents the X-axis coordinate component of the point at the upper left corner of the minimum circumscribed rectangle of the object to be measured in the local coordinate system; W2 represents the Y-axis coordinate component of the point at the lower right corner of the minimum circumscribed rectangle of the object to be measured in the local coordinate system; s represents the scaling factor of the object to be measured in the plan view relative to the object to be measured in the original stereo view; d represents the perspective distance of the plane view relative to the stereogram, which is a constant parameter in the 3D mapping software; Through the mapping matrix M, the coordinates of the two-dimensional point (u, v) corresponding to the three-dimensional point (X, Y, Z) on the plane view are established, and the three-dimensional point is displayed on the plane view:
2. The method for mapping a stereogram to a plan view as claimed in claim 1, It is characterized in that The origin of the local coordinate system is set at the geometric center of the object to be measured, and the local coordinate system is established with the plane view as the xOy plane and the z axis perpendicular to the screen and outward.
3. The method for mapping a stereogram to a plan view as claimed in claim 1, It is characterized in that The perspective distance d is obtained as follows: Import regular solid geometric figures into the 3D drawing software, use them to generate plane views, and read the perspective distance d from the 3D drawing software.
4. A method for matching feature points using the mapping method of a stereogram and a plan view as claimed in any one of claims 1 to 3, wherein the feature points include: Holes, edge points, plane pit points / convex points and defect points on the object to be tested; The invention is characterized by comprising: 1) Pre-set the spatial coordinate system in the 3D drawing software and record it as the absolute coordinate system; import the 3D digital model of the whole workpiece into the 3D drawing software; The following method is used to obtain the plane view I where the object to be measured is located, and the three-dimensional coordinate system constructed in the plane view I is recorded as the local coordinate system: According to the position of the object to be tested in the three-dimensional digital model, determine the name of the view corresponding to the six-surface view, and record the view as plane view I; or rotate and scale the three-dimensional digital model, display the object to be tested at a screen position that is easy to view, intercept the object to be tested, and record the intercepted plane as plane view I; 2) Construct the mapping matrix M using the following method: Wherein, R represents the rotation transformation matrix of the local coordinate system relative to the absolute coordinate system, which is output by the three-dimensional mapping software; Q represents the three-dimensional coordinates of the origin of the local coordinate system in the absolute coordinate system; W1 represents the X-axis coordinate component of the point at the upper left corner of the minimum circumscribed rectangle of the object to be measured in the local coordinate system; W2 represents the Y-axis coordinate component of the point at the lower right corner of the minimum circumscribed rectangle of the object to be measured in the local coordinate system; s represents the scaling factor of the object to be measured in the plan view relative to the object to be measured in the original stereo view; d represents the perspective distance of the plane view relative to the stereogram, which is a constant parameter in the 3D mapping software; According to the coordinates (X, Y, Z) of the feature point in the absolute coordinate system, combined with the mapping matrix M, the two-dimensional coordinates (u, v) of the feature point on the plane view I are obtained and displayed on the plane view I:
5. The method according to claim 4, Features: The integral workpiece is a car body, and the object to be tested is one or more of a front cover, a top cover, a rear cover, a left side panel, a left front door, a left rear door, a right side panel, a right front door, a right rear door, and a rear cover.
6. The method according to claim 4, Features: According to the position of the feature point in the workpiece, the component to which the feature point belongs is determined, and the component is recorded as the object to be measured; When the object to be tested is a front cover, a top cover or a rear cover of a car, the plane view I is a top view; When the object to be measured is the left side wall, left front door, or left rear door of a car, the plane view I is a left view; When the object to be measured is the right side wall, right front door, or right rear door of a car, the plane view I is a right view; When the object to be tested is a rear cover of a car, the plane view I is a rear view.
7. The method according to claim 4, Features: When the feature point is a defect point on the object to be measured, it is obtained by collecting a point cloud through a three-dimensional visual sensor, and the point cloud is stored in the absolute coordinate system, and then displayed on the digital model, combined with the mapping matrix M, to obtain the two-dimensional coordinates of the defect point on the plane view I.
