Size detection system and size detection method for fabrication hole
By fixing the target measuring tool and camera system on one side of the workpiece, and using the scale mark to determine the size and position of the process hole, the detection accuracy and cost problems in the prior art are solved, efficient and low-cost workpiece detection is achieved, and the detection accuracy and consistency.
Patent Information
- Application Number
- CN202411756929.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-01-03
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing workpiece process hole detection technology is difficult to find a balance between high efficiency, low cost and high accuracy, especially in the detection of complex workpieces and large-size workpieces. Conventional methods have problems such as high cost, limited accuracy, and complex operation.
Using fixed target measuring tools and camera systems, the size and position of process holes are determined through the scale marks on the target measuring tools, avoiding deviations caused by the movement of mechanical servo modules, reducing development costs, and improving single-pixel accuracy by reducing the camera field of view. , achieve micron level detection accuracy.
It realizes accurate, efficient and low-cost detection of process holes, improves detection efficiency and accuracy, reduces errors, and ensures the consistency and accuracy of detection results.
Smart Images

Figure CN119245516A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of workpiece detection, and in particular to a size detection system and a size detection method for a process hole. 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 workpiece style has become increasingly complex, and the product iteration speed has been increasingly accelerated. This trend has brought severe challenges to the tolerance quality inspection of the shape and position of the workpiece process holes. Due to the complexity of the workpiece style, conventional standardized measurement tools often cannot meet the precise measurement requirements, and the improvement of production efficiency requires that the inspection must be completed in a very short time.
[0003] There are currently three main solutions to this problem: one is to make professional measuring jigs, the second is to use a three-coordinate measuring machine for measurement, and the third is dimensional 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, which brings a considerable economic burden to the company. In addition, professional fixtures have poor compatibility, and once the product is upgraded, new fixtures often need to be redeveloped. At the same time, the regular maintenance and standardized operation of the fixture also rely on the professional quality of the operator, and there are risks of moral risks and irregular operations, which increases the difficulty of quality control.
[0005] The second method, contact measurement, may damage fragile or soft parts, resulting in inaccurate measurement results. In addition, the purchase and maintenance costs of the three-dimensional coordinate measuring machine are high, and the environmental conditions are demanding. A constant temperature and humidity environment is required to maintain measurement accuracy. Its operation process is complicated, requiring professional operators and maintenance personnel, and the measurement efficiency is relatively low, especially for point-by-point measurement of complex geometric shapes. It is far from meeting the requirements of production efficiency and cannot achieve 100% full inspection of workpieces.
[0006] The third method's workpiece dimensional measurement accuracy is largely limited by the camera's resolution and field of view. When faced with the task of measuring large-sized workpieces, machine vision-based methods often find it difficult to achieve satisfactory detection accuracy while ensuring the integrity of the field of view. This limitation requires more careful consideration of the balance between 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 the present application is to provide a process hole size detection system and a size detection method to solve the above-mentioned problems existing in the prior art, and to accurately, efficiently and cost-effectively detect the size and position of the process hole.
[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 a scale, and a controller; wherein the target measuring tool is located on one side of a workpiece to be measured; the scale line on the target measuring tool is 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 capture an image including the target gauge and the process hole; The controller is used to 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 line 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 line is parallel to any scale line.
[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 used to control the camera to move to just above the process hole; The second moving assembly 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 captured 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 used to fix the workpiece to be measured and limit the height of the workpiece to be measured beyond the top surface; The target measuring tool is provided with at least one measuring area; the center line or boundary line of the measuring area is the scale line of the target measuring tool; A position identifier for indicating the position of the workpiece to be measured is arranged 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 gauge includes a first target gauge and a second target gauge; The first target measuring tool is located at 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 at one side of the rear end of the workpiece to be measured; and the second camera is located directly above the second target measuring tool and the rear end of the workpiece to be measured.
[0012] In a second aspect, a method for detecting the size of a process hole is provided, and the method may include: Acquire the first position of each process hole 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; For any process hole, generating a position control parameter based on the first position of the process hole; Controlling the movement of the first moving component and the second moving component based on the position control parameter to drive the camera to move directly above the process hole; Acquire an image including the process hole and the target scale line captured by a camera; Analyzing the image to obtain a relative positional relationship between a target tangent line of the process hole and the target scale line; wherein the target tangent line is parallel to any scale line; Based on the position of the target scale line on the target gauge and the relative position relationship, the size and the second position of the process hole are determined.
[0013] In an optional implementation, the first position of the process hole includes a positional relationship of the process hole relative to the position identifier, and a distance between the process hole and any end of the workpiece to be measured; Before generating the position control parameter based on the first position of the process hole, the method further includes: Gets the position of the camera.
[0014] In an optional implementation, generating a position control parameter 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; generating a second position control parameter based on a positional 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 parameter includes: Based on the second position control parameter, controlling the second moving assembly 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, the first moving component is controlled to drive the camera to move to directly above the process hole.
[0015] In an optional implementation, before generating the position control parameter based on the first position of the process hole, the method further includes: Controlling the second moving assembly 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; Based on the positional relationship of the process hole relative to the position identifier, generating a second position control parameter includes: determining a target rotation angle based on a positional relationship of the process hole relative to the position identifier; Based on the target rotation angle, a second position control parameter is generated 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.
[0016] In an optional implementation, before obtaining the first position of each process hole on the workpiece to be measured, the method further includes: acquiring an image of the target gauge; Analyzing the image of the target measuring tool to obtain the position of each scale line on the target measuring tool; After selecting at least one scale line from a target measuring tool located on one side of the workpiece to be measured as a target scale line, the method further comprises: Based on the positions of the scale lines on the target gauge, the position of the target scale line on the target gauge is determined.
[0017] In a third aspect, a device for detecting the size of a process hole is provided, which may include: A taking unit, used for obtaining the first position of each process hole on the workpiece to be measured; A selection unit, used to select at least one scale line from the target measuring tool located on one side of the workpiece to be measured as a target scale line; A generating unit, configured to generate a position control parameter for any process hole based on a first position of the process hole; A moving unit, used for controlling the movement of the first moving component and the second moving component based on the position control parameter, so as to drive the camera to move directly above the process hole; An acquisition unit, used for acquiring an image including the process hole and the target scale line acquired by a camera; An analysis unit is used to 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 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.
[0018] In a fourth aspect, an electronic device is provided, the electronic device comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory, used to store computer programs; The processor is used to implement the method steps described in any one of the second aspects when executing the program stored in the memory.
[0019] In a fifth aspect, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the method steps described in any one of the above-mentioned second aspect are implemented.
[0020] This application uses a fixed target measuring tool. The size and position of the process hole are converted by the position of the scale lines on the target measuring tool. This 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 development costs.
[0021] This application solves the limitations of high-resolution cameras 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 to the micron level. It not only improves the accuracy of detection, but also optimizes the resource utilization of the camera, ensures the efficiency of process hole size and position detection, and improves accuracy.
[0022] The target measuring tool of the present application is kept relatively still with the industrial camera, so that the industrial camera always captures the same image of the target, thereby reducing the error caused by camera movement or target change. In the entire measurement system, the only variable that changes is the workpiece to be measured each time. The present application sets a longitudinal groove on the base to fix and limit the workpiece to be measured, so that the error factor caused by each placement of the workpiece to be measured is reduced to a minimum, ensuring the accuracy and consistency of the test results. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0024] Figure 1 A schematic diagram of the structure of a process hole size detection system provided in an embodiment of the present application; Figure 2 A schematic diagram of the layout of a process hole size detection system provided in an embodiment of the present application; Figure 3 A schematic diagram of a base structure provided in an embodiment of the present application; Figure 4 A flow chart of a method for detecting the size of a process hole provided in an embodiment of the present application; Figure 5 A schematic diagram of the relative position relationship between a process hole and a scale line provided in an embodiment of the present application; Figure 6 A schematic diagram of a process hole size measurement provided in an embodiment of the present application; Figure 7 A schematic diagram of the structure of a device for detecting the size of a process hole provided in an embodiment of the present application; Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application; In the figure: 1. camera; 2. target measuring tool; 3. workpiece to be measured; 4. first moving assembly; 5. second moving assembly; 6. base; 7. longitudinal groove; 8. process hole; 9. scale line; 10. target tangent. DETAILED DESCRIPTION
[0025] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments of the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0026] Currently, there are three main ways to solve the problem of large-size workpiece measurement in the machine vision industry: high-resolution cameras, servo platforms carrying small-resolution cameras, and multi-camera stitching.
[0027] First of all, high-resolution cameras are expensive and large in size and total volume. As the camera resolution increases, the problem of lens distortion becomes more serious, resulting in image distortion, which in turn affects the accuracy of measurement. In order to correct this distortion, complex calibration and correction work is required, which not only increases the complexity of operation, but also may introduce new errors. In addition, for products with a size of more than 500mm, even if a high-resolution camera is used, it may face the challenge of resolution limit. When the size of the product exceeds the resolution capability of the camera, it will not be possible to obtain a clear and accurate image, resulting in unreliable measurement results. In addition, high-resolution cameras are extremely sensitive to vibrations in the surrounding environment. In production enterprises, due to the operation of equipment, the movement of personnel, and possible logistics and transportation activities, there will be varying degrees of vibration and interference. These vibrations and interferences will directly affect the stability and imaging quality of the camera, and thus have an adverse effect on the final measurement accuracy and equipment performance.
[0028] Secondly, the distance from the process hole to the reference surface of the servo platform carrying a small-resolution camera is not obtained directly by the camera, but indirectly obtained by adding the process hole size 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 add disturbance factors to the equipment size measurement. This results in low repeated measurement accuracy of the equipment and inability to perform high-precision measurements of large-sized workpieces; at the same time, in order to fully 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 a perfect match between overlapping areas of images. In addition, factors such as subtle changes in lighting conditions and interference from shadows make it easy for obvious stitching defects or color differences to appear at the stitching gaps. These problems not only damage the overall visual effect of the image, but also have an unignorable impact on the measurement accuracy.
[0029] Finally, when multiple cameras are used to work together, in order to ensure that each camera can work together accurately like a precision instrument, the position and posture of each camera must be accurately measured and calibrated. To do this, we have to rely on a professional tool called a large calibration plate; however, the installation of the calibration plate requires extremely high precision, and any slight deviation may cause errors in the calibration results. At the same time, the slight vibration of the camera may also affect the calibration results, so 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, all of which may have a certain impact on the calibration results.
[0030] This method has extremely high requirements for the installation accuracy of the calibration plate and the vibration of the camera, which are often difficult to control in actual operation. As a result, the accuracy and effect of image stitching cannot be guaranteed, affecting the detection accuracy and effect of the equipment.
[0031] In order to solve the problems existing in the above-mentioned prior art, the present application designs a size detection system for process holes, which determines the position and size of the process holes 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 by fixing a target measuring tool with scale lines on one side of the workpiece to be measured. 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, thereby effectively reducing the development cost. At the same time, it solves the limitations of high-resolution cameras 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 to the micron level. This not only improves the accuracy of detection, but also optimizes the resource utilization of the camera, ensures the efficiency of process hole size and position detection, and improves accuracy.
[0032] like Figure 1As shown, the size detection system of the process hole adopted in the embodiment of the present application includes: a camera 1, a target measuring tool 2 with a scale, a controller, a first movable assembly 4, a second movable assembly 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 line 9 on the target measuring tool 2 is 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 movable assembly 4 is connected to the camera 1; the second movable assembly 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 provided below the workpiece 3 to be measured.
[0033] The first moving component 4 is used to control the camera 1 to move to the top of the process hole, so that the camera can capture an image including the target gauge 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 captured by the camera; Camera 1, used to capture images including target gauges and process holes; A controller is used to select at least one scale line as a target scale line; for any process hole 8, analyze the image to obtain the relative position relationship between the target tangent line 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 line is parallel to any scale line; In the embodiment of the present application, at least one measuring area is provided on the target measuring tool 2; the center line or boundary line of the measuring area is the scale line of the target measuring tool; the scale lines are 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 measuring area can be circular or square, etc. The measuring 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 accuracy of the measurement.
[0034] In the embodiments of the present application, an object with a black and white checkered pattern on the top surface may be selected as the target measuring tool, or a ruler with scales or other objects provided with a measuring area may be selected as the target measuring tool.
[0035] In the embodiment of the present application, the distance between the scale line on the target measuring tool 2 and one 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 extension line of the target tangent line 10 of the process hole 8 and the distance between any one or more scale lines 9. Specifically, the target tangent line does not actually exist, but is added or drawn using a tool during image analysis.
[0036] In the embodiment of the present application, the target tangent line can be a tangent line parallel to the scale line at both ends of the process hole, or a center line of the process hole parallel to the scale line; or a line segment passing through any positioning point in the process hole, the line segment is parallel to the scale line; the position of the positioning point in the process hole is known and fixed. For example, there is a positioning point in the process hole, and the distance ratio of the positioning point to the front and rear ends of the process hole is 4:3; based on the positioning point, a line segment parallel to the scale line is made to obtain the target tangent line, and based on the relative positional relationship between the target tangent line and the scale line, the position of the positioning point on the workpiece to be measured is determined; then, based on the distance ratio of the positioning point to the front and rear ends of the process hole is 4:3, the position and size of the front and rear ends of the process hole on the workpiece to be measured are determined.
[0037] In one 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; the first moving component also includes two; Figure 2 As shown, the first target gauge is located at one side of the front end of the workpiece to be measured; the first camera is located directly above the first target gauge and the front end of the workpiece to be measured; the second target gauge is located at one side of the rear end of the workpiece to be measured; the second camera is located directly above the second target gauge 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 to the middle of the workpiece to be measured 3, so as to collect process holes 8 located at different positions; when the workpiece to be measured is long, two sets of target gauges, cameras and first moving components are set, which can simultaneously collect images of the front and rear ends including process holes and corresponding target gauges, and determine the sizes and positions of the front and rear end process holes, thereby improving the efficiency of detection.
[0038] In actual applications, although a larger workpiece to be measured is provided with process holes not only at the front and rear ends, given 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 and rear ends of the workpiece to be measured are detected correctly, the probability of errors in the size and position of the process holes located in the middle of the workpiece to be measured is very small. Therefore, the present application sets cameras at both ends to specifically detect the process holes at both ends of the workpiece to be measured, and can obtain the detection results of the entire workpiece to be measured.
[0039] 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; the position identifier may be located on the outer surface of one end or the middle position of the workpiece to be measured; the workpiece to be measured may be a cylinder, a cuboid or other shapes.
[0040] In actual 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, the workpiece to be measured needs to be rotated to change the top surface of the workpiece to be measured. Setting a position identifier can indicate the position of the workpiece to be measured. By obtaining the relative position relationship between the process hole and the position identifier, the rotation angle of the workpiece to be measured can be clearly determined.
[0041] For example, when the workpiece to be measured is a cylinder, a position identifier is set at one end of the workpiece to be measured. When the workpiece to be measured is placed, the position identifier is located on the top surface. After the measurement of all process holes on the current top surface is completed, the angle of rotation of the workpiece to be measured is determined 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, so that the other process holes are located on the top surface of the workpiece to be measured, and then the camera is used to capture an image containing the other process holes and the target measuring tool; when the position identifier is located on the top surface again, it indicates that all process holes on the workpiece to be measured have been detected.
[0042] In an embodiment of the present application, the camera is controlled by the first moving component to move from one end of the workpiece to be measured to the other end, so as to collect process holes located at different positions on the same top surface. This can not only effectively reduce the camera field of view and improve the camera accuracy; at the same time, under the same resolution, the number of pixels occupied by the camera field of view per unit area is significantly increased, thereby further improving the measurement accuracy of the image.
[0043] 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 to limit the height of the workpiece 3 to be measured beyond the top surface of the base; specifically, since the positions of the same type of workpieces to be measured embedded in the longitudinal grooves must be the same, the longitudinal grooves can play a role in positioning the workpieces to be measured, and ensure that the positions (relative to the height of the top surface of the base) of the same type or model of workpieces to be measured are consistent each time they are placed, thereby eliminating the detection error caused by inconsistent placement heights of the workpieces to be measured, which not only improves the accuracy of the detection, but also makes the entire detection process more convenient and efficient.
[0044] In one embodiment of the present application, the longitudinal groove 7 may be a longitudinal V-shaped groove, such as Figure 3 shown.
[0045] In one embodiment of the present application, the camera may be a small field of view high-pixel camera, thereby improving detection accuracy and system stability.
[0046] In another embodiment of the present application, the use of a small-resolution camera can make its motion trajectory more flexible and easy to adjust, and perform better in being compatible with different models of products; by adjusting the PLC program, the camera's motion trajectory can be easily changed to adapt to the measurement requirements of different models of products, thereby improving the utilization rate of the equipment and enabling one device to be compatible with the measurement of multiple products, meeting diversified detection needs.
[0047] In another embodiment of the present application, light sources are also provided on both sides of the workpiece 3 to be measured, so as to provide lighting for the camera to capture images.
[0048] The present application achieves this by fixing a target measuring tool on one side of a workpiece to be measured, and allowing a camera to take images of the target measuring tool at the same time as the workpiece to be measured. Through a professional algorithm, key features of the target measuring tool are extracted and associated with the process holes to be measured, thereby obtaining the physical position coordinates of the process holes of the workpiece to be measured. The target measuring tool is used as an intermediate medium to effectively associate the physical coordinate system with the camera coordinate system, thereby effectively shielding the disturbance caused by the servo motion accuracy to the detection system, thereby achieving high-precision flexible measurement.
[0049] The process hole size detection system of the embodiment of the present application can be used for process hole detection of large-sized workpieces to be measured. The images including the target measuring tool and the process hole are collected by cameras arranged at the front and rear ends of the workpiece to be measured, and the size and position of the process hole are then analyzed. The size and position of the process hole are compared with the size and position of the process hole specified in the process hole construction standards and construction requirements to determine whether the process hole meets the requirements, thereby completing efficient and accurate process hole detection.
[0050] The controller of the embodiment of the present application can be a physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and basic cloud computing services such as big data and artificial intelligence platforms. The terminal can be a user equipment (UE) such as a mobile phone, smart phone, laptop computer, digital broadcast receiver, personal digital assistant (PDA), tablet computer (PAD), handheld device, vehicle-mounted device, wearable device, computing device or other processing device connected to a wireless modem, mobile station (MS), mobile terminal, etc. The terminal and the server can be directly or indirectly connected through wired or wireless communication methods, which is not limited in this application.
[0051] The preferred embodiments of the present application are described below in conjunction with the drawings in the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application, and are not used to limit the present application. In addition, the embodiments and features in the embodiments of the present application may be combined with each other if there is no conflict.
[0052] Figure 4 The following is a flow chart of a method for detecting the size of a process hole provided in an embodiment of the present application. Figure 4 As shown, the method may include: Step S410, obtaining the first position of each process hole on the workpiece to be measured; and 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.
[0053] In an 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, and the purpose of the present application is to control the camera to capture an image including the process hole and the target measuring tool according to the fuzzy distance, and then analyze the image to obtain the precise position of the process hole, that is, the second position.
[0054] In the embodiment of the present application, there is one or more scale lines on the target measuring tool, and the present application can select one or more scale lines as target scale lines.
[0055] In an embodiment of the present application, a camera is used to pre-capture an image containing only the target measuring tool, and the position of each scale line on the target measuring tool is obtained by analyzing the image of the target measuring tool; after the target scale line is determined, the position of the target scale line on the target measuring tool is determined according to the position of each scale line on the target measuring tool.
[0056] In an embodiment of the present application, the target tangent line of the process hole is extended to the position of the scale line; and the scale line with the shortest horizontal distance to the extended target tangent line is selected as the target scale line.
[0057] Step S420, for any process hole, based on the first position of the process hole, generate a position control parameter; control the movement of the first moving component and the second moving component based on the position control parameter; obtain an image including the process hole and the target scale line captured by the camera.
[0058] In the embodiment of the present application, it is also necessary to obtain the position of the camera in advance, that is, the horizontal distance between the camera and one end of the workpiece to be measured.
[0059] In an embodiment of the present application, in order to facilitate the positioning of 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.
[0060] In the embodiment of the present application, based on the first position of the process hole, the position control parameter is generated, including: A first position control parameter is generated based on the distance between the process hole and any end of the workpiece to be measured and the position of the camera; and a second position control parameter is generated based on the position relationship of the process hole relative to the position identifier.
[0061] In an embodiment of the present application, controlling the movement of the first moving component and the second moving component based on the position control parameter includes: Based on the second position control parameter, the second moving component is controlled 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, the first moving component is controlled to drive the camera to move directly above the process hole.
[0062] In an embodiment of the present application, generating a second position control parameter based on the position relationship of the process hole relative to the position identifier includes: Based on the positional relationship of the process hole relative to the position identifier, a target rotation angle corresponding to the positional relationship is matched from a comparison table of different configured positional relationships and corresponding rotation angles; based on the target rotation angle, a second position control parameter is generated 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, and the process hole is located on the midline of the new top surface perpendicular to the scale line.
[0063] In an 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 obtained directly by calculating the position difference and angle between the vertex of the position identifier and the center of the process hole, or it can be obtained in advance based on the information of the workpiece to be measured; for example, when the workpiece to be measured is a rectangular parallelepiped, the position identifier and the process hole are respectively located on two adjacent side surfaces, and the target rotation angle is 90 degrees.
[0064] In another embodiment of the present application, when placing the workpiece to be measured, the tangent of one end of the workpiece to be measured can be made to coincide with any scale line on the target measuring tool, and the target tangent of the process hole to be measured can be made to coincide with any scale line, so as to directly obtain the distance between the corresponding scale lines, determine the size of the process hole and the second position, and improve the efficiency of detection.
[0065] Step S430, analyzing the image to obtain the relative position relationship between the target tangent line and the target scale line of the process hole; based on the position and relative position relationship of the target scale line on the target measuring tool, determining the size and the second position of the process hole.
[0066] In the embodiment of the present application, the target tangent line of the process hole is a tangent line parallel to any scale line extracted from all edge tangent lines of the process hole, such as Figure 5 As shown; the number of target tangents is 2, which are the edge tangents of the front end and the rear end of the process hole.
[0067] In the embodiment of the present application, the image is analyzed to obtain the relative position relationship between the target tangent line of the process hole and the target scale line, including: In an embodiment of the present application, the target tangents at both ends of the process hole are extended to the target scale line position, and the distance between the two target tangents of the process hole, that is, the size of the process hole, is determined based on the distance between the extended target tangents at both ends and the target scale line; based on the distance between the two extended target tangents and the target scale line and the position of the target scale line on the target measuring tool, the second position of the process hole is determined.
[0068] In an embodiment of the present application, one or more target scale lines can be selected. If there is only one target scale line, the distances between the two target tangents of the process hole and the target scale line are determined respectively, and then the positions of the two target tangents of the process hole on the workpiece to be measured are determined; if there are two target scale lines, it is necessary to obtain the scale spacing between the target scale lines, and the size of the process hole is obtained according to the distances between the two target tangents and the target scale lines combined with the scale spacing.
[0069] In another embodiment of the present application, a tangent (the tangent is parallel to the scale line) can be made on one end of the workpiece to be measured and extended to the scale line; the second position of the process hole is determined based on the distance between the tangent and the target scale line and the distance between the target tangent of the process hole and the target scale line.
[0070] 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.
[0071] For example, Figure 6 As shown, an object with a black and white checkered pattern on the top surface is selected as a target measuring tool. Two measuring areas are set in the target measuring tool, and the center lines of the two measuring areas are used as target scale lines; the distance between the two target scale lines, that is, the scale spacing is d'; by obtaining the distances d1 and d2 between the extended line of the target tangent of the process hole and the two target scale lines, the length D of the process hole is obtained.
[0072] Corresponding to the above method, the embodiment of the present application also provides a device for detecting the size of a process hole, such as Figure 7 As shown, the size detection device of the process hole includes: An acquisition unit 710 is used to acquire a first position of each process hole on a workpiece to be measured; A selection unit 720, for selecting at least one scale line from a target measuring tool located on one side of the workpiece to be measured as a target scale line; A generating unit 730, configured to generate a position control parameter for any process hole based on a first position of the process hole; The moving unit 740 is used to control the movement of the first moving component and the second moving component based on the position control parameter to drive the camera to move to the top of the process hole; The acquisition unit 750 is used to acquire the image including the process hole and the target scale line acquired by the camera; The analysis unit 760 is used to analyze the image to obtain the relative position relationship between the target tangent line and the target scale line of the process hole; wherein the target tangent line is parallel to any scale line; based on the position and relative position relationship of the target scale line on the target measuring tool, the size and the second position of the process hole are determined.
[0073] The functions of each functional unit of the process hole size detection device provided in the above embodiments of the present application can be achieved through the above method steps. Therefore, the specific working process and beneficial effects of each unit in the process hole size detection device provided in the embodiments of the present application will not be repeated here.
[0074] The present application also provides an electronic device, such as Figure 8 As shown, it includes a processor 810 , a communication interface 820 , a memory 830 and a communication bus 840 , wherein the processor 810 , the communication interface 820 , and the memory 830 communicate with each other via the communication bus 840 .
[0075] Memory 830, used for storing computer programs; The processor 810 is used to execute the program stored in the memory 830 to implement the following steps: Acquire the first position of each process hole 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, generating a position control parameter based on a first position of the process hole; Controlling the movement of the first moving component and the second moving component based on the position control parameter to drive the camera to move directly above the process hole; Acquire an image including process holes and target scale lines captured by a camera; The image is analyzed to obtain the relative position relationship between the target tangent line and the target scale line of the process hole, wherein the target tangent line is parallel to any scale line; based on the position and relative position relationship of the target scale line on the target measuring tool, the size and the second position of the process hole are determined.
[0076] The communication bus mentioned above may be a Peripheral Component Interconnect (PCI) bus or an Extended Industrial Standard Architecture (EISA) bus, etc. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0077] The communication interface is used for communication between the above electronic device and other devices.
[0078] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0079] 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 device, a discrete gate or transistor logic device, or a discrete hardware component.
[0080] In another embodiment provided in the present application, a computer-readable storage medium is provided, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer executes the size detection method of the process hole in any of the above embodiments.
[0081] In another embodiment provided in the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute the process hole size detection method of any one of the above embodiments.
[0082] Those skilled in the art will appreciate that the embodiments in the present application can be provided as methods, systems, or computer program products. Therefore, the embodiments in the present application can be in the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments in the present application can be in 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 codes.
[0083] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the embodiments of the present application.
[0084] Obviously, those skilled in the art can make various changes and modifications to the embodiments in the present application without departing from the spirit and scope of the embodiments in the present application. Thus, if these modifications and variations of the embodiments in the present application fall within the scope of the claims and their equivalents in the embodiments of the present application, the embodiments of the present application are also intended to include these modifications and variations.
Claims
1. A size detection system for process holes, characterized in that: The system comprises a camera, a target gauge with a scale and a controller; wherein the target gauge is located on one side of a workpiece to be measured; the scale line on the target gauge is 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 gauge and the workpiece to be measured; the camera is connected to the controller; the target gauge and the camera are relatively stationary; The camera is used to capture an image including the target gauge and the process hole; The controller is used to 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 line 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 line is parallel to any scale line.
2. The system according to claim 1, characterized in that The system further comprises: a first moving assembly and a second moving assembly; 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 to just above the process hole; The second moving assembly 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 captured by the camera.
3. The system according to claim 1, characterized in that The system further comprises: 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 beyond the top surface; The target measuring tool is provided with at least one measuring area; the center line or boundary line of the measuring area is the scale line of the target measuring tool; A position identifier for indicating the position of the workpiece to be measured is arranged on the outer surface of the workpiece to be measured.
4. The system according to claim 1, characterized in that 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 at 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 at one side of the rear end of the workpiece to be measured; and 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 applied to the process hole size detection system as claimed in any one of claims 1 to 4, characterized in that: The method comprises: Acquire the first position of each process hole 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; For any process hole, generating a position control parameter based on the first position of the process hole; Controlling the movement of the first moving component and the second moving component based on the position control parameter to drive the camera to move directly above the process hole; Acquire an image including the process hole and the target scale line captured by a camera; Analyzing the image to obtain a relative positional relationship between a target tangent line of the process hole and the target scale line; wherein the target tangent line is parallel to any scale line; Based on the position of the target scale line on the target gauge and the relative position relationship, the size and the second position of the process hole are determined.
6. The method according to claim 5, characterized in that The first position of the process hole includes a positional relationship of the process hole relative to the position identifier, and a distance between the process hole and any end of the workpiece to be measured; Before generating the position control parameter based on the first position of the process hole, the method further includes: Gets the position of the camera.
7. The method according to claim 6, characterized in that Based on the first position of the process hole, generating a position control parameter 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; generating a second position control parameter based on a positional 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 parameter includes: Based on the second position control parameter, controlling the second moving assembly 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, the first moving component is controlled to drive the camera to move to directly above the process hole.
8. The method according to claim 6, characterized in that Before generating the position control parameter based on the first position of the process hole, the method further includes: Controlling the second moving assembly 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; Based on the positional relationship of the process hole relative to the position identifier, generating a second position control parameter includes: Based on the positional relationship of the process hole relative to the position identifier, matching the target rotation angle corresponding to the positional relationship from a comparison table of different configured positional relationships and corresponding rotation angles; Based on the target rotation angle, a second position control parameter is generated 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.
9. The method according to claim 6, characterized in that Before obtaining the first position of each process hole on the workpiece to be measured, the method further includes: acquiring an image of the target gauge; Analyzing the image of the target measuring tool to obtain the position of each scale line on the target measuring tool; After selecting at least one scale line on a target measuring tool located on one side of the workpiece to be measured as a target scale line, the method further includes: Based on the positions of the scale lines on the target gauge, the position of the target scale line on the target gauge is determined.
10. A device for detecting the size of a process hole, characterized in that: The device comprises: An acquisition unit, used for acquiring a first position of each process hole on the workpiece to be measured; A selection unit, used to select at least one scale line from the target measuring tool located on one side of the workpiece to be measured as a target scale line; A generating unit, configured to generate a position control parameter for any process hole based on a first position of the process hole; A moving unit, used for controlling the movement of the first moving component and the second moving component based on the position control parameter, so as to drive the camera to move to the top of the process hole; An acquisition unit, used for acquiring an image including the process hole and the target scale line acquired by a camera; An analysis unit is used to 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 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.
Citation Information
Patent Citations
System and method for multi-sensor-based on-line multi-dimension measurement of special-shaped shaft-type workpieces
CN101762253A
Binocular vision laser calibration measurement device and measurement method
CN104390584A
Workpiece multi-dimension multi-parameter measuring method based on image processing
CN106441087A
Apparatus for semi-automatically measuring object size based on digital image processing
CN109029203A
Plate deformation measuring device and method based on image processing
CN113048902A
Cited By
Position detection method, device and system
CN119779152A
Tab misalignment amount measurement method and measurement device
WO2026158016A1
