An Automatic Defocusing Method with Large Depth of Field Based on Binocular Structured Light Projection

Through the electronically controlled focus lens and point cloud segmentation technology of binocular stripe projection, point cloud fusion is combined with linear interpolation method, which solves the problem of insufficient accuracy of projector automatic defocusing under large depth of field, realizes high-precision automated measurement, and improves the industrial application of stripe projection measurement.

CN116499397BActive Publication Date: 2025-07-22TIANJIN UNIVERSITY OF TECHNOLOGY
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310464568.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-26
Publication Date
2025-07-22
Estimated Expiration
2043-04-26

AI Technical Summary

Technical Problem

Under large depth of field, the prior art is difficult to realize the projector's automatic defocusing, resulting in insufficient measurement accuracy, especially for objects with large changes in object distances on the outer surface, which cannot effectively improve measurement accuracy.

Method used

Using a binocular stripe projection method, the measured object is divided by point clouds through the electronically controlled focus lens and Otsu threshold method. The relationship between the object distance and the optimal defocus degree is combined, and the point cloud fusion is used to optimize the measurement error to achieve high-precision automatic defocus measurement.

Benefits of technology

It realizes high-precision automatic defocus measurement under large depth of field, optimizes measurement errors, improves the accuracy and efficiency of point cloud measurement, and enhances the industrial application value of stripe projection measurement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116499397B_ABST
    Figure CN116499397B_ABST
Patent Text Reader

Abstract

The present invention discloses a large depth of field automatic defocusing method based on binocular fringe projection, including: setting a plurality of object distances based on an electrically controlled focusing lens of a projector and an object to be measured; obtaining the relationship between the object distance and the optimal defocus degree based on the object distance; performing point cloud segmentation on the object to be measured to obtain a plurality of segmented point clouds and the corresponding object distances of the segmented point clouds; measuring the plurality of segmented point clouds based on the relationship between the object distance and the optimal defocus degree and the corresponding object distances of the segmented point clouds to obtain a plurality of groups of point clouds; and fusing the corresponding points of the plurality of groups of point clouds one by one based on a point cloud fusion algorithm to obtain a final fused point cloud. The present invention realizes high-precision and automatic fringe projection measurement under the condition of large depth of field by adjusting the defocus degree of the projector in real time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical fields of computer vision, advanced manufacturing and automation, and particularly relates to a large-depth-of-field automatic defocusing method based on binocular fringe projection. Background Art

[0002] Fringe projection measurement is an important research content in the fields of computer vision, advanced manufacturing and automation. As a dense point cloud measurement method that takes into account both accuracy and efficiency, it is currently a relatively reliable means for controlling the manufacturing accuracy of complex workpieces, and has the advantages of non-contact, high speed, high accuracy, high degree of automation, etc. It has been widely studied and applied in various fields, such as machine vision systems, reverse engineering technology, medical diagnosis and medical beauty, human body measurement, manufacturing industry, etc.

[0003] In a fringe projection system, due to the differences in the characteristics of projection optics and the development level of basic electronic devices, the performance of the digital projector, an important component in the system, has become the main factor restricting the performance improvement of the fringe projection measurement system. The projector defocusing technology can greatly affect the fringe pattern, making the fringe pattern projected by the projector closer to the ideal sine fringe pattern, thereby improving the measurement accuracy. In the case of a large depth of field, when measuring with the same defocus level, the improvement in measurement accuracy compared to the focused situation is limited, and there may even be a decrease in accuracy. This is because for an object with a large variation in the object distance of the outer surface, the object distances from different points to the projector may be different. Therefore, we cannot simply judge the defocus distance of the projector based on a single object distance. In order to better apply the projector defocusing technology to industrial scenarios, it is necessary to focus on studying the automatic defocusing method of the projector in the case of a large depth of field. Summary of the Invention

[0004] To solve the problems of the prior art, the present invention provides a large-depth-of-field automatic defocusing method based on binocular fringe projection. First, according to the depth of the surface of an object with a large depth of field, the Otsu threshold method is used to segment the point cloud of the object to be measured into multiple parts, and the average object distance of the point clouds of these parts is solved. Then, according to the relationship between the object distance and the optimal defocus level, optimal defocus measurements are respectively performed to obtain multiple groups of point clouds. Finally, according to the error curves of the defocus levels corresponding to each group of point clouds, the linear interpolation method is used to solve the error of each point in the point cloud, and the corresponding points are fused point by point to obtain a group of point clouds with higher accuracy. This fused point cloud can fully exert the application range of the projector defocus measurement.

[0005] To achieve the above technical objectives, the present invention provides the following technical solution: A large-depth-of-field automatic defocusing method based on binocular fringe projection, comprising:

[0006] Setting a plurality of object distances based on the electrically controlled focusing lens of the projector and the object to be measured;

[0007] Obtain the relationship between the object distance and the optimal defocus degree based on the object distance;

[0008] Perform point cloud segmentation on the object to be measured to obtain a number of segmented point clouds and the corresponding object distances of the segmented point clouds;

[0009] Measure a number of the segmented point clouds based on the relationship between the object distance and the optimal defocus degree and the corresponding object distances of the segmented point clouds to obtain a number of groups of point clouds;

[0010] Based on the point cloud fusion algorithm, fuse the corresponding points of the number of groups of point clouds one by one to obtain the final fused point cloud.

[0011] Preferably, the process of obtaining the relationship between the object distance and the optimal defocus degree includes:

[0012] Obtain the rotation speed and the focusing distance of the electrically controlled focusing lens based on the electrically controlled focusing lens of the projector;

[0013] Obtain the relationship between the rotation speed and the focusing distance based on the rotation speed of the electrically controlled focusing lens and the focusing distance;

[0014] Set a number of object distances, perform defocusing multiple times at each object distance to obtain a polynomial curve of the defocus degree and the standard error at each object distance;

[0015] Obtain the optimal defocus degree corresponding to each object distance based on each polynomial curve;

[0016] Obtain the relationship between the object distance and the optimal defocus degree based on the object distance and the optimal defocus degree corresponding to the object distance.

[0017] Preferably, the process of performing point cloud segmentation on the object to be measured to obtain a number of groups of point clouds includes:

[0018] Perform preliminary measurement on the object to be measured to obtain the preliminary point cloud of the object to be measured;

[0019] Perform segmentation on the preliminary point cloud to obtain a number of segmented point clouds;

[0020] Obtain the corresponding object distance of the segmented point cloud based on the mean method;

[0021] Obtain the optimal defocus degree of the segmented point cloud based on the relationship between the object distance and the optimal defocus degree and the corresponding object distance of the segmented point cloud;

[0022] Based on the optimal defocus degree of the segmented point cloud, adjust the corresponding rotation speed of the electrically controlled focusing lens and perform fringe projection measurement to obtain a number of groups of point clouds.

[0023] Preferably, use the Otsu threshold method to segment the preliminary point cloud.

[0024] Preferably, the process of fusing the corresponding points of the several groups of point clouds one by one based on the point cloud fusion algorithm to obtain the final fused point cloud includes:

[0025] Obtain a coordinate interval based on the entire measurement range;

[0026] Perform noise point screening on the points in the several groups of point clouds based on the coordinate interval to obtain the object distances of the high-quality points;

[0027] Obtain the rotational speeds corresponding to the left and right boundaries of the coordinate interval and the rotational speed corresponding to the object distance of the high-quality points based on the relationship between the rotational speed and the focusing distance;

[0028] Obtain the defocus degree of the left boundary and the defocus degree of the right boundary based on the rotational speed corresponding to the object distance of the high-quality points and the left and right boundaries of the coordinate interval;

[0029] Obtain the standard error of the left boundary based on the polynomial curve corresponding to the left boundary and the defocus degree of the left boundary;

[0030] Obtain the standard error of the right boundary based on the polynomial curve corresponding to the right boundary and the defocus degree of the right boundary;

[0031] Obtain the standard error of the high-quality points based on the standard error of the left boundary and the standard error of the right boundary.

[0032] Preferably, the standard error of the high-quality points is calculated by using the linear interpolation method, and the calculation formula is as follows:

[0033]

[0034] In the formula, E t represents the standard error of the high-quality points, Z t represents the Z-axis coordinate of the high-quality points, Z l represents the left boundary of the coordinate interval, Z r represents the right boundary of the coordinate interval, E l represents the standard error of the left boundary, E r represents the standard error of the right boundary.

[0035] Preferably, based on the standard errors of several high-quality points, the corresponding points of the several groups of point clouds are fused one by one to obtain the final fused point cloud, and the calculation formula for fusing the corresponding points of the several groups of point clouds one by one is as follows:

[0036]

[0037] In the formula, E Fi and E Bi represent the standard errors corresponding to the i-th points of the front and rear groups of point clouds, p Fi and p Bi represent the coordinates of the i-th points of the front and rear groups of point clouds, p iRepresents the coordinates of the i-th point after fusion.

[0038] The present invention has the following technical effects:

[0039] The present invention proposes a method for automatic defocusing with a large depth of field. This method can achieve high-precision and automated defocus measurement of objects with a large depth of field. Based on the automated defocus of projectors, it optimizes the measurement errors caused by different depths of field, and realizes the relatively rapid acquisition of higher-precision point clouds. This method gives full play to the technical characteristics of defocus measurement, supplements the technical method for optimizing point cloud errors in the field of fringe projection measurement, enhances the industrial application value of fringe projection measurement technology, and provides a high-precision and high-efficiency measurement means for the quality control of complex curved surfaces in intelligent manufacturing. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required to be used in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0041] Figure 1 It is the technical roadmap in the embodiments of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0042] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.

[0043] Embodiment 1

[0044] As Figure 1 shown, this embodiment discloses a method for automatic defocusing with a large depth of field based on binocular fringe projection. It includes the following steps:

[0045] Step 1, install an electronically controlled focusing lens on the projector, and solve the relationship between the rotation speed of the electronically controlled focusing lens and the focusing distance through experiments, as well as the optimal defocus degree corresponding to different object distances.

[0046] Step 2, conduct a preliminary measurement on the object, and then, according to the depth of the object surface, use the Otsu threshold method to segment the point cloud of the object to be measured into multiple parts (here, two parts are taken as an example for introduction), obtain the object distances corresponding to the two parts, and perform optimal defocus measurement respectively to obtain two groups of point clouds.

[0047] Step 3: Use the point cloud fusion algorithm to fuse two groups of point clouds with different defocus levels to improve the overall point cloud. First, calculate the error corresponding to each point in the two groups of point clouds, then match the points in the two groups of point clouds one by one, and each point in each group is weighted and fused according to its own error.

[0048] Among them, for the preliminary measurement in Step 2 and using the Otsu threshold method to segment the object to be measured, the projector needs to be roughly focused on the location of the object to be measured, and the point cloud of the object to be measured is obtained through fringe projection measurement technology. Then, all the point clouds are transformed into the projector coordinate system, and the Z-axis coordinate of the transformed point cloud is regarded as the "gray value". Find the maximum and minimum values of the Z-axis coordinates of this group of point clouds. Continuously set thresholds within this range. Here, the point cloud is divided into two parts, the front and the back, and then the maximum between-class variance is calculated through Equation (1):

[0049] ICV = f × (F_ave - z_ave) 2 + b × (B_ave - z_ave) 2 (1)

[0050] Among them, ICV is the between-class variance, f and b are the proportions of the front and back two groups of point clouds divided in the total point cloud, F_ave and B_ave are the average values of the Z-axis coordinates of the front and back two groups of point clouds, and z_ave is the average value of the Z-axis coordinates of all point clouds.

[0051] Among them, when ICV is the largest, record the point clouds of the front and back two parts at this time, and then calculate the average values of the Z-axis coordinates of these two parts of point clouds respectively. These two average values correspond to the object distances of the front and back two parts respectively. Then, according to the relationship between the object distance and the best defocus level, find the best defocus levels under the object distances of the front and back two parts, and perform fringe projection measurement at this defocus level to obtain two groups of point clouds with different defocus levels.

[0052] Among them, for calculating the standard error of each point in Step 3, starting from the first point, find the interval (Z t , Z l , Z r ) where the Z-axis coordinate Z of this point is located. If Z t is not within the entire measurement range interval, then regard this point as a miscellaneous point. According to the relationship between the rotation speed and the focusing distance, the rotation speeds of the projector lens corresponding to the left and right boundaries of the interval (Z l , Z r ) are N l and N r respectively. According to the current projector rotation speed N, calculate the defocus levels |N - N l | and |N - N r | of the rotation speed N with respect to the left and right boundaries respectively. According to the left boundary Z l and the right boundary Z rThe corresponding third-order polynomial curve is solved for the standard error E l at the defocus levels of |N - N r | and |N - N l |, and E r . The standard errors of the left and right boundaries are linearly interpolated through Equation (2) to obtain the standard error E t at this point, and then the standard error of each point is calculated.

[0053]

[0054] Among them, the weighted fusion according to its own error in step 3 requires point-by-point fusion of the corresponding points in the two groups of point clouds through Equation (3).

[0055]

[0056] Among them, f Fi and E Bi are the standard errors corresponding to the i-th points of the front and back groups of point clouds, p Fi and p Bi are the coordinates of the i-th points of the front and back groups of point clouds, and p i is the coordinate of the i-th point after fusion. By performing point cloud fusion operations on all points in the point cloud, a new group of point clouds can be obtained, and the accuracy of the new point cloud will be improved significantly.

[0057] Embodiment 2

[0058] The specific steps of a large-depth-of-field automatic defocus method based on binocular fringe projection disclosed in this embodiment are as follows:

[0059] (1) Set up a binocular fringe projection measurement system, establish the relationship between the rotation speed and the focusing distance, and the relationship between the object distance and the optimal defocus level.

[0060] (2) Place the planar calibration plate obliquely at a certain object distance, and obtain the point cloud of the planar calibration plate when the projector is in focus. Then, according to the Otsu threshold method, the planar calibration plate is divided into two parts, the average object distances of the two parts of the plate are obtained, and then the optimal defocus level is obtained according to the polynomial of the object distance and the optimal defocus level.

[0061] (3) According to the two obtained optimal defocus levels, adjust the electrically controlled focusing lens to the corresponding rotation speed, and then perform fringe projection measurement on the planar calibration plate to obtain two groups of point clouds.

[0062] (4) Use the linear interpolation method to solve the standard error of each point in the point cloud, and perform point-by-point fusion on the corresponding points in the two groups of point clouds to obtain the fused point cloud as the final result.

[0063] As described above, a large depth of field automatic defocusing method based on binocular fringe projection proposed by the present invention has been clearly and detailedly described.

[0064] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments, and the above embodiments and the descriptions in the specification only illustrate the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention will have various changes and improvements, and these changes and improvements all fall within the scope of the present invention claimed. The scope of the present invention claimed is defined by the appended claims and their equivalents.

Claims

1. An automatic defocusing method with large depth of field based on binocular fringe projection, characterized in that Including: Based on the electronically controlled focusing lens of the projector and the object to be measured, set several object distances; Obtain the relationship between the object distance and the optimal defocus degree based on the object distance; Perform point cloud segmentation on the object to be measured to obtain several segmented point clouds and the corresponding object distances of the segmented point clouds; Measure several of the segmented point clouds based on the relationship between the object distance and the optimal defocus degree and the corresponding object distances of the segmented point clouds to obtain several groups of point clouds; Based on the point cloud fusion algorithm, fuse the corresponding points of the several groups of point clouds one by one to obtain the final fused point cloud; The process of obtaining the final fused point cloud includes: obtaining the coordinate interval based on the entire measurement range; performing noise point screening on the points in the several groups of point clouds based on the coordinate interval to obtain the object distances of the high-quality points; obtaining the rotation speeds of the left and right boundaries of the coordinate interval and the rotation speeds corresponding to the object distances of the high-quality points based on the relationship between the rotation speed and the focusing distance; obtaining the defocus degrees of the left and right boundaries based on the rotation speeds corresponding to the object distances of the high-quality points and the left and right boundaries of the coordinate interval; obtaining the left boundary standard error based on the polynomial curve corresponding to the left boundary and the defocus degree of the left boundary; obtaining the right boundary standard error based on the polynomial curve corresponding to the right boundary and the defocus degree of the right boundary; obtaining the standard error of the high-quality points based on the left boundary standard error and the right boundary standard error; Calculate the standard error of the high-quality points using the linear interpolation method, and the calculation formula is as follows: Where E t represents the standard error of the high-quality points, Z t represents the Z-axis coordinate of the high-quality points, Z l represents the left boundary of the coordinate interval, Z r represents the right boundary of the coordinate interval, E l represents the standard error of the left boundary, E r represents the standard error of the right boundary; Based on the standard errors of several high-quality points, fuse the corresponding points of the several groups of point clouds one by one to obtain the final fused point cloud, where the calculation formula for fusing the corresponding points of the several groups of point clouds one by one is as follows: where E Fi and E Bi represent the standard errors corresponding to the i-th points of the front and rear groups of point clouds, p Fi and p Bi represent the coordinates of the i-th points of the front and rear groups of point clouds, and p i represents the coordinate of the i-th point after fusion.

2. The automatic defocusing method with large depth of field based on binocular fringe projection according to claim 1, wherein: The process of obtaining the relationship between the object distance and the optimal defocus degree includes: Obtain the rotation speed and focusing distance of the electronically controlled focusing lens based on the electronically controlled focusing lens of the projector; Obtain the relationship between the rotation speed and the focusing distance based on the rotation speed of the electronically controlled focusing lens and the focusing distance; Set several object distances, perform defocusing multiple times at each object distance to obtain the polynomial curves of the defocus degree and the standard error at each object distance; Obtain the optimal defocus degree corresponding to each object distance based on each polynomial curve; Obtain the relationship between the object distance and the optimal defocus degree based on the object distance and the optimal defocus degree corresponding to the object distance.

3. The automatic defocusing method with large depth of field based on binocular fringe projection according to claim 2, characterized in that: The process of performing point cloud segmentation on the object to be measured to obtain several groups of point clouds includes: Perform preliminary measurement on the object to be measured to obtain the preliminary point cloud of the object; Segment the preliminary point cloud to obtain several segmented point clouds; Obtain the corresponding object distances of the segmented point clouds based on the mean method; Obtain the optimal defocus degree of the segmented point cloud based on the relationship between the object distance and the optimal defocus degree and the corresponding object distance of the segmented point cloud; Based on the optimal defocus degree of the segmented point cloud, adjust the corresponding rotation speed of the electronically controlled focusing lens and perform fringe projection measurement to obtain several groups of point clouds.

4. The automatic defocusing method with large depth of field based on binocular fringe projection according to claim 3, wherein: Segment the preliminary point cloud using the Otsu threshold method.

Citation Information

Patent Citations

  • Automatic defocusing method based on binocular fringe projection measurement system

    CN115355849A