Workpiece profile detection device, method, server, and storage medium

CN115930879BActive Publication Date: 2026-08-11CHINA RAILWAY CONSTR HEAVY IND
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-30
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0004]本申请提供一种工件的轮廓检测装置、方法、服务器及存储介质,用于解决现有技术中无法精确地检测精密仪器的工件的内腔的尺寸是否合格的问题

Benefits of technology

[0029]本申请提供一种工件的轮廓检测装置、方法、服务器及存储介质,可以通过接收来自点云采集模块采集的工件的内腔的轮廓点云数据;从预设的标准工件模型的多个横截面轮廓中,确定轮廓点云数据中的各个待检测点分别对应的横截面轮廓;进而,确定任一待检测点的距离误差大于待检测点关联的误差阈值时,确定该待检测点不合格。如此,可以精确地检测出不合格的精密仪器的工件的内腔的待检测点,可靠性高、效率也高。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115930879B_ABST
    Figure CN115930879B_ABST
Patent Text Reader

Abstract

This application provides a workpiece contour detection device, method, server, and storage medium, relating to the field of quality control technology. The server receives contour point cloud data of the workpiece's inner cavity from a point cloud acquisition module; the server determines the cross-sectional contour corresponding to each detection point in the contour point cloud data from multiple cross-sectional contours of a preset standard workpiece model; the server determines whether the distance error of each detection point is greater than the corresponding allowable error threshold based on each detection point and its corresponding cross-sectional contour; when the server determines that the distance error of any detection point is greater than the error threshold associated with that detection point, the detection point is deemed unqualified, resulting in high efficiency and high reliability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of quality control technology, and in particular to a contour detection device, method, server, and storage medium for a workpiece. Background Technology

[0002] Typically, before a precision instrument component leaves the factory, its dimensions need to be inspected to determine if they are within acceptable limits.

[0003] Currently, calipers are commonly used to inspect the dimensions of precision instrument workpieces. However, for precision instrument workpieces with internal cavities, calipers are inconvenient to insert into the workpiece to inspect its dimensions. This makes it impossible to accurately determine whether the dimensions of the internal cavity of the precision instrument workpiece are within acceptable limits. Summary of the Invention

[0004] This application provides a workpiece contour detection device, method, server, and storage medium to solve the problem in the prior art that it is impossible to accurately detect whether the internal cavity dimensions of workpieces used in precision instruments are up to standard.

[0005] In a first aspect, this application provides a contour detection method for a workpiece, comprising: a server receiving contour point cloud data of the inner cavity of the workpiece acquired by a point cloud acquisition module; the server determining the cross-sectional contour corresponding to each detection point in the contour point cloud data from multiple cross-sectional contours of a preset standard workpiece model; the server determining whether the distance error of each detection point is greater than the corresponding allowable error threshold based on each detection point and the corresponding cross-sectional contour; and the server determining that the detection point is unqualified when it determines that the distance error of any detection point is greater than the error threshold associated with the detection point.

[0006] In one possible implementation, the server determines whether the distance error of each detection point is greater than the corresponding allowable error threshold based on each detection point and its corresponding cross-sectional profile. This includes: the server adjusting the cross-sectional profile corresponding to each detection point by different factors to obtain a set of cross-sectional profiles corresponding to each detection point; the server determining the error range to which the distance error of the corresponding detection point belongs based on the cross-sectional profiles adjacent to the corresponding detection points in the set of cross-sectional profiles; and the server determining that the distance error of the corresponding detection point is greater than the allowable error threshold when the lower limit of the error range is greater than the allowable error threshold.

[0007] In this way, it is possible to efficiently and reliably determine whether the distance error between the point to be detected and the corresponding cross-sectional profile is greater than the allowable error threshold.

[0008] In one possible implementation, the server determines the error range to which the distance error of the corresponding detection point belongs based on the cross-sectional contours adjacent to each detection point in the cross-sectional contour set. This includes: the server substituting the coordinates (X, Y) of the detection point into the function expression f(x+m) of each cross-sectional contour in the cross-sectional contour set. i δ, y+m i δ) = 0. Where, when i takes the value n, m i δ represents the coordinate offset coefficient associated with the adjustment factor of the cross-sectional profile with position sorting n, and when the adjustment factor is the reduction factor, m i δ < 0, when the adjustment factor is the reduction factor, m i δ>0; when f(X+m) n δ, Y+m n δ)>0、f(X+m n+1 δ, Y+m n+1 δ) < 0, and m n+1 δ>m n When δ is reached, the server determines the nth and (n+1)th cross-sectional profiles, which are the cross-sectional profiles adjacent to the corresponding detection points; the server then uses the coordinate offset coefficient m of the nth cross-sectional profile... n δ and the coordinate offset coefficient m of the nth cross-sectional profile n+1 δ, determine the error interval to which the distance error of the corresponding detection point belongs (m) n δ, m n+1 δ).

[0009] In this way, the error range to which the distance error between the point to be detected and the corresponding cross-sectional profile belongs can be determined accurately and efficiently.

[0010] In one possible implementation, before the server receives the contour point cloud data of the inner cavity of the workpiece acquired by the point cloud acquisition module, the method provided in this application further includes: the server receiving standard contour point cloud data of the inner cavity of a standard workpiece model acquired by the point cloud acquisition module; the server using the least squares method to fit the cross-sectional contour of the standard contour point cloud data to obtain a functional expression of the cross-sectional contour of the standard contour point cloud data.

[0011] In this way, a functional expression for the cross-sectional profile of the standard contour point cloud data can be accurately and efficiently obtained, so as to determine the distance error between the point to be detected and the corresponding cross-sectional profile in the subsequent process.

[0012] In one possible implementation, each cross-sectional profile in the set of cross-sectional profiles is an elliptical profile, and the function expression of the elliptical profile is... Where a is the length of the major axis of the elliptical profile, and b is the length of the minor axis of the elliptical profile; or, each cross-sectional profile in the set of cross-sectional profiles is a circular profile, and the function expression for the circular profile is f(x+m). i δ, y+m i δ)=(x-a+m i δ) 2 +(y-b+m i δ) 2 -R 2 = 0, where a is the x-coordinate of the center of the circular outline, b is the y-coordinate of the center of the circular outline, and R is the radius of the circular outline.

[0013] Since the function expressions for elliptical and circular contours are known, there is no need to obtain them by collecting standard contour data, thus saving computational resources.

[0014] In one possible implementation, the server determines whether the distance error of each detection point is greater than the corresponding allowable error threshold based on each detection point and the corresponding cross-sectional profile. This includes: the server determining the shortest distance between each detection point and the corresponding cross-sectional profile; and the server determining whether the shortest distance between each detection point and the corresponding cross-sectional profile is greater than the corresponding allowable error threshold.

[0015] Understandably, the shortest distance between the point to be tested and the corresponding cross-sectional profile is the distance error between the point to be tested and the corresponding cross-sectional profile. By detecting whether the shortest distance between the point to be tested and the corresponding cross-sectional profile is greater than the corresponding allowable error threshold, it is possible to accurately determine whether the point to be tested is qualified.

[0016] In one possible implementation, when the cross-sectional profile is an elliptical profile, the server determines the shortest distance between each detection point and its corresponding cross-sectional profile, including: when the detection point is outside the elliptical profile and located in the first or third quadrant of a coordinate system established with the geometric center of the elliptical profile as the origin, the server determines the distance between the elliptical profile and the detection point at preset intervals in a clockwise direction, starting from the intersection of the line connecting the detection point and the geometric center with the elliptical profile; if the distance between the elliptical profile and the detection point determined this time is greater than the distance between the elliptical profile and the detection point determined in the previous time, then the distance between the elliptical profile and the detection point determined in the previous time is determined as the shortest distance between the detection point and its corresponding cross-sectional profile.

[0017] When the point to be detected is outside the elliptical contour and is located in the second or fourth quadrant of a coordinate system established with the geometric center of the elliptical contour as the origin, the server takes the intersection of the line connecting the point to be detected and the geometric center with the elliptical contour as the starting point, and determines the distance between the elliptical contour and the point to be detected at preset intervals in a counterclockwise direction. If the distance between the elliptical contour and the point to be detected determined this time is greater than the distance between the elliptical contour and the point to be detected determined in the previous time, then the distance between the elliptical contour and the point to be detected determined in the previous time is determined as the shortest distance between the point to be detected and the corresponding cross-sectional contour.

[0018] When the point to be detected is outside the elliptical contour, the above method can more efficiently and quickly determine the shortest distance between each point to be detected and the corresponding elliptical contour.

[0019] In one possible implementation, when the cross-sectional profile is an elliptical profile, the server determines the shortest distance between each detection point and its corresponding cross-sectional profile, including: when the detection point is within the elliptical profile and located in the first or third quadrant of a coordinate system established with the geometric center of the elliptical profile as the origin, the server takes the intersection of the line connecting the detection point and the geometric center with the elliptical profile as the starting point, and determines the distance between the elliptical profile and the detection point at preset intervals in a counterclockwise direction; if the distance between the elliptical profile and the detection point determined in this instance is greater than the distance between the elliptical profile and the detection point determined in the previous instance, then the distance between the elliptical profile and the detection point determined in the previous instance is... The distance is determined as the shortest distance between the detection point and the corresponding cross-sectional contour. When the detection point is inside the elliptical contour and is located in the second or fourth quadrant of the coordinate system established with the geometric center of the elliptical contour as the origin, the server takes the intersection of the line connecting the detection point and the geometric center with the elliptical contour as the starting point, and determines the distance between the elliptical contour and the detection point at preset intervals in a clockwise direction. If the distance between the elliptical contour and the detection point determined this time is greater than the distance between the elliptical contour and the detection point determined last time, then the distance between the elliptical contour and the detection point determined last time is determined as the shortest distance between the detection point and the corresponding cross-sectional contour.

[0020] When the point to be detected is within the elliptical contour, the above method can more efficiently and quickly determine the shortest distance between each point to be detected and the corresponding elliptical contour.

[0021] In one possible implementation, after determining that the detection point is unqualified when the distance error of any detection point is greater than the error threshold associated with the detection point, the method provided in this application further includes: the server mapping the unqualified detection point to a standard workpiece model; and the server sending the standard workpiece model mapped with the unqualified detection point to a terminal device for display.

[0022] This allows staff to clearly see the relative positions of the defective test points and the standard workpiece model.

[0023] In one possible implementation, before the server sends a standard workpiece model with unqualified inspection points mapped to it to the terminal device for display, the method provided in this application further includes: the server determining the error range to which the distance error of each unqualified inspection point belongs; and the server marking each unqualified inspection point with a different identifier according to the error range to which the distance error of each unqualified inspection point belongs.

[0024] This allows staff to more clearly see the relative positions of the defective test points and the standard workpiece model.

[0025] Secondly, this application provides a workpiece contour detection device, comprising: a data receiving unit for receiving contour point cloud data of the inner cavity of the workpiece acquired by a point cloud acquisition module; a contour determination unit for determining the cross-sectional contour corresponding to each detection point in the contour point cloud data from multiple cross-sectional contours of a preset standard workpiece model; an error determination unit for determining whether the distance error of each detection point is greater than the corresponding allowable error threshold based on each detection point and the corresponding cross-sectional contour; and a data detection unit for determining that the detection point is unqualified when the distance error of any detection point is determined to be greater than the error threshold associated with the detection point.

[0026] Thirdly, this application provides a server including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, it causes the server to perform the method provided in the first aspect.

[0027] Fourthly, this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, causes the computer to perform the method provided in the first aspect.

[0028] Fifthly, this application also provides a computer program product, including a computer program that, when run, causes a computer to perform the method provided in the first aspect.

[0029] This application provides a workpiece contour detection device, method, server, and storage medium. It can receive contour point cloud data of the workpiece's internal cavity acquired by a point cloud acquisition module; determine the cross-sectional contour corresponding to each detection point in the contour point cloud data from multiple cross-sectional contours of a preset standard workpiece model; and further determine that if the distance error of any detection point is greater than an error threshold associated with that detection point, then that detection point is deemed unqualified. In this way, the detection points within the internal cavity of unqualified precision instrument workpieces can be accurately detected, with high reliability and efficiency. Attached Figure Description

[0030] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0031] Figure 1 A flowchart of a workpiece contour detection method provided in an embodiment of this application;

[0032] Figure 2 A schematic diagram of the outline of a workpiece provided in an embodiment of this application;

[0033] Figure 3 A schematic diagram illustrating the fitting of a cross-sectional profile of standard contour point cloud data to an embodiment of this application;

[0034] Figure 4 This is a schematic diagram showing the positional relationship of each elliptical contour in the set of elliptical contours corresponding to the point to be detected (a) provided in this embodiment of the application.

[0035] Figure 5 One of the schematic diagrams provided in this application for determining the shortest distance from the point to be detected b to the elliptical contour A;

[0036] Figure 6 This is a second schematic diagram illustrating the determination of the shortest distance from the point to be detected (b) to the elliptical contour A, provided in an embodiment of this application.

[0037] Figure 7 This is the third schematic diagram illustrating the determination of the shortest distance from the point to be detected (b) to the elliptical contour A, as provided in the embodiments of this application.

[0038] Figure 8 The fourth schematic diagram illustrating the determination of the shortest distance from the point to be detected b to the elliptical contour A, provided in the embodiments of this application;

[0039] Figure 9Fifth of the schematic diagrams provided for determining the shortest distance from the point to be detected b to the elliptical contour A in the embodiments of this application;

[0040] Figure 10 One of the structural schematic diagrams of a standard workpiece model with unqualified test points provided in the embodiments of this application;

[0041] Figure 11 A second schematic diagram of the structure of a standard workpiece model with unqualified test points provided in this application embodiment;

[0042] Figure 12 This is a functional block diagram of the contour detection device for a workpiece provided in an embodiment of this application. Detailed Implementation

[0043] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments made by those skilled in the art under the guidance of these embodiments are within the scope of protection of this application.

[0044] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0045] Currently, calipers are commonly used to inspect the dimensions of precision instrument workpieces. However, for precision instrument workpieces with internal cavities, calipers are inconvenient to insert into the workpiece to inspect its dimensions. This makes it impossible to accurately determine whether the dimensions of the internal cavity of the precision instrument workpiece are within acceptable limits.

[0046] Based on the above-mentioned technical problems, the inventive concept of this application is to: collect the contour point cloud data of the inner cavity of the workpiece through the point cloud acquisition module, and compare each point to be detected on the contour point cloud data with the standard contour point cloud data to detect unqualified points, with high accuracy and reliability.

[0047] The technical solutions of this application and how they solve the aforementioned technical problems will be described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0048] Please see Figure 1 This application provides a workpiece contour detection method applied to a server. The server is communicatively connected to a point cloud acquisition module. The point cloud acquisition module can be, but is not limited to, a displacement sensor, a laser tracker, and a laser scanner. Specifically, as shown... Figure 1 As shown, the workpiece contour detection method provided in this application includes:

[0049] S101: The server receives the contour point cloud data of the workpiece's inner cavity from the point cloud acquisition module.

[0050] For example, the point cloud acquisition module can capture images of the workpiece from multiple angles to obtain point cloud data from multiple angles, and then fuse the point cloud data from multiple angles to obtain the contour point cloud data of the workpiece. Understandably, the contour point cloud data of the workpiece includes the contour point cloud data of the workpiece's internal cavities, wherein the contour of the workpiece can be as follows: Figure 2 As shown.

[0051] S102: The server determines the cross-sectional contour corresponding to each point to be detected in the contour point cloud data from multiple cross-sectional contours of the preset standard workpiece model.

[0052] The cross-sectional profile corresponding to each detection point refers to the cross-sectional profile that has the same coordinates as the detection point in the vertical direction.

[0053] It should be noted that when each cross-sectional profile in the cross-sectional profile set is an irregular shape, before S102, the method provided in this application embodiment may further include: the server receiving standard profile point cloud data of the inner cavity of a standard workpiece model acquired by the point cloud acquisition module. For example... Figure 3 As shown, the server can use the least squares method to fit the cross-sectional profile of the standard contour point cloud data. In this way, the server obtains a functional expression for the cross-sectional profile of the standard contour point cloud data. This allows for an accurate and efficient determination of the functional expression for the cross-sectional profile of the standard contour point cloud data, which is then used to subsequently determine the distance error between the point to be detected and the corresponding cross-sectional profile.

[0054] Additionally, when each cross-sectional profile in the set of cross-sectional profiles is an elliptical profile, before S102, the method provided in this application embodiment may further include: configuring a function expression for the elliptical profile on the server. Where a is the length of the major axis of the elliptical contour, b is the length of the minor axis of the elliptical contour, and when i takes the value n, m i δ represents the coordinate offset coefficient associated with the adjustment factor of the cross-sectional profile with position sorting n. The adjustment factor is the adjustment factor for the standard elliptical profile, and when the adjustment factor is a reduction factor, m i δ < 0, when the adjustment factor is the reduction factor, m i δ > 0. Since the functional expression for the elliptical contour is well-known, it is not necessary to obtain it by collecting standard contour data, thus saving computational resources.

[0055] Furthermore, when each cross-sectional profile in the set of cross-sectional profiles is a circular profile, the functional expression for the circular profile is f(x+m). i δ, y+m i δ)=(x-a+m i δ) 2 +(y-b+m i δ) 2 -R 2 = 0, where a is the x-coordinate of the center of the circular contour, b is the y-coordinate of the center of the circular contour, and R is the radius of the circular contour. Where a is the length of the major axis of the elliptical contour, b is the length of the minor axis of the elliptical contour, and when i takes the value n, m i δ represents the coordinate offset coefficient associated with the adjustment factor of the cross-sectional profile ordered n, where the adjustment factor is the same as that for the standard circular profile. Since the functional expression for the circular profile is well-known, it does not need to be obtained by collecting standard profile data, thus saving computational resources.

[0056] S103: The server determines whether the distance error of each detection point is greater than the corresponding allowable error threshold based on each detection point and its corresponding cross-sectional profile.

[0057] For example, S103 can specifically include:

[0058] Step 1-1: The server adjusts the cross-sectional contours corresponding to each detection point by different factors to obtain a set of cross-sectional contours corresponding to each detection point.

[0059] like Figure 4 As shown, when the cross-sectional profile is an elliptical profile, the point to be detected, a, corresponds to elliptical profile A. Adjusting elliptical profile A by different factors yields elliptical profiles B, C, D, and E. Elliptical profiles A, B, C, D, and E constitute the set of elliptical profiles. Furthermore, as... Figure 4As shown, the major axis of elliptical contour E is 2δ longer than that of elliptical contour A, the major axis of elliptical contour D is δ longer than that of elliptical contour A, the major axis of elliptical contour B is 2δ shorter than that of elliptical contour A, and the major axis of elliptical contour C is δ shorter than that of elliptical contour A.

[0060] Step 1-2: The server determines the error range to which the distance error of the corresponding detection point belongs based on the cross-sectional profiles adjacent to the corresponding detection points in the cross-sectional profile set.

[0061] Specifically, the server can substitute the coordinates (X, Y) of the point to be detected into the function expression f(x+m) of each cross-sectional profile in the cross-sectional profile set. i δ, y+m i δ) = 0. Where, when i takes the value n, m i δ represents the coordinate offset coefficient associated with the adjustment factor of the cross-sectional profile with position sorting n, and when the adjustment factor is the reduction factor, m i δ < 0, when the adjustment factor is the reduction factor, m i δ>0. When f(X+m) n δ, Y+m n δ)>0、f(X+m n+1 δ, Y+m n+1 δ) < 0, and m n+1 δ>m n When δ is reached, the server determines the nth and (n+1)th cross-sectional profiles, which are the cross-sectional profiles adjacent to the corresponding points to be detected. The server then uses the coordinate offset coefficient m of the nth cross-sectional profile as a reference. n δ and the coordinate offset coefficient m of the nth cross-sectional profile n+1 δ, determine the error interval to which the distance error of the corresponding detection point belongs (m) n δ, m n+1 δ).

[0062] Still Figure 4 As shown, when the x-coordinate and y-coordinate of the point to be detected, a, are (X, Y), and the function expression of the elliptical contour A is: If the major axis of the elliptical contour E is 2δ longer than that of the elliptical contour A (i.e., the coordinate offset coefficient), then the function expression of the elliptical contour E is... (It can be seen that m) i =2), the major axis of the elliptical contour D is δ longer than that of the elliptical contour A (i.e., the coordinate offset coefficient), then the function expression of the elliptical contour D is... (It can be seen that m) i =1). If and Therefore, the error interval to which the distance error of the point to be detected a belongs is determined to be (δ, 2δ).

[0063] As can be seen from the above, when the x-coordinate and y-coordinate of the point to be detected, a, are (X, Y) and the function expression of the cross-sectional profile is f(x, y) = 0, if the major axis of the cross-sectional profile E is 2 longer than that of the cross-sectional profile A (i.e., the coordinate offset coefficient), then the function expression of the cross-sectional profile E, f(x+2δ, y+2δ), is 0 (it can be seen that m i =2), the major axis of the cross-sectional profile D is δ longer than the cross-sectional profile A (i.e., the coordinate offset coefficient), then the function expression of the cross-sectional profile D is f(x+δ, y+δ) = 0 (it can be seen that m i =1). If f(X+2δ,Y+2δ)<0 and f(X+δ,Y+δ)>0, then the error interval to which the distance error of the point to be detected a belongs is determined to be (δ,2δ).

[0064] Steps 1-3: When the lower limit of the error interval is greater than the allowable error threshold, the server determines that the distance error of the corresponding detection point is greater than the allowable error threshold.

[0065] In this way, it is possible to efficiently and reliably determine whether the distance error between the point to be detected and the corresponding cross-sectional profile is greater than the allowable error threshold.

[0066] S104: When the server determines that the distance error of any point to be tested is greater than the error threshold associated with the point to be tested, the point to be tested is deemed unqualified.

[0067] In summary, this application provides a method for detecting the contour of a workpiece. This method involves receiving contour point cloud data of the workpiece's internal cavity from a point cloud acquisition module; determining the cross-sectional contour corresponding to each detection point in the contour point cloud data from multiple cross-sectional contours of a preset standard workpiece model; and then determining that the detection point is unqualified when the distance error of any detection point exceeds an error threshold associated with that point. This method can accurately detect the detection points within the internal cavity of unqualified precision instrument workpieces, offering high reliability and efficiency.

[0068] Understandably, such as Figure 5 As shown, the intersection point P of the line connecting the point to be detected (b) and the geometric center O of the elliptical contour with the ellipse is point P. From... Figure 5 As can be seen, the distance from the detection point b to point P is not the shortest distance from the detection point b to the elliptical contour. The elliptical contour also includes point Q, where the tangent line of the elliptical contour passing through point Q is perpendicular to the line connecting the detection point b to Q. It can be understood that the distance from the detection point b to point Q is the shortest distance from the detection point b to the elliptical contour.

[0069] Therefore, the specific implementation methods of steps 1-3 above can include:

[0070] Step 2-1: The server determines the shortest distance between each point to be detected and its corresponding cross-sectional profile.

[0071] For example, the specific implementation of step 2-1 includes, but is not limited to, the following four cases:

[0072] The first type: such as Figure 6 As shown, when the point to be detected is outside the elliptical contour and located in the first or third quadrant of a coordinate system established with the geometric center of the elliptical contour as the origin, the distance between the elliptical contour and the point to be detected is determined at preset intervals along the elliptical contour, starting from the intersection of the line connecting the point to be detected and the geometric center with the elliptical contour, proceeding clockwise (i.e., towards the major axis of the elliptical contour). If the distance between the elliptical contour and the point to be detected determined in this instance is greater than the distance between the elliptical contour and the point to be detected determined in the previous instance, then the distance between the elliptical contour and the point to be detected determined in the previous instance is taken as the shortest distance between the point to be detected and the corresponding cross-sectional contour.

[0073] The second type: such as Figure 7 As shown, when the point to be detected is outside the elliptical contour and located in the second or fourth quadrant of a coordinate system established with the geometric center of the elliptical contour as the origin, the server takes the intersection of the line connecting the point to be detected and the geometric center with the elliptical contour as the starting point, and determines the distance between the elliptical contour and the point to be detected at preset intervals along the elliptical contour in a counterclockwise direction (i.e., the direction closer to the minor axis of the elliptical contour). If the distance between the elliptical contour and the point to be detected determined in this instance is greater than the distance between the elliptical contour and the point to be detected determined in the previous instance, then the distance between the elliptical contour and the point to be detected determined in the previous instance is taken as the shortest distance between the point to be detected and the corresponding cross-sectional contour. When the point to be detected is outside the elliptical contour, the above method can more efficiently and quickly determine the shortest distance between each point to be detected and the corresponding elliptical contour.

[0074] Understandably, when the point to be detected is outside the elliptical contour, the first and second methods described above can more efficiently and quickly determine the shortest distance between each point to be detected and its corresponding elliptical contour.

[0075] The third type: such as Figure 8As shown, when the point to be detected is within the elliptical contour and is located in the first or third quadrant of a coordinate system established with the geometric center of the elliptical contour as the origin, the server takes the intersection of the line connecting the point to be detected and the geometric center with the elliptical contour as the starting point, and determines the distance between the elliptical contour and the point to be detected at preset intervals along the elliptical contour in a counterclockwise direction (i.e., the direction closer to the minor axis of the elliptical contour). If the distance between the elliptical contour and the point to be detected obtained in this determination is greater than the distance between the elliptical contour and the point to be detected obtained in the previous determination, then the distance between the elliptical contour and the point to be detected obtained in the previous determination is determined as the shortest distance between the point to be detected and the corresponding cross-sectional contour.

[0076] The fourth type: such as Figure 9 As shown, when the point to be detected is within the elliptical contour and is located in the second or fourth quadrant of a coordinate system established with the geometric center of the elliptical contour as the origin, the server takes the intersection of the line connecting the point to be detected and the geometric center with the elliptical contour as the starting point, and determines the distance between the elliptical contour and the point to be detected at preset intervals along the elliptical contour in a clockwise direction (i.e., the direction closer to the major axis of the elliptical contour). If the distance between the elliptical contour and the point to be detected determined this time is greater than the distance between the elliptical contour and the point to be detected determined in the previous time, then the distance between the elliptical contour and the point to be detected determined in the previous time is determined as the shortest distance between the point to be detected and the corresponding cross-sectional contour.

[0077] Understandably, when the point to be detected is within the elliptical contour, the third and fourth methods described above can more efficiently and quickly determine the shortest distance between each point to be detected and the corresponding elliptical contour.

[0078] Step 2-2: The server determines whether the shortest distance between each point to be detected and its corresponding cross-sectional profile is greater than the corresponding allowable error threshold.

[0079] Understandably, the shortest distance between the point to be tested and the corresponding cross-sectional profile is the distance error between the point to be tested and the corresponding cross-sectional profile. By detecting whether the shortest distance between the point to be tested and the corresponding cross-sectional profile is greater than the corresponding allowable error threshold, it is possible to accurately determine whether the point to be tested is qualified.

[0080] In the above Figure 1 Based on the corresponding embodiment, after S104, the method provided in this application embodiment further includes: the server mapping the unqualified inspection points onto a standard workpiece model. The server sends the standard workpiece model mapped with the unqualified inspection points to the terminal device for display. The standard workpiece model mapped with the unqualified inspection points can be as follows: Figure 10As shown. This allows staff to clearly see the relative positions of the defective inspection points and the standard workpiece model.

[0081] Furthermore, before the server sends the standard workpiece model with the defective inspection points mapped to it to the terminal device for display, the method provided in this application embodiment further includes: the server determining the error range to which the distance error of each defective inspection point belongs. The server marks each defective inspection point with a different identifier based on the error range to which the distance error of each defective inspection point belongs. For example, as... Figure 11 As shown, different colors are used to mark the unqualified inspection points belonging to different error intervals of the distance error. Alternatively, the server can also use different sizes to mark the unqualified inspection points belonging to different error intervals of the distance error. This allows staff to more clearly view the relative positions of the unqualified inspection points to the standard workpiece model.

[0082] Please see Figure 12 This application provides a workpiece contour detection device 1200. It should be noted that the basic principle and technical effects of the workpiece contour detection device 1200 provided in this application are the same as those in the above embodiments. For the sake of brevity, any parts not mentioned in this application can be referred to the corresponding content in the above embodiments. The workpiece contour detection device 1200 includes a data receiving unit 1201, a contour determination unit 1202, an error determination unit 1203, and a data detection unit 1204.

[0083] The data receiving unit 1201 is used to receive the contour point cloud data of the inner cavity of the workpiece acquired by the point cloud acquisition module.

[0084] The contour determination unit 1202 is used to determine the cross-sectional contour corresponding to each detection point in the contour point cloud data from multiple cross-sectional contours of a preset standard workpiece model.

[0085] The error determination unit 1203 is used to determine whether the distance error of each detection point is greater than the corresponding allowable error threshold based on each detection point and the corresponding cross-sectional profile.

[0086] The data detection unit 1204 is used to determine that the detection point is unqualified when the distance error of any detection point is greater than the error threshold associated with the detection point.

[0087] In one possible implementation, the error determination unit 1203 is specifically used to adjust the cross-sectional profile corresponding to each detection point by different factors to obtain a set of cross-sectional profiles corresponding to each detection point; based on the cross-sectional profiles in the set of cross-sectional profiles that are adjacent to the positions of the corresponding detection points, determine the error interval to which the distance error of the corresponding detection point belongs; when the lower limit of the error interval is greater than the allowable error threshold, determine that the distance error of the corresponding detection point is greater than the allowable error threshold.

[0088] In one possible implementation, the error determination unit 1203 is specifically used to substitute the coordinates (X, Y) of the point to be detected into the function expression f(x+m) of each cross-sectional profile in the cross-sectional profile set. i δ, y+m i δ) = 0; where, when i takes the value n, m i δ represents the coordinate offset coefficient associated with the adjustment factor of the cross-sectional profile with position sorting n, and when the adjustment factor is the reduction factor, m i δ < 0, when the adjustment factor is the reduction factor, m i δ>0; when f(X+m) n δ, Y+m n δ)<0、f(X+m n+1 δ, Y+m n+1 δ) < 0, and m n+1 δ>m n When δ is reached, the server determines the nth and (n+1)th cross-sectional profiles, which are the cross-sectional profiles adjacent to the corresponding detection points; the server then uses the coordinate offset coefficient m of the nth cross-sectional profile... n δ and the coordinate offset coefficient m of the nth cross-sectional profile n+1 δ, determine the error interval to which the distance error of the corresponding detection point belongs (m) n δ, m n+1 δ).

[0089] In one possible implementation, the data receiving unit 1201 is further configured to receive standard contour point cloud data of the inner cavity of a standard workpiece model acquired by the point cloud acquisition module. The apparatus 1200 provided in this application embodiment may further include: a data fitting unit, configured to fit the cross-sectional contour of the standard contour point cloud data using the least squares method to obtain a functional expression for the cross-sectional contour of the standard contour point cloud data.

[0090] In one possible implementation, each cross-sectional profile in the set of cross-sectional profiles is an elliptical profile, and the function expression of the elliptical profile is... Where a is the length of the major axis of the elliptical profile, and b is the length of the minor axis of the elliptical profile; or, each cross-sectional profile in the set of cross-sectional profiles is a circular profile, and the function expression for the circular profile is f(x+m). i δ, y+m i δ)=(x-a+m i δ) 2 +(y-b+m i δ) 2 -R 2 = 0, where a is the x-coordinate of the center of the circular outline, b is the y-coordinate of the center of the circular outline, and R is the radius of the circular outline.

[0091] In one possible implementation, the error determination unit 1203 is specifically used to determine the shortest distance between each detection point and its corresponding cross-sectional profile; and to determine whether the shortest distance between each detection point and its corresponding cross-sectional profile is greater than the corresponding allowable error threshold.

[0092] In one possible implementation, the error determination unit 1203 is specifically used to determine the distance between the elliptical contour and the point to be detected when the point to be detected is outside the elliptical contour and is located in the first or third quadrant of a coordinate system established with the geometric center of the elliptical contour as the origin. Starting from the intersection of the line connecting the point to be detected and the geometric center with the elliptical contour, the distance is determined clockwise at preset intervals along the elliptical contour. If the distance between the elliptical contour and the point to be detected determined in this instance is greater than the distance between the elliptical contour and the point to be detected determined in the previous instance, then the distance between the elliptical contour and the point to be detected determined in the previous instance is used as the distance between the point to be detected and the corresponding... The shortest distance of the cross-sectional profile; when the point to be detected is outside the elliptical profile and is located in the second or fourth quadrant of the coordinate system established with the geometric center of the elliptical profile as the origin, the server takes the intersection of the line connecting the point to be detected and the geometric center with the elliptical profile as the starting point, and determines the distance between the elliptical profile and the point to be detected at preset intervals in a counterclockwise direction; when the distance between the elliptical profile and the point to be detected determined this time is greater than the distance between the elliptical profile and the point to be detected determined in the previous time, the distance between the elliptical profile and the point to be detected determined in the previous time is determined as the shortest distance between the point to be detected and the corresponding cross-sectional profile.

[0093] In another possible implementation, the error determination unit 1203 is further specifically used to determine the distance between the elliptical contour and the point to be detected when the point to be detected is within the elliptical contour and located in the first or third quadrant of a coordinate system established with the geometric center of the elliptical contour as the origin. Starting from the intersection of the line connecting the point to be detected and the geometric center with the elliptical contour, the server determines the distance between the elliptical contour and the point to be detected at preset intervals in a counter-clockwise direction. If the distance between the elliptical contour and the point to be detected determined this time is greater than the distance between the elliptical contour and the point to be detected determined in the previous time, then the distance between the elliptical contour and the point to be detected determined in the previous time is used as the distance between the point to be detected and the geometric center. The shortest distance of the corresponding cross-sectional profile; when the point to be detected is within the elliptical profile and is located in the second or fourth quadrant of the coordinate system established with the geometric center of the elliptical profile as the origin, the server takes the intersection of the line connecting the point to be detected and the geometric center with the elliptical profile as the starting point, and determines the distance between the elliptical profile and the point to be detected at preset intervals in a clockwise direction; if the distance between the elliptical profile and the point to be detected determined this time is greater than the distance between the elliptical profile and the point to be detected determined in the previous time, then the distance between the elliptical profile and the point to be detected determined in the previous time is determined as the shortest distance between the point to be detected and the corresponding cross-sectional profile.

[0094] In one possible implementation, the apparatus 1200 provided in this application further includes: a data mapping unit for mapping unqualified test points onto a standard workpiece model; and a data sending unit for sending the standard workpiece model mapped with unqualified test points to a terminal device for display.

[0095] In one possible implementation, the apparatus 1200 provided in this application further includes: a data marking unit, used to determine the error range to which the distance error of each unqualified test point belongs; and a server marking each unqualified test point with a different identifier according to the error range to which the distance error of each unqualified test point belongs.

[0096] In addition, this application also provides a server, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it causes the server to perform the method provided in the above embodiments.

[0097] In addition, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the computer to perform the method provided in the above embodiments.

[0098] In addition, this application also provides a computer program product, including a computer program that, when run, causes a computer to perform the method provided in the above embodiments.

[0099] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0100] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. A method for detecting the contour of a workpiece, characterized in that, The method includes: The server receives the contour point cloud data of the workpiece's inner cavity from the point cloud acquisition module. The server determines the cross-sectional contour corresponding to each detection point in the contour point cloud data from multiple cross-sectional contours of the preset standard workpiece model. The cross-sectional contour corresponding to each detection point refers to the cross-sectional contour with the same coordinates in the vertical direction as the detection point. The multiple cross-sectional contours include irregular shapes. The server determines whether the distance error of each of the points to be detected is greater than the corresponding allowable error threshold based on each of the points to be detected and the corresponding cross-sectional contour. The distance error is the shortest distance between the point to be detected and the corresponding cross-sectional contour. When the server determines that the distance error of any of the points to be detected is greater than the error threshold associated with the point to be detected, the point to be detected is deemed unqualified. The server determines whether the distance error of each of the points to be detected is greater than the corresponding allowable error threshold based on each of the points to be detected and the corresponding cross-sectional contour, including: The server adjusts the cross-sectional contour corresponding to each of the detection points by different factors to obtain a set of cross-sectional contours corresponding to each of the detection points. The server determines the error range to which the distance error of the corresponding detection point belongs based on the cross-sectional contours adjacent to the positions of the corresponding detection points in the cross-sectional contour set. When the lower limit of the error range is greater than the allowable error threshold, the server determines that the distance error of the corresponding detection point is greater than the allowable error threshold.

2. The method according to claim 1, characterized in that, The server determines the error range to which the distance error of the corresponding detection point belongs based on the cross-sectional contours adjacent to each detection point in the set of cross-sectional contours, including: The server substitutes the coordinates (X, Y) of the point to be detected into the function expressions of each cross-sectional profile in the set of cross-sectional profiles. Where, when the value of i is n, This represents the coordinate offset coefficient associated with the adjustment factor of the cross-sectional profile whose position is ordered as n, and when the adjustment factor is a reduction factor, When the adjustment factor is a reduction factor, ; when and At that time, the server determines the nth cross-sectional profile and the (n+1)th cross-sectional profile, which are the cross-sectional profiles adjacent to the corresponding detection point; The server uses the coordinate offset coefficient of the nth cross-sectional profile. Coordinate offset coefficient of the nth cross-sectional profile The error range to which the distance error of the corresponding point to be detected belongs is determined as ( , ).

3. The method according to claim 2, characterized in that, Before the server receives the contour point cloud data of the workpiece's inner cavity acquired by the point cloud acquisition module, the method further includes: The server receives standard contour point cloud data of the inner cavity of a standard workpiece model acquired by the point cloud acquisition module. The server uses the least squares method to fit the cross-sectional profile of the standard contour point cloud data to obtain a functional expression for the cross-sectional profile of the standard contour point cloud data.

4. The method according to claim 2, characterized in that, Each cross-sectional profile in the set of cross-sectional profiles is an elliptical profile, and the function expression of the elliptical profile is... Where a is the length of the major axis of the elliptical contour, and b is the length of the minor axis of the elliptical contour; Alternatively, each cross-sectional profile in the set of cross-sectional profiles may be a circular profile, and the function expression for the circular profile may be... (xa )²+ (yb )²-R²=0, where a is the x-coordinate of the center of the circular outline, b is the y-coordinate of the center of the circular outline, and R is the radius of the circular outline.

5. The method according to claim 1, characterized in that, The server determines whether the distance error of each of the points to be detected is greater than the corresponding allowable error threshold based on each of the points to be detected and the corresponding cross-sectional contour, including: The server determines the shortest distance between each of the points to be detected and the corresponding cross-sectional contour. The server determines whether the shortest distance between each of the points to be detected and the corresponding cross-sectional contour is greater than the corresponding allowable error threshold.

6. The method according to claim 5, characterized in that, When the cross-sectional profile is elliptical, the server determines the shortest distance between each of the points to be detected and the corresponding cross-sectional profile, including: When the point to be detected is outside the elliptical contour and is located in the first or third quadrant of a coordinate system established with the geometric center of the elliptical contour as the origin, the distance between the elliptical contour and the point to be detected is determined at preset intervals in a clockwise direction, starting from the intersection of the line connecting the point to be detected and the geometric center with the elliptical contour. If the distance between the elliptical contour and the point to be detected obtained in this determination is greater than the distance between the elliptical contour and the point to be detected obtained in the previous determination, then the distance between the elliptical contour and the point to be detected obtained in the previous determination is determined as the shortest distance between the point to be detected and the corresponding cross-sectional contour. When the point to be detected is outside the elliptical contour and is located in the second or fourth quadrant of a coordinate system established with the geometric center of the elliptical contour as the origin, the server takes the intersection of the line connecting the point to be detected and the geometric center with the elliptical contour as the starting point and determines the distance between the elliptical contour and the point to be detected at preset intervals in a counterclockwise direction. If the distance between the elliptical contour and the point to be detected determined this time is greater than the distance between the elliptical contour and the point to be detected determined in the previous time, then the distance between the elliptical contour and the point to be detected determined in the previous time is determined as the shortest distance between the point to be detected and the corresponding cross-sectional contour.

7. The method according to claim 5, characterized in that, When the cross-sectional profile is elliptical, the server determines the shortest distance between each of the points to be detected and the corresponding cross-sectional profile, including: When the point to be detected is within the elliptical contour and is located in the first or third quadrant of a coordinate system established with the geometric center of the elliptical contour as the origin, the server takes the intersection of the line connecting the point to be detected and the geometric center with the elliptical contour as the starting point and determines the distance between the elliptical contour and the point to be detected at preset intervals in a counterclockwise direction. If the distance between the elliptical contour and the point to be detected determined this time is greater than the distance between the elliptical contour and the point to be detected determined in the previous time, then the distance between the elliptical contour and the point to be detected determined in the previous time is determined as the shortest distance between the point to be detected and the corresponding cross-sectional contour. When the point to be detected is within the elliptical contour and is located in the second or fourth quadrant of a coordinate system established with the geometric center of the elliptical contour as the origin, the server takes the intersection of the line connecting the point to be detected and the geometric center with the elliptical contour as the starting point, and determines the distance between the elliptical contour and the point to be detected at predetermined intervals in a clockwise direction. If the distance between the elliptical contour and the point to be detected determined this time is greater than the distance between the elliptical contour and the point to be detected determined in the previous time, then the distance between the elliptical contour and the point to be detected determined in the previous time is determined as the shortest distance between the point to be detected and the corresponding cross-sectional contour.

8. The method according to any one of claims 1-7, characterized in that, After determining that the detection point is unqualified when the distance error of any of the detection points is greater than the error threshold associated with the detection point, the method further includes: The server maps the defective test points onto the standard workpiece model; The server will map a standard workpiece model with the defective test points onto it and send it to the terminal device for display.

9. The method according to claim 8, characterized in that, Before the server sends a standard workpiece model with non-conforming inspection points to the terminal device for display, the method further includes: The server determines the error range to which the distance error of each of the unqualified test points belongs; The server marks each of the unqualified test points with a different identifier based on the error range to which the distance error of each unqualified test point belongs.

10. A contour detection device for a workpiece, characterized in that, The device includes: The data receiving unit is used to receive the contour point cloud data of the inner cavity of the workpiece acquired by the point cloud acquisition module. The contour determination unit is used to determine the cross-sectional contour corresponding to each detection point in the contour point cloud data from multiple cross-sectional contours of a preset standard workpiece model. The cross-sectional contour corresponding to each detection point refers to the cross-sectional contour with the same coordinates in the vertical direction as the detection point. The multiple cross-sectional contours include irregular shapes. An error determination unit is used to determine whether the distance error of each of the points to be detected is greater than the corresponding allowable error threshold based on each of the points to be detected and the corresponding cross-sectional profile. The distance error is the shortest distance between the point to be detected and the corresponding cross-sectional profile. The data detection unit is used to determine that the detection point is unqualified when the distance error of any of the detection points is greater than the error threshold associated with the detection point. The error determination unit is specifically used for: The server adjusts the cross-sectional contour corresponding to each of the points to be detected by different factors to obtain a set of cross-sectional contours corresponding to each of the points to be detected. The server determines the error range to which the distance error of the corresponding detection point belongs based on the cross-sectional contours adjacent to the positions of the corresponding detection points in the cross-sectional contour set. When the lower limit of the error range is greater than the allowable error threshold, the server determines that the distance error of the corresponding detection point is greater than the allowable error threshold.

11. A server comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it causes the server to perform the method as described in any one of claims 1 to 9.

12. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it causes the computer to perform the method as described in any one of claims 1 to 9.

13. A computer program product, said computer program product storing a computer program, characterized in that, When the computer program is executed by a processor, it causes the computer to perform the method as described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Pipeline section contour acquisition method and device, electronic equipment and storage medium

    CN113359150A

  • Municipal infrastructure monitoring operation and maintenance method and system and storage medium

    CN113538688A