Workpiece size and geometric tolerance batch measurement device and method based on machine vision
By using a machine vision-based batch measurement device for workpiece dimensions and geometric tolerances, efficient and accurate measurement of complex workpieces has been achieved, solving the problems of high measurement cost and low efficiency in existing technologies, and improving measurement accuracy and ease of operation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INST OF AUTOMATION CHINESE ACAD OF SCI (LUOYANG) ROBOTICS & INTELLIGENT EQUIP INNOVATION INST
- Filing Date
- 2024-12-03
- Publication Date
- 2026-04-14
AI Technical Summary
Existing technologies struggle to achieve efficient and accurate batch measurement of complex workpieces, especially in geometric tolerance measurement where clamping issues and multi-datum calculation difficulties exist, resulting in high measurement costs, low efficiency, and insufficient accuracy.
A machine vision-based batch measurement device for workpiece dimensions and geometric tolerances is adopted, including a data processing and control unit, an optical image acquisition unit, a spectral confocal displacement measurement unit, a light source group unit, and a micro-displacement unit. Through automatic centering, multi-measurement surface focusing, light source combination, and measurement algorithms, the device achieves automated measurement of workpieces.
It improves measurement accuracy and efficiency, reduces production costs, adapts to various workpiece types and environments, is suitable for batch measurement, and is easy to operate and safe and reliable.
Smart Images

Figure CN119687783B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of machine vision measurement technology, and in particular relates to a machine vision-based batch measurement device and method for workpiece dimensions and geometric tolerances. Background Technology
[0002] With the continuous development of industrial technology, the demand for complex and precise workpieces is increasing, leading to higher requirements for the inspection of the processing quality of these workpieces. Workpiece dimensional measurement is a crucial link in the field of industrial inspection. For complex workpieces, the accuracy of the measurement results of form and position tolerances directly affects the subsequent assembly process and the durability of parts. Therefore, achieving accurate measurement of complex workpieces is of paramount importance. The dimensional measurement of complex workpieces often has characteristics such as multiple types, multiple states, and multiple objectives. Current industrial customization is highly specialized, making it difficult to solve all clamping problems with universal fixtures. Furthermore, the calculation of positional tolerances involves multiple benchmarks, making it difficult to achieve all measurements on a single focal plane. In batch measurement, there are also certain requirements for the placement of workpieces.
[0003] Current inspection methods include manual methods and coordinate measuring machines (CMMs). Manual methods require specialized inspection equipment, which has many problems such as high cost, low efficiency, inaccurate inspection results, and inability to achieve full inspection. On the other hand, CMMs have high measurement accuracy and strong adaptability, and can inspect almost all geometric tolerances. However, they have relatively high environmental requirements, low efficiency, large workspace, are very expensive, troublesome to maintain, have limited applications, and their measurement speed is difficult to cope with large-volume dimensional measurement tasks. Summary of the Invention
[0004] To address the aforementioned problems, the present invention aims to provide a machine vision-based batch measurement device and method for workpiece dimensions and geometric tolerances.
[0005] To achieve the above-mentioned objectives, the present invention adopts the following technical solution:
[0006] A machine vision-based batch measurement device for workpiece dimensions and geometric tolerances includes a data processing and control unit, an optical image acquisition unit, a spectral confocal displacement measuring unit, a light source unit, and a micro-displacement unit connected to the data processing and control unit. The micro-displacement unit is connected to the optical image acquisition unit.
[0007] The optical image acquisition unit is used to acquire the current focus surface image of the workpiece under test and transmit the image data to the data processing and control unit;
[0008] The spectral confocal displacement ranging unit is used to measure the distance to multiple measuring surfaces of the workpiece being measured, thereby achieving automatic focusing of multiple measuring surfaces;
[0009] The light source unit is used to turn on and off according to the preset brightness, preset combination, and preset flicker frequency of the measurement elements;
[0010] The micro-displacement unit is used to control the workpiece under test to move below the optical image acquisition unit, automatically center the workpiece under test, perform the measurement task, and control the optical image acquisition unit to automatically move to the focusing distance.
[0011] The data processing and control unit is used to receive optical image data output by the optical image acquisition unit and spectral image data output by the spectral confocal displacement ranging unit, analyze measurement elements, execute measurement algorithms, output measurement results, perform data analysis tasks, and control the execution combination of the light source group unit, the translational movement of the micro-displacement unit, and the autofocus movement of the optical image acquisition unit in different measurement elements.
[0012] Furthermore, the aforementioned optical image acquisition unit includes a camera equipped with an optical lens.
[0013] Furthermore, the aforementioned spectral confocal displacement ranging unit includes a spectral confocal sensor and a white light source.
[0014] Furthermore, the aforementioned light source unit includes a light source controller, a stage-based light source connected to the light source controller, a first programmable light source, and a second programmable light source.
[0015] Furthermore, the aforementioned micro-displacement unit includes an XYZ three-axis motion module, on which a batch of workpieces to be measured are arranged.
[0016] A machine vision-based batch measurement method for workpiece dimensions and geometric tolerances, implemented using the aforementioned batch measurement device, includes the following steps:
[0017] S1. The data processing and control unit controls the light source group unit to open and close according to the preset brightness, preset combination, and preset flicker frequency of the measurement elements;
[0018] S2. The data processing and control unit controls the micro-displacement unit to move the workpiece under test to below the optical image acquisition unit for automatic centering of the workpiece. Based on the center of the area of the workpiece under test in the image, the deviations dx and dy of the workpiece under test relative to the center of the field of view are calculated, and the micro-displacement unit is automatically controlled to perform translational movement in the XY direction to compensate for the placement deviation of the workpiece under test and move the workpiece to the center of the field of view.
[0019] S3. The data processing and control unit controls the spectral confocal displacement ranging unit to measure the distance of multiple measurement surfaces of the workpiece under test, and performs automatic focusing on multiple measurement surfaces. After registering the optical image output by the optical image acquisition unit and the spectral image output by the spectral confocal displacement ranging unit, the unit selects the area to be focused and obtains the distance L1 of the area to be focused. According to the focusing clear distance L2 of the optical image acquisition unit, the unit controls the optical image acquisition unit to move along the Z-axis by a distance difference L1-L2 to achieve coarse focusing. The unit extracts the local focusing area in the optical image. The micro-displacement unit moves the camera along the positive and negative directions of the Z-axis with a set step size L to obtain n images. The Laplacian operator is used to calculate the image with the largest gradient value. The unit controls the optical image acquisition unit to move to that point to achieve fine focusing.
[0020] S4. The data processing and control unit controls the optical image acquisition unit to acquire the current focus plane image and transmits it to the data processing and control unit to execute the measurement algorithm; the measurement algorithm is:
[0021] (a) Based on the pixel information of the focal plane image of the workpiece under test, match it with the preset reference image feature library, predict the features of the elements to be measured contained in the image, automatically infer the possible measurement area, and obtain the feature area.
[0022] (b) Extract edge points and feature points within the feature region, perform region type matching based on region features, and perform fitting process based on region type;
[0023] (c) Based on the regional distribution in the image, match similar size features in the algorithm library and measure their relative size.
[0024] The aforementioned machine vision-based batch measurement method for workpiece dimensions and geometrical tolerances includes the following steps in its measurement process: The geometrical tolerances include the element to be measured and the datum element, and the geometrical tolerances include positional tolerance, symmetry tolerance, and coaxiality tolerance. Selecting the element to be measured and the datum element includes the following steps:
[0025] (1) Select the first measured feature in the first position image, define it as the element to be measured in the calculation of geometric tolerance, and transform its first position coordinate description from the image coordinate system to the camera coordinate system;
[0026] (2) Select the second measured feature in the second position image, define it as a reference element in the calculation of form and position tolerance, and transform its shape coordinate description from the image coordinate system to the camera coordinate system; or select the second measured feature in the second position image and select the third measured feature in the third position image to jointly construct a reference element, and construct an XY reference coordinate system by obtaining the center points of the two features as references, and transform its shape coordinate description from the image coordinate system to the camera coordinate system.
[0027] (3) According to the definition of geometric tolerance, calculate the geometric tolerance of the measured element relative to the datum element, construct an XY coordinate system with the datum element, calculate the coordinate description of the measured element with respect to the coordinate system, and calculate its geometric deviation by comparing it with the standard coordinate to obtain the geometric tolerance.
[0028] Due to the adoption of the technical solution described above, the present invention has the following advantages:
[0029] Machine vision is the application of computer vision technology in industrial automation, enhancing the intelligence and automation levels of the industrial sector. Machine vision technology boasts advantages such as non-contact operation, large information acquisition capacity, high cost-effectiveness, and ease of operation. Through controllable optical imaging, it can solve complex problems, adapt to various workpiece types and environments, and has promising application prospects.
[0030] This machine vision-based batch measurement device for workpiece dimensions and geometric tolerances is easy to operate, safe and reliable, and can effectively measure the dimensions and geometric tolerances of complex workpieces. It has a fast measurement speed and high accuracy and is suitable for the measurement of batch workpieces.
[0031] This machine vision-based batch measurement method for workpiece size and geometric tolerances utilizes different combinations of light sources in a light source group to highlight specific features of the workpiece to be measured, and constructs a feature library of measurement elements for image comparison. It automatically infers the elements to be measured, filters the areas to be measured, extracts feature points of the areas, and executes a preset measurement algorithm. Compared with existing image instruments, it reduces the work of manually selecting measurement elements and improves measurement efficiency.
[0032] This machine vision-based batch measurement method for workpiece dimensions and geometric tolerances calculates positional tolerances by selecting datum elements and elements to be measured. It solves the problem in existing technologies where positional tolerances cannot be quantitatively measured due to the use of specific tooling. This method enables operators to automatically measure positional tolerances by selecting different elements and the type of positional tolerance to be measured, thereby reducing production costs and improving measurement efficiency. It has good potential for widespread application. Attached Figure Description
[0033] Figure 1 This is a schematic diagram of the workpiece size and form and position tolerance batch measurement device based on machine vision according to the present invention.
[0034] Figure 2 This is a flowchart of the batch measurement method for workpiece size and geometric tolerances based on machine vision according to the present invention;
[0035] Figure 3 This is a schematic diagram illustrating the calculation of the measured element size and geometric tolerances in one embodiment of the present invention. Detailed Implementation
[0036] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments.
[0037] like Figure 1 As shown, this machine vision-based batch measurement device for workpiece dimensions and geometric tolerances includes a data processing and control unit, an optical image acquisition unit, a spectral confocal displacement measuring unit, a light source unit, and a micro-displacement unit connected to the data processing and control unit. The micro-displacement unit is connected to the optical image acquisition unit.
[0038] The optical image acquisition unit includes a camera equipped with an optical lens, used to acquire the current focus surface image of the workpiece under test, and transmit the image data to the data processing and control unit;
[0039] The spectral confocal displacement ranging unit includes a spectral confocal sensor and a white light source, which are used to measure the distance of multiple measuring surfaces of the workpiece and realize automatic focusing of multiple measuring surfaces;
[0040] The light source unit includes a light source controller, a workbench bottom light source, a first programmable light source, and a second programmable light source connected to the light source controller. It is used to control the light source controller to combine and turn on and off according to the preset brightness, preset combination, and preset flicker frequency of the measurement elements.
[0041] The micro-displacement unit includes an XYZ three-axis motion module, on which a batch of workpieces to be measured are arranged; the micro-displacement unit is used to control the workpieces to be measured to move below the optical image acquisition unit, to automatically center the workpieces to be measured, to perform the measurement task, and to control the optical image acquisition unit to automatically move to the focusing distance.
[0042] The data processing and control unit is used to receive optical image data output by the optical image acquisition unit and spectral image data output by the spectral confocal displacement ranging unit, analyze measurement elements, execute measurement algorithms, output measurement results, perform data analysis tasks, and control the execution combination of the light source group, the translational movement of the micro-displacement unit, and the autofocus movement of the optical image acquisition unit in different measurement elements.
[0043] like Figure 2 As shown, a machine vision-based batch measurement method for workpiece dimensions and geometric tolerances, implemented using the aforementioned batch measurement device, includes the following steps:
[0044] S1. The data processing and control unit controls the light source group unit to turn each light source on and off according to the preset brightness, preset combination, and preset flicker frequency of the measurement elements.
[0045] S2. The data processing and control unit controls the micro-displacement unit to move the workpiece under test to below the optical image acquisition unit for automatic centering of the workpiece. Based on the center of the workpiece under test in the image, the deviations dx and dy of the workpiece under test relative to the center of the field of view are calculated. The micro-displacement unit is automatically controlled to perform translational motion in the XY direction to compensate for the placement deviation of the workpiece under test and move the workpiece under test to the center of the field of view to eliminate image edge distortion error.
[0046] S3. The data processing and control unit controls the spectral confocal displacement ranging unit to measure the distance of multiple measurement surfaces of the workpiece, and performs automatic focusing on multiple measurement surfaces. After registering the optical image output by the optical image acquisition unit and the spectral image output by the spectral confocal displacement ranging unit, the unit selects the area to be focused and obtains the distance L1 of the area to be focused. The unit calculates the clear focusing distance L2 of the camera based on the focal length of the optical lens, and controls the camera to move along the Z-axis by the distance difference L1-L2 to achieve coarse focusing. The unit then extracts a local focus area from the optical image. The micro-displacement unit moves the camera along the positive and negative directions of the Z-axis with a set step size of lmm to obtain n images. The unit uses the Laplacian operator to calculate the image with the largest gradient value and controls the camera to move to that point to achieve fine focusing.
[0047] S4. The data processing and control unit controls the optical image acquisition unit to acquire the current focus plane image and transmits it to the data processing and control unit to execute the measurement algorithm; the measurement algorithm is:
[0048] (a) Based on the pixel information of the focal plane image of the workpiece under test, match it with the preset reference image feature library, predict the features of the elements to be measured contained in the image, automatically infer the possible measurement area, and obtain the feature area; the features of the elements to be measured include but are not limited to circles, center distances, U-shaped grooves, and rectangles.
[0049] (b) Extract edge points and feature points within the feature region, perform region type matching based on the region features, and perform a fitting process based on the region type; the region features include, but are not limited to, region area, aspect ratio, and region pixel ratio; the fitting process includes, but is not limited to, line fitting, circle fitting, and curve fitting.
[0050] (c) Based on the regional distribution in the image, match similar size elements in the algorithm library and measure the relative size, including but not limited to hole center distance, slot distance, and relative angle;
[0051] S5. Select the geometric tolerance measurement element and the datum element, including the following steps:
[0052] (1) Select the first measured feature in the first position image, define it as the element to be measured in the calculation of geometric tolerance, and transform its first position coordinate description from the image coordinate system to the camera coordinate system;
[0053] (2) Select the second measured feature in the second position image and define it as a datum element in the calculation of geometric tolerances. Transform its shape coordinate description from the image coordinate system to the camera coordinate system; or select the second measured feature in the second position image and the third measured feature in the third position image to jointly construct a datum element. Construct an XY datum coordinate system by obtaining the center points of the two features as datums and transform its shape coordinate description from the image coordinate system to the camera coordinate system. The selection of the above datum elements is based on the batch measurement of position, symmetry, or coaxiality.
[0054] (3) According to the definition of geometric tolerance, calculate the geometric tolerance of the measured element relative to the datum element. Construct an XY coordinate system with the datum element, calculate the coordinate description of the measured element with respect to this coordinate system, and compare it with the standard coordinates to calculate its geometric deviation and obtain the geometric tolerance. Taking position tolerance as an example, according to the definition of geometric tolerance of position tolerance, it is the XY description point (x1, y1) of the measured element in the datum element coordinate system. The calculation method formula is as follows:
[0055]
[0056] like Figure 3 As shown, by automatically identifying the feature type, the diameters d1 to d4 of the four corner holes and the diameter D1 of the large hole in the middle are measured. The large hole and the rectangular groove on the hole are selected as reference elements. The center points P1 and P2 of the two features are selected as reference points to construct an XY coordinate system. The descriptions p1 to p4 of the center of the four corner holes in the coordinate system are calculated. The position tolerance of the four holes is calculated based on the design value using the above position tolerance calculation formula.
[0057] Similar to symmetry, coaxiality, and position, after selecting the datum element, the relationship between the measured element and the datum element is calculated according to the definition of geometric tolerance.
[0058] The above description is only a preferred embodiment of the present invention and not a limitation thereof. Any equivalent changes and modifications made in accordance with the scope of the present invention without departing from the spirit and scope of the present invention shall be within the scope of patent protection of the present invention.
Claims
1. A method for measuring the size and geometric tolerance of a workpiece based on machine vision, which is implemented based on a device for measuring the size and geometric tolerance of a workpiece based on machine vision, characterized in that: The batch measurement device includes a data processing and control unit, and an optical image acquisition unit, a spectral confocal displacement ranging unit, a light source group unit, and a micro-displacement unit connected to the data processing and control unit. The micro-displacement unit is connected to the optical image acquisition unit. The optical image acquisition unit is used to acquire the current focus surface image of the workpiece under test and transmit the image data to the data processing and control unit; The spectral confocal displacement ranging unit includes a spectral confocal sensor and a white light source, which are used to measure the distance of multiple measuring surfaces of the workpiece and realize automatic focusing of multiple measuring surfaces; The light source unit is used to turn on and off according to the preset brightness, preset combination, and preset flicker frequency of the measurement elements; The micro-displacement unit is used to control the workpiece under test to move below the optical image acquisition unit, automatically center the workpiece under test, perform the measurement task, and control the optical image acquisition unit to automatically move to the focusing distance. The data processing and control unit is used to receive optical image data output by the optical image acquisition unit and spectral image data output by the spectral confocal displacement ranging unit, analyze measurement elements, execute measurement algorithms, output measurement results, perform data analysis tasks, and control the execution combination of the light source group, the translational movement of the micro-displacement unit, and the autofocus movement of the optical image acquisition unit in different measurement elements. The batch measurement method includes the following steps: S1. The data processing and control unit controls the light source group unit to open and close according to the preset brightness, preset combination, and preset flicker frequency of the measurement elements; S2. The data processing and control unit controls the micro-displacement unit to move the workpiece under test to below the optical image acquisition unit for automatic centering of the workpiece. Based on the center of the area of the workpiece under test in the image, the deviations dx and dy of the workpiece under test relative to the center of the field of view are calculated, and the micro-displacement unit is automatically controlled to perform translational movement in the XY direction to compensate for the placement deviation of the workpiece under test and move the workpiece to the center of the field of view. S3. The data processing and control unit controls the spectral confocal displacement ranging unit to measure the distance of multiple measurement surfaces of the workpiece under test, and performs automatic focusing on multiple measurement surfaces. After registering the optical image output by the optical image acquisition unit and the spectral image output by the spectral confocal displacement ranging unit, the unit selects the area to be focused and obtains the distance L1 of the surface to be focused. According to the focusing clear distance L2 of the optical image acquisition unit, the unit is controlled to move along the Z-axis by a distance difference L1-L2 to achieve coarse focusing. The local focusing area in the optical image is cropped. The micro-displacement unit moves the camera along the positive and negative directions of the Z-axis with a set step size L to obtain n images. The Laplacian operator is used to calculate the image with the largest gradient value. The unit is controlled to move to the position of the image with the largest gradient value to achieve fine focusing. S4. The data processing and control unit controls the optical image acquisition unit to acquire the current focus plane image and transmits it to the data processing and control unit to execute the measurement algorithm; the measurement algorithm is: (a) Based on the pixel information of the focal plane image of the workpiece under test, match it with the preset reference image feature library, predict the features of the elements to be measured contained in the image, automatically infer the possible measurement area, and obtain the feature area. (b) Extract edge points and feature points within the feature region, perform region type matching based on region features, and perform fitting process based on region type; (c) Based on the regional distribution in the image, match similar size features in the algorithm library and measure their relative size; S5. The process of measuring the form and position tolerances of the workpiece, wherein the form and position tolerances include the element to be measured and the datum element, and the form and position tolerances include positional tolerance, symmetry tolerance, and coaxiality tolerance; the selection of the element to be measured and the datum element includes the following steps: (1) Select the first measured feature in the first position image, define it as the measured element in the calculation of geometric tolerance, and transform its first position coordinate description from the image coordinate system to the camera coordinate system; (2) Select the second measured feature in the second position image, define it as a reference element in the calculation of form and position tolerance, and transform its shape coordinate description from the image coordinate system to the camera coordinate system; or select the second measured feature in the second position image and select the third measured feature in the third position image to jointly construct a reference element, and construct an XY reference coordinate system by obtaining the center point of the two features as a reference, and transform its shape coordinate description from the image coordinate system to the camera coordinate system. (3) According to the definition of geometric tolerance, calculate the geometric tolerance of the measured element relative to the datum element, construct an XY coordinate system with the datum element, calculate the coordinate description of the measured element with respect to the coordinate system, and calculate its geometric deviation by comparing it with the standard coordinate to obtain the geometric tolerance.
2. A machine vision-based batch measurement device for workpiece dimensions and geometric tolerances, performing the method of claim 1, characterized in that: It includes a data processing and control unit, and connected to the data processing and control unit are an optical image acquisition unit, a spectral confocal displacement ranging unit, a light source group unit, and a micro-displacement unit, with the micro-displacement unit connected to the optical image acquisition unit; wherein, The optical image acquisition unit is used to acquire the current focus surface image of the workpiece under test and transmit the image data to the data processing and control unit; The spectral confocal displacement ranging unit includes a spectral confocal sensor and a white light source, which are used to measure the distance of multiple measuring surfaces of the workpiece and realize automatic focusing of multiple measuring surfaces; The light source unit is used to turn on and off according to the preset brightness, preset combination, and preset flicker frequency of the measurement elements; The micro-displacement unit is used to control the workpiece under test to move below the optical image acquisition unit, automatically center the workpiece under test, perform the measurement task, and control the optical image acquisition unit to automatically move to the focusing distance. The data processing and control unit is used to receive optical image data output by the optical image acquisition unit and spectral image data output by the spectral confocal displacement ranging unit, analyze measurement elements, execute measurement algorithms, output measurement results, perform data analysis tasks, and control the execution combination of the light source group, the translational movement of the micro-displacement unit, and the autofocus movement of the optical image acquisition unit in different measurement elements.
3. The machine vision-based batch measurement device for workpiece dimensions and geometric tolerances according to claim 2, characterized in that: The optical image acquisition unit includes a camera equipped with an optical lens.
4. The machine vision-based batch measurement device for workpiece dimensions and geometric tolerances according to claim 2, characterized in that: The light source unit includes a light source controller, a workbench-based light source connected to the light source controller, a first programmable light source, and a second programmable light source.
5. The machine vision-based batch measurement device for workpiece dimensions and geometric tolerances according to claim 2, characterized in that: The micro-displacement unit includes an XYZ three-axis motion module, on which a batch of workpieces to be measured are arranged.
Citation Information
Patent Citations
A digital focusing method of imaging instrument based on light field imaging technology
CN109089025A
Image measurement equipment and image measurement method
CN113899312A