Bolt surface tiny defect feature extraction method based on image enhancement technology

By using multi-source image processing and 3D reconstruction technology, false defects are filtered out, high-risk features are extracted, and defect risk feature maps are generated. This solves the problem of oil stain reflection being confused with real microcracks in the intelligent quality inspection line for high-strength bolts of high-speed rail bogies, and improves detection accuracy and hardware efficiency.

CN121921583APending Publication Date: 2026-04-24SHAANXI FULAN AUTOMOBILE STANDARD PARTS CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-26
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

In the intelligent quality inspection line for high-strength bolts of high-speed rail bogies, the high false alarm rate is caused by the high degree of confusion between the reflective surface oil stains and the visual characteristics of real microcracks. Furthermore, traditional methods are unable to distinguish between harmless, gentle indentations and high-risk sharp cracks, resulting in a high false defect rate and the consumption of computing power due to optical interference.

Method used

By acquiring bolt surface images from multiple light source angles, calculating the surface normal field and albedo, filtering out false defect pixels, reconstructing 3D point cloud data and aligning it with the thread geometry model, extracting high-risk features using the morphological curvature tensor operator, generating a defect risk feature map, and performing closed-loop re-inspection.

Benefits of technology

It significantly reduces the high false alarm rate caused by the confusion between oil stain reflection and cracks, improves the accuracy of defect detection and hardware utilization, and reduces reading fatigue and misjudgment rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121921583A_ABST
    Figure CN121921583A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of machine vision and intelligent quality inspection, in particular to a bolt surface tiny defect feature extraction method based on an image enhancement technology, which comprises the following steps: acquiring an original two-dimensional image sequence of a bolt surface acquired at the same imaging view angle and a preset multi-light-source angle, and calculating a surface normal vector field and a surface albedo; obtaining basic decoupling feature data including two-dimensional coordinates, a gray value, a surface albedo and a normal vector; reconstructing three-dimensional point cloud data of the bolt surface by using the surface normal vector field and a preset integral boundary condition, and determining a target topological region set and a corresponding spatial enhancement weight; enhancing the basic decoupling feature data based on a spatial enhancement weight to generate a defect risk feature map; calculating a defect risk value based on the feature intensity value, the spatial distribution, the connected region area of the high-risk feature and the spatial aggregation degree, and respectively generating an alarm instruction, a recheck instruction or a qualification instruction; according to the method, the sensitivity to hidden cracks in a weak area is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of machine vision and intelligent quality inspection technology, specifically to a method for extracting minute defect features on bolt surfaces based on image enhancement technology. Background Technology

[0002] Currently, in the intelligent quality inspection production line for high-strength bolts of high-speed railway bogies, the main reliance is on vision systems to acquire raw two-dimensional images for surface defect detection. The system identifies potential anomalies through conventional image enhancement and edge extraction methods. In real-world scenarios, bolt surfaces are often coated with uneven anti-rust oil, and the mechanical loads borne by different topological regions such as the thread root and thread crest are drastically different. However, current detection methods often treat the object as a simple two-dimensional pixel and perform globally uniform image enhancement processing, often ignoring the differences in three-dimensional spatial distribution during operation. In related technologies, global processing based on conventional two-dimensional grayscale has obvious technical defects. Due to the high degree of visual confusion between surface oil stains and anti-rust oil droplets and real microcracks, coupled with the difficulty of traditional methods in distinguishing between harmless gentle indentations and high-risk sharp cracks, the false defect false alarm rate is extremely high. In addition, the lack of spatial priors in global processing means that a large amount of computing power is consumed by pure optical interference, and complex multidimensional data can easily cause interpretation fatigue for on-site quality inspectors, which urgently needs improvement. Therefore, a solution is urgently needed to solve the problems existing in the current technology. Summary of the Invention

[0003] The purpose of this invention is to provide a method for extracting minute defect features on the surface of bolts based on image enhancement technology, thereby solving the following technical problems: This invention addresses the high false alarm rate in the intelligent quality inspection line for high-strength bolts on high-speed railway bogies, caused by the high degree of confusion between the reflective surface oil stains and the visual characteristics of real microcracks. It effectively filters out false defect alarms caused by oil stains, allowing the algorithm's computing power to focus on the thread root area, which is prone to fracture, and improves the accuracy of defect detection without changing the existing hardware configuration.

[0004] The objective of this invention can be achieved through the following technical solutions: A method for extracting minute defects on bolt surfaces based on image enhancement technology includes: Acquire the original two-dimensional image sequence of the bolt surface under the same imaging viewpoint and preset multi-source angles, and calculate the surface normal vector field and surface albedo; Based on the surface albedo and surface normal vector field, the pseudo-defect pixels of the original two-dimensional image sequence are filtered to obtain basic decoupled feature data containing two-dimensional coordinates, gray values, surface albedo and normal vectors; The three-dimensional point cloud data of the bolt surface is reconstructed using the surface normal vector field and preset integral boundary conditions, and then aligned with the preset three-dimensional geometric model space of the thread to determine the target topological region set and the corresponding spatial enhancement weights. The basic decoupled feature data is enhanced based on the spatial enhancement weights to obtain a topology-enhanced feature map; Using a preset morphological curvature tensor operator, local high-frequency abrupt change features are extracted from the topology enhancement feature map to generate a target high-risk feature set and map it to a two-dimensional image space to generate a defect risk feature map. Based on the feature intensity value and spatial distribution of the defect risk feature map, the area of ​​the connected region of high-risk features and the spatial clustering degree, the defect risk value is calculated and compared with the preset risk threshold and safety threshold to generate alarm command, re-inspection command or qualified command respectively.

[0005] In one possible implementation, the steps of calculating the surface normal field and surface albedo of the bolt surface based on preset multi-source light source angles and the original two-dimensional image sequence specifically include: Construct the photometric stereo vision equation for the original two-dimensional image sequence; The photometric stereo vision equation is decomposed into a matrix to separate the normal vector matrix representing the surface geometry and the albedo matrix representing the surface reflectivity. The normal vector matrix is ​​converted into the surface normal vector field; the albedo matrix is ​​converted into the surface albedo.

[0006] In one possible implementation, the step of filtering pseudo-defect pixels in the original two-dimensional image sequence based on the surface albedo and surface normal vector field to obtain basic decoupled feature data containing two-dimensional coordinates, gray values, surface albedo, and normal vectors specifically includes: Calculate the gradient change value of the surface albedo and the directional derivative of the surface normal field; When the gradient change value is higher than or equal to the preset albedo threshold and the directional derivative is lower than the preset normal vector threshold, the corresponding pixel is determined to be a pseudo-defect pixel. When the gradient change value is lower than the preset albedo threshold and the directional derivative is higher than or equal to the preset normal vector threshold, the corresponding pixel is determined to be a real physical concave pixel. When the gradient change value is higher than or equal to the preset albedo threshold and the directional derivative is higher than or equal to the preset normal vector threshold, or when the gradient change value is lower than the preset albedo threshold and the directional derivative is lower than the preset normal vector threshold, the corresponding pixel is determined to be a pixel to be determined. The pseudo-defect pixels are removed from the original two-dimensional image sequence, while the two-dimensional coordinates, gray values, surface albedo, and surface normal vectors of the real physical concave pixels and the undetermined pixels are retained and combined to generate the basic decoupling feature data.

[0007] In one possible implementation, the step of spatially aligning the 3D point cloud data with the threaded 3D geometric model to determine the target topological region set specifically includes: Extract the standard three-dimensional point cloud features of the thread three-dimensional geometric model, wherein the standard three-dimensional point cloud features include the spatial coordinates of standard points and the corresponding surface normal vectors; The three-dimensional point cloud data is registered with the standard three-dimensional point cloud features using a preset iterative nearest point algorithm to obtain a spatial transformation matrix; The spatial transformation matrix is ​​used to map the three-dimensional point cloud data into the coordinate system of the three-dimensional geometric model of the thread. Based on the geometric curvature of the three-dimensional geometric model of the thread, the coordinate system is divided into the root region, the lateral region, and the crest region. The tooth base region, the tooth lateral region, and the tooth crest region are combined to form the target topological region set.

[0008] In one possible implementation, the step of determining the corresponding spatial augmentation weights based on the target topological region set specifically includes: Obtain a preset stress concentration factor mapping table, wherein the stress concentration factor mapping table records the reinforcement weights corresponding to the tooth floor region, tooth side region and tooth top region respectively, and the first reinforcement weight is greater than the second reinforcement weight, and the second reinforcement weight is greater than the third reinforcement weight; According to the stress concentration factor mapping table, the highest level of first reinforcement weight is assigned to the tooth floor region; According to the stress concentration factor mapping table, a medium level of second reinforcement weight is assigned to the tooth lateral region; According to the stress concentration factor mapping table, the lowest level of third reinforcement weight is assigned to the tooth crest region; The first enhancement weight, the second enhancement weight, and the third enhancement weight are integrated into the spatial enhancement weight.

[0009] In one possible implementation, the step of performing image enhancement on the basic decoupled feature data based on the spatial enhancement weights to obtain a topology-enhanced feature map specifically includes: Extract the initial gray-level gradient matrix corresponding to the basic decoupled feature data from the original two-dimensional image sequence; The initial gray-level gradient matrix is ​​multiplied pixel-by-pixel by the spatial enhancement weights to obtain the weighted gray-level gradient matrix. The weighted gray-level gradient matrix is ​​subjected to histogram equalization to obtain the topology-enhanced feature map.

[0010] In one possible implementation, the topology-enhanced feature map is calculated using a preset morphological curvature tensor operator to extract local high-frequency abrupt change features, specifically including: A morphological curvature tensor operator is used to construct the Hessian matrix based on the first and second partial derivatives and to calculate the principal curvature from the eigenvalues ​​of the Hessian matrix. The first and second partial derivatives of the topology-enhanced feature map in the horizontal and vertical directions are calculated. Construct the Hessian matrix based on the first and second partial derivatives; Calculate the eigenvalues ​​of the Hessian matrix; Calculate the principal curvature of the topology-enhanced feature map based on the eigenvalues; When the principal curvature is greater than the preset curvature threshold, the features of the corresponding region are extracted as the local high-frequency abrupt change features; When the principal curvature is less than or equal to the preset curvature threshold, the features of the corresponding region are determined to be low-frequency smooth features and filtered out.

[0011] In one possible implementation, the step of generating a set of high-risk features of the target based on local high-frequency drastic change features specifically includes: Based on the surface normal field and the principal curvature, the morphological depth and morphological sharpness values ​​of the local high-frequency abrupt change features are calculated. The original sharpness value is obtained by multiplying the morphological depth value and the morphological sharpness value, and then the minimum and maximum values ​​of the original sharpness value in the current image are normalized by minimum-maximum value to obtain the topological sharpness index with a value range of 0 to 1. When the topological sharpness index is higher than the preset sharpness threshold, the local high-frequency abrupt change feature is determined to be a deep and sharp V-shaped feature. The topological sharpness index is multiplied by the spatial enhancement weight corresponding to the region where the feature is located to obtain a risk weight value. The V-shaped feature is then added to the target high-risk feature set. When the topological sharpness index is lower than or equal to the preset sharpness threshold, the local high-frequency abrupt change feature is determined to be a shallow and wide U-shaped feature and is filtered out.

[0012] In one possible implementation, generating a set of high-risk features of the target and mapping it to a two-dimensional image space to generate a defect risk feature map specifically includes: Obtain the spatial coordinates and risk weight value of each feature point in the target high-risk feature set; Using preset perspective projection parameters corresponding to the original two-dimensional image sequence, the spatial coordinates are projected onto the two-dimensional image space to obtain two-dimensional pixel coordinates; The risk weight value is mapped to a pseudo-color pixel value corresponding to the two-dimensional pixel coordinates in the two-dimensional image space; The defect risk feature map is generated based on the pseudo-color pixel values ​​and the two-dimensional pixel coordinates.

[0013] In one possible implementation, after the steps of generating alarm instructions, re-inspection instructions, or pass instructions respectively, when generating a re-inspection instruction, the method further includes: In response to the re-inspection instruction, the region in the defect risk feature map corresponding to the re-inspection instruction is identified as a suspicious region, and the coordinates of the suspicious region are extracted. The direction of the local surface normal vector corresponding to the suspicious area is determined based on the coordinates of the suspicious area, and the preset multi-light source angle is adjusted according to the direction of the local surface normal vector to generate an updated light source angle. The image acquisition device used to acquire the original two-dimensional image sequence is controlled to perform secondary image acquisition on the bolt surface under the updated light source angle to obtain an updated two-dimensional image sequence. The updated two-dimensional image sequence is used as the new original two-dimensional image sequence, and the method steps described in Example 1 are executed again.

[0014] The beneficial effects of this invention are: 1. This invention calculates the surface normal field and surface albedo from the original image from multiple light sources, effectively separating optical interference from the true morphology; the method can filter out false defect pixels such as rust-preventing oil droplets in the early stages based on the albedo gradient and normal derivative; this significantly reduces the high false alarm rate caused by the confusion between oil stain reflection and cracks, and avoids the ineffective consumption of computing power on pure optical interference. 2. This invention utilizes three-dimensional point cloud reconstruction and spatial alignment with the thread geometry model to accurately divide the bolt into topological regions such as the root, flank, and crest. Combining the knowledge of fracture mechanics, it assigns spatial reinforcement weights to different regions based on stress concentration sensitivity and performs directional reinforcement. This breaks the limitation of traditional global processing that ignores the differences in three-dimensional load distribution and greatly improves the sensitivity to hidden cracks in weak areas. 3. This invention uses the morphological curvature tensor operator to extract local high-frequency abrupt change features, and calculates morphological depth and sharpness based on the normal vector field and principal curvature to generate a topological sharpness index. This mechanism can accurately quantify the defect morphology and effectively distinguish between deep, sharp, high-risk cracks that are prone to fracture and harmless, gentle indentations. This solves the technical defect of traditional edge extraction that makes it difficult to distinguish the physical morphology of defects. 4. This invention maps the set of high-risk features of the target to a two-dimensional image space to generate a defect risk feature map with feature intensity distribution and pseudo-color display. This method transforms the complex multidimensional calculation results into an intuitive two-dimensional heat map, and the color depth directly reflects the actual probability of mechanical failure risk. This greatly reduces the cognitive threshold and effectively alleviates the fatigue of interpretation that on-site personnel may experience when facing complex data. 5. This invention addresses suspicious areas in a blurred zone between safety and danger by constructing a closed-loop re-inspection mechanism. By extracting the direction of the local surface normal vector, the system can actively adjust and generate updated light source angles for secondary image acquisition. This breaks the initial observation blind spot, highlights the shadow projection of tiny gaps by reconstructing the physical optical path, improves the signal-to-noise ratio from a hardware perspective, and reduces the misjudgment rate in a blurred state. Attached Figure Description

[0015] The invention will now be further described with reference to the accompanying drawings.

[0016] Figure 1 This is a schematic flowchart of a method for extracting minute defects on the surface of bolts based on image enhancement technology, provided in an embodiment of the present invention. Detailed Implementation

[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0018] Please see Figure 1 This invention provides a method for extracting minute defect features on bolt surfaces based on image enhancement technology, aiming to solve the problem of high false alarm rate in the intelligent quality inspection line for high-strength bolts of high-speed railway bogies, caused by the high degree of confusion between the surface oil stain reflection and the visual features of real microcracks. In the specific implementation process, the system acquires the original two-dimensional image sequence of the bolt surface under the same imaging view and according to the preset multi-source angle. The preset multi-source angle is the set of light source incident angles formed by driving the ring controllable light source array to illuminate the bolt surface in different spatial orientations according to the spatial coordinate parameters pre-calibrated by the underlying hardware control system based on the standard bolt size. This design aims to break the shadow occlusion of a single view by utilizing the cascading change law of light and shadow, demonstrating robustness in complex optical environments. While acquiring the original two-dimensional image sequence, the system calculates the surface normal vector field and surface albedo of the bolt surface based on the preset multi-light source angle and the original two-dimensional image sequence. The surface normal vector field, as a set of vectors describing the microscopic three-dimensional geometric orientation of each pixel on the bolt surface, represents the real physical morphological undulations, while the surface albedo, after removing the influence of illumination, represents the inherent reflective properties of the bolt surface material itself and the distribution of stains. Based on the above calculation results, the system filters out false defect pixels in the original two-dimensional image sequence according to the surface albedo and surface normal field to obtain basic decoupling feature data. This basic decoupling feature data excludes pure optical interference such as oil film and retains only the set of pixels with real physical morphological changes, including two-dimensional coordinates, gray values, corresponding surface albedo and corresponding surface normal. This step effectively reduces the subsequent computing power consumption by constructing an optical decoupling mechanism in situ. To incorporate prior mechanical knowledge into the image processing algorithm, the system acquires a preset three-dimensional geometric model of the thread and performs surface integration based on the surface normal vector field and preset integral boundary conditions to reconstruct the three-dimensional point cloud data of the bolt surface. Then, the three-dimensional point cloud data is spatially aligned with the three-dimensional geometric model of the thread to determine the target topological region set. This set accurately divides the bolt surface into a combination of regions with different mechanical characteristics in three-dimensional space, providing spatial prior coordinates for directional enhancement, reflecting the innovative consideration of mapping morphology and mechanics. Furthermore, to ensure a directly reproducible implementation path for the surface integration step based on the surface normal vector field combined with preset integral boundary conditions, the system first converts the surface normal vector field into a depth gradient field, and then performs discrete integration reconstruction; specifically, the unit normal vector for each effective pixel is denoted as:

[0019] These represent the normal vector along the three-dimensional coordinate system. axis axis, The projection components of the axis; when When the value exceeds a preset lower limit, it is converted into a depth gradient, and the calculation formula is as follows:

[0020]

[0021] when When the value is less than or equal to the preset lower limit, the pixel is marked as a pixel with unreliable slope, and then the slope is filled in by neighborhood interpolation to avoid division by zero or abnormal amplification of slope. The system uses the outer contour boundary of the bolt as the integration boundary and the depth reference plane on the boundary as the zero-height condition, transforming the depth gradient field into a discrete Poisson reconstruction problem: Let the surface depth to be determined be... To minimize the and The overall residual formed is the objective, where and They represent the surface depths to be determined. along direction and The partial derivatives of the directions are used to solve for the depth map on a discrete pixel grid; To avoid the non-integrability of the normal field caused by noise and shadows, the system first calculates the curl residual of the gradient of adjacent pixels and marks pixels with curl residuals higher than a preset consistency threshold as non-integrable abnormal pixels. These pixels do not directly participate in the integration of the current round, but are replaced by the weighted average of the reliable gradients in the neighborhood before entering the Poisson solution. After solving the depth map, the system uses the two-dimensional coordinates and corresponding imaging calibration parameters retained in the basic decoupling feature data to combine the two-dimensional position of each pixel with the depth value to form a three-dimensional coordinate point, thereby generating three-dimensional point cloud data of the bolt surface. To ensure the stability of the reconstruction results, the system adopts the following order: first, solve the overall problem, then repair the local problem: first, generate an initial depth map for the entire region, then perform neighborhood smoothing to complete unsolvable pixels, pixels with missing boundaries, and low confidence pixels, and finally output 3D point cloud data for subsequent registration. The system determines the corresponding spatial enhancement weights based on the target topological region set. These spatial enhancement weights are assigned numerical multipliers based on the stress concentration sensitivity of different topological locations in fracture mechanics. The system then performs image enhancement on the basic decoupled feature data based on the spatial enhancement weights to obtain a topological enhancement feature map, breaking the traditional global enhancement logic to achieve directional enhancement. At this point, the system uses a preset morphological curvature tensor operator to calculate the topology enhancement feature map, extracts local high-frequency abrupt change features that appear as extremely narrow and extremely deep pixel abrupt change regions in the image gradient domain, and generates a set of target high-risk features based on the local high-frequency abrupt change features. The system maps the target high-risk feature set to a two-dimensional image space to generate a defect risk feature map with feature intensity distribution. This map intuitively reflects the risk of local stress failure on the bolt surface. Finally, the system obtains preset risk thresholds and preset safety thresholds from the finite element stress analysis statistics of a large number of historical fracture bolt samples. The preset risk threshold is greater than the preset safety threshold. The defect risk value is calculated based on the feature intensity value and spatial distribution of each pixel in the defect risk feature map, combined with the area of ​​the connected region and the spatial clustering degree corresponding to the high-risk feature. The defect risk level is assessed based on the defect risk value. When the defect risk value is higher than the preset risk threshold, an alarm command is generated. When the defect risk value is lower than or equal to the preset risk threshold but higher than or equal to the preset safety threshold, a re-inspection command is generated. When the defect risk value is lower than the preset safety threshold, a pass command is generated. This embodiment effectively filters out false defect reports caused by oil contamination in the high-speed rail bolt maintenance scenario by introducing the underlying logic of optomechanical topography coupling. This allows the algorithm's computing power to focus on the thread root region, which is prone to breakage, thus improving the accuracy of defect detection without increasing hardware. To further quantify defect risks and clarify data flow relationships, the defect risk feature map uses pseudo-color pixel values ​​for visualization at the display layer. However, at the computation layer, only one single-channel scalar feature intensity value corresponding one-to-one with the pseudo-color display result is retained for each pixel. Participating in risk calculations, including subscripts Indicates the first A high-risk connected area, subscript Represents the first term within the connected region. 1 pixel; The scalar intensity is generated and normalized from the risk weight value through a preset monotonic mapping rule. It does not represent RGB triples or color indexes. The pseudo-color pixel value is only used as the human-computer display result and is obtained by converting the scalar intensity according to the preset color table. Therefore, the color encoding of the display layer and the scalar intensity of the calculation layer are expressions of the same risk information at different levels. To avoid inconsistencies in the subscript system between simply connected and multi-connected regions, the system uniformly calculates using a region-first, pixel-second hierarchy: Let the current bolt surface detect a total of... There are r-th high-risk connected regions, and the sub-risk value of the r-th high-risk connected region is denoted as . The total defect risk value is obtained by summing the sub-risk values ​​of all connected regions; where the sub-risk value of the r-th connected region is calculated using the following formula:

[0022] in, Let be the total number of pixels in the r-th connected region. Let be the area parameter of the r-th connected region, which is the number of pixels contained in that region. Let r be the spatial clustering parameter of the r-th connected region. To use a preset benchmark scale parameter shared by all connected regions, the denominator is squared to match the area dimension; in the discrete pixel domain implementation... , and All calculations are performed using a dimensionless pixel scale to ensure that the ratios in the logarithmic terms have consistent meanings. Furthermore, the system treats each high-risk region with 8 connected neighbors as a separate connected region; it calculates the outer boundary length of each connected region and records the boundary pixel length of that region as... And determine its spatial aggregation parameter according to the following formula:

[0023] Large and concentrated areas are given higher regional correction weights; when multiple high-risk connected regions exist, the system calculates the sub-risk values ​​of each connected region sequentially and then sums them; when no high-risk connected regions exist, the total defect risk value is set to zero; to ensure that logarithmic terms are computable, if a connected region corresponds to... Less than Then This serves as the lower limit of the numerator for the logarithmic operation of the connected region; Both the preset risk threshold and the preset safety threshold are derived from the statistical calibration process of tagged historical samples. Specifically, the defect risk value of known fracture failure samples, suspected re-inspection samples, and qualified samples are calculated according to the same process. The upper quantile of the risk value distribution of suspected re-inspection samples is taken as the preset risk threshold, and the upper quantile of the risk value distribution of qualified samples is taken as the preset safety threshold. Cross-validation is used to minimize the sum of the alarm missed detection rate and the re-inspection false trigger rate, so that the threshold setting logic is consistent with the actual maintenance judgment standard.

[0024] In this embodiment of the invention, the specific details of the steps for calculating the surface normal vector field and surface albedo of the bolt surface are intended to accurately separate optical interference from the true morphology in the business scenario where the bolt surface of a high-speed rail assembly line often has an uneven anti-rust oil coating; when constructing the photometric stereo vision equation of the original two-dimensional image sequence, the system uses a matrix equation based on the Lambertian reflection model to establish the following:

[0025] in, For the observation matrix, Represents the set of real numbers; Indicates the number of preset multi-light source angles and satisfies , Indicates the total number of pixels; It is a direction vector matrix, where each row represents the spatial direction vector of a light source; Let be the matrix to be solved. The List as , indicating the first The albedo of each pixel is coupled to the normal vector; for any pixel... , its in The grayscale observation column vector under each light source is denoted as . ; Furthermore, to facilitate direct programming implementation, before proceeding to the above solution, the system first performs camera black level subtraction and grayscale normalization on each original two-dimensional image, limiting the pixel grayscale to the range of 0 to 1. Then assemble the observation matrix according to pixel position. The column vector; if the gray level of the corresponding pixel under a certain light source is lower than the shadow threshold, the observation of that light source is discarded in the solution of the current pixel, and only no less than 3 effective light sources are retained to participate in the least squares calculation; If the number of effective light sources is less than 3, the pixel is marked as an unsolvable pixel and subsequently filled in by neighborhood interpolation; to avoid mixing the original markers with the effective markers after shadow removal, the system marks each pixel... Construct the effective light source sub-matrix and effective observation sub-vector separately: Combine the remaining light source directions after removing shadow observations into the effective direction matrix in their original order. The corresponding grayscale observations are combined to form an effective observation vector. ; When there are no shadow observations to be removed in the current pixel, The participating row of the original direction matrix at this pixel is consistent. The participating component of the original observation vector at this pixel is consistent; the system uniformly solves for the coupling vector of pixel p using the effective data, and its calculation formula is:

[0026] in, It is a third-order identity matrix, whose dimensions are the same as those of the matrix. Consistent, The preset regularization coefficient is derived from the empirical value that minimizes the mean square error of the reconstructed normal vector after repeated sampling of the standard sample during the calibration stage. When the conditions of the normal equation corresponding to the effective observation are good, the regularization term can take a minimum value. At this time, the solution result is equivalent to performing conventional least squares on the effective light source set. Calculate albedo and normal vector by column: First take The L2 norm is used as the albedo of the pixel, and then... The unit normal vector is obtained by normalizing its magnitude; when the albedo is lower than the preset albedo lower limit, the pixel is marked as a low confidence pixel and the mean of the effective normal vectors in the neighborhood is used for compensation. The system backfills all normal vectors according to the original two-dimensional pixel coordinates, converting them into a surface normal vector field with spatial coordinate mapping relationship, and backfills all albedo to form surface albedo. When using numerical calculation methods such as singular value decomposition to accelerate the above matrix solution process, it is only used as a numerical implementation means of inverting the linear equation system, rather than changing the photometric stereo vision equation itself. This makes the data flow closed loop of equation construction—shadow observation by pixel removal—formation of effective sub-matrices / sub-vectors—solving coupling vectors—separation of albedo and normal vectors—backfilling into a field clear, avoiding the problem that cannot be reproduced by functional description alone.

[0027] In this embodiment of the invention, the step of filtering false defect pixels in the original two-dimensional image sequence is specified. In response to the problem of misjudgment in the business scenario of high-strength bolt inspection of high-speed rail bogies, where rust-preventive oil droplets and real micro scratches appear as similar black line segments on conventional two-dimensional grayscale images, a two-dimensional judgment mechanism is constructed. The system calculates the gradient change value of surface albedo and the directional derivative of the surface normal field. When the gradient change value is higher than or equal to the preset albedo threshold and the directional derivative is lower than the preset normal threshold, the corresponding pixel is determined to be a pseudo-defect pixel with drastic color change but no change in the physical flatness of the surface, so as to identify interference such as rust-preventing oil droplets. When the gradient change value is lower than the preset albedo threshold and the directional derivative is higher than or equal to the preset normal vector threshold, the corresponding pixel is determined to be a real physical depression pixel with the same color as the surrounding area but a sudden change in physical depth, thus locking in the non-oxidized microcrack; when the gradient change value is higher than or equal to the preset albedo threshold and the directional derivative is higher than or equal to the preset normal vector threshold, or when the gradient change value is lower than the preset albedo threshold and the directional derivative is lower than the preset normal vector threshold, the corresponding pixel is determined to be a pixel to be determined. The system removes pseudo-defect pixels from the original two-dimensional image sequence, retains the two-dimensional coordinates, gray values, surface albedo, and surface normal vectors of real physical concave pixels and undetermined pixels, and combines them to generate basic decoupling feature data. This scheme constructs a decision quadrant by combining the albedo gradient and the derivative of the normal vector, effectively intercepting massive amounts of harmless optical noise in the early stages of feature extraction. This significantly reduces the computational cost of subsequent algorithms and improves the real-time detection throughput of the system on industrial production lines. Furthermore, to enable the aforementioned two-dimensional decision mechanism to be directly programmatically implemented, the system uses a central difference or equivalent Sobel operator on the pixel grid to calculate the gradient change value of the surface albedo, i.e., to calculate the square of the albedo gradient magnitude, and defines it as:

[0028] in, For pixels Surface albedo at the location, and Let represent the difference operators along the horizontal and vertical directions of the image, respectively; the system also characterizes the directional derivative of the surface normal field as the average of the angles between the current pixel and the normal vectors of its four neighboring pixels, and defines it as:

[0029] in, Let be the unit surface normal vector of the current pixel. This represents the set of four neighboring pixels of the current pixel. This represents the actual number of neighboring pixels. This means limiting the dot product value to between -1 and 1 to prevent the inverse trigonometric function from becoming invalid due to numerical errors; the preset albedo threshold is derived from purely optical interference areas such as oil stains and oxidation color differences in the calibration sample. The upper quantile value of the statistical distribution, and the preset normal vector threshold are derived from the actual crack, indentation and scratch areas in the calibration sample. The statistical distribution lower quantile value is used, and the false defect removal rate and the real defect retention rate are balanced by cross-validation of labeled samples. For image boundary pixels, if the four-neighborhood is incomplete, only the actual neighboring pixels are averaged. For pixels marked as low confidence or unsolvable in previous steps, the system does not directly determine them as false defects, but uniformly classifies them into undetermined pixels and retains them for subsequent topology enhancement processing, so as to avoid real defects being prematurely removed due to local shadows or overly dark areas.

[0030] In this embodiment of the invention, the step of spatially aligning three-dimensional point cloud data with a three-dimensional geometric model of a thread to determine the target topological region set is specified, aiming to solve the business and technical defects that simple two-dimensional pixels cannot reflect the location information of the weak stress area of ​​high-speed rail bolts. The system extracts standard 3D point cloud features from the discretized sampling of the thread 3D geometric model from standard computer-aided design drawings. These standard 3D point cloud features include the spatial coordinates of standard points and the corresponding surface normal vectors. The pre-defined iterative nearest point algorithm is used to register the actual reconstructed 3D point cloud data with standard 3D point cloud features to obtain a spatial transformation matrix for describing the translation and rotation of the rigid body. The spatial transformation matrix is ​​then used to map the 3D point cloud data to the absolute coordinate system of the thread 3D geometric model. Based on the geometric curvature variation law of the three-dimensional geometric model of the thread, the system accurately divides the coordinate system into the root region as the negative curvature maximum region, the lateral region as the near-zero curvature region, and the crest region as the positive curvature maximum region, and combines these three into a target topological region set; This high-precision 3D registration technology enables flat image pixels to achieve accurate spatial positioning, allowing the system to clearly identify the specific topological location of minute anomalies during the quality inspection of high-speed rail bolts. It establishes a spatial mapping relationship for introducing prior knowledge of fracture mechanics and demonstrates the effectiveness of the morphological feature cascade mechanism.

[0031] In this embodiment of the invention, the step of determining the corresponding spatial enhancement weights based on the target topological region set is specified. In the business scenario where high-speed rail bolts are subjected to extremely large axial loads at the thread root during actual operation, thus becoming a high-incidence area for fatigue fracture, the theory of micromechanical stress concentration is transformed into control parameters for image enhancement. The system obtains a preset stress concentration factor mapping table from the finite element fatigue simulation test results of the same batch of bolts. This mapping table records the reinforcement weights corresponding to the tooth base region, tooth lateral region, and tooth crest region, and sets the first reinforcement weight to be greater than the second reinforcement weight, and the second reinforcement weight to be greater than the third reinforcement weight. Based on this mapping table, the system assigns the highest level of first reinforcement weight to the tooth base region, a medium level of second reinforcement weight to the tooth lateral region, and the lowest level of third reinforcement weight to the tooth crest region, and integrates the first, second, and third reinforcement weights into a spatial reinforcement weight. This design directly converts the stress concentration factor in mechanics into image enhancement weights in machine vision, enabling the system to maintain high sensitivity to hidden cracks located at the tooth base while suppressing the visual representation of machining marks located at the tooth tip. This alleviates the misjudgment problem caused by global enhancement in high-speed rail bolt inspection, demonstrating the rationality of mechanical risk-driven design.

[0032] This invention embodiment is a concretization of the steps for obtaining a topologically enhanced feature map by performing image enhancement on basic decoupled feature data based on spatial enhancement weights. It aims to achieve adaptive image enhancement through spatial topological priors in the quality inspection of high-speed rail bolts. The system uses an edge detection operator to extract the initial gray-level gradient matrix of the corresponding basic decoupled feature data in the original two-dimensional image sequence. To resolve the dimensionality matching conflict between the three-dimensional spatial parameters and the two-dimensional image matrix, before performing pixel-by-pixel multiplication, the system maps the spatial enhancement weights back projection established based on the three-dimensional absolute coordinate system to the two-dimensional pixel coordinate system based on the mapping relationship between the two-dimensional coordinates and the three-dimensional point cloud data retained in the basic decoupled feature data. The initial gray-level gradient matrix is ​​multiplied pixel-by-pixel with the spatial enhancement weights to obtain a weighted gray-level gradient matrix. This operation amplifies the subtle gray-level changes in the tooth floor region and suppresses the strong reflective edges in the tooth roof region at a mathematical level. Histogram equalization is then applied to the weighted gray-level gradient matrix to redistribute the dynamic range of the image and obtain a topological enhancement feature map. This embodiment achieves precise superposition of pixel-level weights through dimension transformation and matrix point-by-point multiplication, transforming image enhancement into directional feature amplification with engineering purposes. It improves the signal-to-noise ratio of high-risk micro-defects in the complex background of high-speed rail bolts, verifying the applicability of this cascade enhancement mechanism.

[0033] In this embodiment of the invention, the step of calculating and extracting local high-frequency abrupt change features by using a preset morphological curvature tensor operator to enhance the topology feature map is specified. For the business scenario where there are often gentle indentations on the surface of high-speed rail bolts and traditional edge extraction cannot distinguish the defect morphology, a method of calculating curvature based on partial derivative matrix construction is adopted. The system first applies a standard deviation of 1 to the topology enhancement feature map. Gaussian smoothing is used to suppress the amplification effect of acquisition noise on the second derivative, where The values ​​are derived from the search results that minimize the false defect detection rate on the calibration samples; The first and second partial derivatives of the topology-enhanced feature map in the horizontal and vertical directions are calculated, and the partial derivative values ​​are obtained by Gaussian derivative convolution kernel to construct the Hessian matrix. To avoid letters To avoid confusion between the preceding risk intensity notation and the image function here, this embodiment explicitly denotes the continuous grayscale function corresponding to the topology enhancement feature map as follows: Based on this, the Hessian matrix is ​​constructed as follows:

[0034] in, and Representing functions respectively Pure second-order partial derivatives along the horizontal and vertical directions, and Representation function The mixed second-order partial derivatives; In discrete implementation, first... Calculate the first derivative using central difference or equivalent convolution kernel, then further differencing the obtained first derivative to obtain the second derivative, and let... To satisfy the symmetry of the Hessian matrix; The system calculates the eigenvalues ​​of the Hessian matrix and uses the curvature amplitude corresponding to the eigenvalue with the larger absolute value as the principal curvature representation value of the current pixel. When the principal curvature is greater than the preset curvature threshold determined by the statistical lower limit of the crack width-to-depth ratio in the calibration sample, the features of the corresponding region are extracted as local high-frequency abrupt change features to capture tubular or V-shaped high curvature abrupt changes in the grayscale surface of the image. When the principal curvature is less than or equal to the preset curvature threshold, the features of the corresponding region are identified as low-frequency smooth features such as gentle indentations and filtered out. This method uses matrix eigenvalues ​​to accurately describe the local curvature morphology of the grayscale surface of the image, distinguishing between sharp microcracks that are prone to fatigue fracture and harmless pits, thus improving the pertinence of feature extraction under complex physical morphology. The setting logic of the preset curvature threshold here is based on the second-order gradient theoretical extreme value of a 0.05mm wide microcrack in the standard sample at the current image resolution. By mapping the physical size to the gray-level change rate between pixels, the algorithm's physical perception accuracy of hidden cracks is ensured. Furthermore, to avoid implementation ambiguities during iteration or traversal, the system calculates the Hessian matrix and principal curvature representation value pixel by pixel, and then merges pixels that meet the principal curvature threshold into candidate regions using an 8-neighborhood connectivity method; when the area of ​​a candidate region is less than the preset minimum connected area, it is directly filtered out; the preset minimum connected area is derived from the statistical lower limit of the minimum identifiable crack projection area in the standard sample; thus forming a directly programmable process of smoothing—differentiation—construction of Hessian matrix—calculation of eigenvalues—principal curvature threshold determination—connected region filtering.

[0035] In this embodiment of the invention, the step of generating a set of target high-risk features based on local high-frequency drastic change characteristics is specified, aiming to quantify the sharpness of micro-morphology and assess its physical fracture risk in the quality inspection of high-speed rail bolts. The system calculates the morphological depth and morphological sharpness values ​​of local high-frequency abrupt change features based on the surface normal vector field and principal curvature. The morphological depth and morphological sharpness values ​​are multiplied to obtain the original sharpness value. The system then performs normalization based on the minimum and maximum values ​​of the original sharpness values ​​in the current image to obtain a topological sharpness index with a value range of 0 to 1. When the topological sharpness index is higher than the preset sharpness threshold, the local high-frequency abrupt change feature is determined to be a deep and sharp V-shaped feature that is very likely to cause crack propagation. The risk weight value is obtained by multiplying the topological sharpness index by the spatial enhancement weight corresponding to the region where the feature is located, and the V-shaped feature is added to the target high-risk feature set. When the topological sharpness index is lower than or equal to the preset sharpness threshold, the local high-frequency abrupt change feature is determined to be a shallow and wide U-shaped feature and is filtered out as a harmless feature. This embodiment achieves mathematical quantification of the micro-geometric morphology of defects by constructing a topological sharpness index. The product of this index and the spatial enhancement weight produces a synergistic effect, enabling the system to accurately locate potential defects that have both sharp morphology and are located in stress concentration areas in the inspection of high-speed rail bolts, demonstrating the high robustness of this risk assessment model. In terms of computational details, to ensure that morphological depth values ​​are not merely functional representations, the system defines their dedicated symbols as follows: For each local high-frequency abrupt change candidate region, a centerline is extracted. The centerline is determined by the longest connected path after the region is skeletonized. Symmetrical sampling is performed on both sides of the local normal at each sampling point along the centerline to obtain the unit surface normal vectors on the left and right sides respectively. The average level of the difference between the two normal vectors is used to characterize the morphological depth value of the candidate region. The calculation formula is as follows:

[0036] in, The number of valid sampling points along the centerline. and They represent the first The unit surface normal vectors on both sides of a sampling point; when one side of a sampling point falls outside the region or the corresponding normal vector is unavailable, the sampling point is skipped and the number of valid sampling points is updated synchronously. Since the unit vector difference, after being scaled by half, stabilizes in the range of zero to one, therefore It can directly reflect the average intensity of the normal deflection on both sides of the concave cross-section; the larger the value, the deeper the concavity. The morphological sharpness value is denoted as... The rate of change of principal curvature along the characteristic tangential direction is used to distinguish between sharp crack edges and smooth pit edges. The system calculates the principal curvature difference along the centerline tangential direction at adjacent sampling points and takes its average absolute change as... ; If the number of centerline sampling points is less than 2, the morphological sharpness value of the candidate region is recorded as 0, and it will not be subsequently classified as a high-risk V-shaped feature; the original sharpness value is determined by... and The minimum and maximum values ​​are determined together, and then normalized within the entire candidate region of the current image; When the original sharpness values ​​of all candidate regions are the same, resulting in a normalized denominator of zero, the topological sharpness index of all candidate regions is uniformly set to 0; the preset sharpness threshold is derived from the optimal segmentation point of the receiver operating characteristic curve of V-shaped cracks and U-shaped indentations in labeled samples. Furthermore, to address the issue that simple product-based judgment might result in indistinguishable high-depth low-sharpness and low-depth high-sharpness values, the system adds a dual-threshold constraint when judging V-shaped features: the corresponding feature is added to the target high-risk feature set only when the topological sharpness index is higher than the preset sharpness threshold and the morphological depth value is not lower than the preset depth lower limit and the morphological sharpness value is not lower than the preset sharpness lower limit. Otherwise, they are all filtered out as U-shaped or uncertain features; the preset depth lower limit and preset sharpness lower limit are both derived from the 10th percentile value of the statistical distribution of standard crack samples; thus, the subsequent program can form a definite input, calculation, judgment and output path for each candidate region.

[0037] In this embodiment of the invention, the step of mapping the target high-risk feature set to a two-dimensional image space to generate a defect risk feature map is specified. In view of the business scenario where quality inspectors at high-speed rail bolt maintenance sites are prone to interpretation fatigue when facing complex multi-dimensional data, an intuitive data dimensionality reduction presentation mechanism is constructed. The system obtains the spatial coordinates and risk weight values ​​of each feature point in the target high-risk feature set, and uses the preset perspective projection parameters, which are composed of camera intrinsic and extrinsic matrices and correspond to the original two-dimensional image sequence, to project the spatial coordinates onto the two-dimensional image space to obtain two-dimensional pixel coordinates. The system maps risk weight values ​​to pseudo-color pixel values ​​corresponding to two-dimensional pixel coordinates in a two-dimensional image space, so that the mapped color of areas with higher risk weight values ​​is closer to the darker warning color, and generates a defect risk feature map based on pseudo-color pixel values ​​and two-dimensional pixel coordinates. This solution reduces the complexity of multidimensional calculations into an intuitive two-dimensional heat map. The depth of the color directly reflects the actual probability of mechanical failure. In industrial field applications, this lowers the cognitive threshold for operators and optimizes the technical judgment process in the re-inspection stage.

[0038] In this embodiment of the invention, an adaptive secondary detection mechanism is specified when a re-inspection instruction is generated after the steps of generating alarm instructions, re-inspection instructions, or qualified instructions respectively. A closed-loop targeted scanning logic is constructed for suspected defect areas in the ambiguous zone between safety and danger in the quality inspection of high-speed rail bolts. In response to the re-inspection command, the system takes the area corresponding to the re-inspection command in the defect risk feature map as the suspicious area and extracts the coordinates of the suspicious area. Based on the coordinates of the suspicious area, the system determines the direction of the local surface normal vector corresponding to the suspicious area. Based on the direction of the local surface normal vector, the system adjusts the preset multi-light source angle to generate an updated light source angle. This process calculates the position of the light source that forms a specific angle with the local normal vector to highlight the shadow projection of the tiny gap. The system controls the image acquisition device used to acquire the original two-dimensional image sequence to perform secondary image acquisition on the bolt surface under the updated light source angle to obtain an updated two-dimensional image sequence, and then uses the updated two-dimensional image sequence as a new original two-dimensional image sequence to re-execute the above feature extraction steps. This embodiment endows the system with the ability to actively seek optimization. By targeting and reconstructing the physical optical path, it breaks the blind spot of the initial perspective and improves the feature signal-to-noise ratio of the re-inspection area at the hardware level. It effectively reduces the misjudgment rate in the ambiguous state in the high-speed rail bolt quality inspection line. Furthermore, to avoid creating ambiguous descriptions by adjusting the preset multi-source light source angles based on the local surface normal vector direction, the system generates updated light source angles according to the following rules: the surface normal vectors of all pixels in the suspicious area are weighted and averaged according to the risk weight value to obtain the representative normal vector of the area; the principal axis direction of the suspicious area in the two-dimensional image is extracted, and the principal axis direction is determined by the largest eigenvector of the pixel coordinate covariance matrix of the area. From the preset candidate light source angles of the ring controllable light source array, a set of candidate angles with the regional representative normal vector within the range of 30 to 60 degrees is selected to ensure that sufficient shadow contrast is generated without causing local overexposure due to excessive grazing. Then, from the candidate angle set, the light source angle whose projection of the incident direction in the image plane is approximately perpendicular to the principal axis direction is selected first to enhance the lateral brightness and darkness variation of the microcrack. If there are more than one candidate angle that meets the conditions, the first two angles are selected and collected in order of priority: local illuminance uniformity first, and the incident angle deviation of 40 degrees least. If there are fewer than one candidate angle that meets the conditions, the collection is performed again by reverting to the preset light source angle that is closest to 40 degrees with the normal vector of the region. The angle range of 30 to 60 degrees is derived from the joint statistical results of shadow contrast and saturation pixel ratio in the standard crack sample experiment. The judgment condition for near verticality is that the angle is between 70 and 110 degrees. In order to make the rule of prioritizing local illumination uniformity have a definite calculation caliber, the system does not use subjective judgment based on human experience, but performs a low-exposure pre-sampling for each candidate angle to obtain a preview image that only covers the suspicious area. In the preview image, only the gray mean and gray standard deviation of pixels in the suspicious area are statistically analyzed, and the one with the smaller gray standard deviation is judged to have more uniform local illumination. When the difference in gray standard deviation between two candidate angles does not exceed the preset uniformity tolerance, they are considered to have the same local illumination uniformity. Then, their deviation from the 40-degree target incident angle is compared, and the angle with the smaller deviation is selected for priority execution. Furthermore, to avoid distortion of uniformity indicators due to local over-darkness or local saturation, the system only includes pixels with gray values ​​within the effective exposure range in the above statistics within the suspicious area; If the percentage of effective exposure pixels corresponding to a candidate angle is lower than the preset lower limit, the candidate angle will be directly removed from the candidate angle set and will not participate in the subsequent sorting. After the two candidate angles are sorted according to the above rules, the system will collect them in the order of priority angle first and then second priority angle, and send the two collection results together with the first collection result into the subsequent re-inspection process. After the secondary image acquisition is completed, the system will update the two-dimensional image sequence to correspond one-to-one with the initial acquisition result in terms of pixel coordinates. If the defect risk value after re-inspection is higher than the initial result and exceeds the preset risk threshold, an alarm command will be output. If the value after re-inspection is still between the preset safety threshold and the preset risk threshold, the re-inspection command will be retained and the area will be marked as a priority area for manual review. If the value after re-inspection drops below the preset safety threshold, a qualified command will be output. This forms a closed-loop re-inspection mechanism with clear input, angle selection rules, and output judgment path.

[0039] The foregoing has provided a detailed description of one embodiment of the present invention, but this description is merely a preferred embodiment and should not be construed as limiting the scope of the invention. All equivalent variations and modifications made within the scope of the claims of this invention should still fall within the patent coverage of this invention.

Claims

1. A method for extracting minute defect features from bolt surfaces based on image enhancement technology, characterized in that, include: Acquire the original two-dimensional image sequence of the bolt surface under the same imaging viewpoint and preset multi-source angles, and calculate the surface normal field and surface albedo; Based on the surface albedo and surface normal vector field, the pseudo-defect pixels of the original two-dimensional image sequence are filtered to obtain basic decoupled feature data containing two-dimensional coordinates, gray values, surface albedo and normal vectors; The three-dimensional point cloud data of the bolt surface is reconstructed using the surface normal vector field and preset integral boundary conditions, and then aligned with the preset three-dimensional geometric model space of the thread to determine the target topological region set and the corresponding spatial enhancement weights. The basic decoupled feature data is enhanced based on the spatial enhancement weights to obtain a topology-enhanced feature map; Using a preset morphological curvature tensor operator, local high-frequency abrupt change features are extracted from the topology enhancement feature map to generate a target high-risk feature set and map it to a two-dimensional image space to generate a defect risk feature map. Based on the feature intensity value and spatial distribution of the defect risk feature map, the area of ​​the connected region of high-risk features and the spatial clustering degree, the defect risk value is calculated and compared with the preset risk threshold and safety threshold to generate alarm command, re-inspection command or qualified command respectively.

2. The method for extracting minute defect features on bolt surfaces based on image enhancement technology according to claim 1, characterized in that, The steps for calculating the surface normal field and surface albedo of the bolt surface based on the preset multi-light source angles and the original two-dimensional image sequence specifically include: Construct the photometric stereo vision equation for the original two-dimensional image sequence; The photometric stereo vision equation is decomposed into a matrix to separate the normal vector matrix representing the surface geometry and the albedo matrix representing the surface reflectivity. Convert the normal vector matrix into the surface normal vector field; The albedo matrix is ​​converted into the surface albedo.

3. The method for extracting minute defect features on bolt surfaces based on image enhancement technology according to claim 1, characterized in that, The steps for obtaining basic decoupled feature data containing two-dimensional coordinates, gray values, surface albedo, and normal vectors by filtering pseudo-defect pixels from the original two-dimensional image sequence based on the surface albedo and surface normal vector field specifically include: Calculate the gradient change value of the surface albedo and the directional derivative of the surface normal field; When the gradient change value is higher than or equal to the preset albedo threshold and the directional derivative is lower than the preset normal vector threshold, the corresponding pixel is determined to be a pseudo-defect pixel. When the gradient change value is lower than the preset albedo threshold and the directional derivative is higher than or equal to the preset normal vector threshold, the corresponding pixel is determined to be a real physical concave pixel. When the gradient change value is higher than or equal to the preset albedo threshold and the directional derivative is higher than or equal to the preset normal vector threshold, or when the gradient change value is lower than the preset albedo threshold and the directional derivative is lower than the preset normal vector threshold, the corresponding pixel is determined to be a pixel to be determined. The pseudo-defect pixels are removed from the original two-dimensional image sequence, while the two-dimensional coordinates, gray values, surface albedo, and surface normal vectors of the real physical concave pixels and the undetermined pixels are retained and combined to generate the basic decoupling feature data.

4. The method for extracting minute defect features on bolt surfaces based on image enhancement technology according to claim 1, characterized in that, The step of spatially aligning the 3D point cloud data with the 3D geometric model of the thread to determine the target topological region set specifically includes: Extract the standard three-dimensional point cloud features of the thread three-dimensional geometric model, wherein the standard three-dimensional point cloud features include the spatial coordinates of standard points and the corresponding surface normal vectors; The three-dimensional point cloud data is registered with the standard three-dimensional point cloud features using a preset iterative nearest-point algorithm to obtain a spatial transformation matrix; The spatial transformation matrix is ​​used to map the three-dimensional point cloud data into the coordinate system of the three-dimensional geometric model of the thread. Based on the geometric curvature of the three-dimensional geometric model of the thread, the coordinate system is divided into the root region, the lateral region, and the crest region. The tooth base region, the tooth lateral region, and the tooth crest region are combined to form the target topological region set.

5. The method for extracting minute defect features on bolt surfaces based on image enhancement technology according to claim 4, characterized in that, The steps for determining the corresponding spatial augmentation weights based on the target topological region set specifically include: Obtain a preset stress concentration coefficient mapping table, wherein the stress concentration coefficient mapping table records the reinforcement weights corresponding to the tooth floor region, tooth side region and tooth top region respectively, and the first reinforcement weight is greater than the second reinforcement weight, and the second reinforcement weight is greater than the third reinforcement weight; According to the stress concentration factor mapping table, the highest level of first reinforcement weight is assigned to the tooth floor region; According to the stress concentration factor mapping table, a medium level of second reinforcement weight is assigned to the tooth lateral region; According to the stress concentration factor mapping table, the lowest level of third reinforcement weight is assigned to the tooth crest region; The first enhancement weight, the second enhancement weight, and the third enhancement weight are integrated into the spatial enhancement weight.

6. The method for extracting minute defect features on bolt surfaces based on image enhancement technology according to claim 1, characterized in that, The step of performing image enhancement on the basic decoupled feature data based on the spatial enhancement weights to obtain a topology-enhanced feature map specifically includes: Extract the initial gray-level gradient matrix corresponding to the basic decoupled feature data from the original two-dimensional image sequence; The initial gray-level gradient matrix is ​​multiplied pixel-by-pixel by the spatial enhancement weights to obtain the weighted gray-level gradient matrix. The weighted gray-level gradient matrix is ​​subjected to histogram equalization to obtain the topology-enhanced feature map.

7. The method for extracting minute defect features on bolt surfaces based on image enhancement technology according to claim 1, characterized in that, The step of using the preset morphological curvature tensor operator to calculate the topological enhancement feature map and extracting local high-frequency abrupt change features specifically includes: A morphological curvature tensor operator is used to construct the Hessian matrix based on the first and second partial derivatives and to calculate the principal curvature from the eigenvalues ​​of the Hessian matrix. The first and second partial derivatives of the topology-enhanced feature map in the horizontal and vertical directions are calculated. Construct the Hessian matrix based on the first and second partial derivatives; Calculate the eigenvalues ​​of the Hessian matrix; Calculate the principal curvature of the topology-enhanced feature map based on the eigenvalues; When the principal curvature is greater than the preset curvature threshold, the features of the corresponding region are extracted as the local high-frequency abrupt change features; When the principal curvature is less than or equal to the preset curvature threshold, the features of the corresponding region are determined to be low-frequency smooth features and filtered out.

8. The method for extracting minute defect features on bolt surfaces based on image enhancement technology according to claim 7, characterized in that, The steps for generating a set of high-risk features for a target based on local high-frequency dramatic changes specifically include: Based on the surface normal field and the principal curvature, the morphological depth and morphological sharpness values ​​of the local high-frequency abrupt change features are calculated. The original sharpness value is obtained by multiplying the morphological depth value and the morphological sharpness value, and then the minimum and maximum values ​​of the original sharpness value in the current image are normalized by minimum-maximum value to obtain the topological sharpness index with a value range of 0 to 1. When the topological sharpness index is higher than the preset sharpness threshold, the local high-frequency abrupt change feature is determined to be a deep and sharp V-shaped feature. The topological sharpness index is multiplied by the spatial enhancement weight corresponding to the region where the feature is located to obtain a risk weight value. The V-shaped feature is then added to the target high-risk feature set. When the topological sharpness index is lower than or equal to the preset sharpness threshold, the local high-frequency abrupt change feature is determined to be a shallow and wide U-shaped feature and is filtered out.

9. The method for extracting minute defect features on bolt surfaces based on image enhancement technology according to claim 1, characterized in that, The process of generating a set of high-risk features of the target and mapping it to a two-dimensional image space to generate a defect risk feature map specifically includes: Obtain the spatial coordinates and risk weight value of each feature point in the target high-risk feature set; Using preset perspective projection parameters corresponding to the original two-dimensional image sequence, the spatial coordinates are projected onto the two-dimensional image space to obtain two-dimensional pixel coordinates; The risk weight value is mapped to a pseudo-color pixel value corresponding to the two-dimensional pixel coordinates in the two-dimensional image space; The defect risk feature map is generated based on the pseudo-color pixel values ​​and the two-dimensional pixel coordinates.

10. The method for extracting minute defect features on bolt surfaces based on image enhancement technology according to claim 1, characterized in that, After generating alarm commands, re-inspection commands, or pass commands respectively, when generating a re-inspection command, the method further includes: In response to the re-inspection instruction, the region in the defect risk feature map corresponding to the re-inspection instruction is identified as a suspicious region, and the coordinates of the suspicious region are extracted. The direction of the local surface normal vector corresponding to the suspicious area is determined based on the coordinates of the suspicious area, and the preset multi-light source angle is adjusted according to the direction of the local surface normal vector to generate an updated light source angle. The image acquisition device used to acquire the original two-dimensional image sequence is controlled to perform secondary image acquisition on the bolt surface under the updated light source angle to obtain an updated two-dimensional image sequence. The updated two-dimensional image sequence is used as the new original two-dimensional image sequence, and the method steps of claim 1 are repeated.

Citation Information

Cited By

  • Machine vision-based mobile phone lens mount quality detection system

    CN122199537A

  • Circuit board assembly defect feature recognition method based on deep learning

    CN122265748A

  • A Deep Learning-Based Method for Defect Feature Recognition of Circuit Board Assemblies

    CN122265748B