High-precision size measurement method

By adjusting the color of the light output light matches the object to be measured, combined with image processing technology, the measurement accuracy deviation of different colored rod-shaped objects to be measured is solved, and the accuracy of measurement of multi-color products is improved.

CN119146845APending Publication Date: 2024-12-17WUHAN JINGLI ELECTRONICS TECH +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411211395.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

In the prior art, rod-shaped objects to be measured with different colors have different light transmittances due to different colors, resulting in different image contrast differences, which in turn affects the measurement accuracy and cannot be effectively applied to multi-color product measurements.

Method used

By adjusting the color of the light output light from the light source, it matches the object to be measured. If the size of the object to be measured is greater than or equal to the set size, it will be adjusted to a complementary color. If it is less than, it will be adjusted to the color with the longest wavelength. Combined with image processing, calculate the image to be measured size of the object.

Benefits of technology

Improve image contrast and measurement accuracy, which can effectively solve the measurement accuracy deviation of different colored rod-shaped objects to be measured, and achieve multi-color product measurement needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119146845A_ABST
    Figure CN119146845A_ABST
Patent Text Reader

Abstract

The invention relates to a high-precision size measurement method. The method comprises the following steps: adjusting output light of a light source into a color matched with a to-be-measured object according to a set rule; collecting an image of a to-be-detected area of the to-be-detected object And calculating the size of the to-be-measured area of the to-be-measured object based on the By adjusting the color of the light output by the light source, the different colored to-be-measured objects can be irradiated with the light matched with the colors of the to-be-measured objects, the contrast of the collected image is further improved, the size precision of the to-be-measured area calculated based on the high-contrast image is higher, the multi-color product measurement requirement can be met, and the measurement accuracy of the to-be-measured area is improved. The technical problem that the measurement precision of the rod-shaped to-be-measured objects with different colors is deviated due to the fact that the image contrast of the rod-shaped to-be-measured objects with different colors is obviously different in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of optical detection technology, and in particular to a high-precision dimension measurement method. Background Art

[0002] At present, many rods and slits such as optical fiber cores, grating slits, wire copper cores and machine tool lead screws are important components of precision instruments and measurement systems. The processing and detection accuracy of their geometric cross-sections and slit diameters directly affects the performance and accuracy of the instruments and systems. Therefore, high-precision and rapid detection of slits or rods is particularly important.

[0003] In the related art, in measuring the cross-sectional diameter of rod-shaped test objects, current measuring equipment has obvious differences in image contrast for rod-shaped test objects of different colors due to the different transmittances of different colors to light. This leads to deviations in the measurement accuracy of rod-shaped test objects of different colors, and cannot be well applied to the measurement needs of multi-color products.

[0004] Therefore, it is necessary to design a new high-precision dimension measurement method to overcome the above problems. Summary of the invention

[0005] The present application provides a high-precision dimension measurement method, which can solve the technical problem in the related art that the image contrast of rod-shaped objects to be measured with different colors is obviously different, resulting in deviation in the measurement accuracy of rod-shaped objects to be measured with different colors.

[0006] In a first aspect, an embodiment of the present application provides a high-precision dimension measurement method, which comprises the following steps:

[0007] According to the set rules, the output light of the light source is adjusted to a color that matches the object to be tested;

[0008] Collecting images of the area to be tested of the object to be tested;

[0009] The size of the area to be tested of the object to be tested is calculated based on the boundary information of the area to be tested in the image.

[0010] In combination with the first aspect, in one implementation, adjusting the output light of the light source to a color matching the object to be tested according to a set rule includes:

[0011] If the size of the area to be tested of the object to be tested is greater than or equal to the set size, the output light of the light source is adjusted to a complementary color to the object to be tested;

[0012] If the size of the area to be tested of the object to be tested is smaller than the set size, the output light of the light source is adjusted to the color with the longest wavelength.

[0013] In combination with the first aspect, in one implementation, when the size of the area to be tested of the object to be tested is smaller than a set size, the wavelength range of the light output by the light source is 620nm-700nm.

[0014] In combination with the first aspect, in one implementation, adjusting the output light of the light source to a color matching the object to be tested according to a set rule includes:

[0015] Rotate the rotating color wheel on one side of the light source so that the output light from the rotating color wheel is adjusted to a color that matches the object to be measured.

[0016] In combination with the first aspect, in one implementation, the step of calculating the size of the area to be tested of the object to be tested based on the image includes:

[0017] Calculate the boundary of the area to be tested in the image;

[0018] The cross-sectional diameter d of the area to be measured is calculated according to the pixel size P of the image captured by the camera, the number of pixels N occupied by the cross-sectional diameter within the boundary of the area to be measured, and the magnification M of the camera front lens; or the seam spacing d of the object to be measured is calculated according to the pixel size P of the image captured by the camera, the number of pixels N occupied by the seam spacing within the boundary of the area to be measured, and the magnification M of the camera front lens.

[0019] In combination with the first aspect, in one implementation, calculating the boundary of the area to be measured in the image includes:

[0020] After the image is binary segmented, the edge detection algorithm is used to calculate the boundary of the area to be tested in the image.

[0021] In combination with the first aspect, in one implementation, when the acquired image is a diffraction image, the step of calculating the size of the area to be measured of the object to be measured based on the image includes:

[0022] Extract the intensity distribution and distance relationship distribution curve of the effective area in the horizontal direction of the image;

[0023] The size of the area to be tested of the object to be tested is calculated based on the distribution curve of the relationship between the intensity distribution and the distance.

[0024] In combination with the first aspect, in one embodiment, when the diffraction image is in a stripe shape, the step of calculating the size of the area to be measured of the object to be measured based on the intensity distribution and distance relationship distribution curve includes:

[0025] Calculate the distance x from each level of dark fringe to the central main maximum point in the distribution curve of intensity distribution and distance k ;

[0026] According to the dark fringe level k, the distance x from the kth dark fringe to the central main maximum point k , the wavelength of light λ and the focal length f of the camera front lens to calculate the cross-sectional diameter of the area to be measured or the slit spacing d of the object to be measured.

[0027] In combination with the first aspect, in one implementation, when the diffraction image is circular, the step of calculating the size of the area to be tested of the object to be tested based on the intensity distribution and distance relationship distribution curve includes:

[0028] Get the central Airy disk diameter x in the intensity distribution and distance relationship distribution curve 0 ;

[0029] According to the wavelength of light λ, the focal length f of the camera front lens and the diameter x of the central Airy disk 0 Calculate the cross-sectional diameter d of the area to be measured.

[0030] In combination with the first aspect, in one embodiment, before acquiring the image of the area to be tested of the object to be tested, the following steps are also included:

[0031] Determine the length of the object to be measured and the size of the area to be measured;

[0032] If the length of the object to be measured is greater than the set length, the imaging module for collecting images and the light source are placed on the same side of the object to be measured;

[0033] If the size of the area to be tested is smaller than the set size, the imaging module and the light source for collecting images are placed on opposite sides of the object to be tested.

[0034] In combination with the first aspect, in one implementation, before acquiring the image of the area to be tested of the object to be tested, the method further includes:

[0035] Adjust the position of the object to be tested so that the light spot of the light source is symmetrical about the area to be tested;

[0036] Adjust the distance between the lens and the camera behind the object to be measured so that the focal plane of the lens coincides with the imaging plane of the camera.

[0037] The beneficial effects brought by the technical solution provided in the embodiments of the present application include:

[0038] By adjusting the color of the light output by the light source, the light matching the color of the different colored test objects can be irradiated, thereby improving the contrast of the collected image, and the size accuracy of the test area calculated based on the image is also higher, and the measurement requirements of multi-color products can be met, which solves the technical problem in the related art that the image contrast of the different colored rod-shaped test objects is obviously different, resulting in deviation in the measurement accuracy of the different colored rod-shaped test objects. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0040] Figure 1 A schematic diagram of a process flow of a high-precision dimension measurement method provided in an embodiment of the present application;

[0041] Figure 2 A schematic diagram of a structure in which an imaging module and an adjustable light source module are located on different sides in a measuring device provided in an embodiment of the present application;

[0042] Figure 3 A schematic diagram of the three-dimensional structure of a fixture module provided in an embodiment of the present application;

[0043] Figure 4 A schematic diagram of a structure in which an imaging module and an adjustable light source module are located on the same side in a measuring device provided in an embodiment of the present application;

[0044] Figure 5 (a) is a schematic diagram of the shooting result of a thick rod-shaped object to be tested or a regular gap, (b) is a diagram of the processing result of (a) after edge recognition, (c) is a schematic diagram of the shooting result of a regular inner diameter, and (d) is a diagram of the processing result of (c) after edge recognition;

[0045] Figure 6 (a) is a schematic diagram of the shooting results of a thinner rod-shaped object to be tested or a regular gap, and (b) is a curve diagram of the relationship between the intensity distribution and the distance of (a);

[0046] Figure 7 (a) is a schematic diagram of the shooting results of a thinner regular inner diameter, and (b) is a curve diagram of the relationship between the intensity distribution and distance of (a).

[0047] In the figure:

[0048] 1. Adjustable light source module; 11. Light source; 12. Rotating color wheel; 13. Collimator; 14. Aperture;

[0049] 2. fixture module; 21. fixing rail; 22. clamping piece; 221. mounting hole; 222. outer side surface; 23. fixing plate; 24. flexible anti-injury layer;

[0050] 3. Imaging module; 31. Imaging lens; 32. Camera;

[0051] 4. Precision controllable slide rail; 5. Object to be tested. DETAILED DESCRIPTION

[0052] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings 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 in 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.

[0053] In the related technology, the current measurement methods for thin gaps or thin rods include contact measurement and non-contact measurement. The contact measurement methods include the probe spacing method and the caliper reading method. The contact measurement method requires close contact with the object to be measured. The metal probe will deform or scratch the object to be measured, which will affect the subsequent high-precision use requirements. The non-contact measurement methods mainly include laser diameter gauges or photoelectric diameter gauges. The instruments with high measurement accuracy are often large and complex in structure, while the measurement accuracy of small devices is insufficient. There are multiple variables in the measurement method, and it is difficult to complete high-precision testing through a simple system and measurement method. It is also impossible to take into account the measurement of multiple types of thick outer diameters, thin outer diameters, and hollow inner diameters in the same device.

[0054] In measuring the cross-sectional diameter of thick rod-shaped objects to be tested, the current measuring equipment has obvious differences in image contrast for rod-shaped objects of different colors due to different light transmittances of different colors, resulting in deviations in the measurement accuracy of thin rod-shaped objects of different colors, and cannot be well applied to the measurement needs of multi-color products. In the measurement of thin slits and thin rods of a few millimeters or even smaller, due to their small cross-sectional diameter, the direct image algorithm calculation is easily affected by diffraction and cannot accurately measure the cross-sectional diameter of thin slits and thin rods.

[0055] The embodiment of the present application provides a high-precision dimension measurement method, which can solve the technical problem in the related art that the image contrast of rod-shaped objects to be measured with different colors is obviously different, resulting in deviation in the measurement accuracy of rod-shaped objects to be measured with different colors.

[0056] See also Figure 1 As shown, a high-precision dimension measurement method provided by an embodiment of the present application may include the following steps:

[0057] S1: adjusting the output light of the light source 11 to a color matching the object to be measured 5 according to a set rule.

[0058] In step S1, the color of the light output by the light source 11 can be directly controlled to change, or a rotating color wheel 12 can be arranged behind the light source 11. The light source 11 selects a white point light source 11. The rotating color wheel 12 is preferably an adjustable single-pass rotating color wheel 12. The rotating color wheel 12 can rotate around its axis, and the rotating color wheel 12 is provided with a plurality of monochromatic (single wavelength) permeable film layers along its circumferential direction. When the rotating color wheel 12 rotates until one of the monochromatic permeable film layers is aligned with the light source 11, the wavelength of the output light emitted by the light source 11 is consistent with the wavelength of the monochromatic permeable film layer after passing through the monochromatic permeable film layer. In this way, the color of the output light can be adjusted by rotating the rotating color wheel 12 (see Figure 2 shown).

[0059] S2: Capture an image of the test area of ​​the test object 5. In this step, the test area can be a certain area on the surface of the test object 5 (such as a hole or gap set on the test object 5), or the entire surface of the test object 5 (such as the entire surface of the rod).

[0060] S3: Calculate the size of the area to be tested of the object 5 based on the image. In this step, the size of the area to be tested can be, for example, the diameter or cross-sectional size of the rod (the rod can be round or square or other shapes), or the inner diameter of the inner hole or the spacing of the gaps.

[0061] This embodiment adjusts the color of the light output by the light source 11 so that the differently colored test objects 5 are irradiated with light that matches their colors, thereby improving the contrast of the collected image, and the size accuracy of the test area calculated based on the image is also higher, and the measurement requirements of multi-color products can be met, which solves the technical problem in the related art that the image contrast of the differently colored rod-shaped test objects 5 is significantly different, resulting in deviations in the measurement accuracy of the differently colored rod-shaped test objects 5.

[0062] Furthermore, in one embodiment, adjusting the output light of the light source 11 to a color matching the object to be tested 5 according to a set rule may include: if the size of the area to be tested of the object to be tested 5 is greater than or equal to the set size, adjusting the output light of the light source 11 to a complementary color to the object to be tested 5; if the size of the area to be tested of the object to be tested 5 is less than the set size, adjusting the output light of the light source 11 to a color with the longest wavelength.

[0063] In this embodiment, if the area to be measured is a larger area to be measured, for example, the outer diameter of a thicker rod-shaped object to be measured 5, or a larger regular gap, or a larger regular inner diameter, the larger size here can be greater than or equal to 0.2mm (of course, other values ​​can also be taken according to the actual accuracy requirements), that is, the outer diameter or gap or inner diameter of the rod is greater than or equal to 0.2mm. For such a larger area to be measured, when detecting, the output light of the light source 11 is adjusted to a complementary color with the object to be measured 5. For the thicker object to be measured 5, the complementary color is selected during detection, which can improve the contrast between the background area and the area to be measured, so that the boundary segmentation is closer to the true value, thereby obtaining a more accurate measurement result. For a smaller area to be measured, for example, the outer diameter or regular slit or smaller regular inner hole of a thinner rod-shaped object to be measured 5 needs to be measured, that is, the outer diameter or gap or inner diameter of the rod is less than 0.2mm. For such a smaller area to be measured, when detecting, the output light of the light source 11 is adjusted to the color with the longest wavelength. The longer the wavelength, the higher the detection accuracy.

[0064] Further, in some optional embodiments, when the size of the area to be tested of the object to be tested 5 is smaller than the set size, the wavelength range of the light source output light is 620nm-700nm. For example, a red light of 660nm is selected. The wavelength of the output light here refers to the wavelength value after adjustment. If the color of the output light is adjusted by rotating the color wheel 12, the wavelength range of the output light here refers to the wavelength of the output light after the rotating color wheel 12. For the smaller area to be tested (such as the measurement of a slit or a thin rod), the wavelength of the output light is adjusted to 620nm-700nm in this embodiment. When the collimated detection light passes through the slit or the thin rod, the longer the wavelength, the stronger the diffraction ability, and the characteristic trend of the obtained detection image will be more obvious, thereby improving the detection accuracy.

[0065] Further, in one embodiment, adjusting the output light of the light source 11 to a color matching the object to be tested 5 according to a set rule may include: rotating a rotating color wheel 12 on one side of the light source 11, so that the output light output from the rotating color wheel 12 of the light source 11 is adjusted to a color matching the object to be tested 5. In this embodiment, the rotating color wheel 12 is used to adjust the color of the output light, and the output of multiple monochromatic lights can be achieved through a single light source 11. At the same time, it only needs to be rotated to the corresponding color, avoiding the switching of multiple light sources 11. In addition, the cost and structure of the single light source 11 used in this embodiment are far superior to the integration of multiple light sources 11.

[0066] In this embodiment, the above measurement method can be used Figure 2The measuring device shown in the figure is used for detection, wherein the measuring device includes an adjustable light source module 1, a fixture module 2 and an imaging module 3. The adjustable light source module 1 may include the above-mentioned light source 11 and a rotating color wheel 12. The imaging module 3 includes an imaging lens 31 and a camera 32. The imaging lens 31 is located between the fixture module 2 and the camera 32, and the focal plane of the imaging lens 31 coincides with the imaging plane of the camera 32. There are many ways to change the color of the output light of the adjustable light source module 1, such as self-luminescence or white light combined with a filter.

[0067] See also Figure 2 As shown, the adjustable light source module 1 further includes a collimator 13 and an aperture 14, wherein the collimator 13 and the aperture 14 are located between the rotating color wheel 12 and the fixture module 2, and the aperture 14 is located between the collimator 13 and the fixture module 2. The aperture 14 is preferably an adjustable circular aperture 14, and the aperture 14 is provided with a plurality of holes of different sizes along its circumferential direction. When the measuring device is used to detect a coarser object 5 to be measured, the aperture 14 can be adjusted to have a larger hole aligned with the light source 11, so that the light emitted by the light source 11 can pass through the larger hole to irradiate the object 5 to be measured; when the measuring device is used to detect a finer object 5 to be measured, the aperture 14 can be adjusted to have a smaller hole aligned with the light source 11, so that the light emitted by the light source 11 can pass through the smaller hole to irradiate the object 5 to be measured, thereby enabling the measuring device to be applicable to the detection of objects 5 to be measured of various sizes.

[0068] See also Figure 3 As shown, the fixture module 2 includes a fixed rail 21, on which two clamping members 22 are slidably mounted, and the two clamping members 22 are used to fix the object to be tested 5. The fixed rail 21 extends in the front-to-back direction, and the two clamping members 22 can move on the fixed rail 21 in the front-to-back direction, so that the gap between the two clamping members 22 can be adjusted, so that the two clamping members 22 can clamp the objects to be tested 5 of different sizes. In this embodiment, the number of clamping members 22 on the fixed rail 21 can be two or more, which can be set according to actual needs and is not limited here.

[0069] Further, see Figure 2 and Figure 3As shown, the measuring device may further include a precision controllable slide rail 4; the fixture module 2 may further include a fixed plate 23, the fixed plate 23 is mounted on the precision controllable slide rail 4, and the fixed rail 21 is fixed to the fixed plate 23. The fixture module 2 is integrally mounted on the precision controllable slide rail 4, so that the precision controllable slide rail 4 can drive the fixture module 2 to move along the x, y and z axes, so as to accurately adjust the position of the fixture module 2 in the x, y and z axis directions, and then adjust the distance between the object to be tested 5 in the fixture module 2 and the aperture 14 and the imaging module 3. The precision controllable slide rail 4 can also drive the fixture module 2 to rotate around the x, y and z axes, and adjust the object to be tested 5 to the required detection state, for example, adjust the object to be tested 5 so that the light spot of the light source 11 is symmetrical about the object to be tested 5, or the light source 11 is in a coaxial state with the object to be tested 5. This embodiment uses the precision controllable slide rail 4 to adjust the position of the fixture module 2, which can achieve precise adjustment of the position of the fixture module 2 and provide a basis for subsequent precise detection.

[0070] Further, see Figure 3 As shown, each clamping member 22 is provided with a mounting hole 221, and the mounting hole 221 penetrates the clamping member 22 along the extension direction of the fixed rail 21. In this embodiment, the mounting hole 221 penetrates the clamping member 22 along the front-to-back direction, and the mounting holes 221 on the two clamping members 22 are coaxially arranged. When measuring the outer diameter of the rod or the inner diameter of the hole, the object to be measured 5 can be horizontally inserted into the mounting holes 221 of the two clamping members 22, so that the axis of the rod or the hole is horizontal along the front-to-back direction, and the light emitted by the light source 11 is irradiated to the object to be measured 5, and the end surface of the rod or the hole can be photographed by the imaging module 3, and the outer diameter of the rod or the inner diameter of the hole can be calculated based on the photographed image. At the same time, the clamping members 22 are slidably mounted on the fixed rail 21. By adjusting the relative positions of the two clamping members 22, the length of the tested member between the two clamping members 22 can be moderate after the tested member passes through the two clamping members 22, and the length of the tested member in front of the two clamping members 22 is consistent with the length behind the two clamping members 22, ensuring that the tested member is in a horizontal state. A flexible anti-injury layer 24 is provided on the side where the two clamping members 22 are close to each other.

[0071] See also Figure 4 As shown, the imaging module 3 and the adjustable light source module 1 can be located on the same side of the fixture module 2, and the axis of the imaging module 3 and the axis of the adjustable light source module 1 are arranged symmetrically about the symmetry plane passing through the center of the mounting hole 221, or they can be located on opposite sides of the fixture module 2 ( Figure 2As shown). When on the same side, the imaging module 3 and the adjustable light source module 1 are both located in front of the fixture module 2, and the adjustable light source module 1 and the imaging module 3 can be arranged up and down, or left and right. When the adjustable light source module 1 and the imaging module 3 are arranged up and down, the symmetry plane is a horizontal plane passing through the center of the mounting hole 221; when the adjustable light source module 1 and the imaging module 3 are arranged left and right, the symmetry plane is a vertical plane passing through the center of the mounting hole 221. The light emitted by the light source 11 is irradiated to the object to be tested 5, and the reflected light of the object to be tested 5 can enter the imaging module 3 for imaging. Placing the imaging module 3 and the adjustable light source module 1 on the same side of the fixture module 2 can leave a larger area behind the fixture module 2, so that the fixture module 2 can be suitable for horizontally placed and longer objects to be tested 5. Of course, this solution is also suitable for short objects to be tested 5.

[0072] Preferably, when the imaging module 3 and the adjustable light source module 1 are located on the same side of the fixture module 2, the value range of the angle α between the axis of the imaging module 3 and the symmetry plane is: α<=arctan(V / 2H); wherein V is the inner diameter of the mounting hole 221; and H is the distance between the outer side surfaces 222 of the two clamping members 22 along the axis direction of the mounting hole 221 when the object to be measured 5 is mounted on the two clamping members 22. In this embodiment, the angle α between the axis of the imaging module 3 and the symmetry plane is limited to this range, so that no matter whether the size of the area to be measured on the object to be measured 5 is large or small, the collimated light can cover the area to be measured; at the same time, the angle α between the adjustable light source module 1 and the symmetry plane is also within this range. The adjustable light source module 1 of this angle is symmetrically arranged with the imaging module 3, and a bright field image of the area to be measured can be obtained, which can better highlight the contour feature information of the area to be measured.

[0073] Further, in some optional embodiments, the calculating the size of the area to be tested of the object to be tested 5 based on the image includes:

[0074] S311: Calculate the boundary of the area to be tested in the image.

[0075] S312: Calculate the cross-sectional diameter d of the area to be measured based on the pixel size P of the image captured by the camera 32, the number of pixels N occupied by the cross-sectional diameter within the boundary of the area to be measured, and the magnification M of the front lens of the camera 32; or calculate the seam spacing d of the object to be measured 5 based on the pixel size P of the image captured by the camera 32, the number of pixels N occupied by the seam spacing within the boundary of the area to be measured, and the magnification M of the front lens of the camera 32.

[0076] See also Figure 5 As shown in FIG. 1 , (a) is a schematic diagram of the detection result of a thick rod-shaped object to be detected 5 or a regular gap, and FIG. (b) is the processing result after boundary recognition. When the object to be detected 5 is a cylindrical rod, Figure 5The distance between the upper and lower arrows in (b) is the cross-sectional diameter within the boundary of the test area, and the number of pixels between the upper and lower arrows is the number of pixels N occupied by the cross-sectional diameter within the boundary of the test area; when the test area of ​​the object 5 to be tested is a regular gap (the gap here is not a thin gap), Figure 5 The distance between the two arrows in (b) is the gap spacing within the boundary of the region to be tested, and the number of pixels between the two arrows is the number of pixels N occupied by the gap spacing within the boundary of the region to be tested. Figure 5 By calculating the number of cross-sectional pixels N at multiple locations in (b), the average of the cross-sectional diameter d or the slit spacing d can be obtained. The specific formula is:

[0077]

[0078] Among them, i is Figure 5 The number of locations selected in (b).

[0079] Figure 5 (c) is a schematic diagram of measuring the inner diameter of a regular hole or the end face of a thick rod-shaped object to be tested 5, and (d) is the processing result after boundary recognition in (c). At this time, the number of pixels occupied between the two arrows on the same diameter is the number of pixel data N occupied by the cross-sectional diameter within the boundary of the test area. Figure 5 The number of cross-sectional pixels N is calculated at multiple diameter positions in (d), and the average cross-sectional diameter d can be obtained. The specific formula is also:

[0080]

[0081] In this embodiment, when measuring the outer diameter of a thick rod-shaped object to be tested 5, the object to be tested 5 can be placed vertically to collect Figure 5 The image shown in (a) can also be collected by placing the object 5 horizontally. Figure 5 (c) shows the end face image. Both methods can be used to calculate the outer diameter of the rod-shaped object to be tested 5, and the outer diameters obtained by the two methods can be verified with each other.

[0082] Further, in some embodiments, the calculation of the boundary of the area to be measured in the image may include: using an edge detection algorithm to calculate the boundary of the area to be measured in the image after binary segmentation of the image. In this embodiment, the edge detection algorithm may use a Canny operator, or other edge detection algorithms may also be used. In addition, the edge detection after binary segmentation in this embodiment may highlight the boundary information of the object to be measured 5, thereby improving the calculation accuracy. According to the identified boundaries, multiple smooth or horizontal normal areas may be selected to calculate the cross-sectional diameter, thereby avoiding the influence of the concave area caused by deformation or damage on the actual measurement result.

[0083] In this embodiment, for the measurement of the thicker rod-shaped object to be tested 5, regular gaps, and the inner diameter of regular holes, the color of the light output by the light source 11 can be adjusted by rotating the color wheel 12 so that the color of the output light forms a complementary color with the object to be tested 5; then the object to be tested 5 is placed in the fixture module 2, and the object to be tested 5 is adjusted to be coaxial with the light source 11 or the light spot of the light source 11 is symmetrical about the area to be tested; then, by adjusting the distance between the imaging lens 31 and the camera 32, a corresponding clear image (that is, Figure 5 (a) or (c)); then the image is binary segmented and the Canny operator is used to calculate the boundary of the object 5 to be measured; finally, the cross-sectional diameter d or the slit spacing d is calculated.

[0084] Further, in some optional embodiments, when the acquired image is a diffraction image, the calculating the size of the area to be measured of the object to be measured 5 based on the image may also include:

[0085] S321: Extracting a distribution curve of the intensity distribution and distance relationship in the horizontal direction of the effective area in the image.

[0086] S322: Calculate the size of the area to be tested of the object to be tested 5 based on the intensity distribution and distance relationship distribution curve.

[0087] In this embodiment, for a thinner rod-shaped object to be tested 5 or a regular slit, it can be known from Babinet's theorem that a thin rod or a slit has the same diffraction phenomenon. If the size of the test area of ​​the object to be tested 5 is smaller than the set size (i.e., the thin rod or the slit), the object to be tested 5 is vertically fixed on the fixture module 2, and the image of the test area of ​​the object to be tested 5 is collected as a diffraction image ( Figure 6 (a)), and the intensity distribution and distance relationship distribution curve of the effective area in the horizontal direction of the image can be extracted according to the collected diffraction image. The intensity distribution diagram is shown in Figure 6 For the measurement of the inner diameter of a relatively thin regular hole, a thin rod with a hollow inner diameter is extracted and fixed horizontally on the fixture module 2, and the thin rod is adjusted to be coaxial with the light source 11, and the corresponding diffraction image is taken, as shown in FIG. Figure 7 As shown in (a), the relationship between the intensity distribution and distance in the horizontal direction through the center is as follows Figure 7 Then, based on the intensity distribution and distance relationship distribution curve, the outer diameter of the thin rod, the spacing of the regular thin slits, or the inner diameter of the thin hole can be calculated.

[0088] This embodiment can take diffraction into consideration when measuring thin slits and thin rods of a few millimeters or even smaller, and can accurately measure the cross-sectional diameters of the thin slits and thin rods.

[0089] On the basis of the above technical solution, in one embodiment, when the diffraction image is in the shape of stripes, the calculation of the size of the test area of ​​the test object 5 based on the intensity distribution and distance relationship distribution curve may include:

[0090] S3221: Calculate the distance x from each level of dark fringe to the central main maximum point in the intensity distribution and distance relationship distribution curve k .

[0091] S3222: According to the dark fringe level k, the distance x from the kth dark fringe to the central main maximum point k , the light wavelength λ and the focal length f of the front lens of the camera 32 are used to calculate the cross-sectional diameter of the area to be measured or the slit spacing d of the object to be measured 5.

[0092] In this embodiment, for a thinner rod-shaped object to be tested 5 or a regular slit, when measuring the outer diameter of the rod-shaped object to be tested 5 (that is, the cross-sectional diameter d of the area to be tested) or the slit spacing d of the regular slit, according to Figure 6 The intensity distribution and distance relationship distribution curve (b) in the image can be used to calculate the distance x from each level of dark pattern to the central main maximum point through pixel calibration. k , where the central principal maximum point is Figure 6 (b) The point with the highest peak value; then according to the dark fringe level k, the distance x from the kth dark fringe to the central main maximum point k , the wavelength λ of light and the focal length f of the front lens of the camera 32 are used to calculate the cross-sectional diameter of the area to be measured or the slit spacing d of the object to be measured 5, and the calculation formula is:

[0093]

[0094] On the basis of the above technical solution, in one embodiment, when the diffraction image is circular, the calculation of the size of the test area of ​​the test object 5 based on the intensity distribution and distance relationship distribution curve may include:

[0095] S3223: Obtain the central Airy disk diameter x in the intensity distribution and distance relationship distribution curve 0 .

[0096] S3224: Based on the wavelength λ of the light, the focal length f of the front lens of the camera 32, and the diameter x of the central Airy disk 0 Calculate the cross-sectional diameter d of the area to be measured.

[0097] In this embodiment, for measuring the inner diameter of a relatively fine regular hole, according to Figure 7 The intensity distribution and distance relationship distribution curve in (b) can be used to obtain the central Airy disk diameter x 0 , according to the wavelength λ, the focal length f of the front lens of the camera 32 and the central Airy disk diameter x 0 The inner diameter d can be calculated as:

[0098]

[0099] In some optional embodiments, before acquiring the image of the area to be tested of the object to be tested, the following steps may also be included:

[0100] Step a: Determine the length of the object to be measured 5 and the size of the area to be measured;

[0101] Step b: If the length of the object to be tested 5 is greater than the set length, the imaging module 3 for collecting images and the light source 11 are placed on the same side of the object to be tested 5; if the size of the area to be tested is smaller than the set size, the imaging module 3 for collecting images and the light source 11 are placed on opposite sides of the object to be tested 5.

[0102] In this embodiment, for the object to be tested 5 with a longer length, the imaging module 3 and the light source 11 can be placed in front of the fixture module 2. In this way, a larger free area can be left behind the fixture module 2, so that the fixture module 2 can be suitable for the horizontally placed and long object to be tested 5; for the object to be tested 5 with a shorter length, the imaging module 3 and the light source 11 can be placed on the front and back sides of the fixture module 2, or both can be placed in front of the fixture module 2; for the object to be tested 5 with a smaller size of the test area, it is necessary to use diffraction to image and calculate the size, so the light source 11 and the imaging module 3 need to be placed on the front and back sides of the fixture module 2.

[0103] Furthermore, in some embodiments, before the image of the test area of ​​the object to be tested 5 is collected, the following may be included: adjusting the position of the object to be tested 5 so that the light spot of the light source 11 is symmetrical about the test area; and then adjusting the distance between the lens behind the object to be tested 5 and the camera 32 so that the focal plane of the lens coincides with the imaging surface of the camera 32. In this embodiment, when the object to be tested 5 is vertically fixed to the fixture module 2, the object to be tested 5 can be adjusted so that the light spot of the light source 11 is symmetrical about the test area, so that the test area captured is in the middle of the image, and the focal plane of the lens coincides with the imaging surface of the camera 32, thereby ensuring the clarity of the captured image.

[0104] The present application proposes a high-precision dimensional measurement method. For the measurement of thicker rods, slits and inner diameter cross-sectional diameters, it can form complementary colors with the color of the object to be measured 5 through color control, and further improve the contrast and measurement accuracy in combination with image processing; in the measurement of thin slits, thin rods and inner diameters of several millimeters or even smaller, it can take diffraction into account and accurately measure the cross-sectional diameters of thin slits and thin rods, and can simultaneously take into account the unified measurement of multiple objects such as thick outer diameters, thin outer diameters and hollow inner diameters through a simple system and measurement method.

[0105] In the description of the present application, it should be noted that the terms "upper", "lower", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present application. Unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be an indirect connection through an intermediate medium, or it can be a connection between the two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to the specific circumstances.

[0106] It should be noted that, in this application, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0107] The above description is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest range consistent with the principles and novel features applied for herein.

Claims

1. A high-precision dimension measurement method, characterized in that: It includes the following steps: According to the set rules, the output light of the light source is adjusted to a color that matches the object to be tested; Collecting images of the area to be tested of the object to be tested; The size of the area to be measured of the object to be measured is calculated based on the image.

2. The high-precision dimension measurement method according to claim 1, characterized in that: The step of adjusting the output light of the light source to a color matching the object to be tested according to a set rule includes: If the size of the area to be tested of the object to be tested is greater than or equal to the set size, the output light of the light source is adjusted to a complementary color to the object to be tested; If the size of the area to be tested of the object to be tested is smaller than the set size, the output light of the light source is adjusted to the color with the longest wavelength.

3. The high-precision dimension measurement method according to claim 2, characterized in that: When the size of the area to be tested of the object to be tested is smaller than the set size, the wavelength range of the light output by the light source is 620nm-700nm.

4. The high-precision dimension measurement method according to claim 1, characterized in that: The step of adjusting the output light of the light source to a color matching the object to be tested according to a set rule includes: Rotate the rotating color wheel on one side of the light source so that the output light from the rotating color wheel is adjusted to a color that matches the object to be measured.

5. The high-precision dimension measurement method according to claim 1, characterized in that: The step of calculating the size of the area to be measured of the object to be measured based on the image includes: Calculate the boundary of the area to be tested in the image; The cross-sectional diameter d of the area to be measured is calculated according to the pixel size P of the image captured by the camera, the number of pixels N occupied by the cross-sectional diameter within the boundary of the area to be measured, and the magnification M of the camera front lens; or the seam spacing d of the object to be measured is calculated according to the pixel size P of the image captured by the camera, the number of pixels N occupied by the seam spacing within the boundary of the area to be measured, and the magnification M of the camera front lens.

6. The high-precision dimension measurement method according to claim 1, characterized in that: When the acquired image is a diffraction image, the step of calculating the size of the area to be measured of the object to be measured based on the image includes: Extract the intensity distribution and distance relationship distribution curve of the effective area in the horizontal direction of the image; The size of the area to be tested of the object to be tested is calculated based on the distribution curve of the relationship between the intensity distribution and the distance.

7. The high-precision dimension measurement method according to claim 6, characterized in that: When the diffraction image is in the shape of stripes, the step of calculating the size of the area to be measured of the object to be measured based on the distribution curve of the relationship between the intensity distribution and the distance includes: Calculate the distance x from each level of dark fringe to the central main maximum point in the distribution curve of intensity distribution and distance k ; According to the dark fringe level k, the distance x from the kth dark fringe to the central main maximum point k , the wavelength of light λ and the focal length f of the camera front lens to calculate the cross-sectional diameter of the area to be measured or the slit spacing d of the object to be measured.

8. The high-precision dimension measurement method according to claim 6, characterized in that: When the diffraction image is circular, the step of calculating the size of the area to be measured of the object to be measured based on the intensity distribution and distance relationship distribution curve includes: Calculate the central Airy disk diameter x0 in the intensity distribution and distance relationship distribution curve; The cross-sectional diameter d of the area to be measured is calculated according to the light wavelength λ, the focal length f of the camera front lens, and the central Airy disk diameter x0.

9. The high-precision dimension measurement method according to claim 1, characterized in that: Before acquiring the image of the area to be tested of the object to be tested, the following steps are also included: Determine the length of the object to be measured and the size of the area to be measured; If the length of the object to be measured is greater than the set length, the imaging module for collecting images and the light source are placed on the same side of the object to be measured; If the size of the area to be tested is smaller than the set size, the imaging module and the light source for collecting images are placed on opposite sides of the object to be tested.

10. The high-precision dimension measurement method according to claim 1, characterized in that: Before acquiring the image of the area to be tested of the object to be tested, the method further includes: Adjust the position of the object to be tested so that the light spot of the light source is symmetrical about the area to be tested; Adjust the distance between the lens and the camera behind the object to be measured so that the focal plane of the lens coincides with the imaging plane of the camera.