Optical workpiece measurement method

CN122881576APending Publication Date: 2026-10-09CHENGDU HUAYUAN DEEP INTELLIGENT TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610981470.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-02
Publication Date
2026-10-09

AI Technical Summary

Technical Problem

这导致扫描区域不可避免地包含夹具表面

Benefits of technology

本发明创新性地将光学工件三维面型扫描与同步厚度测量统一纳入同一测量任务流程,摒弃了现有技术中面型与厚度需拆分为多个独立测量任务的繁琐模式。通过在面型扫描过程中同步采集厚度通道数据,并利用精确的坐标映射关系,确保每个面型点都严格对应其同步获取的厚度值。这种“一次装夹即可完成面型扫描和同步厚度获取”的方式,减少了重复定位和扫描工序,极大提升了测量效率和数据的内在一致性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122881576A_ABST
    Figure CN122881576A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of optical measurement, in particular to an optical workpiece measurement method, which comprises the following steps: step 1: placing an optical workpiece on a fixture plane, guiding a confocal displacement sensor to move above the optical workpiece, and measuring the distance of each measurement point on the upper surface and the lower surface of the optical workpiece; step 2: obtaining the refractive index of the optical workpiece, calculating the height of each measurement point from the confocal displacement sensor according to the distance of each measurement point on the upper surface and the lower surface of the optical workpiece, and obtaining original point cloud data; and step 3: fitting the original point cloud data to obtain fitted point cloud data, and the fitting mode comprises any one of plane fitting, spherical surface fitting and aspherical surface fitting. The optical workpiece measurement method provides a solid data basis for subsequent assembly precision control, process optimization (such as mold compensation) and quality tracing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of optical measurement, laser measuring instruments, industrial vision, and distance sensor technology, and more specifically, to an optical workpiece measurement method. Background Technology

[0002] The content in this section provides only background information related to this application and may not constitute prior art.

[0003] In the processing, inspection, and assembly of precision components such as optical lenses and molded glass lenses, the accurate acquisition of key geometric parameters such as three-dimensional surface distribution, core thickness, and sagitta is crucial. These interrelated parameters collectively determine the workpiece's performance, assembly accuracy, and subsequent process optimization (such as mold compensation) and quality traceability. Existing technologies typically employ multi-axis motion platforms equipped with confocal displacement sensors to scan and measure the workpiece, acquiring multi-dimensional data such as distance and thickness, significantly improving measurement efficiency.

[0004] In actual production, workpieces are often placed within fixtures such as sleeves and clamps to ensure stable positioning. This inevitably results in the scanning area including the fixture surface. Existing measurement software's data processing algorithms (such as those relying on global statistics or fixed thresholds) cannot effectively distinguish between the workpiece body and the surrounding fixtures, causing fixture data to be misidentified as workpiece data, leading to misjudgment of workpiece boundaries, distortion of surface fitting, and errors in core thickness / sagittal height calculation. Summary of the Invention

[0005] The summary section of this application is intended to provide a brief overview of the concepts, which will be described in detail in the detailed description section below. This summary section is not intended to identify key or essential features of the claimed technical solutions, nor is it intended to limit the scope of the claimed technical solutions.

[0006] Some embodiments of this application propose an optical workpiece measurement method to solve the technical problems mentioned in the background section above.

[0007] As a first aspect of this application, some embodiments of this application provide an optical workpiece measurement method, including the following steps: Step 1: Place the optical workpiece on the fixture plane, guide the confocal displacement sensor to move above the optical workpiece, and measure the distance between each measuring point on the upper and lower surfaces of the optical workpiece; Step 2: Obtain the refractive index of the optical workpiece. Based on the distance between each measurement point on the upper and lower surfaces of the optical workpiece, calculate the height of each measurement point from the confocal displacement sensor to obtain the raw point cloud data. Step 3: Fit the original point cloud data to obtain fitted point cloud data. The fitting method can be any one of planar fitting, spherical fitting, and aspherical fitting. Step 4: Determine the geometric center, concave surface, and convex surface of the fitted point cloud data, and calculate the target size of the optical workpiece based on the fitted point cloud data.

[0008] The optical workpiece measurement method described in this invention, by combining point cloud three-dimensional coordinate acquisition with intelligent fitting processing (including planar, spherical, or aspherical fitting), can effectively eliminate interfering point cloud data on the surface of fixtures (such as sleeves and clamps), significantly improving the identification accuracy of the effective measurement area of ​​the workpiece body. This ensures that the calculation results of key geometric parameters such as the three-dimensional surface distribution, core thickness, and sagittal height of the workpiece are more accurate and reliable, providing a solid data foundation for subsequent assembly accuracy control, process optimization (such as mold compensation), and quality traceability.

[0009] The technical solution of this application embodiment has at least the following advantages and beneficial effects: This invention innovatively integrates three-dimensional surface scanning and simultaneous thickness measurement of optical workpieces into a single measurement workflow, eliminating the cumbersome process of separating surface scanning and thickness measurement into multiple independent tasks in existing technologies. By simultaneously acquiring thickness channel data during surface scanning and utilizing precise coordinate mapping, it ensures that each surface point strictly corresponds to its synchronously acquired thickness value. This method of "completing surface scanning and simultaneous thickness acquisition in a single setup" reduces repetitive positioning and scanning processes, greatly improving measurement efficiency and data consistency.

[0010] This invention emphasizes that the fitting input is uniformly derived from the original point cloud file, ensuring that the fitting process is based on the most original, unprocessed data. This guarantees the authenticity and reproducibility of the fitted input, providing data support for process traceability and result verification. Regarding the fitting method, the system is compatible with default planar fitting, spherical fitting, and aspherical fitting. It manages aspherical parameters through fixed slots, allowing for flexible adaptation to the measurement needs of both spherical and aspherical workpieces within the same software framework, thus reducing system complexity.

[0011] This scheme uses a mathematical approach of least-squares plane fitting and coordinate subtraction, rather than directly physically segmenting the point cloud, to remove the tilt plane component representing the fixture from the Z-coordinates of all sampled points. This transforms the problem of distinguishing the fixture from the workpiece into a purely numerical computation problem. Thus, without prior knowledge of the fixture's precise digital model or complex feature recognition and region division of the point cloud, it can automatically and stably eliminate the tilt and height offset caused by fixture clamping, fully preserving the workpiece's true surface shape information relative to the fixture plane. This method is particularly suitable for scenarios where the fixture dominates the plane and the workpiece surface shape is relatively small. It effectively avoids over-segmentation or under-segmentation caused by improper hard segmentation threshold settings, as well as alignment errors caused by fixture deformation or positioning deviations. Attached Figure Description

[0012] Figure 1 This is a flowchart of an optical workpiece measurement method.

[0013] Figure 2 These are the fitting parameters for the aspherical fitting equation.

[0014] Figure 3 The original point cloud data obtained from the optical workpiece.

[0015] Figure 4 To fit the point cloud data. Detailed Implementation

[0016] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments. The same reference numerals in the accompanying drawings represent the same components. It should be noted that the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the described embodiments of this application without creative effort are within the scope of protection of this application.

[0017] Compared to the embodiments shown in the accompanying drawings, feasible embodiments within the scope of this application may have fewer components, other components not shown in the drawings, different components, differently arranged components, or components with different connections, etc. Furthermore, two or more components in the drawings may be implemented in a single component, or a single component shown in the drawings may be implemented as multiple separate components.

[0018] Unless otherwise defined, the technical or scientific terms used herein shall have the ordinary meaning as understood by one of ordinary skill in the art to which this application pertains. The terms “first,” “second,” and similar terms used in this specification and claims do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Similarly, the terms “an” or “a” and similar terms do not necessarily indicate a quantity limitation. Terms such as “upper” and “lower” are used only to indicate relative positional relationships, and these relative positional relationships may change accordingly when the absolute position of the described object changes.

[0019] Optical workpieces typically refer to lenses or similar precision components made of transparent optical materials (such as glass, resin, etc.). When a confocal displacement sensor emits a highly focused electromagnetic wave (usually visible or near-infrared light) onto the surface of an optical workpiece placed on a fixture, two main measurement points are generated: the first measurement point (P1) is located on the upper surface (incident surface) of the optical workpiece, and the second measurement point (P2) is located on the lower surface (exit surface) of the optical workpiece. The sensor records the flight time corresponding to the electromagnetic wave signal returned from each measurement point through a precision timing circuit.

[0020] The spectral confocal displacement sensor uses broadband white light as the incident light source. After the white light passes through the dispersive objective lens with large dispersion inside the sensor, due to the change in the refractive index of the medium with wavelength, light of different wavelengths is focused to different axial positions on the optical axis, which produces axial chromatic aberration (axial dispersion): different wavelengths correspond to different focusing distances (usually shorter wavelengths are focused closer and longer wavelengths are focused farther), thus forming a continuous focusing range within the sensor's measurement range where wavelength and axial distance correspond one-to-one.

[0021] When the focal point of a certain wavelength falls precisely on the surface of the optical workpiece being measured, which is placed on the fixture, the light of that wavelength is precisely focused and efficiently reflected on the surface. After returning along the original optical path, it can pass through the confocal pinhole (confocal aperture). The remaining wavelengths that are out of focus are suppressed at the pinhole and cannot pass through effectively. Therefore, only the narrow-band wavelength component of the returned light that is "focused precisely on the surface being measured" is effectively received.

[0022] The returned light is received by a spectrometer and subjected to spectral analysis to identify the peak wavelength corresponding to the peak intensity of the reflected light. Since there is a fixed correspondence between wavelength and axial distance determined by the calibration curve inside the sensor, the axial distance of the measured surface relative to the sensor can be obtained by referring to the calibration curve based on this peak wavelength.

[0023] Thickness measurement of transparent optical workpieces: For transparent workpieces such as glass and resin, the incident light will be focused and reflected once on the upper surface (incident surface) and once on the lower surface (exit surface), causing the spectrometer to display two wavelength peaks simultaneously: The peak wavelength λ1 corresponds to the upper surface, and the distance D1 from the sensor to the upper surface is obtained by conversion through calibration curve; The peak wavelength λ2 corresponds to the lower surface, and the apparent distance D2′ from the sensor to the lower surface is obtained by conversion through calibration curve.

[0024] Since the light used to measure the lower surface must pass through the workpiece material with a refractive index of n before focusing on the lower surface, and the calibration curve is calibrated in air, the apparent thickness ΔD=D2′-D1 obtained directly from the two peaks is less than the actual physical thickness of the workpiece, and needs to be corrected using the material's refractive index n.

[0025] That is, the physical thickness of the transparent workpiece at the measurement point is equal to the product of the apparent (optical) thickness measured by the sensor under air calibration and the refractive index n.

[0026] The above describes the principle of using sensors to obtain the three-dimensional coordinates of the optical workpiece surface in this application.

[0027] refer to Figure 1 Example 1: The optical workpiece measurement method includes the following steps: Step 1: Place the optical workpiece on the fixture plane, guide the confocal displacement sensor to move above the optical workpiece, and measure the distance between each measuring point on the upper and lower surfaces of the optical workpiece.

[0028] Step 1 includes the following steps: Step 11: Establish the mapping relationship between the logical coordinate axis and the motion coordinate axis. The motion coordinate axis is the coordinate axis of the confocal displacement sensor moving on the plane above the optical workpiece. The logical coordinate axes are the coordinate axes of the scanning plane in the host computer.

[0029] Logical coordinate axes refer to a two-dimensional space set up on the host computer, which is a plane simulated by the host computer.

[0030] The motion coordinate axis is the coordinate axis of the actual motion of the confocal displacement sensor.

[0031] Typically, a confocal displacement sensor is fixedly mounted above an optical workpiece using a motion gimbal. The motion gimbal can move the confocal displacement sensor within a plane, allowing it to move to any point within that plane, thus performing a global scan of the optical workpiece.

[0032] The position of the confocal displacement sensor is controlled by a motion gimbal. The position that the confocal displacement sensor can move is described by the motion coordinate axis.

[0033] Once the motion coordinate axes and logical coordinate axes are aligned, the confocal displacement sensor can be moved to the desired position within the virtual space of the host computer.

[0034] Step 12: Design scanning points in the logical coordinate axis according to the spiral trajectory, generate a scanning grid of all scanning points, and each grid point in the scanning grid corresponds to each measurement point that the confocal displacement sensor needs to collect; The measurement point mentioned is essentially the point where the confocal displacement sensor moves to and takes measurements.

[0035] Step 13: The confocal displacement sensor starts at the starting point and uses a spiral sampling motion to traverse all grid points. When the confocal displacement sensor moves to the specified coordinates, it performs a sampling to obtain the sampling result. The sampling results include the height of the measurement point from the confocal displacement sensor.

[0036] Step 13 includes the following steps: Step 131: Move the confocal displacement sensor to the starting point of the scanning grid according to the mapping relationship; The starting point here is generally set as the origin of the motion coordinate axis, which is also the initial point of the motion gimbal. During use, the motion gimbal will experience error offsets. Excessive error offsets will prevent the confocal displacement sensor from being accurately moved to the required position. Therefore, it is necessary to use the grid point corresponding to the origin of the motion coordinate axis as the starting point.

[0037] Moving the confocal displacement sensor to the starting point of the scanning grid is equivalent to moving the confocal displacement sensor to the reset point of the motion gimbal. This point is generally the origin of the motion coordinate axis.

[0038] Step 132: The confocal displacement sensor, starting from the point of origin, uses a spiral sampling motion to traverse all grid points; Step 133: Measure at each grid point to obtain the height of all measurement points from the confocal displacement sensor.

[0039] refer to Figure 3 Step 2: Obtain the refractive index of the optical workpiece. Based on the distance between each measurement point on the upper and lower surfaces of the optical workpiece, calculate the height of each measurement point from the confocal displacement sensor to obtain the raw point cloud data. Step 2 includes the following steps: Step 21: Obtain the sampling results of the confocal displacement sensor to obtain the apparent thickness between the upper and lower surfaces of the optical workpiece at each measurement point; Step 22: Obtain the refractive index of the optical workpiece, and multiply the apparent thickness by the refractive index to obtain the thickness of the optical workpiece at the measurement point; Step 23: Based on the thickness of the measurement point and the distance from the upper surface to the confocal displacement sensor, obtain the distance from the lower surface of the optical workpiece to the confocal displacement sensor; Step 24: Based on the distance between the upper surface of the optical workpiece and the confocal displacement sensor, the distance between the lower surface of the optical workpiece and the confocal displacement sensor, and the logical coordinate axes of the measurement points, generate the three-dimensional coordinates of the measurement points on the upper surface of the optical workpiece and the corresponding measurement points on the lower surface. A confocal displacement sensor moves within a plane; therefore, by adding the distance to the coordinates of the confocal displacement sensor on the logical coordinate axes, the three-dimensional coordinates of the measurement point can be obtained.

[0040] Step 25: Collect all three-dimensional coordinates to obtain the original point cloud data of the optical workpiece surface; Step 26: Perform region filtering on the raw point cloud data.

[0041] In step 25, the entire optical workpiece is scanned, thus obtaining the three-dimensional coordinates of each point on the upper and lower surfaces of the optical workpiece. However, it is impossible to distinguish between the optical workpiece and the fixture. Therefore, step 26 is required for filtering.

[0042] Step 26 includes the following steps: Step 261: Obtain the original point cloud data and convert it into a 3D plane. For each point P in the original point cloud data... i It can be represented by a three-dimensional plane equation as follows: ; Where i represents the index of the point. They represent point P respectively. i The x-coordinate, y-coordinate, and height coordinates are given, and A, B, and C are the first fitting coefficient, the second fitting coefficient, and the third fitting coefficient, respectively. Step 262: Obtain the three-dimensional plane equations of all points, solve for the first fitting coefficient A, the second fitting coefficient B, and the third fitting coefficient C, and obtain the fitting equation; Furthermore, in step 262, for each point in the original point cloud data, a fitting equation is constructed using the least squares method, and the objective function of the fitting equation is S; The fitting equation is: Z = AX + BY + C; ; S represents the sum of residuals of the fitted equation, and A, B, and C are the first, second, and third fitting coefficients, respectively. They represent point P respectively. i The x-coordinate, y-coordinate, and height coordinate.

[0043] The solution process for the fitted equation in step 262 is as follows: To minimize the sum of squared residuals at all measurement points, establish a system of normal equations: ; Where N is the number of points involved in the fitting, A is the inclination coefficient in the X direction (first fitting coefficient), B is the inclination coefficient in the Y direction (second fitting coefficient), and C is the Z-axis intercept (third fitting coefficient). Sum the x-coordinates (X-axis) of all points. Sum the squares of the x-coordinates (X-axis) of all points. Sum the ordinates (Y-axis) of all points. The sum of the products of the x and y coordinates of all points. Accumulate the height coordinates (Z-axis) of all points.

[0044] Thus, by solving the system of normal equations, we can obtain A, B, and C.

[0045] The solution principle is as follows: The least squares method treats the plane equation Z = AX + BY + C as the best linear approximation of the spatial distribution of the sampling points (points in the original point cloud data). The objective function S is defined as the sum of the squares of the differences between the actual Z coordinates of all sampling points and the predicted values ​​of the plane. To minimize S, according to the theory of extrema of multivariate functions, the partial derivatives of S with respect to the unknown parameters A, B, and C are taken and set to zero, thus transforming the surface fitting problem into a system of three linear equations. This system of equations, after simplification, becomes the normal equation system, whose coefficient matrix consists entirely of the sum of the squares, cross products, and summation values ​​of the X and Y coordinates of the sampling points. The constant term is the sum of the products of the corresponding coordinates and the Z coordinate. This system of equations describes the linear relationship that A, B, and C must satisfy to minimize the sum of squares of the residuals. Therefore, by solving this system of equations using numerical methods such as Gaussian elimination with partial pivoting, the unique solution obtained is the globally optimal plane tilt coefficient and intercept, completing the analytical solution from a discrete point set to the best-fit plane.

[0046] Step 263: For each point in the original point cloud data, substitute the x-coordinate and y-coordinate into the plane equation to calculate the plane fitting height, and subtract the plane fitting height from the height coordinate in the original point cloud data to obtain the corrected coordinate. Step 264: Obtain the point closest to the measurement origin in the original point cloud, use it as the reference point, obtain the corrected coordinates of the reference point, and subtract the corrected coordinates of the reference point from the corrected coordinates of the remaining points to obtain the original point cloud data filtered by the fixture.

[0047] The principle behind this solution is as follows: the distance between the fixture and the optical workpiece is very close. Due to the transparency of the optical workpiece, it is difficult to distinguish the edge of the optical workpiece from the edge of the fixture using edge detection algorithms. Therefore, this solution utilizes the fact that the area of ​​the fixture is much larger than that of the optical workpiece to generate a fitting plane.

[0048] For the fitting plane, if it is an optical workpiece, there will be a certain deviation from the fitting plane, while for the fixture, its height will be basically the same as the height of the fitting plane.

[0049] Thus, after constructing the fitting equation, a fitting plane is actually obtained. Subtracting the height coordinates of the original point cloud data from the fitting plane yields a zero-valued result for the fixture data, effectively filtering out the fixture. For the point cloud data of the non-fixture optical workpiece, since it is no longer on the fitting plane, the subtracted portion represents the difference between the optical workpiece and the fitting plane. This effectively distinguishes between the optical workpiece and the fixture.

[0050] Meanwhile, after the above coordinate transformation, the reference height of the remaining point cloud may change. Therefore, "obtain the point in the original point cloud that is closest to the measurement origin, use it as the reference point, obtain the corrected coordinates of the reference point, and subtract the corrected coordinates of the reference point from the corrected coordinates of the remaining points to obtain the original point cloud data filtered by the fixture." Step 264 can set a reference point that is closest to the origin to find a new reference benchmark.

[0051] The above solution filters out fixtures by constructing a fitted plane. In some implementations, Kalman filtering combined with gradient difference can also be used to filter fixtures. That is, Kalman filtering is used to remove noise points, and then gradient difference is used to determine the boundary between the workpiece and the fixture.

[0052] The specific plan is as follows: As another implementation of step 26, this implementation includes the following steps: Step S26: Perform Kalman filtering on the acquired raw 3D point cloud data, and extract the workpiece boundary based on the filtered point cloud data, including steps S261 and S262.

[0053] Traditional filtering methods such as mean filtering, median filtering, and Gaussian filtering, while simple to implement, essentially perform indiscriminate spatial averaging of height values ​​within a neighborhood. While suppressing noise, this can easily over-smooth the true details of the workpiece surface and fail to utilize the dynamic correlation between adjacent points on the same scan line. The Kalman filter, an optimal recursive state estimator, fuses the system's kinematic model with sensor observation data and dynamically adjusts their weights based on the relative magnitudes of prediction and observation errors, thereby suppressing random noise while preserving the true undulations of the workpiece surface. Therefore, this implementation uses Kalman filtering to process the original 3D point cloud data.

[0054] Step S261: Perform Kalman filtering on the original 3D point cloud data to obtain filtered point cloud data. Step S261 specifically includes steps S2611 to S2617.

[0055] Step S2611: Obtain raw 3D point cloud data The original 3D point cloud data is arranged and organized into a regular point cloud according to the minimum spacing between points; according to The coordinate column priority order divides the regular point cloud into several scan lines, and arranges them according to the spatial order of each scan line; each scan line contains several points arranged in spatial order, and is treated as an independent Kalman filter unit, and is processed separately in subsequent steps S2612 to S2616.

[0056] Record the total number of points on the current scan line as follows: Point number is , ; ; in, This is a collection of original 3D point cloud data. For the first The x-coordinates of the points; For the first The ordinates of the points; For the first The height coordinates of the nth point, i.e., the nth point The height value of each point along the measurement direction; This represents the total number of points in the original 3D point cloud. The index of the point; Step S2612: For the first scan line on the current scan line... A point, defining the state vector. : ; in, For the current online scan The state vector of each point; For the first The actual height value of each point, i.e., the height value to be estimated; For the first The rate of change of height along the scan line at each point, i.e., the slope of the spatial change of height between adjacent points; superscript Indicates vector transpose; This refers to the sequence number of the point on the current scan line; Establish the system state equations to describe the transition relationship of state vectors between adjacent points: ; in, For the first The state vector of each point; For the first The state vector of each point; This is the state transition matrix; For the first Process noise at each point; This refers to the sequence number of the point on the current scan line; Wherein, the state transition matrix for: ; in, This is the state transition matrix; The actual spatial step size between two adjacent points on the current scan line along the scan line direction; process noise. It follows a Gaussian distribution with a mean of zero: ; in, For the first Process noise at each point; This indicates that the mean is zero and the covariance matrix is... Gaussian distribution; For process noise Covariance matrix; This is the sequence number of the point on the current scan line.

[0057] Establish an observation equation to describe the relationship between the measured height of a point and the state vector: ; in, For the first The measured height value of each point, that is, the height coordinate of the point obtained in step S2611; The observation matrix; For the first The state vector of each point; For the first Observation noise at each point; This refers to the sequence number of the point on the current scan line; Among them, the observation matrix for: ; in, This is the observation matrix, used to extract the height component from the state vector.

[0058] Observation noise It follows a Gaussian distribution with a mean of zero: ; in, For the first Observation noise at each point; This indicates that the mean is zero and the variance is... Gaussian distribution; The noise variance was obtained in advance through sensor calibration tests to observe it. This is the sequence number of the point on the current scan line.

[0059] Step S2613: For each scan line, initialize the height component with the measured height value of its first point, estimate the initial height change rate with the difference between the measured heights of the first and second points, and obtain the initial posterior state vector of the first point. : ; in, This is the initial posterior state vector at the first point of the current scan line; This is the measured height value of the first point; This is the measured height value of the second point; The actual spatial step size between two adjacent points along the scan line direction; superscript Indicates vector transpose; Set the initial posterior error covariance matrix for the first point. : ; in, This is the initial posterior error covariance matrix at the first point of the current scan line; This represents a diagonal matrix with the elements within the brackets as the main diagonal elements. The variance of the initial height estimate; Estimate the variance of the initial height change rate; and All settings are pre-defined based on the measurement accuracy of the sensors.

[0060] Step S2614: For the first scan line on the current scan line... points ( First, calculate the absolute value of the measured height difference between this point and the previous point. : ; in, For the first The point and the first The absolute value of the measured height difference between points; For the first The measured height values ​​of each point; For the first The measured height values ​​of each point; Indicates taking the absolute value; This is the sequence number of the point on the current scan line.

[0061] Set flat threshold and steep change threshold and based on Calculate the first Adaptive adjustment factor at each point : ; in, For the first Adaptive adjustment factor at each point; For the first The point and the first The absolute value of the measured height difference between points; The flatness threshold; The threshold for a sharp change, and ; This is the lower limit adjustment coefficient for flat regions, and its value is [value missing]. ; This is the upper limit adjustment coefficient for the abrupt change region, and its value is [value missing]. ; This is the index of the point on the current scan line. Adaptive adjustment factor. exist Depend on Increase to During the process Continuously linearly increase to This ensures that the adjustment factor remains continuous at the threshold. Update the number according to the adaptive adjustment factor. The process noise covariance matrix at each point : ; in, For the first The process noise covariance matrix at each point; The process noise covariance baseline is preset based on the sensor's noise level; For the first Adaptive adjustment factor at each point; The elements on the main diagonal are respectively and of diagonal matrix; This is the slope noise amplification factor, with a value of [value missing]. This is used to further enhance the ability to track the rate of change of altitude in regions of abrupt change; This is the sequence number of the point on the current scan line.

[0062] Therefore, in flat areas Taking a smaller value reduces process noise, and the filter becomes more reliant on the system model, thus enhancing smoothness; in abrupt change regions... Taking a larger value increases process noise, making the filter more dependent on observation data, thus enhancing edge tracking.

[0063] Step S2615: Using the initial posterior state vector obtained in step S2613 and the initial posterior error covariance matrix Starting from the current scan line to The prediction and update steps are executed sequentially, with each step using a process noise covariance matrix. It is calculated in real time by step S2614.

[0064] The prediction step, by the first Calculate the posterior state vector of the nth point. The prior state vector of each point : ; in, For the first The prior state vector of each point; This is the state transition matrix; For the first The posterior state vector of each point; This is the sequence number of the point on the current scan line.

[0065] Calculate the first The prior error covariance matrix of each point : ; in, For the first The prior error covariance matrix of each point; This is the state transition matrix; For the first The posterior error covariance matrix of each point; This is the transpose of the state transition matrix; For the first The process noise covariance matrix at each point; This is the sequence number of the point on the current scan line.

[0066] Update steps, calculate the first step Kalman gain at each point : ; in, For the first Kalman gain at each point; For the first The prior error covariance matrix of each point; The observation matrix; This is the transpose of the observation matrix; To observe the noise variance; superscript This represents finding the inverse of a matrix. This is the sequence number of the point on the current scan line.

[0067] Calculate the first The posterior state vector of each point : ; in, For the first The posterior state vector of each point; For the first The prior state vector of each point; For the first Kalman gain at each point; For the first The measured height values ​​of each point; The observation matrix; This is the sequence number of the point on the current scan line.

[0068] Calculate the first The posterior error covariance matrix of each point : ; in, For the first The posterior error covariance matrix of each point; for identity matrix; For the first Kalman gain at each point; The observation matrix; For the first The prior error covariance matrix of each point; This is the sequence number of the point on the current scan line.

[0069] Store the posterior state vector of each point on the current scan line. and the posterior error covariance matrix This serves as the input for RTS inverse smoothing in the subsequent step S2616.

[0070] Step S2616: After completing the forward filtering, in order to further eliminate the phase lag caused by the unidirectional filtering and improve the estimation accuracy, the current scan line is subjected to Rauch-Tung-Striebel (RTS) reverse smoothing.

[0071] Specifically, taking the positive filtering endpoint (i.e., the first...) The posterior result of (a number of points) is used as the initial value for inverse smoothing: ; in, For the first A smoothed state vector of points (i.e., the endpoints); For the first The posterior state vector of each point; For the first The smoothing error covariance matrix at each point; For the first The posterior error covariance matrix of each point; This represents the total number of points currently scanned on the line; superscript. This indicates the result of reverse smoothing.

[0072] from to Reverse recursion to calculate the th Smoothing gain at each point : ; in, For the first Smoothing gain at each point; For the first The posterior error covariance matrix obtained by point-to-point positive filtering, i.e., in step S2615 ; This is the state transition matrix; This is the transpose of the state transition matrix; For the first The process noise covariance matrix at each point; superscript Indicates matrix inversion; superscript This represents the result of the forward filtering; This is the sequence number of the point on the current scan line.

[0073] Calculate the first Smooth state vector of points : ; in, For the first A smoothed state vector of points; For the first The posterior state vector obtained by forward filtering at each point, i.e., in step S2615 ; For the first Smoothing gain at each point; For the first A smoothed state vector of points; State transition matrix; superscript Indicates the result of reverse smoothing; superscript This represents the result of the forward filtering; This is the sequence number of the point on the current scan line.

[0074] Take the smoothed state vector of each point The first component is used as the smooth height value of that point. : ; in, For the first Smooth height values ​​for each point; This is the row vector used to extract the first component of the state vector; For the first A smoothed state vector of points; This is the sequence number of the point on the current scan line.

[0075] Step S2617: After completing the forward filtering and reverse smoothing of all scan lines, in order to eliminate individual outliers, perform inter-line median cross-validation for each point.

[0076] For the position located at The first scan line For each point at a given location, the median of the smoothed height values ​​of its corresponding points on several adjacent scan lines is taken. : ; in, For the first The first scan line The median of the smoothed height values ​​of the corresponding points on adjacent scan lines; This indicates taking the midpoint of the set; For the first The first scan line Smooth height values ​​for each point; The neighborhood radius for inter-row cross-validation is the number of one-sided scan lines involved in the median calculation. This is the relative row offset; The current scan line number; The index of the point on the scan line.

[0077] When the smooth height value at that point is equal to the median The absolute value of the difference exceeds the cross-validation threshold. When the time is right, the point is determined to be an outlier, and the median is used as the benchmark. Replace its smoothed height value to obtain the final output height value of that point. : ; in, For the first The first scan line The final output height value of each point; For the first The first scan line Smooth height values ​​for each point; This is the median of the smoothed height values ​​of the corresponding points on adjacent scan lines; The inter-row median cross-validation threshold; Indicates taking the absolute value; The scan line number; The index of the point on the scan line.

[0078] Combine the x and y coordinates of all points with the final output height value to obtain the filtered point cloud data, thus completing step S261.

[0079] Step S262: For the filtered point cloud data, calculate the height difference between adjacent points one by one along the scan line direction. When the absolute value of the height difference between adjacent points exceeds the preset boundary threshold, the adjacent point pair is determined as a boundary point, where the lower height is the boundary of the optical workpiece and the higher height is the boundary of the fixture.

[0080] Step S262 specifically includes steps S2621 to S2622.

[0081] Step S2621: Calculate the height difference between adjacent points.

[0082] For each scan line of the filtered point cloud data, calculate the first scan line along the scan line direction. The point and the first The height difference between points : ; in, For the first The point and the first The height difference between the points; For the first The final output height value after point filtering; For the first The final output height value after point filtering; This is the sequence number of the point on the current scan line.

[0083] Step S2622: Set boundary threshold When the absolute value of the height difference between adjacent points exceeds the boundary threshold When this happens, the adjacent point pair is determined to be a boundary point; ; in, For the first The point and the first The height difference between the points; Indicates taking the absolute value; The preset boundary threshold is set in advance based on the actual height difference between the optical workpiece and the fixture; This is the sequence number of the point on the current scan line.

[0084] For adjacent point pairs that are determined to be boundary points, compare their height values, determine the point with the lower height as the boundary point of the optical workpiece, and determine the point with the higher height as the boundary point of the fixture, thereby completing the distinction between the boundary of the optical workpiece and the boundary of the fixture, and completing step S262.

[0085] Step S263: Using the boundary of the optical workpiece as the dividing line, retain the points located inside the workpiece boundary on each scanning line as the workpiece point cloud, and remove the fixture points located outside the workpiece boundary to obtain the workpiece point cloud data after filtering out the fixtures.

[0086] Step 3: Fit the original point cloud data to obtain fitted point cloud data. The fitting method can be any one of planar fitting, spherical fitting, and aspherical fitting. In step 3, if neither the spherical equation nor the aspherical equation is input, then plane fitting is performed; If the equation of a sphere is input, then a sphere fit is performed; If an aspherical equation is input, an aspherical fit is performed.

[0087] The formula for aspherical fitting is: ; Let c represent the sag, c represent the vertex curvature, and k represent the conic constant. They represent even-order aspherical coefficients, respectively; : Indicates radial radius; ; x and y represent the x-coordinate and y-coordinate of the fitted point, and N / 2 is the total number of even-order aspherical coefficients, where N is an even number.

[0088] The mathematical formulas for plane fitting and spherical fitting are standard formulas and will not be elaborated here.

[0089] For aspherical fitting, this application provides the above formula, which can fit all three-dimensional points to the correct position according to the characteristics of the optical workpiece.

[0090] Therefore, the parameters of the aspherical fitting formula provided in this application are as follows: Figure 2 As shown. Figure 2 The fitting parameters for the convex and concave surfaces are given. Before fitting, the staff will determine the convex surface (R1 surface) and the concave surface (R2 surface) according to the placement of the optical workpiece.

[0091] Step 3 involves fitting the data to remove noise points. Before fitting, a suitable fitting formula is selected based on the type of optical workpiece. For example, a spherical formula is used for fitting a spherical workpiece, and so on. The aspherical fitting formula in this application refers to the fitting plane set for the specific workpiece for which this application is applied. This fitting is essentially a unified equation describing the surface, and by fitting, some noise points that deviate from the preset surface are removed.

[0092] refer to Figure 4 Step 4: Determine the geometric center, concave surface, and convex surface of the fitted point cloud data, and calculate the target size of the optical workpiece based on the fitted point cloud data.

[0093] In this embodiment, the target size includes the core thickness and / or sagitta of the optical workpiece.

[0094] Step 41: Calculate the geometric center of the 3D point cloud based on the fitted point cloud data; Step 42: Calculate the radius from each point to the geometric center, sort by radius, select several points in the inner circle as the central zone, and select several points in the outer circle as the edge zone; Compare the average height of the central zone with the average height of the edge zone; If the average height of the edge band is greater than or equal to the average height of the center band, it is determined to be a concave surface, and the final core thickness is the maximum value in the effective thickness set; If the average height of the edge band is less than the average height of the center band, it is determined to be a convex surface, and the final core thickness is the minimum value in the effective thickness set. Step 43: Save the fitted point cloud data, core thickness, and movement log of the confocal displacement sensor, and reset the confocal displacement sensor.

[0095] The effective thickness set is the set of thickness values ​​corresponding to each measurement point in the central band, and the thickness of each measurement point is calculated in step 22. Since the geometric center of the 3D point cloud is estimated by fitting, it may not fall exactly at the actual vertex of the optical workpiece. Therefore, the core thickness is determined by taking a value within the central band: for concave workpieces, the thickness at the actual vertex is the largest in the central band, so the maximum value in the effective thickness set is taken as the final core thickness; for convex workpieces, the thickness at the actual vertex is the smallest in the central band, so the minimum value in the effective thickness set is taken as the final core thickness. This ensures a robust core thickness estimate even when measurement and fitting errors exist.

[0096] The above are merely preferred embodiments of this application and are not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A method for measuring optical workpieces, characterized in that, Includes the following steps: Step 1: Place the optical workpiece on the fixture plane, guide the confocal displacement sensor to move above the optical workpiece, and measure the distance between each measuring point on the upper and lower surfaces of the optical workpiece; Step 2: Obtain the refractive index of the optical workpiece. Based on the distance between each measurement point on the upper and lower surfaces of the optical workpiece, calculate the height of each measurement point from the confocal displacement sensor to obtain the raw point cloud data. Step 3: Fit the original point cloud data to obtain fitted point cloud data. The fitting method can be any one of planar fitting, spherical fitting, and aspherical fitting. Step 4: Determine the geometric center, concave surface, and convex surface of the fitted point cloud data, and calculate the target size of the optical workpiece based on the fitted point cloud data.

2. The optical workpiece measurement method according to claim 1, characterized in that, Step 1 includes the following steps: Step 11: Establish the mapping relationship between the logical coordinate axis and the motion coordinate axis. The motion coordinate axis is the coordinate axis of the confocal displacement sensor moving on the plane above the optical workpiece. The logical coordinate axes are the coordinate axes of the scanning plane in the host computer; Step 12: Design scanning points in the logical coordinate axis according to the spiral trajectory, generate a scanning grid of all scanning points, and each grid point in the scanning grid corresponds to each measurement point that the confocal displacement sensor needs to collect; The measurement point mentioned is essentially the point where the confocal displacement sensor moves to and takes measurements; Step 13: The confocal displacement sensor starts at the starting point and uses a spiral sampling motion to traverse all grid points. When the confocal displacement sensor moves to the specified coordinates, it performs a sampling to obtain the sampling result. The sampling results include the height of the measurement point from the confocal displacement sensor.

3. The optical workpiece measurement method according to claim 2, characterized in that, Step 13 includes the following steps: Step 131: Move the confocal displacement sensor to the starting point of the scanning grid according to the mapping relationship; Step 132: The confocal displacement sensor, starting from the point of origin, uses a spiral sampling motion to traverse all grid points; Step 133: Measure at each grid point to obtain the height of all measurement points from the confocal displacement sensor.

4. The optical workpiece measurement method according to claim 1, characterized in that, Step 2 includes the following steps: Step 21: Obtain the sampling results of the confocal displacement sensor to obtain the apparent thickness between the upper and lower surfaces of the optical workpiece at each measurement point; Step 22: Obtain the refractive index of the optical workpiece, and multiply the apparent thickness by the refractive index to obtain the thickness of the optical workpiece at the measurement point; Step 23: Based on the thickness of the measurement point and the distance from the upper surface to the confocal displacement sensor, obtain the distance from the lower surface of the optical workpiece to the confocal displacement sensor; Step 24: Based on the distance between the upper surface of the optical workpiece and the confocal displacement sensor, the distance between the lower surface of the optical workpiece and the confocal displacement sensor, and the logical coordinate axes of the measurement points, generate the three-dimensional coordinates of the measurement points on the upper surface of the optical workpiece and the corresponding measurement points on the lower surface. Step 25: Collect all three-dimensional coordinates to obtain the original point cloud data of the optical workpiece surface; Step 26: Perform region filtering on the raw point cloud data.

5. The optical workpiece measurement method according to claim 4, characterized in that, Step 26 includes the following steps: Step 261: Obtain the original point cloud data and convert it into a 3D plane. For each point P in the original point cloud data... i It can be represented by a three-dimensional plane equation as follows: ; Where i represents the index of the point. They represent point P respectively. i The x-coordinate, y-coordinate, and height coordinates are given, and A, B, and C are the first fitting coefficient, the second fitting coefficient, and the third fitting coefficient, respectively. Step 262: Obtain the three-dimensional plane equations of all points, solve for the first fitting coefficient A, the second fitting coefficient B, and the third fitting coefficient C, and obtain the fitting equation; Step 263: For each point in the original point cloud data, substitute the x-coordinate and y-coordinate into the plane equation to calculate the plane fitting height, and subtract the plane fitting height from the height coordinate in the original point cloud data to obtain the corrected coordinate. Step 264: Obtain the point closest to the measurement origin in the original point cloud, use it as the reference point, obtain the corrected coordinates of the reference point, and subtract the corrected coordinates of the reference point from the corrected coordinates of the remaining points to obtain the original point cloud data filtered by the fixture.

6. The optical workpiece measurement method according to claim 5, characterized in that, In step 262, for each point in the original point cloud data, the least squares method is used to construct a fitting equation, and the objective function of the fitting equation is S; The fitting equation is: Z = AX + BY + C; ; S represents the sum of residuals of the fitted equation, and A, B, and C are the first, second, and third fitting coefficients, respectively. They represent point P respectively. i The x-coordinate, y-coordinate, and height coordinate.

7. The optical workpiece measurement method according to claim 5, characterized in that, The solution process for the fitted equation in step 262 is as follows: To minimize the sum of squared residuals at all measurement points, establish a system of normal equations: ; Where N is the number of points involved in the fitting, A is the slope coefficient in the X direction, B is the slope coefficient in the Y direction, and C is the Z-intercept. Sum the x-coordinates of all points. Sum the squared x-coordinates of all points. Sum the ordinates of all points. The sum of the products of the x and y coordinates of all points. Accumulate the height coordinates of all points.

8. The optical workpiece measurement method according to claim 1, characterized in that, In step 3, if neither the spherical equation nor the aspherical equation is input, then plane fitting is performed; If the equation of a sphere is input, then a sphere fit is performed; If an aspherical equation is input, an aspherical fit is performed.

9. The optical workpiece measurement method according to claim 1, characterized in that, Step 4 includes the following steps: Step 41: Calculate the geometric center of the 3D point cloud based on the fitted point cloud data; Step 42: Calculate the radius from each point to the geometric center, sort by radius, select several points in the inner circle as the central zone, and select several points in the outer circle as the edge zone; Compare the average height of the central zone with the average height of the edge zone; If the average height of the edge band is greater than or equal to the average height of the center band, it is determined to be a concave surface, and the final core thickness is the maximum value in the effective thickness set; If the average height of the edge band is less than the average height of the center band, it is determined to be a convex surface, and the final core thickness is the minimum value in the effective thickness set. Step 43: Save the fitted point cloud data, core thickness, and movement log of the confocal displacement sensor, and reset the confocal displacement sensor.

10. The optical workpiece measurement method according to claim 8, characterized in that, The formula for aspherical fitting is: ; Let c represent the sag, c represent the vertex curvature, and k represent the conic constant. They represent even-order aspherical coefficients, respectively; : Indicates radial radius; ; x and y represent the x-coordinate and y-coordinate of the fitted point, and N / 2 is the total number of even-order aspherical coefficients, where N is an even number.