A chuck flatness detection method and system based on surface texture image analysis
Patent Information
- Application Number
- CN202512006275.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-29
- Publication Date
- 2026-09-15
- Estimated Expiration
- 2045-12-29
AI Technical Summary
然而,现有的光度立体视觉方法在应用于夹盘平面度检测时仍存在关键技术难题
本发明通过多角度程控光照系统和光度立体视觉重构技术实现了对夹盘表面微观几何特征的非接触式精确获取,显著提升了测量效率和测量精度。传统的接触式测量方法需要探针与被测表面直接接触,测量过程耗时长且可能对工件表面造成划伤损伤,而非接触式激光扫描方法在面对复杂纹理表面时容易产生漫反射干扰导致测量失效。本发明采用多视角光照采集方式,通过控制不同方位的光源依次照射,获取丰富的表面纹理信息,结合全变分正则化约束的光度立体视觉模型,能够在保持表面细节特征的同时有效抑制噪声干扰,精确恢复表面法向量场。这种多源信息融合的重构策略不仅提高了对复杂表面纹理的适应能力,还显著增强了测量结果的鲁棒性和可靠性。
Smart Images

Figure CN122062608B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of clamp detection, and in particular to a method and system for clamp flatness detection based on surface texture image analysis. Background Technology
[0002] As a key component in machining and semiconductor manufacturing, the flatness accuracy of chucks directly affects the clamping quality and machining precision of workpieces. With the rapid development of precision manufacturing technology, especially in high-end equipment fields such as aerospace, optical component processing, and chip manufacturing, the accuracy requirements for chuck flatness detection have increased from the traditional micrometer level to sub-micrometer or even nanometer level. However, existing chuck flatness detection methods generally suffer from significant technical bottlenecks when facing the demands for high precision, high efficiency, and non-contact measurement.
[0003] Traditional contact measurement methods primarily rely on coordinate measuring machines (CMMs) or indicators for point-by-point measurements. While these methods offer high measurement accuracy, they suffer from several inherent drawbacks. First, the contact probe applies mechanical pressure to the measured surface, which can cause elastic deformation in thin-walled or soft chucks, leading to distorted measurement results. Second, point-by-point scanning is inefficient, often requiring several hours to complete a full inspection, failing to meet the demands of rapid inspection on production lines. Third, the selection of measurement points is subjective; differences in measurement paths and sampling densities chosen by different operators can result in inconsistent evaluation results. More importantly, contact methods struggle to acquire complete morphological information of the measured surface, relying only on limited discrete point data for fitting, often failing to accurately capture complex surface ripples and localized defects.
[0004] Optical interferometry methods, such as laser interferometers and white light interferometers, enable non-contact, high-precision surface topography measurements and are widely used in flatness inspection. However, these methods are extremely sensitive to the measurement environment, requiring strict laboratory conditions for temperature control and vibration isolation. The equipment is expensive and bulky, making it difficult to deploy on production sites. Furthermore, interferometry relies on the high reflectivity of the measured surface. For chucks with oxidation, coatings, or high roughness, the quality of interference fringes often deteriorates or even fails to form an image, limiting its applicability. In addition, the measurement field of view of interferometers is typically small, requiring multiple stitching measurements for large chucks. This not only increases measurement time but also reduces overall measurement accuracy due to stitching errors.
[0005] Three-dimensional scanning methods based on structured light or laser triangulation offer advantages such as high measurement speed and non-contact operation, but they also face numerous challenges in applications like clamp flatness inspection. Structured light methods reconstruct the 3D topography by projecting an encoded grating and acquiring deformed fringes; however, the calibration accuracy of the grating projection system and the stability of the phase demodulation algorithm directly affect measurement accuracy. For surfaces with weak texture or high reflectivity, insufficient fringe contrast can lead to phase calculation errors. While laser triangulation is simple in principle, its measurement accuracy is limited by the laser spot size and detector resolution, and mechanical positioning errors during the scanning process accumulate and propagate, making high-precision full-field measurement difficult. More importantly, these active optical methods all require additional projection or scanning devices, resulting in high system complexity and shortcomings in environmental adaptability and long-term stability in industrial settings.
[0006] In recent years, image-based passive measurement methods have attracted attention. Among them, photometric stereo vision technology, by acquiring images of object surfaces under different lighting directions and reconstructing the three-dimensional shape using the relationship between lighting changes and surface normal vectors, has significant advantages such as simple equipment, low cost, and fast measurement speed. However, existing photometric stereo vision methods still face key technical challenges when applied to the flatness detection of clamps. Traditional methods fail to fully consider the surface geometric continuity constraints during normal vector reconstruction, making the reconstruction results susceptible to image noise and lighting inhomogeneity, leading to unreasonable abrupt changes in the normal vector field. In the gradient field integration stage, conventional spatial domain path integration methods suffer from error accumulation problems, and the height inconsistency generated by different integration paths can seriously affect the final flatness evaluation accuracy. Furthermore, if a simple least squares method is used for datum plane fitting, it is easily affected by local surface defects and anomalies, causing the fitted plane to deviate from the true datum and distorting the flatness index.
[0007] Therefore, there is an urgent need to develop a new method that integrates advanced image processing algorithms and can achieve high-precision, high-efficiency, non-contact detection of the flatness of the clamping disc, in order to meet the increasingly stringent requirements of modern precision manufacturing for quality inspection technology. Summary of the Invention
[0008] In view of this, the present invention provides a method for detecting the flatness of a clamping disk based on surface texture image analysis. The purpose is to acquire multi-view texture images of the clamping disk surface through a multi-source array, reconstruct the surface normal vector field using a photometric stereo vision model with total variational regularization constraints, achieve the global optimal transformation from the gradient field to the height field using a frequency domain integral operator, and obtain accurate flatness evaluation index through least squares reference plane fitting. This enables non-contact, high-efficiency, and high-precision clamping disk flatness detection, meeting the stringent requirements of modern precision manufacturing for quality inspection technology.
[0009] To achieve the above objectives, the present invention provides a method for detecting the flatness of a clamping disc based on surface texture image analysis, comprising the following steps: S1: Under the illumination of multiple preset programmable array light sources, a high-resolution image sensor synchronously triggers the acquisition of multiple frames of original texture images with different illumination vector directions on the surface of the clamping plate. The programmable array light sources are arranged above the surface of the clamping plate according to preset spatial positions. The illumination direction of each light source forms a different incident angle with the normal of the clamping plate surface. The acquired multiple frames of original texture images are processed by grayscale normalization to construct a texture image sequence containing multi-view illumination information. S2: Input the texture image sequence into the photometric stereo vision reconstruction model based on total variation regularization. In the photometric stereo vision reconstruction model, firstly, the Lambert reflection constraint equation between the image gray value and surface reflectivity, light source direction and surface normal vector is established. Then, the total variation regularization term is introduced to smooth the spatial variation of the surface normal vector. Finally, the pixel-level surface reflectivity and normal partial derivative are solved by iterative optimization, and the surface normal vector field characterizing the micro-geometric features of the clamp is output. S3: The surface normal vector field is transformed into a gradient field, and the gradient field is processed using a frequency domain integral operator based on the Frankot-Chellappa algorithm. In the frequency domain integral operator, the horizontal and vertical components of the gradient field are first mapped to the frequency domain by two-dimensional Fourier transform, then global integrability constraints are constructed in the frequency domain and the frequency domain representation of the height field is solved. Finally, the frequency domain height field is transformed back to the spatial domain by two-dimensional inverse Fourier transform, and the three-dimensional topographic height map of the clamp surface is output. S4: Fit a reference plane to the 3D topography height map using the least squares method. Determine the coefficient parameters of the reference plane equation by minimizing the sum of squares of the vertical distances from all discrete points in the height map to the fitted plane. Calculate the vertical distance from each discrete point in the height map to the reference plane. Extract the difference between the maximum and minimum values of all vertical distances as the flatness evaluation index to achieve the flatness detection of the clamping plate.
[0010] As a further improvement of the present invention: Optionally, in step S1, synchronously triggering the acquisition of multiple frames of original texture images of the chuck surface with different illumination vector directions using a high-resolution image sensor includes: S101: Set the total number of light sources in the programmable array light source to... ,Will The light sources are evenly distributed around a circle centered on the center of the chuck surface with a radius of [missing information]. Above the circumference, the angle between each light source and the normal to the surface of the clamping disk is a preset incident angle. ; S102: Sequentially activate the... One light source is selected and the other light sources are turned off. Number the light source and Acquired by a high-resolution image sensor in the first Original image of the surface texture of the chuck under illumination by a single light source. ,get Original texture images of frames with different lighting directions; S103: For each frame's original texture image Perform grayscale normalization to obtain the first The grayscale image of the original texture under illumination by a single light source after normalization processing. ; S104: Construct a texture image sequence Each element in the sequence corresponds to a normalized texture image under a specific light source direction.
[0011] Optionally, in step S2, the processing steps of the photometric stereo vision reconstruction model based on total variational regularization include: S201: Establish the Lambertian reflection constraint equation between image grayscale values and surface reflection parameters, for the Pixel coordinates under illumination by a single light source Normalized gray value at the location The constraint equations it satisfies are: in, Represents pixel coordinates Surface reflectivity at that location Indicates the first The unit illumination direction vector of a light source. Indicates the first Unit illumination direction vector of each light source transpose, Represents pixel coordinates The surface unit normal vector at that location; S202: Surface unit normal vector Expressed as a partial derivative of the surface height function, specifically: ; in, Represents pixel coordinates Surface height function along Partial derivatives in direction, Represents pixel coordinates Surface height function along Partial derivatives in direction; S203: Constructing an energy functional containing a total variational regularization term This is used to constrain the spatial smoothness of the surface normal vectors, specifically: ; in, This represents the energy functional value to be minimized. This represents the weight coefficients of the total variation regularization term. express directional partial derivatives along Gradient of direction, express directional partial derivatives along Gradient of direction, express directional partial derivatives along Gradient of direction, express directional partial derivatives along Gradient of direction; S204: Using the alternating direction multiplier method to analyze the energy functional The solution is obtained through iterative optimization, with the surface reflectivity updated sequentially in each iteration. , directional partial derivatives and directional partial derivatives until the change in the energy functional value is less than the preset convergence threshold. ; S205: Obtained from the optimization solution directional partial derivatives and directional partial derivatives The coordinates of each pixel are calculated using the formula in S202. Surface unit normal vector at the location Construct the surface normal vector field ,in Indicates the width of the image in pixels. This indicates the height of the image in pixels.
[0012] Optionally, in step S3, the processing steps of the frequency domain integral operator based on the Frankot-Chellappa algorithm include: S301: Extract the gradient field of the surface height function based on the surface normal vector field, and then optimize the solution. directional partial derivatives The horizontal component of the gradient field The optimized solution obtained directional partial derivatives As the vertical component of the gradient field ; S302: Horizontal component of the gradient field and vertical components Perform two-dimensional discrete Fourier transforms to obtain the frequency domain representation. and ,in, Represents the horizontal component of the gradient field In frequency coordinates Frequency domain representation at that location, Represents the frequency index in the horizontal direction and , Represents the frequency index in the vertical direction and , Represents the imaginary unit. Represents the vertical component of the gradient field In frequency coordinates Frequency domain representation at; S303: Construct a high-field frequency domain representation that satisfies integrability constraints within the frequency domain. Specifically: ; in, The height field of the three-dimensional topography of the clamping disk surface is represented in frequency coordinates. Frequency domain representation at; S304: Frequency domain representation of the height field Performing a two-dimensional discrete Fourier inverse transform yields a three-dimensional topographic height map in the spatial domain. Specifically: ; in, Indicates the surface of the clamping disc in pixel coordinates The height value at that location.
[0013] This step achieves global constraint reconstruction of the gradient field using frequency domain integration operators, effectively solving the error accumulation problem inherent in traditional spatial domain integration methods. Directly integrating the gradient field in the spatial domain leads to the propagation and accumulation of reconstruction errors along the integration path, especially in the presence of measurement noise, where different integration paths may yield inconsistent height values. This step transforms the gradient field into the frequency domain for processing. Utilizing the global nature of the Fourier transform, it can simultaneously consider the gradient information of all pixels. By constructing integrability constraints in the frequency domain, it ensures that the reconstructed height field satisfies the gradient consistency requirement globally.
[0014] This step employs the core idea of the Frankot-Chellappa algorithm, achieving an optimal integrable approximation of the non-integrable gradient field through frequency domain filtering. In actual measurements, due to noise and measurement errors, the obtained gradient field often does not satisfy the strict integrability condition, i.e., the curl of the gradient field is not zero. The frequency domain integral operator finds the integrable gradient field that best approximates the measured gradient field in the least squares sense by minimizing the difference between the gradient of the reconstructed height field and the measured gradient field, thereby obtaining a more accurate and stable 3D topography reconstruction result.
[0015] Optionally, in step S4, the process of fitting the reference plane based on the least squares method includes: S401: Establish the equation of the datum plane. Let the general form of the equation of the datum plane be: ; in, Indicates the reference plane at pixel coordinates The height value at that location, In the equation of the reference plane The slope coefficient of the direction, In the equation of the reference plane The slope coefficient of the direction, The intercept coefficients of the equation of the reference plane are represented. S402: Constructing the least squares objective function The coefficient parameters of the datum plane equation are determined by minimizing the sum of squared vertical distances from all discrete points in the 3D topographic height map to the datum plane, specifically: ; in, This represents the value of the objective function to be minimized, which has respect to the slope coefficient. Slope coefficient and intercept coefficient The functional relationship; S403: Regarding the objective function Regarding the slope coefficient respectively Slope coefficient and intercept coefficient Find the partial derivatives and set them to zero, establish a system of normal equations, and solve for the optimal coefficient parameters. , and and bring in ,get ; S404: Calculate the coordinates of each pixel in the 3D topography height map. Vertical distance from discrete points to the reference plane Specifically: ; in, Represents pixel coordinates The perpendicular distance from the discrete point at the reference plane; S405: Extract the maximum value from all vertical distance values. and minimum value Calculate flatness evaluation index Specifically: ; in, This indicates the flatness evaluation index value of the clamping plate. This represents the maximum vertical distance across all pixel coordinates. This represents the minimum vertical distance at all pixel coordinates.
[0016] This step achieves a precise quantitative assessment of the flatness of the clamping plate through least-squares reference plane fitting. Flatness is an important indicator reflecting the geometric accuracy of a part's surface. Traditional measurement methods require selecting multiple measurement points on the surface being measured and performing point-by-point measurements using a coordinate measuring machine or coordinate measuring machine, which is inefficient and easily affected by human factors. This step, based on a three-dimensional topographic height map, uses the least-squares method to fit an optimal reference plane. This reference plane minimizes the sum of the squares of the distances from all measurement points to the plane, objectively reflecting the overall topographic characteristics of the clamping plate surface and avoiding the influence of local measurement point selection on the evaluation results.
[0017] This step calculates the vertical distance from all discrete points to the reference plane and extracts the maximum deviation value as the flatness index, which meets the national standard definition requirements for flatness error. Compared with the traditional three-point method or diagonal method, this step utilizes all measurement data from the height map, which can more comprehensively reflect the surface topography deviation and improve the reliability and accuracy of flatness assessment.
[0018] This invention also discloses a clamp flatness detection system based on surface texture image analysis, comprising: Sensor data acquisition module: Under the illumination of multiple preset programmable array light sources, a high-resolution image sensor synchronously triggers the acquisition of multiple frames of original texture images of the clamping plate surface with different light vector directions. Stereo vision reconstruction module: Input multiple frames of original texture images with different illumination vector directions into the photometric stereo vision reconstruction model based on total variation regularization. By iteratively solving the pixel-level surface reflectivity and normal partial derivative, the module outputs the surface normal vector field that characterizes the micro-geometric features of the chuck. Height map generation module: It transforms the surface normal vector field into a gradient field, and uses a frequency domain integral operator based on the Frankot-Chellappa algorithm to reconstruct the gradient field through global constraint integration in the frequency domain, outputting a three-dimensional topographic height map of the clamp surface. Flatness evaluation module: The module performs a reference plane fitting based on the least squares method on the 3D topography height map, calculates the vertical distance from each discrete point in the height map to the reference plane, and extracts the range of all distance values as the evaluation index to realize the flatness detection of the clamping plate.
[0019] Compared with the prior art, the present invention has at least the following beneficial effects: This invention achieves non-contact, precise acquisition of the microscopic geometric features of a clamping plate surface through a multi-angle programmable illumination system and photometric stereo vision reconstruction technology, significantly improving measurement efficiency and accuracy. Traditional contact measurement methods require direct contact between the probe and the surface being measured, which is time-consuming and may cause scratches or damage to the workpiece surface. Non-contact laser scanning methods are prone to diffuse reflection interference, leading to measurement failures when dealing with complex textured surfaces. This invention employs a multi-view illumination acquisition method, sequentially illuminating the surface with light sources from different directions to obtain rich surface texture information. Combined with a photometric stereo vision model constrained by total variational regularization, it can effectively suppress noise interference while preserving detailed surface features and accurately recover the surface normal vector field. This multi-source information fusion reconstruction strategy not only improves adaptability to complex surface textures but also significantly enhances the robustness and reliability of the measurement results.
[0020] This invention employs a frequency-domain integral operator to achieve global constraint reconstruction of the gradient field, effectively solving the error accumulation and path dependence problems inherent in traditional spatial domain integration methods, and significantly improving the accuracy and stability of 3D topography reconstruction. Traditional path integration methods integrate the gradient field point-by-point or row-by-row in the spatial domain. Reconstruction errors propagate and accumulate along the integration path, especially when measurement noise exists in the gradient field or the integrability condition is not met. Different integration paths will yield inconsistent height values, leading to systematic deviations in the reconstruction results. This invention utilizes the Frankot-Chellappa algorithm to transform the gradient field into the frequency domain for processing. By constructing global integrability constraints, the optimal integrable gradient field is found in the least-squares sense, ensuring that the reconstructed height field meets gradient consistency requirements globally. This frequency-domain processing method can simultaneously utilize the gradient information of all pixels for collaborative optimization, avoiding local error accumulation and obtaining more accurate and stable 3D topography reconstruction results, providing a reliable data foundation for subsequent accurate flatness evaluation. Attached Figure Description
[0021] Figure 1This is a flowchart illustrating a method for detecting the flatness of a clamping disc based on surface texture image analysis according to an embodiment of the present invention. Figure 2 This is a schematic diagram of the surface normal vector field reconstructed using total variational regularization. Detailed Implementation
[0022] The present invention will be further described below with reference to the accompanying drawings, but this is not intended to limit the present invention in any way. Any modifications or substitutions made based on the teachings of the present invention shall fall within the protection scope of the present invention.
[0023] Example 1: A method for detecting the flatness of a clamping disc based on surface texture image analysis, such as... Figure 1 As shown, it includes the following steps: S1: Using a high-resolution image sensor, under the illumination of multiple pre-set programmable array light sources, synchronously trigger the acquisition of multiple frames of original texture images of the clamping disk surface with different illumination vector directions. The programmable array light sources are arranged above the clamping disk surface according to a pre-set spatial distribution, and the illumination direction of each light source forms a different incident angle with the normal of the clamping disk surface. The acquired multiple frames of original texture images are subjected to grayscale normalization processing to construct a texture image sequence containing multi-view illumination information, including: S101: Set the total number of light sources in the programmable array light source to... ,Will The light sources are evenly distributed around a circle centered on the center of the chuck surface with a radius of [missing information]. Above the circumference, the angle between each light source and the normal to the surface of the clamping disk is a preset incident angle. In this embodiment, the total number of light sources Set to 8, circumference radius Set to 300mm, preset incident angle Set to 45°; S102: Sequentially activate the... One light source is selected and the others are turned off. Number the light source and Acquired by a high-resolution image sensor in the first Original image of the surface texture of the chuck under illumination by a single light source. ,get Original texture images of frames with different lighting directions; S103: For each frame's original texture image Grayscale normalization is performed, specifically in this embodiment: ; in, Indicates the first The original texture image under illumination by a light source at pixel coordinates The grayscale value after normalization Indicates the first The original texture image under illumination by a light source at pixel coordinates The original grayscale value at that location, Indicates the first The minimum grayscale value of all pixels in the original texture image under illumination by a single light source. Indicates the first The maximum grayscale value of all pixels in the original texture image under illumination by a single light source; S104: Construct a texture image sequence Each element in the sequence corresponds to a normalized texture image under a specific light source direction.
[0024] S2: Input the texture image sequence into a photometric stereo vision reconstruction model based on total variational regularization. In the photometric stereo vision reconstruction model, firstly, a Lambertian reflection constraint equation is established between the image grayscale value and surface reflectivity, light source direction, and surface normal vector. Then, a total variational regularization term is introduced to smooth the spatial variation of the surface normal vector. Finally, the pixel-level surface reflectivity and normal partial derivatives are solved through iterative optimization, and the surface normal vector field characterizing the micro-geometric features of the clamp is output, including: S201: Establish the Lambertian reflection constraint equation between image grayscale values and surface reflection parameters, for the Pixel coordinates under illumination by a single light source Normalized gray value at the location The constraint equations it satisfies are: ; in, Represents pixel coordinates Surface reflectivity at that location Indicates the first The unit illumination direction vector of a light source. Indicates the first Unit illumination direction vector of each light source transpose, Represents pixel coordinates The surface unit normal vector at the location; for the clamp surface with specular reflection properties, the Blinn-Phong reflection model can be extended, and the constraint equations are modified as follows: ; in, Indicates the diffuse reflectance coefficient. Indicates the specular reflection coefficient. Indicates the first Half-angle vector corresponding to each light source , The unit vector representing the direction of observation. Indicates the specular reflectance index; S202: Surface unit normal vector Expressed as a partial derivative of the surface height function, specifically: ; in, Represents pixel coordinates Surface height function along Partial derivatives in direction, Represents pixel coordinates Surface height function along Partial derivatives in direction; S203: Constructing an energy functional containing a total variational regularization term This is used to constrain the spatial smoothness of the surface normal vectors, specifically: ; in, This represents the energy functional value to be minimized. This represents the weight coefficients of the total variation regularization term. express directional partial derivatives along Gradient of direction, express directional partial derivatives along Gradient of direction, express directional partial derivatives along Gradient of direction, express directional partial derivatives along The gradient of the direction; in this embodiment, the weight coefficients of the total variation regularization term. Set to 0.01; S204: The energy functional value is iteratively optimized using the alternating direction multiplier method, and the surface reflectivity is updated sequentially in each iteration. , directional partial derivatives and directional partial derivatives until the change in the energy functional value is less than the preset convergence threshold. In this embodiment, a preset convergence threshold is used. Set as ; S205: Obtained from the optimization solution directional partial derivatives and directional partial derivatives The coordinates of each pixel are calculated using the formula in S202. Surface unit normal vector at the location Construct the surface normal vector field ,in Indicates the width of the image in pixels. The height of the image is represented by the number of pixels, such as Figure 2 As shown in the figure, the outer edge of the chuck and the edge of the mounting hole are marked by white circles.
[0025] S3: The surface normal vector field is transformed into a gradient field, and the gradient field is processed using a frequency domain integral operator based on the Frankot-Chellappa algorithm. In the frequency domain integral operator, the horizontal and vertical components of the gradient field are first mapped to the frequency domain by two-dimensional Fourier transforms, then global integrability constraints are constructed in the frequency domain and the frequency domain representation of the height field is solved. Finally, the frequency domain height field is transformed back to the spatial domain by a two-dimensional inverse Fourier transform, and a three-dimensional topographic height map of the clamp surface is output, including: S301: Extract the gradient field of the surface height function based on the surface normal vector field, and then optimize the solution. directional partial derivatives The horizontal component of the gradient field The optimized solution obtained directional partial derivatives As the vertical component of the gradient field ; S302: Horizontal component of the gradient field and vertical components Perform two-dimensional discrete Fourier transforms to obtain the frequency domain representation. and In this embodiment, specifically: ; in, Represents the horizontal component of the gradient field In frequency coordinates Frequency domain representation at that location, Represents the frequency index in the horizontal direction and , Represents the frequency index in the vertical direction and , Represents the imaginary unit. Represents the vertical component of the gradient field In frequency coordinates Frequency domain representation at; S303: Construct a high-field frequency domain representation that satisfies integrability constraints within the frequency domain. Specifically: ; in, The height field of the three-dimensional topography of the clamping disk surface is represented in frequency coordinates. Frequency domain representation at; S304: Frequency domain representation of the height field Performing a two-dimensional discrete Fourier inverse transform yields a three-dimensional topographic height map in the spatial domain. Specifically: ; in, Indicates the surface of the clamping disc in pixel coordinates The height value at that location.
[0026] S4: Fit a reference plane to the 3D topography height map using the least squares method. Determine the coefficients of the reference plane equation by minimizing the sum of squared vertical distances from all discrete points in the height map to the fitted plane. Calculate the vertical distance from each discrete point in the height map to the reference plane, and extract the difference between the maximum and minimum vertical distance values as the flatness evaluation index to achieve disc flatness detection, including: S401: Establish the equation of the datum plane. Let the general form of the equation of the datum plane be: ; in, Indicates the reference plane at pixel coordinates The height value at that location, In the equation of the reference plane The slope coefficient of the direction, In the equation of the reference plane The slope coefficient of the direction, The intercept coefficients of the equation of the reference plane are represented. S402: Constructing the least squares objective function The coefficient parameters of the datum plane equation are determined by minimizing the sum of squared vertical distances from all discrete points in the 3D topographic height map to the datum plane, specifically: ; in, This represents the value of the objective function to be minimized, which has respect to the slope coefficient. Slope coefficient and intercept coefficient The functional relationship; S403: Regarding the objective function Regarding the slope coefficient respectively Slope coefficient and intercept coefficient Find the partial derivatives and set them to zero, establish a system of normal equations, and solve for the optimal coefficient parameters. , and and bring in ,get ; S404: Calculate the coordinates of each pixel in the 3D topography height map. Vertical distance from discrete points to the reference plane Specifically: ; in, Represents pixel coordinates The perpendicular distance from the discrete point at the reference plane; S405: Extract the maximum value from all vertical distance values. and minimum value Calculate flatness evaluation index Specifically: ; in, This indicates the flatness evaluation index value of the clamping plate. This represents the maximum vertical distance across all pixel coordinates. This represents the minimum vertical distance at all pixel coordinates.
[0027] Example 2: This invention also discloses a clamp flatness detection system based on surface texture image analysis, comprising the following four modules: Sensor data acquisition module: Under the illumination of multiple preset programmable array light sources, a high-resolution image sensor synchronously triggers the acquisition of multiple frames of original texture images of the clamping plate surface with different light vector directions. Stereo vision reconstruction module: Input multiple frames of original texture images with different illumination vector directions into the photometric stereo vision reconstruction model based on total variation regularization. By iteratively solving the pixel-level surface reflectivity and normal partial derivative, the module outputs the surface normal vector field that characterizes the micro-geometric features of the chuck. Height map generation module: It transforms the surface normal vector field into a gradient field, and uses a frequency domain integral operator based on the Frankot-Chellappa algorithm to reconstruct the gradient field through global constraint integration in the frequency domain, outputting a three-dimensional topographic height map of the clamp surface. Flatness evaluation module: The module performs a reference plane fitting based on the least squares method on the 3D topography height map, calculates the vertical distance from each discrete point in the height map to the reference plane, and extracts the range of all distance values as the evaluation index to realize the flatness detection of the clamping plate.
[0028] It should be noted that the sequence numbers of the above embodiments of the present invention are merely for descriptive purposes and do not represent the superiority or inferiority of the embodiments. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, apparatus, article, or method. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.
[0029] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0030] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. A method for detecting the flatness of a clamping disc based on surface texture image analysis, characterized in that, Includes the following steps: S1: Under the illumination of multiple preset programmable array light sources, a high-resolution image sensor synchronously triggers the acquisition of multiple frames of original texture images with different illumination vector directions on the surface of the clamping plate. The programmable array light sources are arranged above the surface of the clamping plate according to preset spatial positions. The illumination direction of each light source forms a different incident angle with the normal of the clamping plate surface. The acquired multiple frames of original texture images are processed by grayscale normalization to construct a texture image sequence containing multi-view illumination information. S2: Input the texture image sequence into the photometric stereo vision reconstruction model based on total variation regularization. In the photometric stereo vision reconstruction model, firstly, the Lambert reflection constraint equation between the image gray value and surface reflectivity, light source direction and surface normal vector is established. Then, the total variation regularization term is introduced to smooth the spatial variation of the surface normal vector. Finally, the pixel-level surface reflectivity and normal partial derivative are solved by iterative optimization, and the surface normal vector field characterizing the micro-geometric features of the clamp is output. S3: The surface normal vector field is transformed into a gradient field, and the gradient field is processed using a frequency domain integral operator based on the Frankot-Chellappa algorithm. In the frequency domain integral operator, the horizontal and vertical components of the gradient field are first mapped to the frequency domain by two-dimensional Fourier transform, then global integrability constraints are constructed in the frequency domain and the frequency domain representation of the height field is solved. Finally, the frequency domain height field is transformed back to the spatial domain by two-dimensional inverse Fourier transform, and the three-dimensional topographic height map of the clamp surface is output. S4: Fit a reference plane to the 3D topography height map using the least squares method. Determine the coefficient parameters of the reference plane equation by minimizing the sum of squares of the vertical distances from all discrete points in the height map to the fitted plane. Calculate the vertical distance from each discrete point in the height map to the reference plane. Extract the difference between the maximum and minimum values of all vertical distances as the flatness evaluation index to achieve the flatness detection of the clamping plate.
2. The method for detecting the flatness of a clamping disc based on surface texture image analysis according to claim 1, characterized in that, Step S1 includes: S101: Set the total number of light sources in the programmable array light source to... ,Will The light sources are evenly distributed around a circle centered on the center of the chuck surface with a radius of [missing information]. Above the circumference, the angle between each light source and the normal to the surface of the clamping disk is a preset incident angle. ; S102: Sequentially activate the... One light source is selected and the others are turned off. Number the light source and Acquired by a high-resolution image sensor in the first Original image of the surface texture of the chuck under illumination by a single light source. ,get Original texture images of frames with different lighting directions; S103: For each frame's original texture image Perform grayscale normalization to obtain the first The grayscale image of the original texture under illumination by a single light source after normalization processing. ; S104: Construct a texture image sequence Each element in the sequence corresponds to a normalized texture image under a specific light source direction.
3. The method for detecting the flatness of a clamping disc based on surface texture image analysis according to claim 2, characterized in that, Step S2 includes: S201: Establish the Lambertian reflection constraint equation between image grayscale values and surface reflection parameters, for the Pixel coordinates under illumination by a single light source Normalized gray value at the location The constraint equations it satisfies are: ; in, Represents pixel coordinates Surface reflectivity at that location Indicates the first The unit illumination direction vector of a light source. Indicates the first Unit illumination direction vector of each light source transpose, Represents pixel coordinates The surface unit normal vector at that location; S202: Surface unit normal vector Expressed as a partial derivative of the surface height function, specifically: ; in, Represents pixel coordinates Surface height function along Partial derivatives in direction, Represents pixel coordinates Surface height function along Partial derivatives in direction; S203: Constructing an energy functional containing a total variational regularization term This is used to constrain the spatial smoothness of the surface normal vectors, specifically: ; in, This represents the energy functional value to be minimized. This represents the weight coefficients of the total variation regularization term. express directional partial derivatives along Gradient of direction, express directional partial derivatives along Gradient of direction, express directional partial derivatives along Gradient of direction, express directional partial derivatives along Gradient of direction; S204: The energy functional value is iteratively optimized using the alternating direction multiplier method, and the surface reflectivity is updated sequentially in each iteration. , directional partial derivatives and directional partial derivatives until the change in the energy functional value is less than the preset convergence threshold. ; S205: Obtained from the optimization solution directional partial derivatives and directional partial derivatives The coordinates of each pixel are calculated using the formula in S202. Surface unit normal vector at the location Construct the surface normal vector field ,in Indicates the width of the image in pixels. This indicates the height of the image in pixels.
4. The method for detecting the flatness of a clamping disc based on surface texture image analysis according to claim 3, characterized in that, Step S3 includes: S301: Extract the gradient field of the surface height function based on the surface normal vector field, and then optimize the solution. directional partial derivatives The horizontal component of the gradient field The optimized solution obtained directional partial derivatives As the vertical component of the gradient field ; S302: Horizontal component of the gradient field and vertical components Perform two-dimensional discrete Fourier transforms to obtain the frequency domain representation. and ,in, Represents the horizontal component of the gradient field In frequency coordinates Frequency domain representation at that location, Represents the frequency index in the horizontal direction and , Represents the frequency index in the vertical direction and , Represents the imaginary unit. Represents the vertical component of the gradient field In frequency coordinates Frequency domain representation at; S303: Construct a high-field frequency domain representation that satisfies integrability constraints within the frequency domain. Specifically: ; in, The height field of the three-dimensional topography of the clamping disk surface is represented in frequency coordinates. Frequency domain representation at; S304: Frequency domain representation of the height field Performing a two-dimensional discrete Fourier inverse transform yields a three-dimensional topographic height map in the spatial domain. Specifically: ; in, Indicates the surface of the clamping disc in pixel coordinates The height value at that location.
5. The method for detecting the flatness of a clamping disc based on surface texture image analysis according to claim 4, characterized in that, Step S4 includes: S401: Establish the equation of the datum plane. Let the general form of the equation of the datum plane be: ; in, Indicates the reference plane at pixel coordinates The height value at that location, In the equation of the reference plane The slope coefficient of the direction, In the equation of the reference plane The slope coefficient of the direction, The intercept coefficients of the equation of the reference plane are represented. S402: Constructing the least squares objective function The coefficient parameters of the datum plane equation are determined by minimizing the sum of squared vertical distances from all discrete points in the 3D topographic height map to the datum plane, specifically: ; in, This represents the value of the objective function to be minimized, which has respect to the slope coefficient. Slope coefficient and intercept coefficient The functional relationship; S403: Regarding the objective function Regarding the slope coefficient respectively Slope coefficient and intercept coefficient Find the partial derivatives and set them to zero, establish a system of normal equations, and solve for the optimal coefficient parameters. , and and bring in ,get ; S404: Calculate the coordinates of each pixel in the 3D topography height map. Vertical distance from discrete points to the reference plane Specifically: ; in, Represents pixel coordinates The perpendicular distance from discrete points at a given location to the reference plane; S405: Extract the maximum value from all vertical distance values. and minimum value Calculate flatness evaluation index Specifically: ; in, This indicates the flatness evaluation index value of the clamping plate. This represents the maximum vertical distance across all pixel coordinates. This represents the minimum vertical distance at all pixel coordinates.
6. A clamp flatness detection system based on surface texture image analysis, characterized in that, include: Sensor data acquisition module: Under the illumination of multiple preset programmable array light sources, a high-resolution image sensor synchronously triggers the acquisition of multiple frames of original texture images of the clamping plate surface with different light vector directions. Stereo vision reconstruction module: Input multiple frames of original texture images with different illumination vector directions into the photometric stereo vision reconstruction model based on total variation regularization. By iteratively solving the pixel-level surface reflectivity and normal partial derivative, the module outputs the surface normal vector field that characterizes the micro-geometric features of the chuck. Height map generation module: It transforms the surface normal vector field into a gradient field, and uses a frequency domain integral operator based on the Frankot-Chellappa algorithm to reconstruct the gradient field through global constraint integration in the frequency domain, outputting a three-dimensional topographic height map of the clamp surface. Flatness evaluation module: Fits the 3D topography height map to a reference plane based on the least squares method, calculates the vertical distance from each discrete point in the height map to the reference plane, and extracts the range of all distance values as an evaluation index to realize the flatness detection of the clamping plate; To achieve the clamp flatness detection method based on surface texture image analysis as described in any one of claims 1-5.
Citation Information
Patent Citations
Socket surface defect detection method and system based on image processing
CN120064298A
Three-dimensional measurement method for non-Lambert metal profile
CN120778034A