Gram determinant-based polarization detection method for micro-defects on metal surface
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NANJING NANTE PRECISE MASCH CO LTD
- Filing Date
- 2026-04-13
- Publication Date
- 2026-06-23
Smart Images

Figure CN122016654B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of metal surface defect detection, and discloses a polarization detection method for micro-defects on metal surfaces based on Gram matrix. Background Technology
[0002] Precision boring of tolerance holes is an important structure on key components in aerospace, precision machinery and other fields. The surface quality of its inner wall directly affects the fitting accuracy, sealing performance and service life. In the traditional precision boring process, factors such as tool wear, cutting parameter fluctuations, insufficient cooling or internal material defects can cause problems. Various micro-defects easily occur on the surface of boreholes, such as axial scratches, spiral scratches, point defects, and material burns or delamination. However, in existing technologies, the inspection of the inner wall of precision-bored tolerance holes is carried out by contact roughness testers or manual visual inspection with industrial endoscopes. Contact methods are inefficient and easily scratch the surface, making it difficult to achieve full inspection. Manual visual inspection is highly subjective, and tiny defects are easily missed. Polarization optical detection technology can obtain micro-structural information of material surfaces and has unique sensitivity to changes in surface roughness, subsurface damage, and changes in material properties. However, existing polarization detection methods usually only analyze a single polarization parameter, failing to fully utilize the complete polarization information carried by reflected light. Furthermore, for deep hole structures such as precision-bored tolerance holes, there is a lack of targeted detection schemes and data processing models, making it difficult to effectively convert polarization information into identification indicators for micro-defects. Summary of the Invention
[0003] The purpose of this section is to outline some aspects of the embodiments of this application and to briefly describe some preferred embodiments. Simplifications or omissions may be made in this section, as well as in the abstract and title of this application, to avoid obscuring the purpose of these documents, and such simplifications or omissions should not be construed as limiting the scope of this application.
[0004] The specific inventive objective of this application is as follows:
[0005] This application aims to solve the technical problems in the existing inspection of the inner wall of tolerance holes in precision boring, such as the low inspection efficiency of contact roughness testers, easy scratching of the surface and difficulty in full inspection, and the high subjectivity of manual visual inspection with industrial endoscopes, which makes it easy to miss small defects.
[0006] To address the aforementioned technical problems, this application provides a method for detecting the polarization of micro-defects on metal surfaces based on Gram matrix.
[0007] On the one hand, this application provides a method for detecting the polarization of micro-defects on metal surfaces based on Gram matrix, including:
[0008] The metal surface is a precision-bored tolerance hole surface, characterized in that it includes:
[0009] S1: Obtain the reflected light intensity data of each pixel on the surface of the precision boring tolerance hole under multiple different polarization illuminations;
[0010] S2: Calculate the defect matrix of each pixel in the precision boring tolerance hole based on the reflected light intensity data;
[0011] S3: Take the four row vectors of the defect matrix corresponding to each pixel of the precision boring tolerance hole as a set of basis vectors, calculate the determinant value of the Gram matrix of the current set of basis vectors, and use it as the Gram determinant value of the current pixel.
[0012] S4: Generate a Gram distribution map based on the Gram determinant values of all pixels;
[0013] S5: Perform image processing on the Gram distribution map to identify and mark the micro-defect areas on the surface of the precision boring tolerance hole.
[0014] As a preferred embodiment of the Gram matrix-based polarization detection method for micro-defects on metal surfaces proposed in this application, wherein:
[0015] The precision boring tolerance hole is located in the area based on the clamping position of the machine tool cradle;
[0016] The precision boring tolerance hole is divided into multiple inspection layers along the axial direction; the polarization inspection probe is controlled to extend into each inspection layer in sequence to perform circumferential scanning of the hole wall of each inspection layer;
[0017] During the circumferential scanning of each detection layer, each micro-element of the aperture wall is sequentially illuminated with illumination light of multiple different polarization states, and the emitted light intensity of at least four different analytical polarization states under each illumination polarization state is collected by the polarization state analyzer to obtain multiple sets of reflected light intensity data for each micro-element.
[0018] Based on the difference in distance between each detection layer and the light source, axial attenuation compensation is performed on the collected reflected light intensity to eliminate the brightness difference caused by the different optical paths.
[0019] As a preferred embodiment of the Gram matrix-based polarization detection method for micro-defects on metal surfaces proposed in this application, wherein:
[0020] The defect matrix solution and Gram determinant calculation in S2 and S3 include:
[0021] Based on the reflected light intensity data after axial attenuation compensation, the defect matrix of each hole wall micro-element is calculated, and the Gram determinant value of each micro-element is calculated.
[0022] Generate annular Gram unfolded images of each detection layer, with the horizontal axis representing the circumferential angle and the vertical axis representing the Gram determinant value; stack the annular Gram unfolded images of each layer along the axial direction to form a grayscale image of the Gram distribution of the pore wall.
[0023] The Gram distribution grayscale image is subjected to directional filtering to enhance the defect features in a specific direction. The filter kernel extending along the axial direction is used to enhance axial scratches, and the filter kernel extending along the spiral direction is used to enhance spiral scratches.
[0024] As a preferred embodiment of the Gram matrix-based polarization detection method for micro-defects on metal surfaces proposed in this application, wherein:
[0025] Defect identification and marking in S5 includes:
[0026] In the directional filtered Gram distribution grayscale image, connected regions with abnormal Gram values are identified as candidate defects;
[0027] Extract the geometric features of candidate defects, including axial length, circumferential span, and extension direction;
[0028] Defects are classified according to their geometric characteristics: those with large axial length, small circumferential span, and extension direction close to the axis are identified as axial scratches; those with large axial length and extension direction consistent with the helix angle are identified as spiral scratches; those with small area and high roundness are identified as point defects; and those with large area, irregular shape, and high Gram abnormal value are identified as material burns or delamination.
[0029] Output the classification results, axial depth position, and circumferential angle position of each defect.
[0030] As a preferred embodiment of the Gram matrix-based polarization detection method for micro-defects on metal surfaces proposed in this application, wherein:
[0031] When solving the defect matrix corresponding to each pixel in S2, for different detection layers of the precision boring tolerance hole, a corresponding incident light instrument matrix is established according to the distance between each layer and the light source, and the measurement data is corrected.
[0032] As a preferred embodiment of the Gram matrix-based polarization detection method for micro-defects on metal surfaces proposed in this application, wherein:
[0033] The Gram determinant value is used to characterize the degree of linear independence among the four row vectors of the defect matrix, and the anomalies in the Gram determinant value are used to identify micro-defects on the surface of the precision boring tolerance hole.
[0034] As a preferred embodiment of the Gram matrix-based polarization detection method for micro-defects on metal surfaces proposed in this application, wherein:
[0035] The axial attenuation compensation includes: measuring the reflected light intensity of a standard sample at multiple different distances in advance, and establishing an attenuation curve of light intensity as a function of distance;
[0036] During detection, the compensation coefficient is obtained by querying the attenuation curve based on the actual distance between the current detection layer and the light source. The collected reflected light intensity is multiplied by the compensation coefficient to eliminate the brightness attenuation caused by the optical path difference.
[0037] As a preferred embodiment of the Gram matrix-based polarization detection method for micro-defects on metal surfaces proposed in this application, wherein:
[0038] The directional filtering process is implemented using a Gabor filter bank, which contains multiple two-dimensional Gabor kernels with different orientations and scales.
[0039] Each layer of the Gram distribution grayscale image is filtered, and the maximum response value in each direction is taken as the enhanced feature map. Among them, the Gabor kernel corresponding to the axial direction is used to enhance axial scratches, and the Gabor kernel corresponding to the spiral direction is used to enhance spiral scratches. The angle of the spiral direction is determined according to the feed helix angle when machining tolerance holes in precision boring.
[0040] As a preferred embodiment of the Gram matrix-based polarization detection method for micro-defects on metal surfaces proposed in this application, wherein:
[0041] When identifying connected regions with abnormal Gram values as candidate defects, an adaptive threshold segmentation method is used:
[0042] Calculate the local mean μ and standard deviation σ of the Gram distribution grayscale image, and set the threshold T = μ + kσ, where k is the preset sensitivity coefficient;
[0043] Pixels with Gram values greater than T are marked as abnormal pixels;
[0044] Perform connected component analysis on abnormal pixels, merge connected components with a distance less than a preset spacing, and remove isolated regions with an area smaller than the minimum defect area to obtain candidate defects.
[0045] As a preferred embodiment of the Gram matrix-based polarization detection method for micro-defects on metal surfaces proposed in this application, wherein:
[0046] Depth correction for establishing the incident light instrument matrix includes:
[0047] The standard reflection sample was placed at different depths in the precision boring tolerance hole, and its response under illumination of various polarization states was measured. The deviation between the instrument matrix elements and the reference depth corresponding to different depths was calculated, and the depth deviation function was fitted.
[0048] During inspection, the pre-calibrated reference instrument matrix is corrected using the depth deviation function based on the current depth position of the inspection layer to obtain the instrument matrix actually used in the current layer, which is then used for defect matrix calculation.
[0049] The beneficial effects of this application are as follows:
[0050] This application constructs a defect matrix for each pixel and calculates the Gram determinant value of its four row vectors, transforming multidimensional polarization information into a quantitative detection index. This achieves highly sensitive detection of micro-defects on the surface of precision-bored tolerance holes. For normally machined surfaces, the Gram determinant value is concentrated. When micro-defects are present, changes in local polarization characteristics lead to abnormal Gram determinant values, effectively amplifying the contrast between micro-defects such as axial scratches, spiral scratches, point defects, material burns, and delamination and the background.
[0051] This application achieves a balance between maximizing the utilization of polarization information and improving detection efficiency by using a defect matrix to fully characterize the polarization response characteristics of the tested surface and introducing Gram determinant as a feature extraction tool. Through a layered circumferential scanning strategy and an axial attenuation compensation mechanism, it achieves comprehensive detection of the inner wall of a precision boring hole with a large depth-to-diameter ratio. The hole wall is divided into multiple detection layers along the axial direction and scanned sequentially. A pre-established attenuation curve is used to correct the light intensity difference between different layers, eliminating the brightness unevenness caused by changes in optical path.
[0052] This application achieves feature enhancement and automatic classification of defects with different orientations by performing directional Gabor filtering on the Gram distribution grayscale image. The filter kernel along the axial direction enhances axial scratches, and the filter kernel along the spiral direction enhances spiral scratches. Combined with geometric feature extraction, it realizes automatic identification of defect types and precise spatial positioning, achieving high efficiency and non-destructive testing. It avoids secondary scratches that may be introduced by contact testing, and the testing efficiency is higher than manual visual inspection or contact roughness sampling. In addition, the Gram determinant value is not only used for abnormal area positioning, but its abnormal amplitude is clearly correlated with the defect type and severity. Combined with geometric features, it can realize fine classification and severity grading of defects. Attached Figure Description
[0053] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained through these drawings without creative effort. Wherein:
[0054] Figure 1 This application provides a flowchart of an overall detection method for polarization detection of micro-defects on metal surfaces based on Gram matrix;
[0055] Figure 2This application provides a data acquisition and axial attenuation compensation process for a polarization detection method for micro-defects on metal surfaces based on Gram matrix.
[0056] Figure 3 This application provides a defect matrix solution and Gram determinant calculation method for a polarization detection method of micro-defects on metal surfaces based on Gram determinant;
[0057] Figure 4 This application provides a Gram distribution grayscale image construction and defect identification and classification method for a polarization detection method of micro-defects on metal surfaces based on Gram determinant.
[0058] Figure 5 Defect images provided in this application for a polarization detection method for micro-defects on metal surfaces based on Gram matrix;
[0059] Figure 6 The three-dimensional Gram distribution map of a polarization detection method for micro-defects on metal surfaces based on Gram determinant provided in this application. Detailed Implementation
[0060] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the specific embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0061] Many specific details are set forth in the following description in order to provide a full understanding of this application. However, this application may also be implemented in other ways different from those described herein. Those skilled in the art can make similar extensions without departing from the spirit of this application. Therefore, this application is not limited to the specific embodiments disclosed below.
[0062] Secondly, the term "an embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of this application. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single embodiment or an embodiment selectively excluded from other embodiments.
[0063] Example 1
[0064] like Figure 1 As shown in the figure, this embodiment provides a polarization detection method for micro-defects on metal surfaces based on Gram matrix.
[0065] The metal surface is a precision-bored tolerance hole surface, characterized in that it includes:
[0066] S1: Obtain the reflected light intensity data of each pixel on the surface of the precision boring tolerance hole under multiple different polarization illuminations;
[0067] S1 is used to control the polarization detection probe to enter the precision boring tolerance hole under the premise of known workpiece spatial pose. It collects the reflected light intensity from the hole wall surface point by point along the axial direction at different depths, circumferential angles, and different illumination polarization states, and performs axial attenuation compensation on the original light intensity to eliminate systematic errors introduced by optical path differences. Figure 2 As shown.
[0068] The precision boring tolerance hole is located in the area based on the clamping position of the machine tool cradle;
[0069] The machine tool cradle refers to the cradle-type turntable equipped in a five-axis linkage CNC machine tool, which constitutes the fourth axis (A axis) and the fifth axis (C axis) of the machine tool. The workpiece to be measured is fixed on the surface of the cradle worktable by a fixture. The cradle can swing and rotate around two orthogonal axes to realize arbitrary posture adjustment of the workpiece in space.
[0070] The clamping position of the machine tool cradle refers to the complete positional data of the workpiece in the machine tool coordinate system, which is recorded and output by the machine tool CNC system after the workpiece is clamped, including translation coordinates and rotation angles.
[0071] Translation coordinates are the three-dimensional coordinates of the workpiece coordinate system origin in the machine tool coordinate system. After the workpiece is clamped, the reference surface of the workpiece is obtained by measuring the workpiece reference surface through the machine tool probe or tool setter and stored in the CNC system.
[0072] The rotation angle is the current angle of the two rotation axes of the cradle turntable, such as the A-axis angle α that swings around the X-axis and the C-axis angle β that rotates around the Z-axis. The angle is read in real time by the encoder of the CNC system.
[0073] Specific area positioning for precision boring tolerance holes includes:
[0074] The area positioning method utilizes the clamping position data of the machine tool cradle, combined with the theoretical coordinates of the tolerance hole to be measured on the workpiece design drawing, to calculate the actual spatial position and axial direction of the tolerance hole to be measured in the machine tool coordinate system. Based on this, the approach path and scanning starting point of the polarization detection probe are planned. The specific implementation steps include:
[0075] Let the workpiece coordinate system be {W} and the machine tool coordinate system be {M}. Based on the translation coordinates in the clamping position of the machine tool cradle... Given the rotation angles (α, β), construct the homogeneous transformation matrix from the workpiece coordinate system to the machine tool coordinate system. The homogeneous transformation matrix can be expressed as a composite of translation and rotation transformations:
[0076]
[0077] in, Represents the translation transformation matrix. This represents the rotation transformation matrix for rotating about the X-axis of the machine tool coordinate system by an angle α. This represents the rotation transformation matrix for rotating about the Z-axis of the machine tool coordinate system by an angle β. The transformation matrix satisfies the following condition for any point in the workpiece coordinate system: Its coordinates in the machine tool coordinate system for:
[0078]
[0079] Read the geometric definition parameters of the precision boring tolerance hole from the 3D CAD model of the workpiece:
[0080] Coordinate vector of the center point of the hole in the workpiece coordinate system
[0081] Unit vector of the hole's axial direction , perpendicular to the plane of the orifice;
[0082] The diameter D and depth L of the hole.
[0083] Substitute the coordinate vector of the hole center point in the workpiece coordinate system and the unit vector of the hole's axis direction into the homogeneous transformation matrix to calculate the actual coordinates of the hole center in the machine tool coordinate system:
[0084]
[0085] Right now:
[0086] Where R is the rotation matrix consisting of rotation angles (α, β), and T is the translation vector. For the axial direction vector, only a rotation transformation needs to be applied (the direction vector is unaffected by translation):
[0087]
[0088] This yields the actual center coordinates of the hole in the machine tool coordinate system. and the actual axis direction .
[0089] The position vector of the center point of the orifice is used as the coordinate of the center of the orifice in the workpiece coordinate system. Preferably, a 3×1 column vector can be used.
[0090] The unit vector representing the direction of the hole axis indicates the direction of the hole's central axis in the workpiece coordinate system. Preferably, a 3×1 unit column vector can be used.
[0091] Based on the calculated actual orifice center coordinates and axis direction, an automatic approach path for the polarization detection probe is generated:
[0092] First, move the probe to a safe distance point above the center of the orifice along the axial direction. The coordinates of this point are: ,in To set a safe distance, a value of 20-50mm can be used.
[0093] Furthermore, control the probe along the axial direction The probe is slowly inserted into the hole at a low speed, while the depth is monitored in real time by the displacement sensor built into the probe or by the machine tool feed axis, until the predetermined depth of the first detection layer is reached.
[0094] If the hole axis is not parallel to the machine tool coordinate axis, the probe axis can be aligned with the hole axis by adjusting the probe angle mechanism, or the workpiece posture can be adjusted by using a cradle turntable to make the hole axis parallel to the probe axis.
[0095] Through the above-mentioned area positioning, an automated connection is achieved from workpiece clamping to precise addressing of the detection target, ensuring that the probe can accurately enter the hole to be tested and perform scanning according to the predetermined trajectory.
[0096] The precision boring tolerance hole is divided into multiple inspection layers along the axial direction; the polarization inspection probe is controlled to extend into each inspection layer in sequence to perform circumferential scanning of the hole wall of each inspection layer;
[0097] The precision boring tolerance hole is divided into multiple detection layers along the axial direction. The polarization detection probe is controlled to extend into each detection layer in sequence to perform circumferential scanning of the hole wall of each detection layer.
[0098] The detection layer consists of several annular cross-sectional layers perpendicular to the axis along the direction of the precision boring tolerance hole. Each layer corresponds to an axial depth position of the hole wall. Dividing the detection layer is used to discretize the continuous curved surface of the deep hole inner wall into a series of cross-sections that are easy to scan, so as to achieve full coverage detection of the entire hole wall.
[0099] The division of the detection layer includes the effective depth of field of the probe and the detection resolution requirements.
[0100] The effective depth of field of the probe is defined by the fact that the optical system of the polarization detection probe has a limited depth of field range, i.e., the axial distance at which clear imaging is possible. The layer thickness is no greater than the probe's depth of field, ensuring that the aperture wall can be clearly imaged during each layer scan. Let the probe's depth of field be... Then the layer thickness Δz ≤ .
[0101] The detection resolution requirement is based on the minimum axial dimension of the micro-defect to be detected, such as the minimum detectable scratch length. The axial sampling interval should not be greater than 1 / 2 of the minimum defect size to avoid missed detection. Let the minimum defect axial dimension be δmin, then the layer thickness Δz ≤ δmin / 2.
[0102] The specific division method is as follows: let the total depth of the hole be L, which is the axial distance from the hole opening plane to the hole bottom plane, and determine the axial sampling layer thickness Δz. The smaller of δmin / 2 and the number of layers N is:
[0103] N=⌈ ⌉
[0104] Where ⌈⋅⌉ represents rounding up.
[0105] The axial position of each detection layer is determined as follows: if scanning starts from the orifice, the center depth of the first layer is z1 = Δz / 2, and the center depth of the kth layer (k = 1, 2, ..., N) is zk = z1 + (k−1) × Δz
[0106] To ensure the continuity of data between layers, an overlapping area can be set between adjacent detection layers, with the overlap typically being 10% to 20% of Δz. In this case, the actual layer thickness scanned is slightly greater than the sampling interval, but the center-to-center distance remains Δz.
[0107] In each detection layer, the polarization detection probe is controlled to perform a circumferential scan, and the specific steps are as follows:
[0108] The probe moves along the hole axis to the set depth zk of the current detection layer. This position can be locked by a ball screw driven by a servo motor, and the positioning accuracy is ensured by closed-loop feedback from a displacement sensor.
[0109] Furthermore, the probe rotates 360° circumferentially around the bore axis. The rotation can be performed in one of the following two modes:
[0110] The probe itself is driven by a miniature rotary motor to rotate around its axis, while simultaneously collecting the reflected light intensity around the aperture wall. This mode is suitable for applications where the probe diameter is small and it can rotate freely.
[0111] Another preferred mode is to keep the probe in a fixed direction facing the hole wall, and drive the workpiece to rotate around its axis by the machine tool cradle turntable to achieve relative circumferential scanning. This mode is suitable for occasions where the workpiece size is small and the cradle has sufficient load-bearing capacity.
[0112] During rotation, the built-in illumination and imaging systems of the probe work synchronously. If step scanning is used, the 360° circumference is evenly divided into M sampling angles, with each angle stepping Δθ, for example, Δθ=1°, and a micro-element of data is collected at each angle position. If continuous scanning is used, the encoder synchronously records the angle position and light intensity data to form a continuous circumferential light intensity curve.
[0113] Furthermore, after completing the circumferential scan of the current detection layer, the probe moves axially to the next detection layer depth zk+1, and the above steps are repeated until all N layers have been scanned.
[0114] During the circumferential scanning of each detection layer, each micro-element of the aperture wall is sequentially illuminated with illumination light of multiple different polarization states, and the emitted light intensity of at least four different analytical polarization states under each illumination polarization state is collected by the polarization state analyzer to obtain multiple sets of reflected light intensity data for each micro-element.
[0115] A preferred example: ,in,
[0116] The original polarization state of the light source at the incident end;
[0117] W represents the instrument matrix at the incident end;
[0118] M is the defect matrix of the sample to be tested, which is the Mueller matrix and is used to fully describe the polarization response characteristics of the surface under test.
[0119] A represents the instrument matrix at the output end;
[0120] This represents the actual light intensity value measured by the detector.
[0121] It is important to note that This represents the original polarization state of the incident light source, used to describe the polarization state output by the polarization generator under ideal design conditions.
[0122] A 4×1 column vector
[0123] In the form of
[0124] For example, the data examples for the four illumination states adopted in this application are as follows:
[0125] Horizontal linear polarization: ;
[0126] Vertical linear polarization: ;
[0127] 45° linear polarization: ;
[0128] Right-handed circular polarization: ;
[0129] For each incident polarization state, by switching the four analysis states of A, four light intensity measurements are obtained, resulting in a total of 16 measurements. These measurements form 16 linear equations about M, which can then be used to uniquely solve for all elements of M.
[0130] W is a 4×4 incident instrument matrix used to describe the original polarization state of the light source. The polarization state that is actually irradiated onto the sample surface Linear transformation relationship between them: .
[0131] M is the defect matrix of the sample to be tested, represented as follows:
[0132]
[0133] in, Total intensity reflectivity;
[0134] , , This is the modulation of the total outgoing intensity by the incident polarization state;
[0135] , , The dependence of the outgoing polarization state on the total incident intensity;
[0136] Other elements: describe the properties of dichroism, birefringence, and depolarization;
[0137] When micro-defects (scratches, burns, delamination) exist on the surface, certain elements of M undergo local changes, which in turn affect the Gram determinant value.
[0138] A represents the instrument matrix at the output end. If a single light intensity is measured, the dimension is a 1×4 row vector; if multiple analytical states are measured, the dimension is a 4×4 matrix.
[0139] At each circumferential micro-element of each detection layer, i.e., at each sampling angle position, multi-polarization illumination and reflected light acquisition are performed.
[0140] Multiple different polarization states include at least four linearly independent polarization states to ensure that a complete 4×4 Mueller matrix can be calculated. In this application, the following four polarization states are used as the standard illumination combination:
[0141] Horizontal linear polarization (0° linear deflection);
[0142] Vertical linear polarization (90° linear deflection);
[0143] 45° linear polarization (45° linear deflection);
[0144] Right-handed circular polarization.
[0145] The polarization state is generated by a polarization state generator, which is composed of a linear polarizer and a rotatable waveplate, and can quickly switch the output polarization state.
[0146] For a specific circumferential micro-element within a detection layer, the acquisition methods include:
[0147] The lighting system outputs a beam of light with the first polarization state to illuminate the current micro-element;
[0148] The imaging system collects the intensity of reflected light and records it as... ;
[0149] The lighting system switches to the second polarization state to illuminate the same micro-element;
[0150] The imaging system collects the intensity of reflected light and records it as... ;
[0151] Switching sequentially to the 3rd and 4th polarization states, and collecting data respectively. and .
[0152] Thus, a set of reflected light intensity values of this micro-element under illumination with different polarization states were obtained. .
[0153] The probe rotates to the next circumferential micro-element (θ+Δθ), and the above multi-polarization illumination and acquisition process is repeated until all circumferential micro-elements of the detection layer are completed.
[0154] Once all detection layers have been scanned, a four-dimensional data cube will be obtained: axial layer number N × circumferential angle number M × polarization state number P (P≥4).
[0155] Based on the difference in distance between each detection layer and the light source, axial attenuation compensation is performed on the collected reflected light intensity to eliminate the brightness difference caused by the different optical paths.
[0156] Both axial attenuation compensation and incident light instrument matrix depth correction are based on systematic errors introduced by depth variations. Axial attenuation compensation affects the light intensity amplitude, while the incident light instrument matrix affects the polarization state distribution. To avoid mutual interference during the compensation process, this application adopts a step-by-step decoupling correction strategy:
[0157] Light intensity amplitude correction is prioritized. First, the original light intensity is compensated for using the attenuation curve η(z) calibrated by the standard sample block to eliminate light intensity attenuation caused by distance.
[0158] The polarization state correction independent calibration is based on the light intensity after amplitude correction. By measuring the standard reflection sample at different depths, the depth variation deviation of the incident light instrument matrix is solved and the deviation function ΔW(z) is fitted.
[0159] After calibration, the standard sample is remeasured to verify the consistency of its defect matrix at different depths, ensuring that the two calibrations do not introduce new systematic errors into each other.
[0160] Because the light beam emitted by the light source attenuates as it propagates through the air, and because different detection layers on the aperture wall are at different distances from the light source, the light intensity collected at different depths on surfaces with the same reflective properties will differ. If this difference is not corrected, it will be misjudged by subsequent algorithms as a change in surface properties, thus introducing detection errors.
[0161] The purpose of axial attenuation compensation is to eliminate the brightness difference caused by different optical paths through a mathematical model, so that micro-elements of the same material and surface condition have a consistent light intensity response at different depths.
[0162] Prepare a standard reflective sample block. The sample block is made of the same material as the workpiece to be tested, and its surface is treated to ensure that its reflective characteristics are uniform and stable.
[0163] Place the standard sample block inside the precision boring tolerance hole and measure it point by point from the hole opening to the bottom of the hole.
[0164] At each depth location z, using the exact same lighting system, the reflected light intensity of the standard sample was collected. The average value of multiple measurements is taken to improve the signal-to-noise ratio.
[0165] At the orifice, the reference depth ,Pick =0, with light intensity Using this as a reference, calculate the attenuation coefficient η(z) at each depth z:
[0166]
[0167] The coefficient reflects the factor of light intensity attenuation caused by the increase in optical path length.
[0168] The attenuation coefficient η(z) at each depth is fitted to a continuous function η=f(z). The fitting can employ a quadratic polynomial, an exponential attenuation model, or spline interpolation, depending on the actual attenuation pattern. For example, if the attenuation approximately follows the inverse square law, the following can be used:
[0169]
[0170] Where d is the optical path constant from the light source to the reference plane (at the aperture).
[0171] Furthermore, during the detection process, regarding the current detection layer depth... Based on the pre-calibrated attenuation curve f(z), the attenuation coefficient η corresponding to that depth is queried. ).
[0172] The original reflected light intensity collected by the detection layer p represents the polarization state index. Multiplying this by the attenuation coefficient yields the corrected light intensity.
[0173]
[0174] The corrected light intensity data is used as the effective data for this layer and stored in the data cube for subsequent defect matrix calculation.
[0175] To ensure effective compensation, the standard sample can be remeasured at different depths after calibration, and the consistency of the corrected light intensity can be calculated. If the compensation is accurate, the corrected light intensity for the standard sample will be... The fluctuation range remains within a preset threshold, regardless of depth. The preset threshold can be ±2%. If the fluctuation exceeds the threshold, the number of calibration points can be increased to optimize the process.
[0176] Axial attenuation compensation is used to eliminate the light intensity amplitude attenuation caused by optical path difference, while incident light instrument matrix depth correction is used to compensate for polarization state drift caused by optical path change. Both are based on the same depth calibration data. First, light intensity amplitude compensation is performed, and then polarization state correction is performed to ensure the consistency of the amplitude and polarization information of the measurement data.
[0177] S2: Calculate the defect matrix of each pixel of the precision boring tolerance hole based on the reflected light intensity data.
[0178] When solving the defect matrix corresponding to each pixel in S2, for different detection layers of the precision boring tolerance hole, a corresponding incident light instrument matrix is established according to the distance between each layer and the light source, and the measurement data is corrected.
[0179] S2: Calculate the defect matrix of each pixel of the precision boring tolerance hole based on the reflected light intensity data.
[0180] After completing the data acquisition and axial attenuation compensation in step S1, the reflected light intensity data of each pixel under different polarization states of illumination were obtained. The light intensity data contains the response information of the tested surface to incident light of different polarization states. In order to convert the information into a feature quantity that can be used for defect identification, it is necessary to solve the defect matrix of each pixel. The defect matrix, namely the Mueller matrix, is a 4-row, 4-column real number matrix used to fully describe the polarization transformation characteristics of the tested surface to incident light, including the ability to change the polarization state, depolarization effect, and microstructure information such as phase delay. Since surface micro-defects, such as scratches, burns, and material delamination, will cause local microstructure changes, thereby changing the polarization response of the region, the defect matrix can be used as a sensitive feature quantity for identifying micro-defects.
[0181] In practical testing systems, polarization state generators and polarization state analyzers inevitably suffer from manufacturing errors and assembly deviations. Furthermore, when the probe penetrates to different depths within the hole, changes in the beam propagation path cause a slight drift in the polarization state of the actual point of illumination. If this depth-dependent polarization state change is not corrected, the calculated defect matrix will contain systematic errors, reducing the reliability of defect detection. Therefore, this application first calibrates the incident light instrument matrix before calculating the defect matrix.
[0182] In polarization measurement, the instrument matrix is used to describe the transformation relationship of the measurement system to the polarization state. The incident light instrument matrix reflects the transformation relationship from the original polarization state of the light source to the actual polarization state of the point being measured, including the combined influence of all polarization elements in the polarization state generator and the light propagation path on the polarization state. The outgoing light instrument matrix describes the transformation relationship from the reflected light at the point being measured to the signal received by the detector, including the influence of the polarization elements in the polarization state analyzer.
[0183] During the system calibration phase, the measurement system is first calibrated at the orifice. During calibration, standard polarization elements with known Mueller matrices, such as air gaps or polarizers, are used to obtain the reference incident light instrument matrix and the reference output light instrument matrix through multiple measurements. The reference instrument matrix represents the polarization characteristics of the system under ideal conditions. Since the polarization state analyzer is fixed inside the probe, the output light instrument matrix does not change with the probe depth and can therefore be considered a constant value. However, the incident light instrument matrix will drift due to changes in optical path and needs to be corrected according to the depth.
[0184] It should be noted that the example for obtaining the defect matrix of the standard sample is as follows;
[0185] The standard sample was measured 10 times. After correction, the light intensity fluctuation was ≤±2%, and the standard deviation of each element in the calculated defect matrix was ≤0.01, which proves that the system calibration accuracy meets the detection requirements.
[0186] Furthermore, the standard reflection template is an optical reference block with a known and stable Mueller matrix. The standard template is used as a known quantity in the calibration: by measuring the light intensity response of the standard template at different depths, and combining the known Mueller matrix of the standard template and the reference outgoing light instrument matrix, the incident light instrument matrix at the current depth is obtained, and the correspondence between the depth and the incident light instrument matrix is established.
[0187] To establish the correspondence between depth and the incident light instrument matrix, multi-depth calibration is required. A preferred implementation method includes:
[0188] A standard reflective sample is placed at different depths within a precision-bored tolerance hole, covering the entire depth range. At each depth, a multi-polarization illumination and light intensity acquisition process is executed: the illumination system sequentially outputs multiple linearly independent polarization states to illuminate the standard sample; the receiving system acquires the reflected light intensity under each polarization illumination state, obtaining a set of light intensity values. To suppress noise, the measurement can be repeated multiple times at each depth and the average value can be taken, thereby obtaining the light intensity response data of the standard sample at each depth and each incident polarization state.
[0189] For each depth position, based on the measured light intensity response, the known standard template Mueller matrix, and the reference outgoing light instrument matrix, a mathematical relationship can be established between the light intensity and the unknown incident light instrument matrix. Since the characteristics of the standard template are known, the mathematical relationship is a system of linear equations, where the unknowns are the elements of the incident light instrument matrix. By solving the system of linear equations, the incident light instrument matrix at the current depth can be obtained.
[0190] The current depth incident light instrument matrix is compared with the reference incident light instrument matrix, and the deviation of each corresponding element is calculated. The deviation can be an absolute difference or a relative change, and the specific form depends on the actual physical laws. The deviation is quantitatively used to reflect the degree of polarization state drift of the incident light caused by the change in depth.
[0191] In this application, a preferred method for establishing the depth deviation function includes:
[0192] The calculated deviations of the instrument matrix elements at various depths are correlated with the corresponding depth values. A continuous function of deviation versus depth is established through data fitting. The fitting principle is that as the optical path length increases, the divergence angle of the beam changes, causing non-ideal polarization; the inhomogeneity of the air medium introduces a slight birefringence effect; and the influence changes continuously with depth. Therefore, fitting methods such as polynomial fitting and spline interpolation can be used to construct the mapping relationship between depth and deviation.
[0193] In the actual detection process, for the current depth position of the detection layer, the deviation of each element of the incident light instrument matrix at the current depth relative to the reference value is first calculated according to the established depth deviation function. Then, each element of the reference incident light instrument matrix is corrected according to the calculated deviation to obtain the actual incident light instrument matrix applicable to the current depth.
[0194] The correction can be made by adding the deviation to the baseline value or by multiplying the baseline value by a correction factor, depending on the definition of the deviation.
[0195] The corrected incident light instrument matrix and the constant reference outgoing light instrument matrix together constitute the complete measurement system instrument matrix of the current detection layer, which is used to solve the defect matrix of all pixels in the current layer.
[0196] In this application, a preferred method for solving the defect matrix includes:
[0197] Since only four polarization states of illumination are used in actual measurements, and no polarization analysis is performed at the output end, directly solving the Mueller matrix with 16 unknowns is an underdetermined problem. Therefore, this application utilizes the prior constraint that the surface of the precision-bored tolerance hole is approximately isotropic in the defect-free region, and its Mueller matrix contains only 4 independent parameters. Simultaneously, combined with the spatial continuity constraint of adjacent micro-elements in the same detection layer, a regularization method is used to solve the underdetermined equation system, thereby uniquely determining the defect matrix of each pixel.
[0198] This application employs a preferred example: the Tikhonov regularization method, which combines two prior constraints: isotropic constraint and spatial continuity constraint.
[0199] The isotropic constraint applies to the defect-free region, where the tested surface approximately satisfies the isotropic assumption. Its Mueller matrix has a special structure with no more than four independent parameters. Regularization terms are constructed as follows: ,in The optimal fit for the isotropic model within the current pixel neighborhood is given by M, where M is the defect matrix. is the Frobenius norm, representing the square root of the sum of the squares of the elements of the matrix.
[0200] The spatial continuity constraint requires that the defect matrix of adjacent pixels should change continuously, and a regularization term is constructed accordingly. Where N(i) represents the spatial neighborhood of pixel i, , Let be the defect matrix of pixel i and its neighboring pixel j.
[0201] Finally, solve the optimization problem:
[0202] M^=
[0203] in , The regularization coefficient is determined through cross-validation. This optimization problem can be solved efficiently using iterative least squares or gradient descent. The strength of the isotropic constraint is such that the larger the value, the more isotropic the solution tends to be. M represents the strength of the spatial continuity constraint; the larger the value, the smoother the solution. M^ is the estimated value of the defect matrix obtained from the optimization solution.
[0204] It should be noted that, This is the data fitting term, which measures the deviation between the model's predicted light intensity and the actual measured light intensity. and As a regularization term, physical priors and spatial continuity are introduced.
[0205] For each pixel, the reflected light intensity data has been compensated for by the axial attenuation of S1 to eliminate the light intensity amplitude attenuation. By combining the depth-corrected incident light instrument matrix with the known reference output light instrument matrix and the original polarization state of the light source corresponding to each incident polarization state (i.e., the known design value), the relationship between the reflected light intensity and the defect matrix to be determined at each pixel is established. Since multiple different polarization states of illumination are used, multiple equations can be obtained. By combining the equations to form a linear equation system, solving the linear equation system yields all 16 elements of the defect matrix of that pixel.
[0206] The defect matrix solution and Gram determinant calculation in S2 and S3 include:
[0207] Based on the reflected light intensity data after axial attenuation compensation, the defect matrix of each hole wall micro-element is calculated, and the Gram determinant value of each micro-element is calculated.
[0208] The axial attenuation compensation includes: measuring the reflected light intensity of a standard sample at multiple different distances in advance, and establishing an attenuation curve of light intensity as a function of distance;
[0209] During detection, the compensation coefficient is obtained by querying the attenuation curve based on the actual distance between the current detection layer and the light source. The collected reflected light intensity is multiplied by the compensation coefficient to eliminate the brightness attenuation caused by the optical path difference.
[0210] After completing the data acquisition in step S1, the reflected light intensity data after axial attenuation compensation is obtained. Steps S2 and S3 perform core mathematical transformations and feature extraction based on this data. Specifically, they include: solving the defect matrix of each hole wall micro-element from the reflected light intensity data after axial attenuation compensation, and calculating the Gram determinant value of each micro-element.
[0211] In this application, a preferred method for axial attenuation compensation includes:
[0212] like Figure 3 As shown, since the light source of the polarization detection system is located outside the aperture, the light beam needs to propagate through the air medium to different depths inside the aperture. When the light intensity propagates in a uniform medium, it decreases according to the inverse square law of distance. That is, the farther the propagation distance, the weaker the light intensity reaching the surface being measured. The geometric constraints of the aperture wall may cause some of the light beam to be blocked or scattered, further aggravating the change in light intensity with depth. The brightness attenuation caused by the difference in optical path means that areas of the same material and the same surface condition exhibit different light intensity measurement values at different depths. If this is not corrected, it will be misjudged by the subsequent algorithm as a difference in surface characteristics, thus introducing detection error.
[0213] Axial attenuation compensation is used to eliminate the influence of optical path variation on light intensity amplitude through a pre-established attenuation model, so that the corrected light intensity data only reflects the true reflection characteristics of the measured surface.
[0214] Axial attenuation compensation is achieved through a two-step method of pre-calibration and real-time correction:
[0215] The pre-calibration is used to establish the attenuation curve of light intensity as a function of distance;
[0216] Select a standard reflective sample block, made of the same material as the workpiece to be measured, with a precision-machined surface to ensure uniform and stable reflective characteristics. The reflectivity of this sample block should remain constant during the measurement process and serve as a known reference for calibration.
[0217] Place the standard sample block in the precision boring tolerance hole and measure it sequentially from the hole opening to the bottom of the hole at different depths. The different depths should correspond one-to-one with the detection layer depth during actual testing, or cover the entire depth range. At each depth, keep the output intensity, polarization state, and exposure time of the imaging system completely consistent with those during the actual testing. Collect the reflected light intensity of the standard sample block. If random noise is suppressed, each position can be measured multiple times and the average value can be taken.
[0218] Furthermore, using the light intensity measurement at the aperture as a benchmark, the proportional relationship between the light intensity at other depths and the benchmark value is calculated. The law of how the proportional relationship changes with depth is the axial attenuation characteristic of the light intensity. The discrete depth-light intensity proportional relationship can be fitted into a continuous curve, which is the attenuation curve, by polynomial fitting, exponential attenuation fitting, or spline interpolation. The attenuation curve is used to describe the degree of attenuation of the light intensity at any depth relative to the benchmark depth.
[0219] Furthermore, real-time calibration performs light intensity compensation based on the depth of the detection layer;
[0220] During the formal inspection process, for the currently scanned inspection layer, the actual distance between the inspection layer and the light source, i.e. the current depth position, is obtained through feedback from displacement sensors or machine tool feed axes.
[0221] Based on the current depth position, find the corresponding light intensity ratio value on the pre-established attenuation curve. The reciprocal of the ratio value is the compensation coefficient, which indicates how many times the original light intensity needs to be amplified to restore the light intensity level at the reference depth.
[0222] The corrected light intensity value is obtained by multiplying all the original reflected light intensity data collected by the current detection layer, including the light intensity under different circumferential angles and different illumination polarization states, by the compensation coefficient.
[0223] Through the above compensation, for the standard sample block, the corrected light intensity at different depths should be basically consistent, and the fluctuation range should be controlled within the preset tolerance range.
[0224] After compensation, the systematic brightness difference in the light intensity data is eliminated, so that the defect matrix calculated by the light intensity is only related to the surface microstructure and not to the measurement depth. This ensures that the defect matrices calculated at different depths are comparable, making Gram determinant defect detection applicable to the entire hole depth range and avoiding false detections or missed detections caused by changes in illumination conditions.
[0225] After completing the axial attenuation compensation, the defect matrix calculation process can begin: using the corrected multi-polarization state light intensity data, combined with the depth-corrected incident light instrument matrix, the defect matrix of each hole wall micro-element is calculated through the basic relationship of polarization optics; then, the four row vectors of the defect matrix are extracted, and their Gram determinant values are calculated as a quantitative index characterizing the polarization response characteristics of the micro-element.
[0226] Generate annular Gram unfolded images for each detection layer, with the horizontal axis representing the circumferential angle and the vertical axis representing the Gram determinant value; stack the annular Gram unfolded images of each layer along the axial direction to form a grayscale image of the Gram distribution on the pore wall, such as... Figure 4 As shown;
[0227] The Gram distribution grayscale image is subjected to directional filtering to enhance the defect features in a specific direction. The filter kernel extending along the axial direction is used to enhance axial scratches, and the filter kernel extending along the spiral direction is used to enhance spiral scratches.
[0228] Considering that the helix angle may fluctuate slightly during actual processing, and that the defect orientation may deviate from the theoretical helix angle, this application introduces a direction tolerance mechanism when constructing the Gabor filter bank:
[0229] Multiple directional parameters are set near the theoretical helix angle φ, such as φ−Δθ, φ, φ+Δθ, where Δθ is a preset angular step size such as 5°, forming a directional coverage zone.
[0230] After multi-directional filtering of the Gram distribution grayscale image, the maximum value of the response in each direction is taken as the enhancement result, ensuring that effective enhancement can still be obtained when there is a certain deviation between the actual direction and the theoretical value.
[0231] The directional tolerance range can be dynamically adjusted according to the stability of the processing technology.
[0232] After calculating the Gram determinant value of each pixel, the discrete values are organized and visualized according to their spatial location to form a Gram distribution map that can be used for image processing and analysis. For the structural characteristics of precision boring tolerance holes, this application adopts a ring-shaped unfolding and axial stacking method to construct a Gram distribution grayscale map and performs directional filtering to enhance the micro-defect features of specific orientations.
[0233] A ring-shaped Gram unfolded diagram is a visual representation of the Gram determinant values of all circumferential micro-elements within a single detection layer;
[0234] A preferred construction method is based on the principle of cylindrical surface unfolding. The cylindrical surface of the hole wall is cut along a generatrix and flattened into a plane, so that the circumferential angle is mapped to the horizontal coordinate and the axial depth is mapped to the vertical coordinate. For a single detection layer, since the axial depth is fixed, only the circumferential dimension needs to be considered.
[0235] Specifically, for the k-th detection layer, its circumferential scan covers a complete circle from 0° to 360°, and a total of M circumferential micro-elements are collected. Each micro-element corresponds to a circumferential angle θi (i=1,2,…,M). The Gram determinant value g(θi) calculated for each micro-element is used as the vertical axis value, and the circumferential angle θi is used as the horizontal axis to construct the annular Gram unfolded diagram of the detection layer. The Gram unfolded diagram is a one-dimensional signal curve, with the horizontal axis representing the circumferential position and the vertical axis representing the magnitude of the Gram determinant value.
[0236] The geometric meaning of the annular Gram unfolded diagram is that it fully records the quantitative index of the polarization characteristics of each point on the circumference of the current inspection layer. In the normal processing area, the Gram determinant value fluctuates steadily within a certain range, forming a background signal. When there are micro-defects, the Gram determinant value at the circumferential angle where the defect is located will deviate from the background value, which is manifested as abnormal peaks or valleys on the curve. Due to the circumferential continuity of the precision boring tolerance hole, the Gram unfolded diagram can reflect the circumferential position and degree of abnormality of the defect.
[0237] Furthermore, the Gram distribution grayscale image is a two-dimensional image formed by stacking the annular Gram unfolded images of all detection layers along the axial direction, realizing panoramic visualization of the Gram determinant values on the surface of the pore wall.
[0238] An example of a preferred definition and stacking of the axial direction includes: the axial direction of the precision-bored tolerance hole is defined as the depth direction, with the positive axial direction being from the hole opening to the hole bottom; the detection layers are arranged in depth order, with the first layer near the hole opening placed at the top or bottom of the image, and the last layer at the hole bottom placed at the opposite end; for each detection layer k, a depth is defined. If the ring-shaped Gram unfolded image is used as a row or column of the image, then the unfolded images of all detection layers are arranged along the axis to form a complete two-dimensional image.
[0239] In the two-dimensional image, the horizontal axis represents the circumferential angle, and the vertical axis represents the axial depth, i.e., from the orifice opening to the bottom. The grayscale value of each pixel represents the Gram determinant value of that micro-element. The resulting Gram distribution grayscale image compresses the three-dimensional spatial information of the orifice wall onto a two-dimensional plane while completely preserving the spatial distribution characteristics of the Gram determinant values. Figure 6As shown, this is a three-dimensional Gram distribution map of the tolerance hole wall in precision boring. The vertical axis is clearly marked as the axial depth (mm). The three-dimensional Gram distribution map is constructed by stacking the annular Gram unfolded maps of each detection layer along the axial direction of the hole. The horizontal axis is the circumferential angular dimension. The gray value at each position in the map corresponds to the Gram determinant value of the pixel. The gray value is uniform in the normal processing area. The micro-defect area shows gray value characteristics that are clearly distinguishable from the background due to the abnormal Gram determinant value. Different types of defects, such as axial scratches, spiral scratches, and point defects, will show corresponding gray value distribution patterns in the map, such as axial stripes, oblique stripes, and isolated spots.
[0240] The physical meaning of the Gram distribution grayscale image is as follows: normal processing areas appear as background areas with uniform grayscale; axial scratches appear as strip-shaped abnormal areas extending along the longitudinal axis; spiral scratches appear as strip-shaped abnormal areas extending obliquely, with the tilt angle consistent with the spiral angle of the processing feed; point defects appear as isolated spot-shaped abnormal areas; and material burns or delamination appear as abnormal areas with large areas and irregular shapes.
[0241] In this application, a preferred implementation method for directional filtering includes:
[0242] Directional filtering involves designing a filter kernel with a specific orientation, enabling the kernel to strongly respond to features in the image that align with the current orientation, while suppressing noise and background from other directions. In the detection of micro-defects in precision boring tolerance holes, axial scratches and spiral scratches exhibit obvious directional characteristics. Using directional filtering can effectively enhance the contrast between these defects and the background, thereby improving detection sensitivity.
[0243] Specifically, the filter kernel, also known as the convolution kernel, is a two-dimensional matrix used in image processing to perform convolution operations.
[0244] The working principle of the convolution kernel is as follows: the filter kernel slides pixel by pixel on the image, and the gray values of each pixel and its neighborhood are weighted and summed to obtain the new value of the current pixel. The coefficient distribution of the filter kernel determines the response characteristics to different image features.
[0245] The coefficients of a directional filter kernel are distributed in an extended manner in a specific direction, which enhances the features along that direction in the convolution operation, while suppressing the features perpendicular to that direction. For example, a filter kernel extending in a vertical direction responds strongly to vertical stripes but weakly to horizontal stripes.
[0246] Axial scratches appear as strip-shaped abnormal regions extending along the vertical axis (axial direction) in the Gram distribution grayscale image. The characteristics of the strip-shaped abnormal regions can be enhanced by designing a filter kernel that extends along the axial direction. That is, the size of the filter kernel is longer in the vertical direction (axial direction) and shorter in the horizontal direction (circumferential direction).
[0247] It should be noted that when there are axially extending strip-shaped features in the image area covered by the filter kernel, the convolution result will produce a large response value because the coefficient distribution of the filter kernel is consistent in the vertical direction. However, for isolated noise points or random textures in the circumferential direction, the response value is small because it does not match the extension direction of the filter kernel. The pixel gray value of the axial scratch area can be enhanced, while the background noise is suppressed.
[0248] By employing a Gaussian filter kernel, the standard deviation in the axial direction is larger, resulting in a wide coverage, while the standard deviation in the circumferential direction is smaller, focusing on local areas. This achieves directional enhancement of axial features. In the enhanced feature map generated after filtering, axial scratches appear as continuous stripes with gray values higher than the background.
[0249] The specific implementation methods for the filter kernel extending along the spiral direction and the enhancement of the spiral scratch include:
[0250] Spiral scratches are defects on the spiral trajectory formed by the tool feed motion on the hole wall. In the Gram distribution grayscale image, they appear as oblique strip-shaped abnormal areas at a certain angle to the axis. The angle is determined by the feed helix angle during fine boring and can be known in advance through machining parameters.
[0251] To enhance the spiral scratches, a filter kernel extending along the spiral direction is specifically implemented as follows: using a standard axial filter kernel as a reference, the tool is rotated to the same direction as the spiral angle through image rotation transformation. The rotated filter kernel has extensibility in the oblique direction, maximizing the feature response of the filter kernel to the spiral direction.
[0252] The direction of the filter kernel matches the direction of the spiral scratch. When the filter kernel covers the spiral scratch area, the convolution operation generates a response because the extension direction of the filter kernel is consistent with the scratch direction; for textures or noise in other directions, the response is weaker.
[0253] A preferred method for implementing directional filtering includes: filter kernel design, convolution operation, response fusion, and feature map generation.
[0254] A preferred example of filter core design is as follows: based on the directional characteristics of the defect to be enhanced, a set of directional filter cores is designed. For axial scratches, an axial filter core is designed; for spiral scratches, a filter core in the corresponding direction is designed according to the actual spiral angle. In specific implementation, multiple filter cores of different sizes can be designed to match defects of different lengths.
[0255] A preferred example of convolution operation is as follows: the designed filter kernel is convolved with the Gram distribution grayscale image. For each pixel, the weighted sum within the coverage area of the filter kernel is calculated to obtain the response value of the current pixel in the current direction.
[0256] An example of preferred response fusion is as follows: if multiple filtering kernels of different directions or scales are used, the responses of each direction are fused, that is, the maximum value of the response of each direction is taken as the final enhancement value of the current pixel, so as to ensure that defects in different directions can be effectively enhanced.
[0257] A preferred example of feature map generation is as follows: the enhancement value of each pixel is mapped to a grayscale image to generate a directionally filtered feature map. In this feature map, axial scratches and spiral scratches are significantly enhanced in the response channels corresponding to their respective directions, and background noise is effectively suppressed.
[0258] Directional filtering significantly amplifies subtle defect features submerged in the background, providing input images for threshold segmentation and defect classification. Gram determinant compresses multidimensional polarization information into scalar indices, while directional filtering further reveals the spatial distribution patterns of these scalar indices.
[0259] The directional filtering process is implemented using a Gabor filter bank, which contains multiple two-dimensional Gabor kernels with different orientations and scales.
[0260] Each layer of the Gram distribution grayscale image is filtered, and the maximum response value in each direction is taken as the enhanced feature map. Among them, the Gabor kernel corresponding to the axial direction is used to enhance axial scratches, and the Gabor kernel corresponding to the spiral direction is used to enhance spiral scratches. The angle of the spiral direction is determined according to the feed helix angle when machining tolerance holes in precision boring.
[0261] After generating the Gram distribution grayscale image, image processing is performed on the Gram distribution grayscale image to enhance the micro-defect features of specific orientations. For two types of defects with obvious directional features, namely axial scratches and spiral scratches on the surface of precision boring tolerance holes, this application uses Gabor filter banks to achieve directional filtering processing.
[0262] Specifically, the Gabor filter is a sinusoidal wave filter modulated by a Gaussian kernel function. In the spatial domain, it is a sinusoidal plane wave under a two-dimensional Gaussian envelope. The Gabor filter has both direction sensitivity and frequency sensitivity, and can produce maximum response to components of specific directions and frequencies in an image. By adjusting the direction parameters and scale parameters of the filter, a set of filters covering different directions and frequencies can be constructed, which is called a Gabor filter bank.
[0263] As a bandpass filter, the Gabor filter's passband center is determined by its direction and scale. When there are texture or edge features in the image that are consistent with the filter's direction and match its scale, the filtered response value increases; conversely, when the image features are orthogonal to the filter's direction or do not match its scale, the response value decreases.
[0264] The Gabor filter bank constructed in this application contains multiple two-dimensional Gabor kernels with different directions and scales. The direction parameter covers the range from 0° to 180°, and the scale parameter corresponds to different widths or lengths of defects. Through the Gabor filter, linear anomaly features of various directions and sizes in the spectrum can be detected comprehensively.
[0265] The specific steps for performing directional filtering on a Gram-distributed grayscale image are as follows:
[0266] First, a set of Gabor kernel functions is generated based on the detection requirements. Each Gabor kernel is determined by the following parameters:
[0267] The direction parameter θ is used to determine the direction that the filter is sensitive to. In this application, two key directions are set: the axial direction corresponds to the vertical direction in the image and the spiral direction corresponds to the oblique direction that is at a certain angle to the vertical direction.
[0268] The θ corresponding to the axial direction is set to 0° or 90°. The θ corresponding to the helical direction is determined according to the feed helix angle during precision boring of the tolerance hole. If the machining helix angle is φ, which is the angle between the tool cutting trajectory and the hole axis, then in the Gram distribution grayscale image, the angle between the extension direction of the helical scratch and the axial direction is also φ. Therefore, the corresponding Gabor filter direction should be set to φ or φ+90°.
[0269] The scale parameter σ is used to determine the size of the filter kernel and the frequency response bandwidth. The larger the scale parameter, the stronger the filter response to wider strip features; the smaller the scale parameter, the stronger the response to fine textures. In this application, multiple scales are set to match axial scratches and spiral scratches of different widths.
[0270] Wavelength λ and phase offset ψ are used to influence the oscillation characteristics of the filter and can be set based on human experience.
[0271] By combining different directions and scales, a filter bank containing K Gabor kernels is generated, denoted as {Gk|k=1,2,…,K}.
[0272] Each layer of the Gram distribution grayscale image, i.e., each detection layer's annular Gram unfolded image, is filtered separately. For a certain layer image I(x,y), where x is the circumferential angular coordinate and y is the axial depth coordinate, but since it is a single layer, y is a constant. In fact, I is a one-dimensional function of x, but to adapt to two-dimensional filtering, it can be regarded as a two-dimensional image with a height of 1. The one-dimensional function is then compared with each Gabor kernel. Perform convolution operations.
[0273] The convolution operation slides the Gabor kernel across the image pixel by pixel, and performs a weighted summation of the gray values of each pixel and its neighborhood to obtain the response value of the pixel under the Gabor kernel. The magnitude of the response value reflects the degree of matching between the image features in the pixel's neighborhood and the direction and scale of the Gabor kernel. For each pixel, after filtering by all K Gabor kernels, K response values are obtained.
[0274] To obtain the enhanced feature map, multiple response values for each pixel need to be fused. This application adopts the maximum value method: for each pixel, the response values under all Gabor kernels are compared, and the maximum value is taken as the final enhancement value of the pixel. Regardless of whether the defect is an axial scratch or a spiral scratch, as long as there is at least one Gabor kernel whose direction and scale match the defect, the pixel will generate a response under the current Gabor kernel. Taking the maximum value can ensure that each defect is preserved and enhanced in its best-matching filter channel, while noise responses in other directions are suppressed.
[0275] A new two-dimensional image, namely the enhanced feature map after directional filtering, is obtained by taking the maximum value. In the enhanced feature map, the gray values of the axial scratch and spiral scratch regions are increased, and the contrast with the background is significantly increased.
[0276] Axial scratches appear as strip-shaped abnormal regions extending along the axial (vertical) direction in the Gram distribution grayscale image. When filtering this spectrum using a Gabor kernel with a direction parameter θ=0° (corresponding to the vertical direction), specific enhancement methods include:
[0277] When there are vertically oriented strip-shaped features in the area covered by the Gabor kernel, the pixels distributed along the vertical direction contribute more in the weighted summation of the points in the Gabor kernel. Due to phase matching, the pixel contributions are superimposed in the same direction, resulting in a larger response value. For noise or texture distributed in the horizontal direction, since the Gabor kernel oscillates and decays in the horizontal direction, the contributions of different phases cancel each other out, resulting in a smaller response value. Therefore, the gray value of the axial scratch area can be enhanced after filtering, while the background noise is suppressed.
[0278] By setting up axial Gabor cores of multiple scales, axial scratches of different widths can be enhanced simultaneously: small-scale cores enhance fine scratches, while large-scale cores enhance coarse scratches.
[0279] Specifically, the specific implementation methods for enhancing helical scratches with Gabor cores along the helical direction include:
[0280] Spiral scratches appear as oblique strip-shaped abnormal regions at an angle φ to the axis in the Gram distribution grayscale image. When filtering with a Gabor kernel with direction parameter θ=φ, the enhancement mechanism is the same as in the axial case, except that the direction of the filter kernel matches the direction of the scratch.
[0281] When the Gabor kernel rotates to the same direction as the helix angle, the spatial distribution extends obliquely along the helix angle. During filtering, the pixel contributions distributed along the helix direction in the region covered by the kernel are superimposed in the same direction, generating a response; while textures or noise in other directions have a weaker response, and the spiral scratches are highlighted in the enhanced feature map.
[0282] It is important to note that the helix angle φ is an inherent parameter of the precision boring process, determined by the feed per revolution of the tool and the hole diameter. It can be obtained through the machining parameter table or actual measurement. Introducing the known parameter into the filter core design makes the filtering process more targeted and avoids blind trial and error.
[0283] Through the aforementioned directional filtering process based on Gabor filter banks, axial scratches and spiral scratches are enhanced in their respective filter channels, resulting in increased grayscale values and greater contrast with the background. This makes previously submerged defects in noise clearly identifiable. Due to the directional selectivity of the Gabor filter, randomly distributed background noise, such as minute fluctuations in the processing texture and sensor noise, does not dominate in any directional response. Even after fusing the maximum values, the noise level remains low, improving the signal-to-noise ratio. By setting multiple Gabor kernels of different scales, defects of different widths can be detected simultaneously, enhancing the universality of the method.
[0284] The Gram determinant value is used to characterize the degree of linear independence among the four row vectors of the defect matrix, and the anomalies in the Gram determinant value are used to identify micro-defects on the surface of the precision boring tolerance hole.
[0285] After solving the defect matrix for each pixel, it is necessary to extract a quantitative index that can characterize the surface state from the matrix. This application uses Gram determinant as this index, and reflects the microstructure characteristics of the tested surface by the degree of linear independence between the four row vectors of the defect matrix.
[0286] Specifically, the defect matrix is a 4×4 real matrix. If we consider the four row vectors as four vectors in four-dimensional space, then the four vectors span a parallelepiped. The Gram determinant is the square of the volume of this parallelepiped.
[0287] Specifically, when the four row vectors are linearly independent, the parallelepiped has a non-zero volume and a positive Gram determinant; when the four vectors are linearly dependent, the parallelepiped has a zero volume and a zero Gram determinant; when the vectors are nearly linearly dependent, the parallelepiped's volume approaches zero and its Gram determinant approaches zero.
[0288] The Gram determinant quantifies the degree of linear independence between a set of vectors. The larger the value, the greater the directional difference between the vectors and the stronger their orthogonality. If the value is smaller, there is a linear dependency between the vectors, that is, some vectors can be linearly represented by other vectors, and the information redundancy is high.
[0289] To further elucidate the correlation mechanism between Gram determinant values and different types of micro-defects, the following is specifically included:
[0290] Axial scratches disrupt the structural consistency of the surface along the circumferential direction, causing local changes in the row vectors in the defect matrix that were originally related to the circumferential polarization response, such as the second and third rows. This weakens the linear correlation between the four row vectors and increases the Gram determinant value locally.
[0291] Spiral scratches introduce oblique structures that are inconsistent with the direction of the machining texture, causing a systematic shift in the inner product relationship between multiple row vectors in the defect matrix. The Gram determinant value forms a continuous band-like anomaly on the scratch trajectory.
[0292] Point defects are small areas of missing or accumulated material that cause abrupt changes in local polarization response, manifested as isolated high Gram value peaks.
[0293] Material burns or delamination alter the depolarization and phase delay characteristics of the surface material, causing an overall shift in the elements of the defect matrix, resulting in an overall increase or decrease in the Gram determinant value over a large area.
[0294] Furthermore, the four row vectors of the defect matrix describe the response modes of the tested surface to incident light with different polarization states. On an ideal smooth surface or a surface with regular processing texture, its microstructure exhibits orderliness and the surface anisotropy is clear, resulting in a correlation between the four row vectors of the defect matrix. This correlation makes the volume of the parallelepiped spanned by the four row vectors smaller, and the Gram determinant value is stable within the normal range where no defects appear.
[0295] When micro-defects exist on the surface, the microstructure undergoes local changes. For scratch-type defects, oriented grooves appear on the surface, altering the anisotropic characteristics of the local area. For burn or material delamination defects, the surface material properties change, affecting the depolarization and phase delay characteristics of reflected light. This weakens the correlation between the row vectors of the defect matrix, resulting in stronger linear independence between the vectors. The volume of the parallelepiped spanned by the four row vectors increases, and the Gram determinant value deviates significantly from the normal value.
[0296] Furthermore, the Gram determinant value compresses the defect matrix into a scalar. In defect-free regions, the Gram determinant value exhibits a relatively stable background value, and the fluctuation range reflects the consistency of the polarization response of a normally processed surface. When the Gram determinant value becomes abnormal, i.e., higher or lower than the normal fluctuation threshold, it indicates that the polarization response mode of the current region has changed, indicating the presence of micro-defects.
[0297] Specifically, different types of defects may cause different anomaly patterns in Gram determinant values: axial scratches, due to the disruption of the surface's circumferential consistency, may cause local peaks in the Gram determinant value at the scratch location; material burns, due to the alteration of the surface's depolarization characteristics, may cause an overall shift in the Gram determinant value; while point defects manifest as isolated Gram value anomalies. By analyzing the spatial distribution patterns of Gram determinant values, various micro-defects can be effectively identified.
[0298] In this application, the Gram determinant is fed upwards from the defect matrix calculated in step S2, compressing the matrix information of 16 elements into a single scalar; downwards, it provides data for the generation of the Gram distribution map in step S4 and the defect identification in step S5, thus preserving the sensitivity of the polarization characteristics of the defect while reducing the complexity of data processing.
[0299] When identifying connected regions with abnormal Gram values as candidate defects, an adaptive threshold segmentation method is used:
[0300] Calculate the local mean μ and standard deviation σ of the Gram distribution grayscale image, and set the threshold T = μ + kσ, where k is the preset sensitivity coefficient;
[0301] Pixels with Gram values greater than T are marked as abnormal pixels;
[0302] Perform connected component analysis on abnormal pixels, merge connected components with a distance less than a preset spacing, and remove isolated regions with an area smaller than the minimum defect area to obtain candidate defects.
[0303] In precision boring tolerance hole inspection, due to differences in the consistency of the machining texture or residual systematic errors, even after axial attenuation compensation and directional filtering, the Gram determinant value may still exhibit a slow changing trend along the axial or circumferential direction. This application uses adaptive threshold segmentation to dynamically determine the threshold based on the statistical characteristics of the local neighborhood of each pixel, which can effectively adapt to local changes in image grayscale and improve the accuracy of segmentation.
[0304] In this application, a preferred implementation method for adaptive threshold segmentation includes:
[0305] Adaptive thresholding first calculates the mean gray value μ and standard deviation σ of each pixel's local neighborhood. The specific implementation is as follows:
[0306] For each pixel in the Gram distribution grayscale image, a local window is defined with each pixel as the center. The size of the local window is determined according to the defect scale. If the window size is too small, the statistics are easily affected by noise; if the window size is too large, it cannot reflect the local change trend. The window size is set to be slightly larger than the expected minimum defect size to ensure that the defect area and the background are statistically distinguishable.
[0307] Within the local window, the arithmetic mean of all pixel gray levels is calculated, which is the local mean μ. The local mean reflects the average level of gray levels within the window. The standard deviation σ of pixel gray levels within the window is also calculated. The standard deviation reflects the dispersion of gray levels within the window. When the window contains defect areas, the standard deviation σ increases accordingly because the gray levels of the defects are higher than those of the background. When the window is completely located in the background area, the standard deviation σ decreases, reflecting the uniformity of the background.
[0308] Furthermore, based on the local mean and standard deviation, the segmentation threshold for this pixel is set to T = μ + kσ, where k is a preset sensitivity coefficient. The value of the sensitivity coefficient k determines the strictness of the segmentation: the smaller the k value, the lower the segmentation threshold, and the easier it is to mark abnormal pixels, but more noise may be introduced; the larger the k value, the higher the threshold, and the marked pixels are more likely to be real defects, but small defects with lower gray levels may be missed. The choice of k value should be determined according to the actual detection requirements and sample statistical results. An example of a preferred value range is between 2 and 5 to ensure that the false detection rate is controlled while ensuring the detection rate.
[0309] Furthermore, the grayscale value of the current pixel is compared with the threshold T: if the pixel grayscale value is greater than T, it is marked as an abnormal pixel; if the defect is manifested as a low grayscale abnormality, it can be set to be marked when the grayscale value is less than T. This process is repeated for all pixels in the image to complete the initial marking of abnormal pixels.
[0310] It should be noted that the initially marked abnormal pixels include noise points, isolated abnormalities, and real defect regions. Candidate defects are extracted through connected component analysis, which merges adjacent abnormal pixels into the same connected region, and each connected region corresponds to a candidate defect.
[0311] Since defects may consist of multiple discontinuous abnormal regions, such as scratches that may be interrupted locally due to changes in lighting, spatially adjacent connected regions will be merged. A preferred example includes: calculating the minimum distance between each connected region; if the minimum distance is less than a preset spacing threshold, then the two regions are merged into the same candidate defect. The set spacing threshold is less than the maximum discontinuity length of the defect in space, and is A times the size of a single pixel.
[0312] After connected component analysis and region merging, there may still be connected regions with excessively small areas. These excessively small connected regions are caused by noise or tiny random fluctuations and are not true micro-defects.
[0313] Specifically, a minimum defect area threshold is set, and connected regions with an area smaller than this threshold are removed. The minimum defect area should be determined based on the actual inspection requirements and the definition of micro-defects. For example, areas smaller than 0.01 square millimeters can be considered non-defects.
[0314] The remaining connected regions are the identified candidate defects. Each candidate defect contains the set of pixel locations of the defect, the area of the defect, the boundary shape of the defect, etc., realizing an effective conversion from polarization measurement data to the geometric region of the defect.
[0315] S3: Take the four row vectors of the defect matrix corresponding to each pixel of the precision boring tolerance hole as a set of basis vectors, calculate the determinant value of the Gram matrix of the current set of basis vectors, and use it as the Gram determinant value of the current pixel.
[0316] Take the four row vectors of the defect matrix corresponding to each pixel of the precision boring tolerance hole as a set of basis vectors, calculate the determinant value of the Gram matrix of the current set of basis vectors, and use it as the Gram determinant value of the current pixel.
[0317] Specifically, for any pixel, its defect matrix M is a 4×4 real matrix containing four row vectors, denoted as r1, r2, r3, and r4 respectively. Each row vector is a four-dimensional vector, and the components of the four-dimensional vector correspond to the four elements of the current row in the defect matrix. These four row vectors are regarded as a set of basis vectors in four-dimensional space. First, the Gram matrix of this set of vectors is calculated.
[0318] The Gram matrix is a 4×4 symmetric matrix. The element in the i-th row and j-th column is defined as the inner product of the i-th row vector and the j-th row vector, which is the sum of the products of the corresponding components of the two vectors. The inner product is used to quantify the angular relationship and length relationship between the two row vectors.
[0319] After obtaining the Gram matrix, the determinant value of the Gram matrix is further calculated. The Gram determinant is equal to the square of the volume of the parallelepiped spanned by the four row vectors. Therefore, it strictly reflects the degree of linear independence between the four row vectors: when the four row vectors are linearly independent, the Gram determinant is positive; when there is a linear dependence, the Gram determinant is zero; when the vector group is close to linearly dependent, the Gram determinant approaches zero.
[0320] S4: Generate a Gram distribution map based on the Gram determinant values of all pixels;
[0321] S5: Perform image processing on the Gram distribution map to identify and mark the micro-defect areas on the surface of the precision boring tolerance hole.
[0322] Defect identification and marking in S5 includes:
[0323] In the directional filtered Gram distribution grayscale image, connected regions with abnormal Gram values are identified as candidate defects;
[0324] Extract the geometric features of candidate defects, including axial length, circumferential span, and extension direction;
[0325] Defects are classified according to their geometric characteristics: those with large axial length, small circumferential span, and extension direction close to the axis are identified as axial scratches; those with large axial length and extension direction consistent with the helix angle are identified as spiral scratches; those with small area and high roundness are identified as point defects; and those with large area, irregular shape, and high Gram abnormal value are identified as material burns or delamination.
[0326] The classification thresholds for the aforementioned geometric features (such as axial length threshold, circumferential span threshold, and roundness threshold) are not fixed values, but are adaptively determined based on the background statistical characteristics of the workpiece being inspected.
[0327] In areas without defects or in normal areas confirmed by humans, the distribution of features such as axial length, circumferential span, and roundness is statistically analyzed, and the distribution mean ± multiple standard deviations are used as the classification boundary.
[0328] For workpieces from different batches or with different processing parameters, a corresponding feature baseline library can be established and automatically matched and used during inspection.
[0329] When multiple types of defects are mixed on the surface of a workpiece, a hierarchical classification strategy is adopted: first, point-like, surface-like and line-like defects are distinguished based on area and Gram outlier value, and then further subdivided based on the degree of matching between the extension direction and the axial helix angle, so as to avoid misclassification caused by a single threshold.
[0330] Output the classification results, axial depth location, and circumferential angular location of each defect, such as... Figure 5 As shown, the horizontal axis represents the circumferential angle of the borehole wall (0°~270°) during precision boring, and the vertical axis represents the axial depth of the hole (0mm~45mm). The labels L1, L2, L3, and L4 in the figure indicate the inspection layers at different axial depths. Figure 5 The distribution of micro-defects at different circumferential angles and axial depths of the hole wall is presented. The spatial position of each defect in the circumferential and axial directions can be clearly seen. The defect presentation results are obtained after Gram determinant detection and image processing.
[0331] Specifically, in the Gram distribution grayscale image after directional filtering, it is necessary to identify and mark micro-defect regions. This invention uses an adaptive threshold segmentation method to extract candidate defects and classifies the defects based on geometric features.
[0332] For each candidate defect, the extracted geometric features include: axial length, circumferential span, extension direction and area, and circularity.
[0333] Based on geometric feature extraction, the statistical characteristics of the Gram determinant value in each candidate defect region are further calculated, including the mean, standard deviation, peak value, and the ratio of the mean to the background value. The Gram statistical characteristics and geometric characteristics are used together as the classification criteria. Specifically: Gram outliers that are significantly increased and the region is strip-shaped with an axial extension direction are identified as axial scratches; Gram outliers that are distributed in an oblique strip shape and are consistent with the helix angle are identified as helical scratches; Gram outliers that are isolated and have prominent peak values are identified as point defects; and Gram outliers that are raised overall and the region has an irregular shape are identified as material burns or delamination.
[0334] The axial length is the projected length of the defect region in the axial direction (vertical axis of the map), reflecting the extent of the defect along the depth of the hole.
[0335] The circumferential span is the span of the defect area in the circumferential direction (horizontal axis of the map), expressed as an angle value, reflecting the coverage range of the defect in the circumferential direction.
[0336] The extension direction is the principal axis direction of the defect region, which can be calculated using the minimum bounding rectangle or principal component analysis method, reflecting the direction of the defect.
[0337] The area refers to the total number of pixels contained in the defect region, reflecting the size of the defect.
[0338] Circularity is used to quantify the regularity of the shape of a defect area. It is defined as the ratio of the area to the square of the perimeter multiplied by a constant. The closer the circularity is to 1, the closer the shape is to a circle.
[0339] Based on the extracted geometric features, candidate defects are classified:
[0340] Axial scratches are defects with a large axial length, a small circumferential span, and an extension direction close to the axis. They are identified as axial scratches. Axial scratches are caused by the tool or chips moving along the axis and scratching the hole wall.
[0341] Spiral scratches are defects with a large axial length and an extension direction consistent with the machining feed helix angle. They are identified as spiral scratches. Spiral scratches are related to the helical feed trajectory of the tool and are a common type of defect in precision boring.
[0342] Point defects are isolated defects with small area and high roundness. They are identified as point defects and are formed by the shedding of hard particles or tiny impurities in the material.
[0343] Material burns or delamination are defects with large areas, irregular shapes, and high Gram outlier values. These defects are identified as material burns or delamination, which are caused by overheating during processing or internal defects in the material.
[0344] After classification, the following information for each defect is output:
[0345] Defect types include axial scratches, spiral scratches, point defects, or material burns / delamination.
[0346] The axial depth position includes the inspection layer number or specific depth coordinates where the defect is located, and is used to locate the position of the defect in the hole depth direction.
[0347] The circumferential angle position includes the starting and ending values of the circumferential angle where the defect is located, and is used to locate the position of the defect in the circumferential direction.
[0348] It enables automatic identification, classification, and spatial positioning of micro-defects on the surface of precision-bored tolerance holes, providing data support for quality assessment and process improvement, and achieving high sensitivity and high accuracy detection of micro-defects on the surface of precision-bored tolerance holes.
[0349] To verify the effectiveness of the method proposed in this application, the applicant has conducted verification experiments on typical precision-bored tolerance hole samples. The experiments employed four illumination states: 0°, 90°, 45° linear polarization, and right-hand circular polarization. Layered scanning was performed on samples with a hole diameter of Φ50mm and a depth of 45mm. The experimental results show that:
[0350] In artificially created defect areas, the Gram determinant value is 3 to 8 times higher than that of the background area, and the contrast is significantly higher than that of traditional light intensity detection.
[0351] After directional filtering, the signal-to-noise ratio of axial scratches and spiral scratches is improved by about 12dB.
[0352] The defect classification accuracy rate reached over 92%.
[0353] It is important to note that the constructions and arrangements of this application shown in several different exemplary embodiments are merely illustrative. Although only two embodiments are described in detail in this disclosure, those who consult this disclosure will readily understand that many modifications are possible without substantially departing from the novel teachings and advantages of the subject matter described in this application. These modifications may include, for example, changes in the size, dimensions, structure, shape, and proportions of various elements, as well as parameter values (e.g., temperature, pressure, etc.), installation arrangements, the use of materials, colors, orientations, etc. For example, an element shown as integrally formed may be composed of multiple parts or elements, the position of elements may be inverted or otherwise altered, and the nature or number or position of discrete elements may be changed or altered. Therefore, all such modifications are intended to be included within the scope of this application. The order or sequence of any process or method steps may be changed or rearranged by alternative embodiments. Any "apparatus plus function" clause is intended to cover, and not only structurally equivalent but also equivalent structures, the structures performing the functions described herein. Other substitutions, modifications, alterations, and omissions may be made in the design, operation, and arrangement of the exemplary embodiments without departing from the scope of this application. Therefore, this application is not limited to a particular embodiment, but extends to various modifications that still fall within the scope of the appended claims.
[0354] Furthermore, in order to provide a concise description of exemplary embodiments, not all features of actual embodiments (i.e., those features that are not relevant to the best mode of performing this application as currently considered, or those features that are not relevant to implementing this application) may be omitted.
[0355] It should be understood that numerous specific implementation decisions can be made during the development of any practical implementation, such as in any engineering or design project. Such development efforts may be complex and time-consuming, but for those of ordinary skill in the art who benefit from this disclosure, the development effort will be a routine task in design, manufacturing, and production without requiring extensive experimentation.
[0356] It should be noted that the above embodiments are only used to illustrate the technical solutions of this application and are not intended to limit it. Although this application has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of this application without departing from the spirit and scope of the technical solutions of this application, and all such modifications and substitutions should be covered within the scope of the claims of this application.
Claims
1. A method for detecting the polarization of micro-defects on a metal surface based on Gram matrix, wherein the metal surface is the surface of a precision-bored tolerance hole, characterized in that, include: S1: Obtain the reflected light intensity data of each pixel on the surface of the precision boring tolerance hole under multiple different polarization illuminations; The precision boring tolerance hole is located in the area based on the clamping position of the machine tool cradle; The precision boring tolerance hole is divided into multiple inspection layers along the axial direction; the polarization inspection probe is controlled to extend into each inspection layer in sequence to perform circumferential scanning of the hole wall of each inspection layer; During the circumferential scanning of each detection layer, each micro-element of the aperture wall is sequentially illuminated with illumination light of multiple different polarization states, and the emitted light intensity of at least four different analytical polarization states under each illumination polarization state is collected by the polarization state analyzer to obtain multiple sets of reflected light intensity data for each micro-element. Based on the difference in distance between each detection layer and the light source, axial attenuation compensation is performed on the collected reflected light intensity to eliminate the brightness difference caused by the different optical paths. S2: Calculate the defect matrix of each pixel in the precision boring tolerance hole based on the reflected light intensity data; S3: Take the four row vectors of the defect matrix corresponding to each pixel of the precision boring tolerance hole as a set of basis vectors, calculate the determinant value of the Gram matrix of the current set of basis vectors, and use it as the Gram determinant value of the current pixel. The defect matrix solution and Gram determinant calculation in S2 and S3 include: Based on the reflected light intensity data after axial attenuation compensation, the defect matrix of each hole wall micro-element is calculated, and the Gram determinant value of each micro-element is calculated. Generate annular Gram unfolded images of each detection layer, with the horizontal axis representing the circumferential angle and the vertical axis representing the Gram determinant value; stack the annular Gram unfolded images of each layer along the axial direction to form a grayscale image of the Gram distribution of the pore wall. The Gram distribution grayscale image is subjected to directional filtering to enhance defect features. The filter kernel extending along the axial direction is used to enhance axial scratches, and the filter kernel extending along the spiral direction is used to enhance spiral scratches. S4: Generate a Gram distribution map based on the Gram determinant values of all pixels; S5: Perform image processing on the Gram distribution map to identify and mark the micro-defect areas on the surface of the precision boring tolerance hole; Defect identification and marking in S5 includes: In the directional filtered Gram distribution grayscale image, connected regions with abnormal Gram values are identified as candidate defects; Extract the geometric features of candidate defects, including axial length, circumferential span, and extension direction; Defects are classified according to their geometric characteristics: those with large axial length, small circumferential span, and extension direction close to the axis are identified as axial scratches; those with large axial length and extension direction consistent with the helix angle are identified as spiral scratches; those with small area and high roundness are identified as point defects; and those with large area, irregular shape, and high Gram abnormal value are identified as material burns or delamination. Output the classification results, axial depth position, and circumferential angle position of each defect; Axial attenuation compensation includes: measuring the reflected light intensity of a standard sample at multiple different distances in advance, and establishing an attenuation curve of light intensity as a function of distance; During detection, the compensation coefficient is obtained by querying the attenuation curve based on the actual distance between the current detection layer and the light source. The collected reflected light intensity is multiplied by the compensation coefficient to eliminate the brightness attenuation caused by the optical path difference.
2. The polarization detection method for micro-defects on metal surfaces based on Gram matrix as described in claim 1, characterized in that: When solving the defect matrix corresponding to each pixel in S2, for different detection layers of the precision boring tolerance hole, a corresponding incident light instrument matrix is established according to the distance between each layer and the light source, and the measurement data is corrected.
3. The polarization detection method for micro-defects on metal surfaces based on Gram matrix as described in claim 1, characterized in that: The Gram determinant value is used to characterize the degree of linear independence among the four row vectors of the defect matrix, and the anomalies in the Gram determinant value are used to identify micro-defects on the surface of the precision boring tolerance hole.
4. The polarization detection method for micro-defects on metal surfaces based on Gram matrix as described in claim 1, characterized in that: The directional filtering process is implemented using a Gabor filter bank, which contains multiple two-dimensional Gabor kernels with different orientations and scales. Each layer of the Gram distribution grayscale image is filtered, and the maximum response value in each direction is taken as the enhanced feature map. Among them, the Gabor kernel corresponding to the axial direction is used to enhance axial scratches, and the Gabor kernel corresponding to the spiral direction is used to enhance spiral scratches. The angle of the spiral direction is determined according to the feed helix angle when machining tolerance holes in precision boring.
5. The polarization detection method for micro-defects on metal surfaces based on Gram matrix as described in claim 1, characterized in that: When identifying connected regions with abnormal Gram values as candidate defects, an adaptive threshold segmentation method is used: Calculate the local mean μ and standard deviation σ of the Gram distribution grayscale image, and set the threshold T = μ + kσ, where k is the preset sensitivity coefficient; Pixels with Gram values greater than T are marked as abnormal pixels; Perform connected component analysis on abnormal pixels, merge connected components with a distance less than a preset spacing, and remove isolated regions with an area smaller than the minimum defect area to obtain candidate defects.
6. The polarization detection method for micro-defects on metal surfaces based on Gram matrix as described in claim 1, characterized in that: Depth correction for establishing the incident light instrument matrix includes: The standard reflection sample was placed at different depths in the precision boring tolerance hole, and its response under illumination of various polarization states was measured. The deviation between the instrument matrix elements and the reference depth corresponding to different depths was calculated, and the depth deviation function was fitted. During inspection, the pre-calibrated reference instrument matrix is corrected using the depth deviation function based on the current depth position of the inspection layer to obtain the instrument matrix actually used in the current layer, which is then used for defect matrix calculation.