Distance measuring system and distance measuring method
Patent Information
- Application Number
- CN202210873311.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-22
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2042-07-22
AI Technical Summary
但是,拟合出的基准平面会随提取出的三个不同点的位置变化而变化,因此,这种拟合方法不能拟合出该不平整表面的真实的基准平面,拟合出的基准平面误差非常大,甚至完全不对
[0040]其中,x1,y1,z1是所述样品上的所述一点的三维坐标。
Smart Images

Figure CN117470113B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a distance measurement system and a distance measurement method. Background Technology
[0002] In existing technologies, it is sometimes necessary to measure the distance from a point on a product to a surface of the product. If this surface is uneven, i.e., bumpy, it is necessary to first use software to fit a reference plane to the uneven surface. In existing technologies, fitting software typically first extracts three distinct points on the uneven surface and then fits a reference plane based on these three points. However, the fitted reference plane changes with the positions of the three extracted distinct points. Therefore, this fitting method cannot fit a true reference plane for the uneven surface; the fitted reference plane has a very large error, or is even completely incorrect. This leads to the final calculated distance from a point on the product to the uneven surface being incorrect. Summary of the Invention
[0003] The purpose of this invention is to solve at least one aspect of the aforementioned problems and defects existing in the prior art.
[0004] According to one aspect of the present invention, a distance measurement system is provided for measuring a distance H from a point on a sample to a reference plane of an uneven surface of the sample. The distance measurement system includes: a gauge having a first flat surface and a second flat surface that are opposite and parallel to each other in their thickness direction; a 3D camera for capturing three-dimensional images of the sample and the gauge; and a computer for calculating the distance H based on the three-dimensional images captured by the 3D camera. When measuring the distance H, the gauge is placed on the uneven surface of the sample, and the first flat surface of the gauge is in contact with the uneven surface of the sample, such that the plane containing the first flat surface is the reference plane; the computer, when calculating the distance H, replaces the reference plane with the plane containing the first flat surface.
[0005] According to an exemplary embodiment of the present invention, when measuring the distance H, the 3D camera is positioned facing the second flat surface of the gauge to capture a three-dimensional image of the second flat surface of the gauge; the computer calculates the distance H according to the following formula:
[0006] H = H B -H G
[0007] in,
[0008] H B The distance from a point on the sample to the second flat surface of the gauge.
[0009] H G The thickness of the gauge.
[0010] According to another exemplary embodiment of the present invention, the computer acquires three-dimensional point cloud data of the sample and the gauge based on the three-dimensional images captured by the 3D camera;
[0011] The computer calculates the plane equation of the plane containing the second flat surface based on the three-dimensional point cloud data:
[0012] a*x+b*y+c*z+d=0
[0013] Where a, b, c and d are constants that can be calculated from the three-dimensional point cloud data of the second flat surface;
[0014] The computer obtains the coordinate system P(x1, y1, z1) of the point on the sample based on the three-dimensional point cloud data;
[0015] The computer calculates the distance H according to the following formula. B :
[0016]
[0017] Where x1, y1, and z1 are the three-dimensional coordinates of the point on the sample.
[0018] According to another exemplary embodiment of the present invention, the computer is communicatively connected to the 3D camera to receive three-dimensional images captured by the 3D camera.
[0019] According to another exemplary embodiment of the present invention, the distance measurement system further includes: a display, communicatively connected to the computer, for displaying in real time the calculation results of the computer and the three-dimensional images captured by the 3D camera.
[0020] According to another exemplary embodiment of the present invention, when the 3D camera captures a three-dimensional image, the sample and the gauge are located directly below the 3D camera.
[0021] According to another aspect of the present invention, a distance measurement method is provided for measuring the distance H from a point on a sample to a reference plane of an uneven surface of the sample. The distance measurement method includes the following steps:
[0022] S100: Provides the aforementioned distance measurement system;
[0023] S200: The gauge is placed on the uneven surface of the sample and the first flat surface of the gauge is in contact with the uneven surface of the sample, such that the plane where the first flat surface is located is the reference plane.
[0024] S300: Set the 3D camera above the second flat surface of the gauge and use the 3D camera to capture a three-dimensional image of the sample and the gauge;
[0025] S400: The computer calculates the distance H based on the captured three-dimensional image.
[0026] According to an exemplary embodiment of the present invention, in step S400, the reference plane is replaced by the plane containing the first flat surface.
[0027] According to another exemplary embodiment of the present invention, step S400 includes:
[0028] S410: Calculate the distance H from the point on the sample to the second flat surface of the gauge. B ;
[0029] S420: Calculate the distance H according to the following formula:
[0030] H = H B -H G
[0031] Among them, H G The thickness of the gauge.
[0032] According to another exemplary embodiment of the present invention, step S410 includes:
[0033] S411: Obtain three-dimensional point cloud data of the sample and the gauge based on the three-dimensional images captured by the 3D camera;
[0034] S412: Calculate the plane equation of the plane containing the second flat surface based on the three-dimensional point cloud data:
[0035] a*x+b*y+c*z+d=0
[0036] Where a, b, c and d are constants that can be calculated from the three-dimensional point cloud data of the second flat surface;
[0037] S413: Obtain the coordinate system P(x1,y1,z1) of the point on the sample based on the three-dimensional point cloud data;
[0038] S414: Calculate the distance H according to the following formula. B :
[0039]
[0040] Where x1, y1, z1 are the three-dimensional coordinates of the point on the sample.
[0041] In the foregoing exemplary embodiments of the present invention, the distance between a point on the sample and the uneven surface of the sample can be calculated accurately and conveniently, thus improving the calculation accuracy.
[0042] Other objects and advantages of the invention will become apparent from the following description of the invention with reference to the accompanying drawings, and will help to provide a comprehensive understanding of the invention. Attached Figure Description
[0043] Figure 1 A schematic diagram of a distance measurement system according to an exemplary embodiment of the present invention is shown;
[0044] Figure 2 A three-dimensional schematic diagram of a sample according to an exemplary embodiment of the present invention is shown;
[0045] Figure 3 A schematic diagram showing the distance from a point on a sample to a reference plane of an uneven surface of the sample according to an exemplary embodiment of the present invention;
[0046] Figure 4 A perspective view of a gauge of a distance measurement system according to an exemplary embodiment of the present invention is shown;
[0047] Figure 5 A three-dimensional schematic diagram showing a distance measurement system according to an exemplary embodiment of the present invention with a gauge placed on a sample;
[0048] Figure 6 A schematic diagram showing the distance from a point on a sample to the second flat surface of a gauge according to an exemplary embodiment of the present invention. Detailed Implementation
[0049] The technical solution of the present invention will be further described in detail below through embodiments and in conjunction with the accompanying drawings. In this specification, the same or similar reference numerals indicate the same or similar components. The following description of the embodiments of the present invention with reference to the accompanying drawings is intended to explain the overall inventive concept of the present invention and should not be construed as a limitation thereof.
[0050] Furthermore, in the following detailed description, numerous specific details are set forth for ease of explanation to provide a thorough understanding of the embodiments disclosed herein. However, it will be apparent that one or more embodiments may be practiced without these specific details. In other instances, well-known structures and apparatuses are illustrated to simplify the figures.
[0051] According to a general technical concept of the present invention, a distance measurement system is provided for measuring the distance H from a point on a sample to a reference plane of an uneven surface of the sample. The distance measurement system includes: a gauge having a first flat surface and a second flat surface that are opposite and parallel to each other in their thickness direction; a 3D camera for capturing three-dimensional images of the sample and the gauge; and a computer for calculating the distance H based on the three-dimensional images captured by the 3D camera. When measuring the distance H, the gauge is placed on the uneven surface of the sample, and the first flat surface of the gauge is in contact with the uneven surface of the sample, such that the plane containing the first flat surface is the reference plane; the computer, when calculating the distance H, uses the plane containing the first flat surface instead of the reference plane.
[0052] According to another general technical concept of the present invention, a distance measurement method is provided for measuring the distance H from a point on a sample to a reference plane of an uneven surface of the sample. The distance measurement method includes the following steps: the aforementioned distance measurement system; placing the gauge on the uneven surface of the sample with a first flat surface of the gauge in contact with the uneven surface of the sample, such that the plane containing the first flat surface is the reference plane; setting the 3D camera above a second flat surface of the gauge and capturing a three-dimensional image of the sample and the gauge using the 3D camera; and the computer calculating the distance H based on the captured three-dimensional image.
[0053] Figure 1 A schematic diagram of a distance measurement system according to an exemplary embodiment of the present invention is shown; Figure 2 A perspective view of a sample 10 according to an exemplary embodiment of the present invention is shown; Figure 3 A schematic diagram showing the distance from a point P on a sample 10 according to an exemplary embodiment of the present invention to a reference plane A of an uneven surface 10a of the sample 10.
[0054] like Figures 1 to 3As shown, in an exemplary embodiment of the present invention, a distance measurement system is disclosed for measuring the distance H from a point P on a sample 10 to a reference plane A on an uneven surface 10a of the sample 10. The distance measurement system includes a gauge 20, a 3D camera 1, and a computer 2. The gauge 20 has a first flat surface 20a and a second flat surface 20b that are opposite to and parallel to each other in their thickness direction. The 3D camera 1 is used to capture three-dimensional images of the sample 10 and the gauge 20. The computer 2 calculates the distance H based on the three-dimensional images captured by the 3D camera 1.
[0055] Figure 4 A perspective view of a gauge 20 of a distance measurement system according to an exemplary embodiment of the present invention is shown; Figure 5 A perspective view showing a distance measurement system according to an exemplary embodiment of the present invention with a gauge 20 placed on a sample 10; Figure 6 A schematic diagram showing the distance from a point P on a sample 10 to the second flat surface 20b of a gauge 20 according to an exemplary embodiment of the present invention.
[0056] like Figures 1 to 6 As shown in the illustrated embodiment, when measuring distance H, gauge 20 is placed on the uneven surface 10a of sample 10, and the first flat surface 20a of gauge 20 is in contact with the uneven surface 10a of sample 10, such that the plane containing the first flat surface 20a is the reference plane A. When calculating distance H, computer 2 uses the plane containing the first flat surface 20a instead of the reference plane A. Figure 5 As shown, the three highest points P1, P2, and P3 on the uneven surface 10a of sample 10 are in contact with the first flat surface 20a of gauge 20. According to the principle of three points determining the plane, the plane on which the first flat surface 20a is located is the reference plane A of the uneven surface 10a of sample 10.
[0057] like Figures 1 to 6 As shown in the illustrated embodiment, when measuring distance H, the 3D camera 1 is positioned to face the second flat surface 20b of the gauge 20 to capture a three-dimensional image of the second flat surface 20b of the gauge 20.
[0058] Computer 2 calculates the distance H according to the following formula:
[0059] H = H B -H G
[0060] in,
[0061] H B Let P be the distance from a point P on sample 10 to the second flat surface 20b of gauge 20.
[0062] H G The thickness is 20 mm.
[0063] like Figures 1 to 6 As shown in the illustrated embodiment, computer 2 acquires three-dimensional point cloud data of sample 10 and gauge 20 based on three-dimensional images captured by 3D camera 1. Computer 2 then calculates the plane equation of the plane containing the second flat surface 20b based on the three-dimensional point cloud data:
[0064] a*x+b*y+c*z+d=0
[0065] Among them, a, b, c and d are constants that can be calculated from the three-dimensional point cloud data of the second flat surface 20b.
[0066] like Figures 1 to 6 As shown in the illustrated embodiment, computer 2 obtains the coordinate system P(x1,y1,z1) of a point P on sample 10 based on three-dimensional point cloud data.
[0067] like Figures 1 to 6 As shown in the illustrated embodiment, computer 2 calculates the distance H according to the following formula. B :
[0068]
[0069] Where x1, y1, z1 are the three-dimensional coordinates of a point P on sample 10.
[0070] like Figures 1 to 6 As shown, in the illustrated embodiment, computer 2 is communicatively connected to 3D camera 1 to receive three-dimensional images captured by 3D camera 1.
[0071] like Figures 1 to 6 As shown in the illustrated embodiment, the distance measurement system also includes a display 3. The display 3 is communicatively connected to the computer 2 and is used to display the calculation results of the computer 2 and the three-dimensional images captured by the 3D camera 1 in real time.
[0072] like Figures 1 to 6 As shown in the illustrated embodiment, when the 3D camera 1 captures a three-dimensional image, the sample 10 and the gauge 20 are located directly below the 3D camera 1.
[0073] like Figures 1 to 6 As shown, in another exemplary embodiment of the present invention, a distance measurement method is also disclosed for measuring the distance H from a point P on a sample 10 to a reference plane A on the uneven surface 10a of the sample 10. This distance measurement method includes the following steps:
[0074] S100: Provides the aforementioned distance measurement system;
[0075] S200: Place the gauge 20 on the uneven surface 10a of the sample 10 and make the first flat surface 20a of the gauge 20 in contact with the uneven surface 10a of the sample 10, so that the plane where the first flat surface 20a is located is the reference plane A.
[0076] S300: Set the 3D camera 1 above the second flat surface 20b of the gauge 20 and use the 3D camera 1 to capture a three-dimensional image of the sample 10 and the gauge 20;
[0077] S400: Computer 2 calculates the distance H based on the captured 3D image.
[0078] like Figures 1 to 6 As shown in the illustrated embodiment, in step S400, the reference plane A is replaced by the plane containing the first flat surface 20a.
[0079] like Figures 1 to 6 As shown, in the illustrated embodiment, step S400 includes:
[0080] S410: Calculate the distance H from a point P on sample 10 to the second flat surface 20b of gauge 20. B ;
[0081] S420: Calculate distance H using the following formula:
[0082] H = H B -H G
[0083] Among them, H G The thickness is 20 mm.
[0084] like Figures 1 to 6 As shown, in the illustrated embodiment, step S410 includes:
[0085] S411: Obtain the three-dimensional point cloud data of sample 10 and gauge 20 based on the three-dimensional images captured by 3D camera 1;
[0086] S412: Calculate the plane equation of the plane containing the second flat surface 20b based on the 3D point cloud data:
[0087] a*x+b*y+c*z+d=0
[0088] Where a, b, c and d are constants that can be calculated from the three-dimensional point cloud data of the second flat surface 20b;
[0089] S413: Obtain the coordinate system P(x1, y1, z1) of a point P on sample 10 based on the three-dimensional point cloud data;
[0090] S414: Calculate distance H using the following formula.B :
[0091]
[0092] Where x1, y1, and z1 are the three-dimensional coordinates of a point P on sample 10.
[0093] like Figures 1 to 6 As shown in the illustrated embodiment, computer 2 is the core of the vision inspection system. It carries vision software and is connected to 3D camera 1. Display 3 shows the inspection results and real-time images. Sample 10 and gauge 20 are mounted together and placed under 3D camera 1. After the machine is started, the speed is set according to sample 10. Computer 2 sends a trigger signal to 3D camera 1. 3D camera 1 acquires 3D images and 3D point cloud data.
[0094] To verify the method, tests were conducted on sample 10 with a non-uniform plane. The detection accuracy reached 7 μm, and the results showed good correlation with those obtained from a coordinate measuring machine. The detection accuracy of this invention is significantly improved. If a higher-precision motion module is selected, the detection accuracy will be lower than 5 μm or even lower. This invention significantly improves detection accuracy. It has been verified that this method is suitable for all high-precision detection of surfaces with complex shapes.
[0095] Those skilled in the art will understand that the embodiments described above are exemplary and can be improved upon. The structures described in the various embodiments can be freely combined without causing structural or principle conflicts, and these changes should fall within the protection scope of this invention.
[0096] Although the invention has been described in conjunction with the accompanying drawings, the embodiments disclosed in the drawings are intended to illustrate preferred embodiments of the invention and should not be construed as limiting the invention.
[0097] While some embodiments of the general concept of the invention have been shown and described, those skilled in the art will understand that changes may be made to these embodiments without departing from the principles and spirit of the general concept of the invention, the scope of which is defined by the claims and their equivalents.
[0098] It should be noted that the word "comprising" does not exclude other elements or steps, and the words "a" or "an" do not exclude multiple elements. Furthermore, any reference numerals in the claims should not be construed as limiting the scope of the invention.
Claims
1. A distance measurement system for measuring the distance H from a point (P) on a sample (10) to a reference plane (A) on an uneven surface (10a) of the sample (10), characterized in that, The distance measurement system includes: The gauge (20) has a first flat surface (20a) and a second flat surface (20b) that are opposite to and parallel to each other in the thickness direction; A 3D camera (1) is used to capture three-dimensional images of the sample (10) and the gauge (20); and The computer (2) calculates the distance H based on the three-dimensional image captured by the 3D camera (1). When measuring the distance H, the gauge (20) is placed on the uneven surface (10a) of the sample (10) and the first flat surface (20a) of the gauge (20) is in contact with the uneven surface (10a) of the sample (10), such that the plane containing the first flat surface (20a) is the reference plane (A). When calculating the distance H, the computer (2) replaces the reference plane (A) with the plane where the first flat surface (20a) is located.
2. The distance measurement system according to claim 1, characterized in that: When measuring the distance H, the 3D camera (1) is set to face the second flat surface (20b) of the gauge (20) to capture a three-dimensional image of the second flat surface (20b) of the gauge (20); The computer (2) calculates the distance H according to the following formula: H=H B -H G in, H B The distance from a point (P) on the sample (10) to the second flat surface (20b) of the gauge (20) is given. H G The thickness of the gauge (20).
3. The distance measurement system according to claim 2, characterized in that: The computer (2) acquires the three-dimensional point cloud data of the sample (10) and the gauge (20) based on the three-dimensional image captured by the 3D camera (1); The computer (2) calculates the plane equation of the plane containing the second flat surface (20b) based on the three-dimensional point cloud data: a*x+b*y+c*z+d=0 Where a, b, c and d are constants that can be calculated from the three-dimensional point cloud data of the second flat surface (20b); The computer (2) obtains the coordinate system P(x1,y1,z1) of the point (P) on the sample (10) based on the three-dimensional point cloud data; The computer (2) calculates the distance H according to the following formula. B : Where x1, y1, z1 are the three-dimensional coordinates of the point (P) on the sample (10).
4. The distance measurement system according to claim 1, characterized in that: The computer (2) is communicatively connected to the 3D camera (1) to receive three-dimensional images captured by the 3D camera (1).
5. The distance measurement system according to claim 1, characterized in that, Also includes: The display (3) is communicatively connected to the computer (2) and is used to display the calculation results of the computer (2) and the three-dimensional images captured by the 3D camera (1) in real time.
6. The distance measurement system according to claim 1, characterized in that: When the 3D camera (1) captures a three-dimensional image, the sample (10) and the gauge (20) are located directly below the 3D camera (1).
7. A distance measurement method for measuring the distance H from a point (P) on a sample (10) to a reference plane (A) of an uneven surface (10a) of the sample (10), the distance measurement method comprising the following steps: S100: Provide the distance measurement system according to claim 1; S200: The gauge (20) is placed on the uneven surface (10a) of the sample (10) and the first flat surface (20a) of the gauge (20) is in contact with the uneven surface (10a) of the sample (10), so that the plane where the first flat surface (20a) is located is the reference plane (A). S300: The 3D camera (1) is positioned above the second flat surface (20b) of the gauge (20) and the 3D camera (1) is used to capture three-dimensional images of the sample (10) and the gauge (20); S400: The computer (2) calculates the distance H based on the captured three-dimensional image.
8. The distance measurement method according to claim 7, characterized in that: In step S400, the reference plane (A) is replaced by the plane containing the first flat surface (20a).
9. The distance measurement method according to claim 7, characterized in that: Step S400 includes: S410: Calculate the distance H from the point (P) on the sample (10) to the second flat surface (20b) of the gauge (20). B ; S420: Calculate the distance H according to the following formula: H=H B -H G Among them, H G The thickness of the gauge (20).
10. The distance measurement method according to claim 9, characterized in that: Step S410 includes: S411: Obtain the three-dimensional point cloud data of the sample (10) and the gauge (20) based on the three-dimensional image captured by the 3D camera (1); S412: Calculate the plane equation of the plane containing the second flat surface (20b) based on the three-dimensional point cloud data: a*x+b*y+c*z+d=0 Where a, b, c and d are constants that can be calculated from the three-dimensional point cloud data of the second flat surface (20b); S413: Obtain the coordinate system P(x1,y1,z1) of the point (P) on the sample (10) based on the three-dimensional point cloud data; S414: Calculate the distance H according to the following formula. B : Where x1, y1, z1 are the three-dimensional coordinates of the point (P) on the sample (10).
Citation Information
Patent Citations
Spot facing quality detecting method based on linear laser three-dimensional scanning
CN109506580A
Length measurement apparatus and length measurement method
JP2016050857A