Size detection system and size detection method for fabrication hole

Through the fixed target measuring tool and camera system, the size and position of process holes are determined using scale marks, and the high cost and low efficiency problems of complex workpiece detection in the prior art are solved, and high-precision and low-cost process hole detection are achieved.

CN120403435APending Publication Date: 2025-08-01FITOW (TIANJIN) DETECTION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510589878.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2024-12-03
Filing Date
2025-05-08
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

The prior art is difficult to accurately detect the size and position of complex workpiece process holes while ensuring high efficiency and low cost. Conventional measurement tools are costly, complex in operation and difficult to meet the requirements of accurate measurement.

Method used

The fixed target measuring tool and camera system are used to determine the size and position of the process hole through the relative position relationship between the scale lines on the target measuring tool and the process hole, avoid the need for high-precision mechanical modules and multi-camera splicing, and use a small field of view and high pixel camera to improve detection accuracy.

Benefits of technology

The accuracy and efficiency of process hole size and position are improved, the detection cost is reduced, the single pixel accuracy is improved to the micron level, the deviation caused by the movement of the mechanical servo module is reduced, and the accuracy and consistency of the detection results are ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120403435A_ABST
    Figure CN120403435A_ABST
Patent Text Reader

Abstract

The invention provides a dimension detection system and a dimension detection method for a fabrication hole, and relates to the technical field of workpiece detection, and the system comprises a camera, a target measuring tool with scales, and a controller. The target measuring tool is positioned on one side of the workpiece to be measured; scale lines on the target measuring tool are perpendicular to the center line of the workpiece to be measured. The workpiece to be measured is provided with at least one process hole; the camera is located right above the target measuring tool and the workpiece to be measured; the camera is connected with the controller; the target measuring tool and the camera are relatively static; the camera is used for collecting an image containing the target measuring tool and the auxiliary hole; and the controller is used for analyzing the image to obtain the size and the position of the fabrication hole. According to the technical scheme of the invention, the detection cost of the fabrication hole is reduced, the detection accuracy of the fabrication hole is improved, the resource utilization of the camera is optimized, the size and position detection efficiency of the fabrication hole is ensured, and the accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of workpiece detection. Specifically, it relates to a size detection system and a size detection method for process holes. Background Art

[0002] With the continuous progress of the manufacturing supply chain, the production efficiency of component manufacturers in various fields has been significantly improved, the styles of workpieces have become increasingly complex, and the product iteration speed has been accelerating. This trend has brought severe challenges to the tolerance quality detection of the shape and position of workpiece process holes. Due to the complexity of workpiece styles, conventional standardized measurement tools often struggle to meet precise measurement requirements, while the improvement of production efficiency requires that detection must be completed within an extremely short time.

[0003] To address this problem, there are currently three main solutions: one is to manufacture professional measurement fixtures, the second is to use a coordinate measuring machine for measurement, and the third is size measurement based on machine vision. However, all three methods have obvious limitations.

[0004] The first method usually requires a long production cycle and high costs during the development process, imposing a significant economic burden on enterprises. In addition, the compatibility of professional fixtures is poor. Once the product is iteratively upgraded, new fixtures often need to be redeveloped. At the same time, the regular maintenance and standardized operation of fixtures also rely on the professional qualities of operators, presenting risks of moral hazard and non-standard operation, thus increasing the difficulty of quality control.

[0005] The second method's contact measurement method may damage fragile or soft parts, resulting in inaccurate measurement results. In addition, the purchase and maintenance costs of coordinate measuring machines are high, and they have strict requirements for environmental conditions and need a constant temperature and humidity environment to maintain measurement accuracy. Their operation process is complex, requiring professional operators and maintenance personnel, and the measurement efficiency is relatively low. Especially for the point-by-point measurement of complex geometric shapes, it far fails to meet the requirements of production efficiency and cannot achieve 100% full inspection of workpieces.

[0006] The third method's size measurement accuracy of workpieces is largely limited by the resolution and field of view of the camera. When facing the measurement task of large-sized workpieces, the machine vision-based method often struggles to achieve satisfactory detection accuracy while ensuring the integrity of the field of view. This limitation makes it necessary to more carefully consider the balance among workpiece size, detection accuracy, and product compatibility when selecting and applying machine vision measurement technology. Summary of the Invention

[0007] The purpose of the embodiments of this application is to provide a size detection system and a size detection method for process holes to solve the above problems existing in the prior art, and to accurately, efficiently, and low-costly detect the size and position of process holes.

[0008] In a first aspect, a method for detecting the size of a process hole is provided. The system may include a camera, a target measuring tool with scales, and a controller; wherein, the target measuring tool is located on one side of the workpiece to be measured; the scale lines on the target measuring tool are perpendicular to the center line of the workpiece to be measured; at least one process hole is provided on the workpiece to be measured; the camera is located directly above the target measuring tool and the workpiece to be measured; the camera is connected to the controller; the target measuring tool and the camera are relatively stationary; The camera is configured to collect an image including the target measuring tool and the process hole; The controller is configured to optionally select at least one scale line as a target scale line; for any process hole, analyze the image to obtain the relative position relationship between the target tangent of the process hole and the target scale line; based on the relative position relationship and the position of the target scale line on the target measuring tool, determine the size and position of the process hole; wherein, the target tangent is parallel to any one of the scale lines.

[0009] In an optional implementation, the system further includes: a first moving component and a second moving component; The first moving component is connected to the camera; the second moving component is connected to the workpiece to be measured; The first moving component is configured to control the camera to move directly above the process hole; The second moving component is configured to control the workpiece to be measured to rotate around the center line, so that the process holes located on different outer surfaces of the workpiece to be measured are collected by the camera.

[0010] In an optional implementation, the system further includes: a base disposed below the workpiece to be measured; A longitudinal groove is formed on the top surface of the base; the workpiece to be measured is embedded in the longitudinal groove; The longitudinal groove is configured to fix the workpiece to be measured and limit the height of the workpiece to be measured exceeding the top surface; At least one measurement area is provided on the target measuring tool; the center line or boundary line of the measurement area is the scale line of the target measuring tool; A position identifier for indicating the position of the workpiece to be measured is provided on the outer surface of the workpiece to be measured.

[0011] In an optional implementation, the camera includes a first camera and a second camera; the target measuring tool includes a first target measuring tool and a second target measuring tool; The first target measuring tool is located on one side of the front end of the workpiece to be measured; the first camera is located directly above the first target measuring tool and the front end of the workpiece to be measured; The second target measuring tool is located on one side of the rear end of the workpiece to be measured; the second camera is located directly above the second target measuring tool and the rear end of the workpiece to be measured.

[0012] Second, a method for detecting the size of a process hole is provided, which may include: Obtain the first positions of the process holes on the workpiece to be measured; Select at least one scale line from the target measuring tool located on one side of the workpiece to be measured as the target scale line; For any process hole, generate position control parameters based on the first position of the process hole; Control the movement of the first moving component and the second moving component based on the position control parameters to drive the camera to move directly above the process hole; Obtain an image collected by the camera that includes the process hole and the target scale line; Analyze the image to obtain the relative position relationship between the target tangent line of the process hole and the target scale line; wherein, the target tangent line is parallel to any one of the scale lines; Determine the size and the second position of the process hole based on the position of the target scale line on the target measuring tool and the relative position relationship.

[0013] In an optional implementation, the first position of the process hole includes the position relationship of the process hole relative to the position identifier, and the distance between the process hole and any end of the workpiece to be measured; Before generating the position control parameters based on the first position of the process hole, the method further includes: Obtain the position of the camera.

[0014] In an optional implementation, generating the position control parameters based on the first position of the process hole includes: Generate a first position control parameter based on the distance between the process hole and any end of the workpiece to be measured and the position of the camera; Generate a second position control parameter based on the position relationship of the process hole relative to the position identifier; Controlling the movement of the first moving component and the second moving component based on the position control parameters includes: Based on the second position control parameter, control the second moving component to drive the workpiece to be measured to rotate around the center line so that the process hole is located in the image acquisition area of the camera; Based on the first position control parameter, control the first moving component to drive the camera to move directly above the process hole.

[0015] In an alternative implementation, before generating the position control parameter based on the first position of the process hole, the method further includes: Controlling the second moving component to drive the workpiece to be measured to rotate around the center line, so that the surface where the position identifier is located is the top surface of the workpiece to be measured; Generating a second position control parameter based on the positional relationship between the process hole and the position identifier, including: Determining a target rotation angle based on the positional relationship between the process hole and the position identifier; Generating a second position control parameter based on the target rotation angle to control the second moving component to drive the workpiece to be measured to rotate around the center line, so that the surface where the process hole is located is the new top surface of the workpiece to be measured.

[0016] In an alternative implementation, before obtaining the first positions of the process holes on the workpiece to be measured, the method further includes: Obtaining an image of the target measuring tool; Analyzing the image of the target measuring tool to obtain the positions of the respective scale lines on the target measuring tool; After selecting at least one scale line from the target measuring tool located on one side of the workpiece to be measured as the target scale line, the method further includes: Determining the position of the target scale line on the target measuring tool based on the positions of the respective scale lines on the target measuring tool.

[0017] In a third aspect, a device for detecting the size of a process hole is provided, and the device may include: A taking unit for obtaining the first positions of the process holes on the workpiece to be measured; A selection unit for selecting at least one scale line from the target measuring tool located on one side of the workpiece to be measured as the target scale line; A generating unit for generating a position control parameter for any process hole based on the first position of the process hole; A moving unit for controlling the first moving component and the second moving component to move based on the position control parameter to drive the camera to move directly above the process hole; An acquisition unit for obtaining an image collected by the camera and including the process hole and the target scale line; An analysis unit for analyzing the image to obtain the relative positional relationship between the target tangent line of the process hole and the target scale line; wherein, the target tangent line is parallel to any one of the scale lines; and determining the size and the second position of the process hole based on the position of the target scale line on the target measuring tool and the relative positional relationship.

[0018] In this application, a fixed target measuring tool is selected. By the position of the scale lines on the target measuring tool, the size and position of the process hole are calculated, which can effectively shield the movement deviation caused by the movement of the mechanical servo module. Therefore, there is no need to configure a high-precision mechanical module, effectively reducing the development cost.

[0019] This application solves the limitation of large-resolution cameras in pixel accuracy. Each camera focuses on collecting the position of the points to be measured within its field of view. Due to the reduction of the field of view, the single-pixel accuracy is significantly improved, reaching the micron level; it not only improves the accuracy of detection, but also optimizes the resource utilization of the camera, ensures the efficiency of detecting the size and position of the process hole, and improves the accuracy.

[0020] The target measuring tool of this application is in a relatively static state with the industrial camera, so that the image acquisition of the target by the industrial camera is always consistent, thus reducing the errors caused by the movement of the camera or the change of the target. In the whole measurement system, the only variable that changes is the workpiece to be measured placed each time. This application fixes and limits the workpiece to be measured by setting longitudinal grooves on the base, minimizing the error factors brought by placing the workpiece to be measured each time, and ensuring the accuracy and consistency of the detection results. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions of the embodiments of this application, the drawings required to be used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application, so they should not be regarded as limiting the scope. For those of ordinary skill in the art, without creative efforts, other relevant drawings can also be obtained based on these drawings.

[0022] Figure 1 It is a schematic structural diagram of a size detection system for a process hole provided by an embodiment of this application; Figure 2 It is a schematic layout diagram of a size detection system for a process hole provided by an embodiment of this application; Figure 3 It is a schematic structural diagram of a base provided by an embodiment of this application; Figure 4 It is a flowchart of a method for detecting the size of a process hole provided by an embodiment of this application; Figure 5 It is a schematic diagram of the relative position relationship between a process hole and scale lines provided by an embodiment of this application; Figure 6 It is a schematic diagram of measuring the size of a process hole provided by an embodiment of this application; Figure 7 It is a schematic structural diagram of a size detection device for a process hole provided by an embodiment of this application; Figure 8 A schematic structural diagram of an electronic device provided by an embodiment of the present application; Figure 9 A side view of a target measuring tool and a workpiece to be measured provided by an embodiment of the present application; In the figure: 1. Camera; 2. Target measuring tool; 3. Workpiece to be measured; 4. First moving component; 5. Second moving component; 6. Base; 7. Longitudinal groove; 8. Process hole; 9. Scale line; 10. Target tangent; 11. Upper step surface; 12. Lower step surface. Specific implementation manners

[0023] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0024] Currently, there are mainly three ways to solve the problem of measuring large-sized workpieces in the machine vision industry: high-resolution cameras, servo platforms carrying small-resolution cameras, and multi-camera mosaics.

[0025] First of all, high-resolution cameras have high costs, large volumes and total weights. Moreover, as the resolution of the camera increases, the problem of lens distortion becomes more and more serious, resulting in image distortion, which in turn affects the measurement accuracy. To correct this distortion, complex calibration and correction work are required, which not only increases the complexity of the operation, but may also introduce new errors. In addition, for products with dimensions exceeding 500 mm, even if high-resolution cameras are used, they may face challenges of resolution limits. When the size of the product exceeds the resolution ability of the camera, clear and accurate images cannot be obtained, resulting in unreliable measurement results. Moreover, high-resolution cameras are extremely sensitive to the vibration conditions of the surrounding environment. In production enterprises, due to activities such as equipment startup, personnel movement, and possible logistics transportation, vibrations and interferences of varying degrees will be generated. These vibrations and interferences will directly affect the stability and imaging quality of the camera, and thus have an adverse impact on the final measurement accuracy and the performance effect of the equipment.

[0026] Secondly, for the servo platform carrying a small-resolution camera, the distance from the process hole to the reference plane is not directly obtained by the camera, but indirectly calculated by adding the size of the process hole obtained by the camera and the mechanical distance of the module movement. Therefore, the motion accuracy, installation accuracy, and process maintenance of the mechanical module itself will all add disturbance factors to the equipment size measurement. This results in a low repeat measurement accuracy of the equipment and makes it impossible to perform high-precision measurement of large-sized workpieces. At the same time, in order to comprehensively capture the details of large-sized products, it must rely on the precise stitching of multiple local images. However, in actual operation, it is often difficult to achieve perfect matching in the overlapping area between images. Coupled with factors such as subtle changes in lighting conditions and interference from shadows, obvious stitching defects or color differences are likely to appear at the stitching seams. These problems not only damage the overall visual effect of the image, but also have a non-negligible impact on the measurement accuracy.

[0027] Finally, when multiple cameras work together, in order to ensure that each camera can cooperate accurately like a precision instrument, it is necessary to accurately measure and calibrate the position and attitude of each camera. For this purpose, it is necessary to rely on a large calibration board, a professional tool. However, the installation of the calibration board requires extremely high precision, and any slight deviation may lead to errors in the calibration results. At the same time, the slight vibration of the camera may also affect the calibration results. Therefore, a series of measures need to be taken to reduce the vibration of the camera. In addition, factors such as lighting conditions and camera lens distortion need to be considered during the calibration process, and these factors may all have a certain impact on the calibration results.

[0028] This method has extremely high requirements for the installation accuracy of the calibration board and the vibration of the camera, and it is often difficult to control in actual operation. As a result, it is impossible to ensure the accuracy and effect of image stitching, affecting the detection accuracy and effect of the equipment.

[0029] To solve the problems existing in the above-mentioned prior art, the present application designs a size detection system for process holes. By fixing a target measuring tool with scale lines on one side of the workpiece to be measured, based on the relative position relationship between the scale lines on the target measuring tool and the process holes on the workpiece to be measured, the position and size of the process holes are determined. This not only overcomes the movement deviation caused by the movement of the mechanical servo module, but also does not require the configuration of a high-precision mechanical module, effectively reducing the development cost. At the same time, it solves the limitation of the large-resolution camera in pixel accuracy. Each camera focuses on collecting the position of the point to be measured within its field of view. Due to the reduction of the field of view, the single-pixel accuracy is significantly improved, reaching the micron level. This not only improves the accuracy of detection, but also optimizes the resource utilization of the camera, ensures the efficiency of detecting the size and position of the process holes, and improves the accuracy.

[0030] Such as Figure 1As shown in the figure, the size detection system for process holes in the embodiments of the present application includes: a camera 1, a target measuring tool 2 with scales, a controller, a first moving component 4, a second moving component 5, and a base 6; wherein, the target measuring tool 2 is located on one side of the workpiece 3 to be measured; the scale lines 9 on the target measuring tool 2 are perpendicular to the center line of the workpiece 3 to be measured; the target measuring tool 2 and the camera 1 are relatively stationary; the camera 1 is located directly above the target measuring tool 2 and the workpiece 3 to be measured; the camera 1 is connected to the controller; the first moving component 4 is connected to the camera 1; the second moving component 5 is connected to the workpiece 3 to be measured; at least one process hole 8 is provided on the workpiece 3 to be measured, and the base 6 is arranged below the workpiece 3 to be measured.

[0031] The first moving component 4 is used to control the camera 1 to move directly above the process hole, so that the camera can collect an image including the target measuring tool and the process hole. The second moving component 5 is used to control the workpiece to be measured to rotate around the center line, so that the process holes located on different outer surfaces of the workpiece to be measured can be collected by the camera. The camera 1 is used to collect an image including the target measuring tool and the process hole. The controller is used to optionally select at least one scale line as the target scale line; for any process hole 8, analyze the image to obtain the relative position relationship between the target tangent of the process hole and the target scale line; based on the relative position relationship and the position of the target scale line on the target measuring tool, determine the size and position of the process hole; wherein, the target tangent is parallel to any one of the scale lines. In the embodiments of the present application, at least one measurement area is provided on the target measuring tool 2; the center line or the boundary line of the measurement area is the scale line of the target measuring tool; each scale line is parallel to each other. The target measuring tool is fixed on one side of the tool to be measured, and its position remains stationary. Specifically, the shape of the measurement area can be circular or square, etc. The measurement area on the target measuring tool not only helps the camera to more accurately identify and locate the target, but also provides more reference information during the measurement process, thereby further improving the measurement accuracy.

[0032] In the embodiments of the present application, an object with a black-and-white grid pattern on its top surface can be selected as the target measuring tool, or a ruler with scales or other objects provided with a measurement area can also be selected as the target measuring tool.

[0033] In the embodiments of the present application, the distance between the scale line on the target measuring tool 2 and the end of the target perpendicular to the center line of the workpiece to be measured can be obtained, and the scale spacing between multiple scale lines can also be determined. Therefore, the position and size of the process hole 8 can be determined based on the distance between the extension line of the target tangent 10 of the process hole and any one or more scale lines 9. Specifically, the target tangent does not actually exist, but is added or drawn using a tool during image analysis.

[0034] In an embodiment of the present application, the target tangent line can be the tangent lines parallel to the scale line at both ends of the process hole, or the center line of the process hole parallel to the scale line; or a line segment passing through any positioning point in the process hole, and this line segment is parallel to the scale line; the position of this positioning point in the process hole is known and fixed. For example, there is a positioning point in the process hole, and the ratio of the distances from this positioning point to the front end and the rear end of the process hole is 4:3; a line segment parallel to the scale line is made based on this positioning point to obtain the target tangent line, and based on the relative position relationship between the target tangent line and the scale line, the position of this positioning point on the workpiece to be measured is determined; then according to the ratio of the distances from the positioning point to the front end and the rear end of the process hole being 4:3, the positions and sizes of the front end and the rear end of the process hole on the workpiece to be measured are determined.

[0035] In an embodiment of the present application, the camera includes a first camera and a second camera; the target measuring tool includes a first target measuring tool and a second target measuring tool; there are also two first moving components; as Figure 2 shown, the first target measuring tool is located on one side of the front end of the workpiece to be measured; the first camera is located directly above the first target measuring tool and the front end of the workpiece to be measured; the second target measuring tool is located on one side of the rear end of the workpiece to be measured; the second camera is located directly above the second target measuring tool and the rear end of the workpiece to be measured; the two first moving components 4 are respectively used to control the first camera or the second camera to move from the front end or the rear end of the workpiece 3 to the middle, so as to collect the process holes 8 at different positions; when the workpiece to be measured is relatively long, setting two sets of target measuring tools, cameras and first moving components can simultaneously collect the images of the process holes and the corresponding target measuring tools at the front and rear ends, and determine the sizes and positions of the process holes at the front and rear ends, thereby improving the detection efficiency.

[0036] In practical applications, although the workpiece to be measured with a relatively large size is provided with process holes not only at the front end and the rear end, considering that the process holes at different positions of the same workpiece to be measured are opened in the same batch, their detection results are strongly correlated. When the sizes and positions of the process holes at the front end and the rear end of the workpiece to be measured are both detected correctly, the probability that the sizes and positions of the process holes at the middle position of the workpiece to be measured have errors is very small. Therefore, in the present application, by setting cameras at both ends to specifically detect the process holes at both ends of the workpiece to be measured, the detection result of the overall workpiece to be measured can be obtained.

[0037] In an embodiment of the present application, a position identifier for indicating the position of the workpiece to be measured is provided on the outer surface of the workpiece to be measured; this position identifier can be located on the outer surface at one end or the middle position of the workpiece to be measured; the workpiece to be measured can be a cylinder, a cuboid or other shapes.

[0038] In practical applications, the process hole 8 may be located on different outer surfaces of the workpiece 3 to be measured. When there is no process hole 8 to be measured on the top surface of the current workpiece 3 to be measured, it is necessary to rotate the workpiece 3 to be measured, thereby changing the top surface of the workpiece 3 to be measured. Setting a position identifier can indicate the position of the workpiece 3 to be measured. By obtaining the relative position relationship between the process hole and the position identifier, the rotation angle of the workpiece 3 to be measured can be determined.

[0039] For example, when the workpiece 3 to be measured is a cylinder, a position identifier is set at one end of the workpiece 3 to be measured. When placing the workpiece 3 to be measured, the position identifier is located on the top surface. After all the process holes on the current top surface are measured, by obtaining the arc length or angle difference between the surface where other process holes are located and the surface where the position identifier is located, the rotation angle of the workpiece 3 to be measured is determined so that other process holes are located on the top surface of the workpiece 3 to be measured. Then, an image including other process holes and the target measuring tool is collected by the camera; when the position identifier is located on the top surface again, it means that all the process holes on the workpiece 3 to be measured have been detected.

[0040] In the embodiment of the present application, the first moving component controls the camera to move from one end of the workpiece 3 to be measured to the other end, so as to collect the process holes located at different positions on the same top surface. This can not only effectively reduce the camera's field of view and improve the camera's accuracy; at the same time, when the resolution is the same, the number of pixels occupied by the camera's field of view per unit area increases significantly, thereby further improving the measurement accuracy of the picture.

[0041] In the embodiment of the present application, a longitudinal groove 7 is provided on the top surface of the base 6; the workpiece 3 to be measured is embedded in the longitudinal groove 7; the longitudinal groove 7 is used to fix the workpiece 3 to be measured and limit the height of the workpiece 3 to be measured exceeding the top surface of the base; specifically, since the positions where workpieces 3 to be measured of the same type are embedded in the longitudinal groove are necessarily the same, the longitudinal groove can play a role in positioning the workpiece 3 to be measured and ensure that the positions (relative to the height of the top surface of the base) of workpieces 3 to be measured of the same type or the same model are consistent each time they are placed. Thereby, the detection error caused by inconsistent placement heights of the workpieces 3 to be measured is eliminated, which not only improves the accuracy of detection, but also makes the entire detection process more convenient and efficient.

[0042] In an embodiment of the present application, the longitudinal groove 7 can be a longitudinal V-shaped groove, as Figure 3 shown.

[0043] In an embodiment of the present application, a small-field-of-view high-pixel camera can be selected for the camera, so as to improve the detection accuracy and system stability.

[0044] In another embodiment of the present application, selecting a camera with a small resolution can make its movement trajectory more flexible and easier to adjust, and it performs better in terms of being compatible with different models of products; by adjusting the PLC program, the movement trajectory of the camera can be easily changed to meet the measurement requirements of different models of products, thereby improving the utilization rate of the equipment and enabling a single device to be compatible with the measurement of multiple products, meeting diverse detection needs.

[0045] In another embodiment of the present application, light sources are further provided on both sides of the workpiece 3 to be measured, for providing illumination when the camera acquires images.

[0046] In the present application, the target measuring tool is fixedly installed on one side of the workpiece to be measured. While the camera takes pictures of the workpiece to be measured, it also takes pictures of the target measuring tool. Through a professional algorithm, the key features of the target measuring tool are extracted and associated with the process hole to be measured, so as to obtain the physical position coordinates of the process hole of the workpiece to be measured; through the target measuring tool as an intermediate medium, the physical coordinate system is effectively associated with the camera coordinate system, effectively shielding the disturbance brought by the servo motion accuracy to the detection system, and thus realizing high-precision flexible measurement.

[0047] The process hole size detection system of the embodiment of the present application can be applied to the detection of process holes of large-sized workpieces to be measured. By using cameras arranged at the front and rear ends of the workpiece to be measured to acquire images containing the target measuring tool and the process hole, and then analyzing to obtain the size and position of the process hole; and comparing with the size and position of the process hole specified in the construction standard and requirements of the process hole to determine whether the process hole meets the requirements, thus completing efficient and accurate detection of the process hole.

[0048] Figure 4 It is a schematic flowchart of a method for detecting the size of a process hole provided for an embodiment of the present application. As Figure 4 shown, the method may include: Step S410, obtaining the first positions of the process holes on the workpiece to be measured; selecting at least one scale line from the target measuring tool located on one side of the workpiece to be measured as the target scale line.

[0049] In the embodiment of the present application, the first position of the process hole includes the positional relationship of the process hole relative to the position identifier and the distance between the process hole and any end of the workpiece to be measured; the distance between the process hole and any end of the workpiece to be measured is generally a fuzzy distance. The purpose of the present application is to control the camera to acquire images containing the process hole and the target measuring tool according to the fuzzy distance, and then analyze the images to obtain the accurate position of the process hole, that is, the second position.

[0050] In the embodiment of the present application, there is one or more scale lines on the target measuring tool, and one or more scale lines can be selected as the target scale line in the present application.

[0051] In the embodiment of the present application, an image containing only the target measuring tool is pre-acquired by a camera. By analyzing the image of the target measuring tool, the positions of the respective scale lines on the target measuring tool are obtained; when the target scale line is determined, based on the positions of the respective scale lines on the target measuring tool, the position of the target scale line on the target measuring tool is determined.

[0052] In the embodiment of the present application, an extension line of the target tangent line of the process hole is extended to the position of the scale line; the scale line with the closest horizontal distance to the extension line of the target tangent line is selected as the target scale line.

[0053] Step S420: For any process hole, generate position control parameters based on the first position of the process hole; control the first moving component and the second moving component to move based on the position control parameters; obtain an image collected by the camera and containing the process hole and the target scale line.

[0054] In the embodiment of the present application, it is also necessary to pre-obtain the position of the camera, that is, the horizontal distance between the camera and one end of the workpiece to be measured.

[0055] In the embodiment of the present application, for the convenience of positioning the process hole, before generating the position control parameters based on the first position of the process hole, it is also necessary to control the second moving component to drive the workpiece to be measured to rotate around the center line so that the surface where the position identifier is located is the top surface of the workpiece to be measured.

[0056] In the embodiment of the present application, generating the position control parameters based on the first position of the process hole includes: Generating a first position control parameter based on the distance between the process hole and any end of the workpiece to be measured and the position of the camera; generating a second position control parameter based on the positional relationship between the process hole and the position identifier.

[0057] In the embodiment of the present application, controlling the first moving component and the second moving component to move based on the position control parameters includes: Based on the second position control parameter, controlling the second moving component to drive the workpiece to be measured to rotate around the center line so that the process hole is located in the image acquisition area of the camera; based on the first position control parameter, controlling the first moving component to drive the camera to move directly above the process hole.

[0058] In the embodiment of the present application, generating the second position control parameter based on the positional relationship between the process hole and the position identifier includes: Based on the positional relationship between the process hole and the position identifier, match the target rotation angle corresponding to the positional relationship from the configured look-up table of different positional relationships and corresponding rotation angles; based on the target rotation angle, generate a second position control parameter to control the second moving component to drive the workpiece to be measured to rotate around the center line, so that the surface where the process hole is located becomes the new top surface of the workpiece to be measured, and the process hole is located on the center line perpendicular to the scale line of the new top surface.

[0059] In the embodiment of the present application, the target rotation angle is the angle required to convert the top surface of the workpiece to be measured from the surface where the position identifier is located to the surface where the process hole is located; it can be directly obtained by calculating the positional difference and angle between the vertex of the position identifier and the center of the process hole, or can be obtained in advance according to the information of the workpiece to be measured; for example, when the workpiece to be measured is a cuboid, the position identifier and the process hole are respectively located on two adjacent side surfaces, then the target rotation angle is 90 degrees.

[0060] In another embodiment of the present application, when placing the workpiece to be measured, it is also possible to make the tangent line at one end of the workpiece to be measured coincide with any scale line on the target measuring tool, and make the target tangent line of the process hole to be measured coincide with any scale line, directly obtain the distance between the corresponding scale lines, and determine the size and the second position of the process hole, improving the detection efficiency.

[0061] Step S430: Analyze the image to obtain the relative positional relationship between the target tangent line of the process hole and the target scale line; based on the position of the target scale line on the target measuring tool and the relative positional relationship, determine the size and the second position of the process hole.

[0062] In the embodiment of the present application, the target tangent line of the process hole is the tangent line extracted from all the edge tangent lines of the process hole and parallel to any one scale line, as Figure 5 shown; the number of target tangent lines is 2, which are the edge tangent lines at the front end and the rear end of the process hole respectively.

[0063] In the embodiment of the present application, analyzing the image to obtain the relative positional relationship between the target tangent line of the process hole and the target scale line includes: In the embodiment of the present application, extend the target tangent lines at both ends of the process hole to the position of the target scale line, and according to the distances between the extended lines of the two target tangent lines and the target scale line, determine the distance between the two target tangent lines of the process hole, that is, the size of the process hole; based on the distances between the extended lines of the two target tangent lines and the target scale line and the position of the target scale line on the target measuring tool, determine the second position of the process hole.

[0064] Analyze the said image to obtain the relative position relationship between the target tangent of the process hole and the target scale line, where the relative position relationship refers to the distance between the target tangent and the target scale line. The calculation steps of the relative position relationship include: Confirm the physical parameters of the camera, including the sensor size and focal length; Confirm the image resolution, where the pixel resolution selects the direction corresponding to the sensor size. The sensor width corresponds to the horizontal pixel number of the image, and the sensor height corresponds to the vertical pixel number of the image; Obtain the object distance, that is, the actual distance from the process hole to the camera lens; Calculate the physical size of each pixel. Pixel physical size = actual field of view size / image resolution, where the unit of the actual field of view size is mm, the unit of the image resolution is pixel, and the actual field of view size = sensor size * object distance / focal length; Obtain the actual pixel number between the target tangent and the target scale line. Through the actual pixel number and the physical size of the pixel, obtain the actual length of the relative position relationship. Actual length = actual pixel number * pixel physical size, where the units of the object distance and the focal length are both mm.

[0065] In actual detection, it is found that the object distance error will cause the measurement result to deviate from the true value, especially when the workpiece is replaced, the object distance changes due to the placement deviation. Therefore, we adopt the following scheme to systematically eliminate the object distance error.

[0066] Obtain the image collected by the camera that contains the process hole and the target scale line; As Figure 9 shown, the newly designed target measuring tool is in a stepped shape. Measuring areas are provided on both the upper and lower stepped surfaces. The upper and lower stepped surfaces extend along the length direction of the workpiece to be measured. Respectively extract the diameters of the same process hole corresponding to the measuring areas on the upper and lower stepped surfaces in the image, and calculate the ratio of the diameters of the same process hole obtained in the two measuring areas. Moreover, it is the diameter of the process hole obtained from the measuring area on the upper stepped surface compared to the diameter of the process hole obtained from the measuring area on the lower stepped surface. It should be noted here that any two parallel tangents on the left and right sides of a process hole can be used as the process hole diameter. For the convenience of calculation, in actual applications, we use the number of pixel grids corresponding to the upper and lower stepped surface measuring areas of the two parallel tangents as the diameter, that is, just calculate the ratio of the two pixel grids, without replacing them with the actual diameter length.

[0067] When the ratio is within the preset range, the standard object distance is used as the object distance in this detection. The standard object distance refers to the actual distance from the process hole to the camera lens after placing the same type of workpiece to be measured under standard working conditions. When the ratio exceeds the preset range, the product of the standard object distance and the coefficient is used as the object distance in this detection. Regarding the ratio mentioned here, in practical applications, based on the principle that the farther the distance, the smaller the image, and through actual verification, the preset range of the ratio is set between 1.03 and 1.05, that is, when the ratio is between 1.03 and 1.05, the standard object distance can be used as the object distance in this detection.

[0068] Regarding the coefficient mentioned here, in practical applications, we made a corresponding relationship table between the ratio and the coefficient, which is not fully listed here: Serial number Ratio Coefficient Serial number Ratio Coefficient 1 0.99 1.04 4 1.02 1.01 2 1 1.03 5 1.06 0.99 3 1.01 1.02 6 1.07 0.98 In the above method, the online distance measurement technology commonly used in traditional methods is abandoned, that is, a laser rangefinder is not required, reducing the system cost. And because the workpiece to be measured and the target measuring tool are relatively not completely fixed, while the target measuring tool is fixed, a new design of the target measuring tool is carried out. Considering the principle that the farther the distance, the smaller the image within the same lens, the target measuring tool is designed in the form of upper and lower steps, and both are provided with measurement areas. The measurement area on the upper step surface is used as the basis for actually calculating the size and position of the process hole, and the measurement areas on the upper and lower step surfaces work together to judge the object distance error.

[0069] This method of judging the object distance error is simple to operate, without the need to take multiple pictures. Just directly detect and take pictures, and add an algorithm judgment in the pre-step of calculating the size and position.

[0070] In the embodiment of the present application, one or more target scale lines can be selected. If there is 1 target scale line, the distances between the two target tangents of the process hole and this target scale line are respectively determined, and then the positions of the two target tangents of the process hole on the workpiece to be measured are determined. If there are 2 target scale lines, it is necessary to obtain the scale distance between the target scale lines. According to the distances between the two target tangents and the target scale lines respectively and the scale distance, the size of the process hole is obtained.

[0071] In another embodiment of the present application, a tangent can also be made at one end of the workpiece to be measured (this tangent is parallel to the scale line) and extended to the scale line. According to the distance between this tangent and the target scale line and the distance between the target tangent of the process hole and the target scale line, the second position of the process hole is determined.

[0072] In the embodiment of the present application, the second position of the process hole is the distance from one end (front end or rear end) of the workpiece to be measured.

[0073] For example, such as Figure 6As shown in the figure, an object with a black-and-white grid pattern on its top surface is selected as the target measuring tool. There are two measurement areas set in the target measuring tool, and the center lines of the two measurement areas are used as the target scale lines; the distance between the two target scale lines, that is, the scale pitch, is d'; by obtaining the distances d1 and d2 between the extension line of the target tangent of the process hole and the two target scale lines, the length D of the process hole is obtained.

[0074] The calculation method of d' is as follows: The position of the target scale line on the target measuring tool can be determined by setting numbers on the target measuring tool, that is, number identifiers are set on each black-and-white grid. By taking pictures with two cameras, it is possible to clearly know the number identifiers of the black-and-white grids where the target scale lines are located, and further quickly obtain the number of black-and-white grids between the two target scale lines. Since the width of the black-and-white grids is known, the distance d' between the two target scale lines can be quickly calculated.

[0075] The calculation methods of d1 and d2 are as follows: By obtaining the number of pixel grids between the extension line of the target tangent and the target scale line, and then combining the physical size of the pixel grids, the lengths of d1 and d2 can be quickly obtained. When facing the measurement task of large-sized workpieces, the method based on machine vision often has difficulty in achieving satisfactory detection accuracy while ensuring the integrity of the field of view. By adopting this method, there is no need for multi-camera stitching, nor high-precision cameras. A customized target measuring tool is selected, and the measured distance is converted through the known distance on the target measuring tool, which can effectively shield the movement deviation caused by the movement of the mechanical servo module. Therefore, there is no need to configure a high-precision mechanical module, effectively reducing the development cost.

[0076] Corresponding to the above method, the embodiment of the present application also provides a size detection device for process holes, as Figure 7 shown. The size detection device for process holes includes: An acquisition unit 710, configured to acquire the first positions of each process hole on the workpiece to be measured; A selection unit 720, configured to select at least one scale line from the target measuring tool located on one side of the workpiece to be measured as the target scale line; A generation unit 730, configured to generate position control parameters for any process hole based on the first position of the process hole; A moving unit 740, configured to control the movement of the first moving component and the second moving component based on the position control parameters to drive the camera to move directly above the process hole; An acquisition unit 750, configured to acquire an image containing the process hole and the target scale line collected by the camera; An analysis unit 760, configured to analyze the image to obtain the relative position relationship between the target tangent of the process hole and the target scale line; wherein, the target tangent is parallel to any one of the scale lines; based on the position of the target scale line on the target measuring tool and the relative position relationship, determine the size and the second position of the process hole.

[0077] The functions of the functional units of the size detection device for process holes provided in the above embodiments of the present application can be implemented by the above method steps. Therefore, the specific working processes and beneficial effects of each unit in the size detection device for process holes provided in the embodiments of the present application will not be elaborated herein.

[0078] The embodiments of the present application also provide an electronic device, such as Figure 8 shown, including a processor 810, a communication interface 820, a memory 830, and a communication bus 840. Among them, the processor 810, the communication interface 820, and the memory 830 communicate with each other through the communication bus 840.

[0079] The memory 830 is used to store computer programs; When the processor 810 executes the programs stored on the memory 830, the following steps are implemented: Obtain the first positions of the process holes on the workpiece to be measured; Select at least one scale line from the target measuring tool on one side of the workpiece to be measured as the target scale line; For any process hole, generate position control parameters based on the first position of the process hole; Control the movement of the first moving component and the second moving component based on the position control parameters to drive the camera to move directly above the process hole; Obtain an image collected by the camera that includes the process hole and the target scale line; Analyze the image to obtain the relative position relationship between the target tangent of the process hole and the target scale line; wherein, the target tangent is parallel to any one scale line; based on the position of the target scale line on the target measuring tool and the relative position relationship, determine the size and the second position of the process hole.

[0080] The above-mentioned communication bus may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of simplicity, only a thick line is used to represent it in the figure, but it does not mean that there is only one bus or one type of bus.

[0081] The communication interface is used for communication between the above electronic device and other devices.

[0082] The memory may include a Random Access Memory (RAM), or may also include a Non-Volatile Memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located far from the aforementioned processor.

[0083] The above-mentioned processor may be a general-purpose processor; it may also be a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0084] In another embodiment provided by the present application, there is also provided a computer-readable storage medium storing instructions, which when running on a computer, cause the computer to execute the method for detecting the size of a process hole in any one of the above embodiments.

[0085] In another embodiment provided by the present application, there is also provided a computer program product containing instructions, which when running on a computer, cause the computer to execute the method for detecting the size of a process hole in any one of the above embodiments.

[0086] Those skilled in the art should understand that the embodiments in the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the embodiments in the embodiments of the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments in the embodiments of the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0087] Although the preferred embodiments in the embodiments of the present application have been described, those skilled in the art can make additional changes and modifications once they know the basic creative concept. Therefore, the appended claims are intended to be construed to include the preferred embodiments and all changes and modifications falling within the scope of the embodiments of the present application.

[0088] Obviously, those skilled in the art can make various changes and modifications to the embodiments in the embodiments of the present application without departing from the spirit and scope of the embodiments in the embodiments of the present application. Thus, if these modifications and variations of the embodiments in the embodiments of the present application fall within the scope of the claims of the embodiments of the present application and their equivalent technologies, the embodiments of the present application are also intended to include these changes and modifications.

Claims

1. A dimensional inspection system for process holes, characterized in that The system includes a camera, a calibrated target measuring tool, and a controller; wherein, the target measuring tool is located on one side of the workpiece to be measured; the scale lines on the target measuring tool are perpendicular to the center line of the workpiece to be measured; at least one process hole is provided on the workpiece to be measured; the camera is located directly above the target measuring tool and the workpiece to be measured; the camera is connected to the controller; the target measuring tool and the camera are relatively stationary; The camera is used to collect an image including the target measuring tool and the process hole; The controller is used to optionally select at least one scale line as the target scale line; for any process hole, analyze the image to obtain the relative position relationship between the target tangent of the process hole and the target scale line; based on the relative position relationship and the position of the target scale line on the target measuring tool, determine the size and position of the process hole; wherein, the target tangent is parallel to any one of the scale lines.

2. The system according to claim 1, wherein The system further includes: a first moving component and a second moving component; The first moving component is connected to the camera; the second moving component is connected to the workpiece to be measured; The first moving component is used to control the camera to move directly above the process hole; The second moving component is used to control the workpiece to be measured to rotate around the center line so that the process holes on different outer surfaces of the workpiece to be measured are collected by the camera.

3. The system according to claim 1, wherein The system further includes: a base disposed below the workpiece to be measured; A longitudinal groove is formed on the top surface of the base; the workpiece to be measured is embedded in the longitudinal groove; The longitudinal groove is used to fix the workpiece to be measured and limit the height of the workpiece to be measured exceeding the top surface; At least one measurement area is provided on the target measuring tool; the center line or boundary line of the measurement area is the scale line of the target measuring tool; A position identifier for indicating the position of the workpiece to be measured is provided on the outer surface of the workpiece to be measured.

4. The system according to claim 1, wherein The camera includes a first camera and a second camera; the target measuring tool includes a first target measuring tool and a second target measuring tool; The first target measuring tool is located on one side of the front end of the workpiece to be measured; the first camera is located directly above the first target measuring tool and the front end of the workpiece to be measured; The second target measuring tool is located on one side of the rear end of the workpiece to be measured; the second camera is located directly above the second target measuring tool and the rear end of the workpiece to be measured.

5. A method for detecting the size of a process hole in a size detection system for a process hole as described in any one of claims 1-4, characterized in that, The method includes: Obtain the first positions of the process holes on the workpiece to be measured; Optionally select at least one scale line from the target measuring tool located on one side of the workpiece to be measured as the target scale line; For any process hole, generate position control parameters based on the first position of the process hole; Based on the position control parameters, control the first moving component and the second moving component to move to drive the camera to move directly above the process hole; Obtain an image collected by the camera including the process hole and the target scale line; Analyze the image to obtain the relative position relationship between the target tangent of the process hole and the target scale line; wherein, the target tangent is parallel to any one of the scale lines; Based on the position of the target scale line on the target measuring tool and the relative position relationship, determine the size and the second position of the process hole.

6. The method according to claim 5, characterized in that Analyze the image to obtain the relative position relationship between the target tangent line of the process hole and the target scale line, where the relative position relationship refers to the spacing between the target tangent line and the target scale line, and the calculation steps of the relative position relationship include: Confirm the physical parameters of the camera, including the sensor size and the focal length; Confirm the image resolution, where the pixel resolution selects the direction corresponding to the sensor size, the sensor width corresponds to the horizontal pixel number of the image, and the sensor height corresponds to the vertical pixel number of the image; Obtain the object distance, that is, the actual distance from the process hole to the camera lens; Calculate the physical size of each pixel, pixel physical size = actual field of view size / image resolution, where the unit of the actual field of view size is mm, the unit of the image resolution is pixel, and the actual field of view size = sensor size * object distance / focal length; Obtain the actual pixel number between the target tangent line and the target scale line, and through the actual pixel number and the physical size of the pixel, obtain the actual length of the relative position relationship, actual length = actual pixel number * pixel physical size, where the units of the object distance and the focal length are both mm.

7. The method according to claim 6, wherein The system error of the object distance is eliminated through the following steps: Obtain the image collected by the camera, which includes the process hole and the target scale line; The target measuring tool is in a stepped shape, and both the upper and lower stepped surfaces are provided with measurement areas. The upper and lower stepped surfaces extend along the length direction of the workpiece to be measured. In the image, respectively extract the diameters of the same process hole corresponding to the measurement areas of the upper and lower stepped surfaces, and calculate the ratio of the diameters of the same process hole obtained in the two measurement areas; When the ratio is within the preset range, use the standard object distance as the object distance in this detection, where the standard object distance refers to the actual distance from the process hole to the camera lens after placing the same type of workpiece to be measured under standard working conditions; When the ratio exceeds the preset range, use the product of the standard object distance and the coefficient as the object distance in this detection.

8. The method according to claim 5, wherein Generate position control parameters based on the first position of the process hole, including: Generate the first position control parameter based on the distance between the process hole and any end of the workpiece to be measured and the position of the camera; Generate the second position control parameter based on the position relationship of the process hole relative to the position identifier; Control the movement of the first moving component and the second moving component based on the position control parameters, including: Based on the second position control parameter, control the second moving component to drive the workpiece to be measured to rotate around the center line so that the process hole is located in the image acquisition area of the camera; Based on the first position control parameter, control the first moving component to drive the camera to move directly above the process hole.

9. The method according to claim 5, characterized in that, Before generating the position control parameters based on the first position of the process hole, the method further includes: Control the second moving component to drive the workpiece to be measured to rotate around the center line so that the surface where the position identifier is located is the top surface of the workpiece to be measured; Generate the second position control parameter based on the position relationship of the process hole relative to the position identifier, including: Based on the positional relationship between the process hole and the position identifier, match the target rotation angle corresponding to the positional relationship from the configured look-up table of different positional relationships and corresponding rotation angles. Based on the target rotation angle, generate a second position control parameter to control the second moving component to drive the workpiece to be measured to rotate around the center line, so that the surface where the process hole is located becomes the new top surface of the workpiece to be measured.

10. A size detection device for a process hole, characterized in that, The device includes: An acquisition unit for acquiring the first positions of the process holes on the workpiece to be measured. A selection unit for arbitrarily selecting at least one scale line on the target measuring tool located on one side of the workpiece to be measured as the target scale line. A generation unit for generating a position control parameter for any process hole based on the first position of the process hole. A moving unit for controlling the first moving component and the second moving component to move based on the position control parameter to drive the camera to move directly above the process hole. An acquisition unit for acquiring an image containing the process hole and the target scale line collected by the camera. An analysis unit for analyzing the image to obtain the relative positional relationship between the target tangent of the process hole and the target scale line; wherein the target tangent is parallel to any one of the scale lines; based on the position of the target scale line on the target measuring tool and the relative positional relationship, determine the size and the second position of the process hole.