Workpiece size and form and location tolerance batch measurement device and method based on machine vision
Through the batch measurement device of workpiece size and shape tolerance based on machine vision, the problems of accurate and low efficiency of complex workpiece measurement are solved, and fast and accurate batch measurement is achieved, and production costs are reduced.
Patent Information
- Application Number
- CN202411758150.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-12-03
AI Technical Summary
It is difficult for the prior art to achieve batch measurement of accurate dimensions and shape tolerances of complex workpieces, and the existing detection methods have problems such as high cost, low efficiency and low accuracy.
The workpiece size and shape tolerance batch measurement device based on machine vision is adopted, including a data processing and control unit, an optical image acquisition unit, a spectral confocal displacement ranging unit, a light source group unit and a micro displacement unit, and batch measurement of the workpiece is realized through automatic centering, multi-measuring surface autofocus, light source combination and measurement algorithm.
It realizes rapid and accurate measurement of dimensional and shape tolerances of complex workpieces, reduces production costs, improves measurement efficiency, and is suitable for measurement of batch workpieces.
Smart Images

Figure CN119687783A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of machine vision measurement, and in particular relates to a device and method for batch measuring workpiece dimensions and form and position tolerances based on machine vision. Background Art
[0002] With the continuous development of industrial technology, the demand for complex and precise workpieces is increasing, and the demand for inspection of the processing quality of these workpieces is also increasing. Workpiece size measurement is an important link in the field of industrial inspection. For complex workpieces, the accuracy of the measurement results of form and position tolerances will directly affect the subsequent assembly process and the durability of the parts. Therefore, it is very important to achieve accurate measurement of complex workpieces. The dimensional measurement of complex workpieces often has the characteristics of multi-type, multi-state, and multi-target composite. The current industrial customization level is high, and it is difficult to achieve universal fixtures to solve all clamping problems. The calculation of position tolerances has multiple benchmarks, and it is difficult to achieve all measurements on a single focus plane. In the case of batch measurement, there are also certain requirements for the placement of workpieces.
[0003] Current inspection methods include manual and three-coordinate measuring machines. The manual method requires the use of special inspection equipment for measurement, which has many problems such as high cost, low efficiency, inaccurate inspection results, and inability to achieve full inspection. The three-coordinate measuring machine has high measurement accuracy and strong adaptability, and can detect almost all form and position tolerances. However, it has relatively high environmental requirements, low efficiency, large working space, and is very expensive. It is difficult to maintain, has limited application, and its measurement speed is difficult to cope with large-scale dimensional measurement tasks. Summary of the invention
[0004] In order to solve the above problems, the purpose of the present invention is to provide a device and method for batch measuring workpiece dimensions and form and position tolerances based on machine vision.
[0005] In order to achieve the above-mentioned invention object, the present invention adopts the following technical scheme:
[0006] A device for batch measuring workpiece dimensions and form and position tolerances based on machine vision comprises a data processing and control unit, 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, wherein 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 being measured 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 of multiple measuring surfaces of the workpiece to achieve automatic focusing of the multiple measuring surfaces;
[0009] The light source group unit is used to switch on and off according to the preset brightness, preset combination, and preset strobe frequency of the measurement element;
[0010] The micro-displacement unit is used to control the workpiece to be measured to move to the bottom of the optical image acquisition unit, automatically center the workpiece to be measured, 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 the optical image data output by the optical image acquisition unit and the spectral image data output by the spectral confocal displacement ranging unit, analyze the measurement elements, execute the measurement algorithm, output the measurement results, perform data analysis tasks, and control the execution combination of the light source group units in different measurement elements, the translation movement of the micro-displacement unit, and the autofocus movement of the optical image acquisition unit.
[0012] Furthermore, the above-mentioned optical image acquisition unit includes a camera equipped with an optical lens.
[0013] Furthermore, the above-mentioned spectral confocal displacement ranging unit includes a spectral confocal sensor and a white light source.
[0014] Furthermore, the above-mentioned light source group unit includes a light source controller, and a workbench bottom light source, a first programmable light source, and a second programmable light source connected to the light source controller.
[0015] Furthermore, the above-mentioned micro-displacement unit includes an XYZ three-axis motion module, and the XYZ three-axis motion module is provided with batch-arranged workpieces to be measured.
[0016] A method for batch measuring workpiece dimensions and geometric tolerances based on machine vision is implemented based on the above batch measuring device, and comprises the following steps:
[0017] S1, the data processing and control unit controls the light source group unit to switch on and off with a preset brightness, preset combination, and preset strobe frequency of the measurement element;
[0018] S2, the data processing and control unit controls the micro-displacement unit to drive the workpiece to be measured to move to the bottom of the optical image acquisition unit to automatically center the workpiece; according to the center of the area of the workpiece to be measured in the image, the deviation dx and dy 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 to be measured, and drive the workpiece to move 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 measuring surfaces of the workpiece to be measured, performs automatic focusing of the multiple measuring surfaces, and after aligning the optical image output by the optical image acquisition unit and the spectral image output by the spectral confocal displacement ranging unit, selects the area to be focused to obtain the distance L1 of the surface to be focused, and controls the optical image acquisition unit to move the distance difference L1-L2 along the Z axis to achieve a coarse focusing process according to the clear focus distance L2 of the optical image acquisition unit, intercepts the local focus area in the optical image, and the micro displacement unit moves the camera along the positive and negative directions of the Z axis with a set step length L to acquire n images, uses the Laplacian operator to calculate the image with the largest gradient value, and controls the optical image acquisition unit to move to this point to achieve a fine focusing process;
[0020] S4, the data processing and control unit controls the optical image acquisition unit to acquire the current focus surface image, and transmits it to the data processing and control unit to execute a measurement algorithm; the measurement algorithm is:
[0021] (a) According to the pixel information of the focused surface image of the workpiece to be measured, it is matched with the preset reference image feature library, the features of the elements to be measured contained in the image are predicted, the possible measurement area is automatically inferred, and the feature area is obtained;
[0022] (b) extracting edge points and feature points within the feature area, matching the region type according to the region features, and performing the fitting process according to the region type;
[0023] (c) According to the regional distribution in the image, similar size elements in the matching algorithm library are used to measure relative sizes.
[0024] The above-mentioned method for batch measurement of workpiece size and form and position tolerance based on machine vision includes the following steps: selecting the elements to be measured and the reference elements, and the form and position tolerance includes position, symmetry, and coaxiality.
[0025] (1) Selecting a first feature to be measured in the first position image, defining it as a feature to be measured in calculating geometric tolerances, and converting its first position coordinate description from the image coordinate system to the camera coordinate system;
[0026] (2) Select a second measured feature in the second position image, define it as a reference element in calculating geometric tolerances, and transform its morphological coordinate description from the image coordinate system to the camera coordinate system; or select a second measured feature in the second position image and a third measured feature in the third position image, jointly construct a reference element, construct an XY reference coordinate system by obtaining the center points of the two features as references, and transform its morphological 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 feature to be measured relative to the datum feature, construct an XY coordinate system with the datum feature, calculate the coordinate description of the feature to be measured with respect to the coordinate system, and compare it with the standard coordinates to calculate its geometric deviation to obtain the geometric tolerance.
[0028] Due to the adoption of the above-mentioned technical solution, the present invention has the following advantages:
[0029] Machine vision is the application of computer vision technology in industrial automation, which enhances the intelligence and automation of the industrial field. Machine vision technology has the advantages of non-contact, large amount of information acquisition, high cost performance, and easy operation. It can solve complex problems through controllable optical imaging, adapt to various workpiece types and environments, and has good application prospects.
[0030] The device for batch measuring workpiece dimensions and form and position tolerances based on machine vision is easy to operate, safe and reliable, can effectively measure the dimensions and form and position tolerances of complex workpieces, has a fast measuring speed and high precision, and is suitable for batch workpiece measurement.
[0031] This machine vision-based batch measurement method for workpiece dimensions and form and position tolerances uses different light source combinations in the light source group to highlight specific features of the workpiece being measured, and builds a measurement element feature library for image comparison. It automatically infers the elements to be measured, screens the areas to be measured, extracts regional feature points, and executes preset measurement algorithms. Compared with existing imagers, it reduces the work of manual screening of measurement elements and improves measurement efficiency.
[0032] This method for batch measuring workpiece dimensions and form and position tolerances based on machine vision calculates position tolerances by selecting reference elements and elements to be measured, thereby solving the problem in the prior art that position tolerances cannot be quantitatively measured through installation through specific tooling. The operator can realize automatic measurement of position tolerances by selecting different elements and the type of position tolerance to be measured, thereby reducing production costs, improving measurement efficiency, and having good promotion and application value. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 It is a structural schematic diagram of a device for batch measuring workpiece dimensions and form and position tolerances based on machine vision of the present invention;
[0034] Figure 2 It is a flow chart of a method for batch measuring workpiece dimensions and form and position tolerances based on machine vision of the present invention;
[0035] Figure 3 It is a schematic diagram of the calculation of the size and geometric tolerance of the measured element in one embodiment of the present invention. DETAILED DESCRIPTION
[0036] The technical solution of the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments.
[0037] like Figure 1 As shown, the workpiece size and shape tolerance batch measurement device based on machine vision includes a data processing and control unit, an optical image acquisition unit connected to the data processing and control unit, a spectral confocal displacement ranging unit, a light source group unit and a micro-displacement unit, and the micro-displacement unit is connected to the optical image acquisition unit; wherein,
[0038] The optical image acquisition unit includes a camera equipped with an optical lens, which is used to acquire the current focus surface image of the workpiece being measured 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, and is used to measure the distance of multiple measuring surfaces of the workpiece to achieve automatic focusing of the multiple measuring surfaces;
[0040] The light source group unit includes a light source controller, a workbench bottom light source connected to the light source controller, a first programmable light source, and a second programmable light source, and is used to control the light source controller to switch on and off the light sources in combination according to the preset brightness, preset combination, and preset strobe frequency of the measurement element;
[0041] The micro-displacement unit includes an XYZ three-axis motion module, on which the workpieces to be measured are arranged in batches; the micro-displacement unit is used to control the workpieces to be measured to move to the bottom of the optical image acquisition unit, automatically center the workpieces to be measured, perform the measurement task, and control the optical image acquisition unit to automatically move to the focusing distance;
[0042] The data processing and control unit is used to receive the optical image data output by the optical image acquisition unit and the spectral image data output by the spectral confocal displacement ranging unit, analyze the measurement elements, execute the measurement algorithm, output the measurement results, perform data analysis tasks, and control the execution combination of the light source groups in different measurement elements, the translation movement of the micro-displacement unit, and the autofocus movement of the optical image acquisition unit.
[0043] like Figure 2 As shown, a method for batch measuring workpiece size and form and position tolerance based on machine vision is implemented based on the above batch measuring device, which includes the following steps:
[0044] S1, the data processing and control unit controls the light source group unit to turn on and off each light source according to the preset brightness, preset combination, and preset strobe frequency of the measurement element;
[0045] S2, the data processing and control unit controls the micro-displacement unit to drive the workpiece to be measured to move below the optical image acquisition unit to automatically center the workpiece; according to the center of the area of the workpiece to be measured in the image, the deviation dx and dy 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 to be measured, and drive the workpiece to be measured to move to the center of the field of view to eliminate the edge distortion error of the image;
[0046] S3, the data processing and control unit controls the spectral confocal displacement ranging unit to measure the distance of multiple measuring surfaces of the workpiece to be measured, performs automatic focusing of the multiple measuring surfaces, and after registering the optical image output by the optical image acquisition unit and the spectral image output by the spectral confocal displacement ranging unit, selects the area to be focused to obtain the distance L1 of the surface to be focused, calculates the focus clear distance L2 of the camera according to the focal length of the optical lens, controls the camera to move along the Z axis by the distance difference L1-L2 to realize the coarse focusing process, intercepts the local focus area in the optical image, and the micro displacement unit moves the camera along the positive and negative directions of the Z axis with a set step length of 1 mm to obtain n images, uses the Laplacian operator to calculate the image with the largest gradient value, and controls the camera to move to this point to realize the fine focusing process;
[0047] S4, the data processing and control unit controls the optical image acquisition unit to acquire the current focus surface image, and transmits it to the data processing and control unit to execute a measurement algorithm; the measurement algorithm is:
[0048] (a) According to the pixel information of the focused surface image of the workpiece to be measured, the image is matched with the preset reference image feature library to 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, distance between the centers of circles, U-shaped grooves, and rectangles;
[0049] (b) extracting edge points and feature points within the feature area, matching the region type according to the region features, and performing a fitting process according to the region type; the region features include but are not limited to the region area, aspect ratio, and region pixel ratio; the fitting process includes but is not limited to straight line fitting, circle fitting, and curve fitting processes;
[0050] (c) According to the regional distribution state in the image, similar size elements in the matching algorithm library are measured to measure relative sizes, wherein the relative sizes include but are not limited to hole center distance, slot distance, and relative angle;
[0051] S5. Selecting the geometric tolerance elements to be measured and the reference elements, including the following steps:
[0052] (1) Selecting a first feature to be measured in the first position image, defining it as a feature to be measured in calculating geometric tolerances, and converting its first position coordinate description from the image coordinate system to the camera coordinate system;
[0053] (2) Select a second measured feature in the second position image, define it as a reference element in calculating geometric tolerances, and transform its morphological coordinate description from the image coordinate system to the camera coordinate system; or select a second measured feature in the second position image and a third measured feature in the third position image, jointly construct a reference element, construct an XY reference coordinate system by obtaining the center points of the two features as references, and transform its morphological coordinate description from the image coordinate system to the camera coordinate system; the selection of the above reference elements is based on batch measurement of position, symmetry, or coaxiality;
[0054] (3) According to the definition of geometric tolerance, calculate the geometric tolerance of the element to be measured relative to the datum element, construct an XY coordinate system with the datum element, calculate the coordinate description of the element to be measured with respect to the coordinate system, and calculate its geometric deviation by comparing it with the standard coordinate to obtain the geometric tolerance; taking position as an example, according to the definition of geometric tolerance of position, that is, the XY description point (x1, y1) of the element to be measured in the datum element coordinate system, in a circle with the XY description point (x0, y0) of the design value in the datum element coordinate system as the center and the position tolerance value d as the diameter, the calculation method formula is:
[0055]
[0056] like Figure 3 As shown, by automatically identifying the feature type, measuring the diameters d1~d4 of the circular holes at the four corners and the diameter D1 of the large hole in the middle, selecting the large hole and the rectangular groove on the hole as reference elements, selecting the center points P1 and P2 of the two features as reference points to construct an XY coordinate system, and calculating the descriptions p1~p4 of the centers of the circular holes at the four corners in the coordinate system. Using the above position calculation formula, the position tolerances of the four holes are calculated according to the design values.
[0057] Symmetry, coaxiality and position are similar. After selecting the datum feature, the relationship between the feature to be measured and the datum feature is calculated according to the definition of geometric tolerance.
[0058] The above description is only a preferred embodiment of the present invention, and is not intended to limit the present invention. Without departing from the spirit and scope of the present invention, all equivalent changes and modifications made within the scope of the patent application of the present invention shall fall within the scope of patent protection of the present invention.
Claims
1. A device for batch measuring workpiece dimensions and geometric tolerances based on machine vision, characterized by: It includes a data processing and control unit, 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, and the micro displacement unit is 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 being measured and transmit the image data to the data processing and control unit; The spectral confocal displacement ranging unit is used to measure the distance of multiple measuring surfaces of the workpiece to achieve automatic focusing of the multiple measuring surfaces; The light source group unit is used to switch on and off according to the preset brightness, preset combination, and preset strobe frequency of the measurement element; The micro-displacement unit is used to control the workpiece to be measured to move to the bottom of the optical image acquisition unit, automatically center the workpiece to be measured, 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 the optical image data output by the optical image acquisition unit and the spectral image data output by the spectral confocal displacement ranging unit, analyze the measurement elements, execute the measurement algorithm, output the measurement results, perform data analysis tasks, and control the execution combination of the light source groups in different measurement elements, the translation movement of the micro-displacement unit, and the autofocus movement of the optical image acquisition unit.
2. The device for batch measuring workpiece dimensions and geometric tolerances based on machine vision according to claim 1 is characterized in that: The optical image acquisition unit includes a camera equipped with an optical lens.
3. The device for batch measuring workpiece dimensions and geometric tolerances based on machine vision according to claim 1 is characterized in that: The spectral confocal displacement ranging unit comprises a spectral confocal sensor and a white light source.
4. The device for batch measuring workpiece dimensions and geometric tolerances based on machine vision according to claim 1 is characterized in that: The light source group unit includes a light source controller, a workbench bottom light source connected to the light source controller, a first programmable light source, and a second programmable light source.
5. The device for batch measuring workpiece dimensions and geometric tolerances based on machine vision according to claim 1 is characterized in that: The micro-displacement unit comprises an XYZ three-axis motion module, on which the workpieces to be measured are arranged in batches.
6. A method for batch measurement of workpiece dimensions and geometric tolerances based on machine vision, implemented based on the batch measurement device described in any one of claims 1 to 5 above, characterized in that: It includes the following steps: S1, the data processing and control unit controls the light source group unit to switch on and off with a preset brightness, preset combination, and preset strobe frequency of the measurement element; S2, the data processing and control unit controls the micro-displacement unit to drive the workpiece to be measured to move to the bottom of the optical image acquisition unit to automatically center the workpiece; according to the center of the area of the workpiece to be measured in the image, the deviation dx and dy 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 to be measured, and drive the workpiece to move 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 measuring surfaces of the workpiece to be measured, performs automatic focusing of the multiple measuring surfaces, and after aligning the optical image output by the optical image acquisition unit and the spectral image output by the spectral confocal displacement ranging unit, selects the area to be focused to obtain the distance L1 of the surface to be focused, and controls the optical image acquisition unit to move the distance difference L1-L2 along the Z axis to achieve a coarse focusing process according to the clear focus distance L2 of the optical image acquisition unit, intercepts the local focus area in the optical image, and the micro displacement unit moves the camera along the positive and negative directions of the Z axis with a set step length L to acquire n images, uses the Laplacian operator to calculate the image with the largest gradient value, and controls the optical image acquisition unit to move to this point to achieve a fine focusing process; S4, the data processing and control unit controls the optical image acquisition unit to acquire the current focus surface image, and transmits it to the data processing and control unit to execute a measurement algorithm; the measurement algorithm is: (a) According to the pixel information of the focused surface image of the workpiece to be measured, it is matched with the preset reference image feature library, the features of the elements to be measured contained in the image are predicted, the possible measurement area is automatically inferred, and the feature area is obtained; (b) extracting edge points and feature points within the feature area, matching the region type according to the region features, and performing the fitting process according to the region type; (c) According to the regional distribution in the image, similar size elements in the matching algorithm library are used to measure relative sizes.
7. The method for batch measuring workpiece dimensions and geometric tolerances based on machine vision according to claim 6 is characterized in that: The process of measuring the form and position tolerance of a workpiece, wherein the form and position tolerance includes the element to be measured and the reference element, and the form and position tolerance includes position, symmetry, and coaxiality; selecting the element to be measured and the reference element, comprises the following steps: (1) Selecting a first feature to be measured in the first position image, defining it as a feature to be measured in calculating geometric tolerances, and converting its first position coordinate description from the image coordinate system to the camera coordinate system; (2) Select a second measured feature in the second position image, define it as a reference element in calculating geometric tolerances, and transform its morphological coordinate description from the image coordinate system to the camera coordinate system; or select a second measured feature in the second position image and a third measured feature in the third position image, jointly construct a reference element, construct an XY reference coordinate system by obtaining the center points of the two features as references, and transform its morphological 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 feature to be measured relative to the datum feature, construct an XY coordinate system with the datum feature, calculate the coordinate description of the feature to be measured with respect to the coordinate system, and compare it with the standard coordinates to calculate its geometric deviation to obtain the geometric tolerance.
Citation Information
Patent Citations
Batch detection method of small pin shaft part space sizes
CN103090793A
Printing plate quality detection system and method
CN103674962A
Method for rapidly measuring end surface pin hole location degree of revolving body type part
CN105066883A
A digital focusing method of imaging instrument based on light field imaging technology
CN109089025A
Automatic focusing method for thread detection based on machine vision
CN109254382A