A gap surface difference calculation method and device based on line structured light
By using line structured light laser sensors and data processing technology, the problem of low accuracy in calculating gap and surface difference in automotive inspection has been solved, achieving high-precision non-destructive measurement and improving enterprise production efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HENAN ALSONTECH INTELLIGENT TECH CO LTD
- Filing Date
- 2022-07-21
- Publication Date
- 2026-06-02
AI Technical Summary
Existing automotive inspection methods are traditional and their accuracy is easily affected by the subjective bias of the measuring personnel, resulting in low accuracy in calculating gap and surface difference.
A gap and surface difference calculation method and device based on line structured light is adopted. By using components such as line structured light laser sensors, industrial cameras and filters, the three-dimensional data of the object under test is obtained through visual calibration and data processing, and the gap and surface difference are calculated, avoiding contact between the tool and the object under test.
It improves the accuracy and efficiency of gap difference calculation, reduces damage to the tested object, and enhances the competitiveness of enterprises.
Smart Images

Figure CN115289963B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automotive technology, and in particular to a method and apparatus for calculating gap surface difference based on line structured light. Background Technology
[0002] In industrial processing, gaps and surface differences are common phenomena. The accuracy of their processing dimensions is related to the sealing performance, aesthetics, and performance of the workpiece, and is an important indicator in quality control. In the automobile production process, gaps and surface differences are one of the important factors that determine the appearance of the vehicle, and also directly affect the vehicle's waterproof and leak-proof performance and noise reduction performance. Therefore, the measurement of gaps and surface differences is also one of the inspection steps when the car leaves the factory.
[0003] However, current automotive technologies still suffer from traditional testing methods, and their accuracy is easily affected by the subjective influence of the measuring personnel, resulting in problems such as unreliable measurement accuracy and low precision in gap difference calculation. Therefore, we propose a gap difference calculation method and device based on line structured light to solve the above problems. Summary of the Invention
[0004] The purpose of this invention is to address the problems of existing automotive technologies still relying on traditional testing methods, whose accuracy is easily affected by the subjective influence of the measuring personnel, resulting in unreliable measurement accuracy and low precision in gap difference calculation. Therefore, this invention proposes a gap difference calculation method and device based on line structured light.
[0005] To achieve the above objectives, the present invention adopts the following technical solution:
[0006] A method for calculating gap surface difference based on line structured light includes the following steps:
[0007] S1: Device Design: Design a measuring device;
[0008] S2: Perform measurement: Perform gap surface difference measurement;
[0009] S3: Surface gap calculation: Perform surface gap calculation to obtain the surface gap value;
[0010] S4: Face Value Calculation: Perform face value calculation;
[0011] Preferably, in step S1, a measuring device is designed, wherein the device includes a line structured light laser sensor, an industrial camera, an industrial lens, a circuit board and a mounting bracket, and a three-dimensional device sensor is obtained by assembling a line structured laser that emits a single line and a black and white camera with a U port. The lens is equipped with a filter and a polarizer to filter ambient light and part of the reflected light from the workpiece surface.
[0012] Preferably, in step S2, gap surface difference measurement is performed, wherein the three-dimensional data of the object under test is first obtained by the gap surface difference measurement method. The gap surface difference measurement method is to calibrate the device by a visual calibration plate and to obtain the intrinsic and extrinsic parameters of the camera by taking pictures of the visual calibration plate in different postures. The three-dimensional coordinates of the object under test in the coordinate system of the device are obtained by the obtained intrinsic and extrinsic parameters of the camera.
[0013] Preferably, in step S3, the surface gap is calculated. Before the surface gap calculation, the device position is adjusted so that the laser line is perpendicular to the gap between the surfaces. Three-dimensional data is acquired by triggering the sensor. The surface gap is calculated based on the acquired data. When calculating the surface gap, the two-dimensional image of the laser line acquired by the camera is first subjected to Gaussian filtering and bilateral filtering to remove the influence of interference points. The laser line is then extracted using the Steger method (light stripe centerline extraction). The coordinates of the extracted laser line are converted to three-dimensional coordinates using a calibrated camera file. The acquired three-dimensional data is then subjected to region segmentation and distance segmentation to further filter out interference data and regions. After dividing the surface into two parts, a reference surface is determined. When determining the reference surface, the point cloud corresponding to the reference surface is selected as the reference data, and the minimum bounding rectangle of the reference data is drawn. The left point cloud is selected as the reference data, and the dashed line represents the reference data. Referring to 3D point data, with ABCD as the smallest bounding box and L as the face perpendicular to AB, the AB feature line is determined. The coordinates of the vertices are obtained by fitting the smallest bounding box of the left point cloud using point cloud processing. The centroids of the four vertices are calculated, and the points are divided into left and right parts based on their relationship to the centroids. Then, points A, D, B, and C are determined according to the Z-direction of the left and right data to obtain the AB feature line. L is the perpendicular bisector of AB, with intersection point E. The data of segment EF in the left point cloud is selected as the feature region. For the right point cloud data, the centroid of the right point cloud is calculated. Data with coordinates to the left of the centroid are used as the set of feature data for the right point cloud. The surface gap value is obtained through calculation. During the calculation, the distance from each point in the EF feature region to line L is first calculated, and the maximum distance from L in the feature region, Gap, is taken. max At the same time, the same method is used to find the minimum distance Gap from the points in the right-hand feature region to L. min The interfacial gap value is obtained by recalculating the calculated value, where the interfacial gap value is calculated using the formula GapVal = |Gap max -Gap min |;
[0014] Preferably, in step S4, the surface difference is calculated. Before performing the surface difference calculation, the direction of the normal to line AB is defined, and the direction of the normal vector is specified in the appendix to the specification. Figure 6The direction indicated by n is used, and the maximum value from the right-side point cloud to the AB plane is calculated as the feature point. Several points around the feature point are selected as measurement points, and the surface difference is obtained by averaging the results of multiple calculations. The calculation formula is as follows: Where n is the normalized normal vector of plane AB;
[0015] A gap / surface difference calculation device based on line structured light includes a design module, a measurement module, an acquisition module, a calculation module, an extraction module, a conversion module, and a determination module. The design module is connected to the measurement module, the measurement module is connected to the acquisition module, the acquisition module is connected to the calculation module, the calculation module is connected to both the extraction module and the determination module, the extraction module is connected to the conversion module, and the conversion module is connected to the determination module. The design module designs a measurement device for measuring gap / surface difference. The acquisition module acquires three-dimensional data of the object being measured. The calculation module calculates the surface gap, the surface gap value, and the surface difference. The extraction module extracts laser lines. The conversion module converts the coordinates of the extracted laser lines into three-dimensional coordinates. The determination module determines a reference surface and the AB feature line.
[0016] Compared with the prior art, the beneficial effects of the present invention are:
[0017] 1. By acquiring the three-dimensional data of the object under test through a line structure and processing the data to calculate the gap surface difference of the object under test, the accuracy of gap surface difference calculation is improved. Moreover, the method can be used for a variety of different surface types, thereby improving the production efficiency of enterprises and increasing their competitiveness.
[0018] 2. By providing a device that prevents the measuring tool from contacting the object being measured, damage to the object is avoided and the measurement accuracy is improved.
[0019] The purpose of this invention is to acquire three-dimensional data of the object under test through a line structure, and to process and calculate the gap surface difference of the object under test, thereby improving the accuracy of gap surface difference calculation. Moreover, the method can be used for a variety of different surface types, which improves the production efficiency of enterprises and increases their competitiveness. At the same time, by providing a device, the measuring tool does not come into contact with the object under test, avoiding damage to the object under test and improving the measurement accuracy. Attached Figure Description
[0020] Figure 1 This is a flowchart of a gap surface difference calculation method based on line structured light proposed in this invention;
[0021] Figure 2 This is a structural diagram of a gap surface difference calculation device based on line structured light proposed in this invention;
[0022] Figure 3This is a device design diagram of a gap surface difference calculation method and apparatus based on line structured light proposed in this invention;
[0023] Figure 4 This invention presents a method and apparatus for calculating gap surface difference based on line structured light, showing the position diagram of the sensor and the object being measured during measurement.
[0024] Figure 5 This is a visual calibration board diagram of a gap surface difference calculation method and device based on line structured light proposed in this invention;
[0025] Figure 6 This is a schematic diagram illustrating the principle of surface gap calculation for a method and device for calculating surface gap based on line structured light proposed in this invention. Detailed Implementation
[0026] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0027] Example 1
[0028] Reference Figure 1-6 A method for calculating gap surface difference based on line structured light includes the following steps:
[0029] S1: Device Design: Design a measuring device, wherein the device includes a line structured light laser sensor, an industrial camera, an industrial lens, a circuit board and a mounting bracket, and assembles a single-line emitting line structured laser and a U-port black and white camera to obtain a three-dimensional device sensor, and the lens is equipped with a filter and a polarizer to filter ambient light and part of the reflected light from the workpiece surface.
[0030] S2: Perform measurement: Perform gap surface difference measurement, wherein the three-dimensional data of the object under test is first obtained by the gap surface difference measurement method. The gap surface difference measurement method is to calibrate the device by a visual calibration plate and to obtain the intrinsic and extrinsic parameters of the camera by taking pictures of the visual calibration plate in different postures. The three-dimensional coordinates of the object under test in the coordinate system of the device are obtained by the obtained intrinsic and extrinsic parameters of the camera.
[0031] S3: Surface Gap Calculation: Surface gap calculation is performed. Before calculation, the device position is adjusted so that the laser line is perpendicular to the gap. Three-dimensional data is acquired by triggering the sensor. The surface gap is calculated based on this data. The calculation involves first applying Gaussian and bilateral filtering to the 2D image of the laser line acquired by the camera to remove interference points. The laser line is then extracted using the Steger method (light stripe centerline extraction). The coordinates of the extracted laser line are converted to 3D coordinates using a calibrated camera file. The acquired 3D data is then segmented by region and distance to further filter out interference data and regions. After dividing the surface into two parts, a reference surface is determined. The point cloud corresponding to the reference surface is selected as the reference data, and the minimum bounding rectangle of the reference data is drawn. The left point cloud is selected as the reference data, and the dashed line represents the reference point. Considering 3D point data, where ABCD is the minimum bounding box, and L is the plane perpendicular to AB, the AB feature line is determined. The coordinates of the vertices are obtained by fitting the minimum bounding box of the left point cloud using point cloud processing. The centroids of the four vertices are calculated, and the points are divided into left and right parts based on their relationship to the centroids. Then, points A, D, B, and C are determined according to the Z-direction of the left and right data to obtain the AB feature line. L is the perpendicular bisector of AB, with intersection point E. The data of segment EF in the left point cloud is selected as the feature region. For the right point cloud data, the centroid of the right point cloud is calculated. Data with coordinates to the left of the centroid are used as the set of feature data for the right point cloud. The surface gap value is obtained through calculation. During the calculation, the distance from each point in the EF feature region to line L is first calculated, and the maximum distance from L in the feature region, Gap, is taken. max At the same time, the same method is used to find the minimum distance Gap from the points in the right-hand feature region to L. min The interfacial gap value is obtained by recalculating the calculated value, where the interfacial gap value is calculated using the formula GapVal = |Gap max -Gap min |;
[0032] S4: Surface Difference Calculation: Perform surface difference calculation. Before performing the surface difference calculation, first define the direction of the normal vector of line AB. The direction of the normal vector is specified in the appendix of the instruction manual. Figure 6 The direction indicated by n is used, and the maximum value from the right-side point cloud to the AB plane is calculated as the feature point. Several points around the feature point are selected as measurement points, and the surface difference is obtained by averaging the results of multiple calculations. The calculation formula is as follows: Where n is the normalized normal vector of plane AB;
[0033] A gap / surface difference calculation device based on line structured light includes a design module, a measurement module, an acquisition module, a calculation module, an extraction module, a conversion module, and a determination module. The design module is connected to the measurement module, the measurement module is connected to the acquisition module, the acquisition module is connected to the calculation module, the calculation module is connected to both the extraction module and the determination module, the extraction module is connected to the conversion module, and the conversion module is connected to the determination module. The design module designs a measurement device for measuring gap / surface difference. The acquisition module acquires three-dimensional data of the object being measured. The calculation module calculates the surface gap, the surface gap value, and the surface difference. The extraction module extracts laser lines. The conversion module converts the coordinates of the extracted laser lines into three-dimensional coordinates. The determination module determines a reference surface and the AB feature line.
[0034] Example 2
[0035] Reference Figure 1-6 A method for calculating gap surface difference based on line structured light includes the following steps:
[0036] S1: Device Design: Design a measuring device, wherein the device includes a line structured light laser sensor, an industrial camera, an industrial lens, a circuit board, and a mounting bracket;
[0037] S2: Perform measurement: Perform gap surface difference measurement, wherein the three-dimensional data of the object under test is first obtained by the gap surface difference measurement method. The gap surface difference measurement method is to calibrate the device by a visual calibration plate and to obtain the intrinsic and extrinsic parameters of the camera by taking pictures of the visual calibration plate in different postures. The three-dimensional coordinates of the object under test in the coordinate system of the device are obtained by the obtained intrinsic and extrinsic parameters of the camera.
[0038] S3: Surface Gap Calculation: Surface gap calculation is performed. Before calculation, the device position is adjusted so that the laser line is perpendicular to the gap. Three-dimensional data is acquired by triggering the sensor. The surface gap is calculated based on this data. The calculation involves first applying Gaussian and bilateral filtering to the 2D image of the laser line acquired by the camera to remove interference points. The laser line is then extracted using the Steger method (light stripe centerline extraction). The coordinates of the extracted laser line are converted to 3D coordinates using a calibrated camera file. The acquired 3D data is then segmented by region and distance to further filter out interference data and regions. After dividing the surface into two parts, a reference surface is determined. The point cloud corresponding to the reference surface is selected as the reference data, and the minimum bounding rectangle of the reference data is drawn. The left point cloud is selected as the reference data, and the dashed line represents the reference point. Considering 3D point data, where ABCD is the minimum bounding box, and L is the plane perpendicular to AB, the AB feature line is determined. The coordinates of the vertices are obtained by fitting the minimum bounding box of the left point cloud using point cloud processing. The centroids of the four vertices are calculated, and the points are divided into left and right parts based on their relationship to the centroids. Then, points A, D, B, and C are determined according to the Z-direction of the left and right data to obtain the AB feature line. L is the perpendicular bisector of AB, with intersection point E. The data of segment EF in the left point cloud is selected as the feature region. For the right point cloud data, the centroid of the right point cloud is calculated. Data with coordinates to the left of the centroid are used as the set of feature data for the right point cloud. The surface gap value is obtained through calculation. During the calculation, the distance from each point in the EF feature region to line L is first calculated, and the maximum distance from L in the feature region, Gap, is taken. max At the same time, the same method is used to find the minimum distance Gap from the points in the right-hand feature region to L. min The interfacial gap value is obtained by recalculating the calculated value, where the interfacial gap value is calculated using the formula GapVal = |Gap max -Gap min |;
[0039] S4: Surface Difference Calculation: Perform surface difference calculation. Before performing the surface difference calculation, first define the direction of the normal vector of line AB. The direction of the normal vector is specified in the appendix of the instruction manual. Figure 6 The direction indicated by n is used, and the maximum value from the right-side point cloud to the AB plane is calculated as the feature point. Several points around the feature point are selected as measurement points, and the surface difference is obtained by averaging the results of multiple calculations. The calculation formula is as follows: Where n is the normalized normal vector of plane AB;
[0040] A gap / surface difference calculation device based on line structured light includes a design module, a measurement module, an acquisition module, a calculation module, an extraction module, a conversion module, and a determination module. The design module is connected to the measurement module, the measurement module is connected to the acquisition module, the acquisition module is connected to the calculation module, the calculation module is connected to both the extraction module and the determination module, the extraction module is connected to the conversion module, and the conversion module is connected to the determination module. The design module designs a measurement device for measuring gap / surface difference. The acquisition module acquires three-dimensional data of the object being measured. The calculation module calculates the surface gap, the surface gap value, and the surface difference. The extraction module extracts laser lines. The conversion module converts the coordinates of the extracted laser lines into three-dimensional coordinates. The determination module determines a reference surface and the AB feature line.
[0041] Example 3
[0042] Reference Figure 1-6 A method for calculating gap surface difference based on line structured light includes the following steps:
[0043] S1: Device Design: Design a measuring device, wherein the device includes a line structured light laser sensor, an industrial camera, an industrial lens, a circuit board and a mounting bracket, and assembles a single-line emitting line structured laser and a U-port black and white camera to obtain a three-dimensional device sensor, and the lens is equipped with a filter and a polarizer to filter ambient light and part of the reflected light from the workpiece surface.
[0044] S2: Perform measurement: Perform gap difference measurement to obtain the three-dimensional data of the object under test through the gap difference measurement method;
[0045] S3: Surface Gap Calculation: Surface gap calculation is performed. Before calculation, the device position is adjusted so that the laser line is perpendicular to the gap. Three-dimensional data is acquired by triggering the sensor. The surface gap is calculated based on this data. The calculation involves first applying Gaussian and bilateral filtering to the 2D image of the laser line acquired by the camera to remove interference points. The laser line is then extracted using the Steger method (light stripe centerline extraction). The coordinates of the extracted laser line are converted to 3D coordinates using a calibrated camera file. The acquired 3D data is then segmented by region and distance to further filter out interference data and regions. After dividing the surface into two parts, a reference surface is determined. The point cloud corresponding to the reference surface is selected as the reference data, and the minimum bounding rectangle of the reference data is drawn. The left point cloud is selected as the reference data, and the dashed line represents the reference point. Considering 3D point data, where ABCD is the minimum bounding box, and L is the plane perpendicular to AB, the AB feature line is determined. The coordinates of the vertices are obtained by fitting the minimum bounding box of the left point cloud using point cloud processing. The centroids of the four vertices are calculated, and the points are divided into left and right parts based on their relationship to the centroids. Then, points A, D, B, and C are determined according to the Z-direction of the left and right data to obtain the AB feature line. L is the perpendicular bisector of AB, with intersection point E. The data of segment EF in the left point cloud is selected as the feature region. For the right point cloud data, the centroid of the right point cloud is calculated. Data with coordinates to the left of the centroid are used as the set of feature data for the right point cloud. The surface gap value is obtained through calculation. During the calculation, the distance from each point in the EF feature region to line L is first calculated, and the maximum distance from L in the feature region, Gap, is taken. max At the same time, the same method is used to find the minimum distance Gap from the points in the right-hand feature region to L. min The interfacial gap value is obtained by recalculating the calculated value, where the interfacial gap value is calculated using the formula GapVal = |Gap max -Gap min |;
[0046] S4: Surface Difference Calculation: Perform surface difference calculation. Before performing the surface difference calculation, first define the direction of the normal vector of line AB. The direction of the normal vector is specified in the appendix of the instruction manual. Figure 6 The direction indicated by n is used, and the maximum value from the right-side point cloud to the AB plane is calculated as the feature point. Several points around the feature point are selected as measurement points, and the surface difference is obtained by averaging the results of multiple calculations. The calculation formula is as follows: Where n is the normalized normal vector of plane AB;
[0047] A gap / surface difference calculation device based on line structured light includes a design module, a measurement module, an acquisition module, a calculation module, an extraction module, a conversion module, and a determination module. The design module is connected to the measurement module, the measurement module is connected to the acquisition module, the acquisition module is connected to the calculation module, the calculation module is connected to both the extraction module and the determination module, the extraction module is connected to the conversion module, and the conversion module is connected to the determination module. The design module designs a measurement device for measuring gap / surface difference. The acquisition module acquires three-dimensional data of the object being measured. The calculation module calculates the surface gap, the surface gap value, and the surface difference. The extraction module extracts laser lines. The conversion module converts the coordinates of the extracted laser lines into three-dimensional coordinates. The determination module determines a reference surface and the AB feature line.
[0048] Example 4
[0049] Reference Figure 1-6 A method for calculating gap surface difference based on line structured light includes the following steps:
[0050] S1: Device Design: Design a measuring device, wherein the device includes a line structured light laser sensor, an industrial camera, an industrial lens, a circuit board and a mounting bracket, and assembles a single-line emitting line structured laser and a U-port black and white camera to obtain a three-dimensional device sensor, and the lens is equipped with a filter and a polarizer to filter ambient light and part of the reflected light from the workpiece surface.
[0051] S2: Perform measurement: Perform gap surface difference measurement, wherein the three-dimensional data of the object under test is first obtained by the gap surface difference measurement method. The gap surface difference measurement method is to calibrate the device by a visual calibration plate and to obtain the intrinsic and extrinsic parameters of the camera by taking pictures of the visual calibration plate in different postures. The three-dimensional coordinates of the object under test in the coordinate system of the device are obtained by the obtained intrinsic and extrinsic parameters of the camera.
[0052] S3: Surface Gap Calculation: Surface gap calculation is performed. Before calculation, the device position is adjusted so that the laser line is perpendicular to the gap. Three-dimensional data is acquired by triggering the sensor. The surface gap is calculated based on this data. The calculation involves first applying Gaussian and bilateral filtering to the 2D image of the laser line acquired by the camera to remove interference points. The laser line is then extracted using the Steger method (light stripe centerline extraction). The coordinates of the extracted laser line are converted to 3D coordinates using a calibrated camera file. The acquired 3D data is then segmented by region and distance to further filter out interference data and regions. After dividing the surface into two parts, a reference surface is determined. The point cloud corresponding to the reference surface is selected as the reference data, and the minimum bounding rectangle of the reference data is drawn. The left point cloud is selected as the reference data, the dashed line represents the reference 3D point data, and ABCD is the minimum bounding box. L is the surface perpendicular to AB. The AB feature line is also determined. The surface gap value is obtained through calculation. The calculation first calculates the distance from points in the EF feature region to line L, and the maximum distance from L in the feature region is taken as Gap. max At the same time, the same method is used to find the minimum distance Gap from the points in the right-hand feature region to L. min The interfacial gap value is obtained by recalculating the calculated value, where the interfacial gap value is calculated using the formula GapVal = |Gap max -Gap min |;
[0053] S4: Surface Difference Calculation: Perform surface difference calculation. Before performing the surface difference calculation, first define the direction of the normal vector of line AB. The direction of the normal vector is specified in the appendix of the instruction manual. Figure 6 The direction indicated by n is used, and the maximum value from the right-side point cloud to the AB plane is calculated as the feature point. Several points around the feature point are selected as measurement points, and the surface difference is obtained by averaging the results of multiple calculations. The calculation formula is as follows: Where n is the normalized normal vector of plane AB;
[0054] A gap / surface difference calculation device based on line structured light includes a design module, a measurement module, an acquisition module, a calculation module, an extraction module, a conversion module, and a determination module. The design module is connected to the measurement module, the measurement module is connected to the acquisition module, the acquisition module is connected to the calculation module, the calculation module is connected to both the extraction module and the determination module, the extraction module is connected to the conversion module, and the conversion module is connected to the determination module. The design module designs a measurement device for measuring gap / surface difference. The acquisition module acquires three-dimensional data of the object being measured. The calculation module calculates the surface gap, the surface gap value, and the surface difference. The extraction module extracts laser lines. The conversion module converts the coordinates of the extracted laser lines into three-dimensional coordinates. The determination module determines a reference surface and the AB feature line.
[0055] Example 5
[0056] Reference Figure 1-6 A method for calculating gap surface difference based on line structured light includes the following steps:
[0057] S1: Device Design: Design a measuring device, wherein the device includes a line structured light laser sensor, an industrial camera, an industrial lens, a circuit board and a mounting bracket, and assembles a single-line emitting line structured laser and a U-port black and white camera to obtain a three-dimensional device sensor, and the lens is equipped with a filter and a polarizer to filter ambient light and part of the reflected light from the workpiece surface.
[0058] S2: Perform measurement: Perform gap surface difference measurement, wherein the three-dimensional data of the object under test is first obtained by the gap surface difference measurement method. The gap surface difference measurement method is to calibrate the device by a visual calibration plate and to obtain the intrinsic and extrinsic parameters of the camera by taking pictures of the visual calibration plate in different postures. The three-dimensional coordinates of the object under test in the coordinate system of the device are obtained by the obtained intrinsic and extrinsic parameters of the camera.
[0059] S3: Surface Gap Calculation: Surface gap calculation is performed. Before calculation, the device position is adjusted so that the laser line is perpendicular to the gap. Three-dimensional data is acquired by triggering the sensor. The surface gap is calculated based on this data. The calculation involves first applying Gaussian and bilateral filtering to the 2D image of the laser line acquired by the camera to remove interference points. The laser line is then extracted using the Steger method (light stripe centerline extraction). The coordinates of the extracted laser line are converted to 3D coordinates using a calibrated camera file. The acquired 3D data is then segmented by region and distance to further filter out interference data and regions. After dividing the surface into two parts, a reference surface is determined. The point cloud corresponding to the reference surface is selected as the reference data, and the minimum bounding rectangle of the reference data is drawn. The left point cloud is selected as the reference data, and the dashed line represents the reference point. Considering 3D point data, where ABCD is the minimum bounding box, and L is the plane perpendicular to AB, the AB feature line is determined. The coordinates of the vertices are obtained by fitting the minimum bounding box of the left point cloud using point cloud processing. The centroids of the four vertices are calculated, and the points are divided into left and right parts based on their relationship to the centroids. Then, points A, D, B, and C are determined according to the Z-direction of the left and right data to obtain the AB feature line. L is the perpendicular bisector of AB, with intersection point E. The data of segment EF in the left point cloud is selected as the feature region. For the right point cloud data, the centroid of the right point cloud is calculated. Data with coordinates to the left of the centroid are used as the set of feature data for the right point cloud. The surface gap value is obtained through calculation. During the calculation, the distance from each point in the EF feature region to line L is first calculated, and the maximum distance from L in the feature region, Gap, is taken. max At the same time, the same method is used to find the minimum distance Gap from the points in the right-hand feature region to L. min The interfacial gap value is obtained by recalculating the calculated value, where the interfacial gap value is calculated using the formula GapVal = |Gap max -Gap min |;
[0060] S4: Face Value Calculation: Perform face value calculation, the calculation formula is as follows: Where n is the normalized normal vector of plane AB;
[0061] A gap / surface difference calculation device based on line structured light includes a design module, a measurement module, an acquisition module, a calculation module, an extraction module, a conversion module, and a determination module. The design module is connected to the measurement module, the measurement module is connected to the acquisition module, the acquisition module is connected to the calculation module, the calculation module is connected to both the extraction module and the determination module, the extraction module is connected to the conversion module, and the conversion module is connected to the determination module. The design module designs a measurement device for measuring gap / surface difference. The acquisition module acquires three-dimensional data of the object being measured. The calculation module calculates the surface gap, the surface gap value, and the surface difference. The extraction module extracts laser lines. The conversion module converts the coordinates of the extracted laser lines into three-dimensional coordinates. The determination module determines a reference surface and the AB feature line.
[0062] The gap difference calculation method based on line structured light in Examples 1, 2, 3, 4, and 5 was tested, and the results are as follows:
[0063]
[0064]
[0065] The gap difference calculation methods based on line structured light obtained in Examples 1, 2, 3, 4 and 5 have significantly improved the accuracy and measurement precision of gap difference calculation compared with existing methods, and Example 1 is the best example.
[0066] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A method for calculating gap surface difference based on line structured light, characterized in that, Includes the following steps: S1: Device Design: Design a measuring device; S2: Perform measurement: Perform gap surface difference measurement; S3: Surface gap calculation: Perform surface gap calculation to obtain the surface gap value; S4: Face Value Calculation: Perform face value calculation; In S1, a measuring device is designed, wherein the device includes a line structured light laser sensor, an industrial camera, an industrial lens, a circuit board and a mounting bracket, and a three-dimensional device sensor is obtained by assembling a line structured laser that emits a single line and a black and white camera with a U port, and a filter and a polarizer are installed in front of the lens. In step S2, gap surface difference measurement is performed. First, the three-dimensional data of the object under test is obtained through the gap surface difference measurement method. The gap surface difference measurement method is to calibrate the device by using a visual calibration plate and to obtain the intrinsic and extrinsic parameters of the camera by taking pictures of the visual calibration plate in different postures. The three-dimensional coordinates of the object under test in the coordinate system of the device are obtained by using the obtained intrinsic and extrinsic parameters of the camera. In step S3, the surface gap is calculated. Before the calculation, the device position is adjusted so that the laser line is perpendicular to the gap. Three-dimensional data is acquired by triggering a sensor. The surface gap is calculated based on this data. The calculation involves first applying Gaussian and bilateral filtering to the two-dimensional image of the laser line acquired by the camera, and then using the Steger method to extract the center line of the laser beam. The coordinates of the extracted laser line are converted to three-dimensional coordinates using a calibrated camera file. The acquired three-dimensional data is then segmented by region and distance to further filter out interference data and regions. After dividing the surface into two parts, a reference surface is determined. This reference surface is selected by using the point cloud corresponding to the reference surface as reference data, and the minimum bounding rectangle of the reference data is drawn. The left point cloud is selected as the reference data, and the dashed line represents the reference three-dimensional points. According to the given information, ABCD is the smallest rectangular bounding box, L is the face perpendicular to AB, and the AB feature line is determined. The coordinates of the vertices are obtained by fitting the smallest rectangular bounding box of the left point cloud using point cloud processing. The centroids of the four vertices are calculated, and the points are divided into left and right parts based on their relationship with the centroids. Then, points A, D, B, and C are determined according to the magnitude of the Z-direction of the left and right data to obtain the AB feature line. L is the perpendicular bisector of AB, and the intersection point is E. The data of segment EF of the left point cloud is selected as the feature region, and the centroid of the right point cloud is calculated. Data with coordinates to the left of the centroid are used as the set of feature data for the right point cloud. The interfacial gap value is obtained through calculation. During the calculation, the distance from the point in the EF feature region to the line L is calculated first, and the distance from the point in the feature region to L is taken as the maximum distance. At the same time, the same method is used to find the minimum distance from the points in the feature region on the right to L. The interfacial gap value is obtained by recalculating the calculated value, where the interfacial gap value is calculated using the following formula: ; In step S4, the surface difference is calculated. Before the surface difference calculation, the direction of the normal to line AB is defined. Simultaneously, the maximum value of the right-side point cloud to plane AB is calculated as a feature point. Several points around the feature point are selected as measurement points, and the surface difference is obtained by averaging the results of multiple calculations. The calculation formula is as follows: , Where N is the total number of selected measurement points; A, B, C, and D are the plane equation coefficients and constant terms of the reference plane AB; , , These are the normalized normal vector components of plane AB.
2. A gap difference calculation device based on line structured light, comprising a design module, a measurement module, an acquisition module, a calculation module, an extraction module, a conversion module, and a determination module, characterized in that, The design module is connected to the measurement module, the measurement module is connected to the acquisition module, the acquisition module is connected to the calculation module, the calculation module is connected to the extraction module and the determination module respectively, the extraction module is connected to the conversion module, and the conversion module is connected to the determination module, wherein: The design module is used to design a measurement device, wherein the device includes a line structured light laser sensor, an industrial camera, an industrial lens, a circuit board and a mounting bracket, and assembles a single-line emitting line structured laser and a U-port black and white camera to obtain a three-dimensional device sensor, and the lens is equipped with a filter and a polarizer. The measuring device is used to measure gap surface difference. First, three-dimensional data of the object being measured is obtained using a gap surface difference measurement method. This method involves calibrating the device using a visual calibration plate and acquiring the camera's intrinsic and extrinsic parameters by photographing the calibration plate in different poses. The three-dimensional coordinates of the object being measured in the device's coordinate system are then obtained using these acquired camera intrinsic and extrinsic parameters. The acquisition module is used to acquire the three-dimensional data of the object under test; the calculation module is used to calculate the surface gap, surface gap value and surface difference; the extraction module is used to extract the laser line; the conversion module is used to convert the coordinates of the extracted laser line into three-dimensional coordinates; and the determination module is used to determine the reference surface and the AB feature line. In the calculation module, before performing the surface gap calculation, the device position is adjusted so that the laser line is perpendicular to the gap. Three-dimensional data is acquired by triggering a sensor, and the surface gap is calculated based on this data. Specifically, the two-dimensional image of the laser line acquired by the camera is first subjected to Gaussian and bilateral filtering, and the center line of the laser stripe is extracted using the Steger method. The coordinates of the extracted laser line are converted to three-dimensional coordinates using a calibrated camera file. The acquired three-dimensional data is then subjected to region segmentation and distance segmentation to further filter out interference data and regions. After dividing the surface into two parts, a reference surface is determined. When determining the reference surface, the point cloud corresponding to the reference surface is selected as the reference data, and the minimum bounding rectangle of the reference data is drawn. The left point cloud is selected as the reference data, and the dashed line represents the reference three-dimensional surface. Point data is used, with ABCD as the smallest rectangular bounding box and L as the face perpendicular to AB. The AB feature line is also determined. The coordinates of the vertices are obtained by fitting the smallest rectangular bounding box of the left point cloud using point cloud processing. The centroids of the four vertices are calculated, and the points are divided into left and right parts based on their relationship to the centroids. Then, points A, D, B, and C are determined according to the magnitude of the Z-direction of the left and right data to obtain the AB feature line. L is the perpendicular bisector of AB, and the intersection point is E. The data of segment EF in the left point cloud is selected as the feature region. The centroid of the right point cloud is calculated, and the data with coordinates to the left of the centroid are used as the set of feature data for the right point cloud. The interfacial gap value is obtained through calculation. During the calculation, the distance from each point in the EF feature region to line L is first calculated, and the distance from the largest point in the feature region to L is selected. At the same time, the same method is used to find the minimum distance from the points in the feature region on the right to L. The interfacial gap value is obtained by recalculating the calculated value, where the interfacial gap value is calculated using the following formula: ; When the calculation module performs the surface difference calculation, the direction of the normal to line AB is defined before the surface difference calculation. Simultaneously, the maximum value of the right-side point cloud to plane AB is calculated as a feature point. Several points around the feature point are selected as measurement points, and the surface difference is obtained by averaging the results of multiple calculations. The calculation formula is as follows: , Where N is the total number of selected measurement points; A, B, C, and D are the plane equation coefficients and constant terms of the reference plane AB; , , These are the normalized normal vector components of plane AB.