Surface concave-convex identification method based on image definition evaluation

The method leverages image clarity evaluation with improved Tenengrad and Otsu algorithms to address surface profiling challenges in complex environments, achieving precise and cost-effective identification of surface features and depth.

CN120318307AActive Publication Date: 2025-07-15XIAN UNIV OF TECH
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510779668.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-12
Publication Date
2025-07-15
Estimated Expiration
2045-06-12

AI Technical Summary

Technical Problem

The existing surface concave and convex recognition methods have limitations in weak texture or textureless surfaces, complex lighting environments, and monocular imaging, low-cost and rapid detection application scenarios.

Method used

Using a method based on image clarity evaluation, the clarity features are obtained through image acquisition and preprocessing, and the improvement of Tenengrad gradient operators are used to identify and estimate the depth of the concave and convex region through image acquisition and preprocessing, and combined with the improved Otsu algorithm and depth estimation model.

Benefits of technology

It realizes rapid and accurate identification of surface concave and convex areas under weak texture or complex lighting environments, overcomes the limitations of traditional methods, and improves recognition accuracy and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120318307A_ABST
    Figure CN120318307A_ABST
Patent Text Reader

Abstract

The invention discloses a surface concave-convex recognition method based on image definition evaluation, which comprises the following steps of: acquiring a single image on the surface of an object through an industrial camera, performing graying processing on the image, and eliminating image noisy points and quantization errors by utilizing wavelet transform; the method comprises the following steps of: acquiring image definition characteristics by adopting an improved Tenengrad gradient operator, and generating a normalized Tenengrad gradient image; the optimal threshold value of the Tenenggrad gradient image is determined through an improved Otsu algorithm, binarization segmentation is carried out on the Tenenggrad gradient image, and pixels with gradient values smaller than or equal to the optimal threshold value are concave areas; and constructing a surface depth estimation model, and completing the estimation of the depth of the concave-convex region through the relation between the Tenenggrad gradient and the height. According to the method, the relationship between the image definition feature and the surface concavity and convexity is described; the concave-convex area on the surface of the object can be quickly and accurately identified through the image definition; and the calculation precision is high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of image processing, and specifically relates to a method for surface concavity and convexity recognition based on image sharpness evaluation. Background Art

[0002] Surface concavity and convexity recognition mainly distinguishes the uneven parts of the object surface through various measurement means, which is of crucial significance in the research fields such as precision manufacturing, semiconductor detection, materials science, biomedical imaging, and cultural relic restoration. Accurately identifying the surface concavity and convexity structure is crucial for tasks such as evaluating the surface quality of products (such as scratches, pits, bumps), analyzing the microscopic characteristics of materials (such as roughness, wear), and realizing three-dimensional topography reconstruction.

[0003] Currently, the methods for surface concavity and convexity recognition mainly include: (1) Multi-view vision method: Using two or more cameras to capture the same object from different perspectives, and determining the surface depth by matching corresponding points and calculating the disparity. However, this method requires accurate camera calibration and a surface with rich texture to achieve reliable matching.

[0004] (2) Structured light method: Actively projecting a specific pattern of light (such as stripes, light points) onto the object surface, and accurately calculating the three-dimensional coordinates by analyzing the deformed pattern. This method has high precision. However, the equipment cost of this method is high, it is sensitive to ambient light, and the scanning speed is limited.

[0005] (3) Interference method: Using the interference principle of light waves to measure the surface height change, and the accuracy can reach the nanometer level. However, the equipment of this method is complex and sensitive to environmental vibration.

[0006] (4) Scattering method: Using light to irradiate the object surface, the surface structure will cause light scattering, and the distribution of the scattered light is related to the surface structure and other characteristics. By detecting information such as the intensity and angular distribution of the scattered light, the degree of surface unevenness can be evaluated. However, the intensity of the scattered light is easily affected by various factors such as the environment, and it is difficult to establish a quantitative relationship between the scattered signal and the surface concavity and convexity characteristics. Summary of the Invention

[0007] The purpose of the present invention is to provide a method for surface concavity and convexity recognition based on image sharpness evaluation, which solves the limitations of traditional surface concavity and convexity recognition methods in weak texture or textureless surfaces, complex lighting environments, as well as monocular imaging, low-cost, and fast detection application scenarios.

[0008] The technical solution adopted by the present invention is a method for surface concavity and convexity recognition based on image sharpness evaluation, which specifically includes the following steps: Step 1: Image acquisition and preprocessing: Use an industrial camera to obtain a single image of the object surface, grayscale the acquired image, and apply wavelet transform to the grayscale image for noise reduction and quantization error processing; Step 2: Image sharpness feature acquisition: Use an improved Tenengrad gradient operator to calculate the preprocessed image in Step 1, obtain the image sharpness feature, normalize the result of the Tenengrad gradient operator, and generate a Tenengrad gradient image; Step 3: Concave and convex region recognition: Use an improved Otsu algorithm to determine the optimal threshold of the Tenengrad gradient image, and perform binary segmentation on the Tenengrad gradient image according to the optimal threshold to identify concave and convex regions; Step 4: Concave and convex region depth estimation: Analyze the mapping relationship between the Tenengrad gradient and the surface height, construct a surface depth estimation model, and input the Tenengrad gradient data into the depth estimation model to obtain the depth values of the concave and convex regions.

[0009] The features of the present invention also lie in that, preferably, the specific process of Step 1 is: Use a high-resolution industrial camera to vertically face the object surface, and acquire a single image under a uniform diffused light source; Grayscale the acquired image, and perform 3-layer decomposition using the Haar wavelet basis, process the high-frequency subband coefficients through a soft threshold function to suppress Gaussian noise and quantization error, and smooth the discontinuity of the grayscale.

[0010] Preferably, in Step 2, an improved Tenengrad gradient operator is used to obtain the image sharpness feature, that is:

[0011] wherein, G x (s) ,G y (s) is the Sobel operator at the s scale, that is s =1, the Sobel kernel size is 3×3; s =2, the Sobel kernel size is 5×5; s =3, the Sobel kernel size is 7×7, I s (x,y) is the s layer image of the Gaussian pyramid, α s is the weight coefficient, between 0 and 1.

[0012] Perform normalization processing on the result of the Tenengrad gradient operator to generate a Tenengrad gradient image, that is:

[0013] Among them, T(x,y) represents the gradient value at position ( x , y ). T min and T max respectively represent the minimum gradient value and the maximum gradient value in the Tenengrad gradient image. T norm ( x , y ) represents the gradient value of the normalized Tenengrad gradient image at position ( x , y ).

[0014] The normalized result is smoothed for local gradient mutation by guided filtering, which can be expressed as:

[0015] Among them, T smooth ( x , y ) represents the gradient value of the smoothed gradient image at position ( x , y ). Ω( x , y ) represents the local neighborhood window centered on the pixel point ( x , y ). λ is the normalization factor, representing the reciprocal of the sum of the weight coefficients in the neighborhood. is the weight coefficient of the guided filtering, that is:

[0016] Among them, represents the average value of the gradient values in the local neighborhood window Ω ( x , y ). α is the adjustment parameter. α is a constant greater than 0.

[0017] Preferably, step 3 specifically includes: S31. Smooth the normalized Tenengrad gradient image and calculate the probability distribution of each gradient value T smooth ( x , y ). P (T smooth ) and calculate the histogram of the gradient values.

[0018] S32. Arrange the gradient values in descending order and remove the top 5% of the extremely high gradient values; assume the total number of gradient values is N , then the number of extremely high gradient values to be removed is 0.05 N . Denote the set of gradient values after removal as T f .

[0019] S33. In the gradient set T f , for each possible threshold T , divide the gradient values into two parts: those less than or equal to T form the concave region, and those greater than T form the convex region. Then calculate the mean and probability of the concave region and the convex region respectively. The between-class variance can be expressed as:

[0020] where, μ 凹 (T) represents the mean of the concave region, μ 凸 (T) represents the mean of the convex region, ω 凹 (T) represents the probability of the concave region, ω 凸 (T) represents the probability of the convex region.

[0021] S34. Introduce the spatial continuity constraint term, that is:

[0022] where, d i represents the Euclidean distance from pixel i to the gradient mutation region, σ represents the Gaussian kernel width, usually σ = 5 , represents the balance factor, usually = 0.3, n represents the number of pixels in the neighborhood.

[0023] S35. Under the condition of satisfying the spatial continuity constraint, select the threshold that maximizes the between-class variance as the final segmentation threshold, that is:

[0024] S36. According to the determined threshold , the gradient image is segmented into concave and convex regions:

[0025] Preferably, in step 4, the expression of the surface depth estimation model is:

[0026] where k is the calibration coefficient, used to convert the normalized gradient value into a depth value, , are the global gradient maximum and minimum values.

[0027] The beneficial effects of the present invention are: (1) The surface concavity and convexity recognition method based on image sharpness evaluation proposed by the present invention can quickly and accurately identify the surface concavity and convexity regions through image sharpness; (2) The improved Tenengrad gradient operator proposed by the present invention is used to obtain the image sharpness features, and the multi-scale Sobel operator is fused with the multi-level features of the Gaussian pyramid to solve the multi-scale contradiction problem in concavity and convexity recognition; (3) The present invention proposes an improved Otsu algorithm, which incorporates constraints such as spatial continuity and exclusion of extremely high gradient values, and overcomes the over-segmentation problem of the traditional Otsu algorithm on low-contrast surfaces. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 is the flowchart of the surface concavity and convexity recognition method based on image sharpness evaluation of the present invention.

[0029] Figure 2 is the structure diagram of the type-I concave and convex part in Embodiment 1.

[0030] Figure 3 is the type-I concave and convex surface image in Embodiment 1.

[0031] Figure 4 is the Tenengrad gradient image of the type-I concave and convex surface in Embodiment 1.

[0032] Figure 5 is the image recognition result of the type-I concave and convex surface in Embodiment 1.

[0033] Figure 6 is the depth estimation result of the type-I concave and convex surface in Embodiment 1.

[0034] Figure 7 is the structure diagram of the type-II concave and convex part in Embodiment 1.

[0035] Figure 8 is the type-II concave and convex surface image in Embodiment 2.

[0036] Figure 9 is the type-II concave-convex surface Tenengrad gradient image of Example 2.

[0037] Figure 10 is the image recognition result of the type-II concave-convex surface of Example 2.

[0038] Figure 11 is the depth estimation result of the type-II concave-convex surface of Example 2. Detailed implementation mode

[0039] The present invention will be described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0040] Example 1 The surface concave-convex recognition method based on image sharpness evaluation of the present invention is specifically implemented according to the following steps: (1) Image acquisition and preprocessing: A high-resolution industrial camera is vertically facing the type-I concave-convex surface. The material of the type-I concave-convex part is 6032 aluminum alloy, and the hole depth h 1 is 3 mm, and the result is as Figure 2 shown. A single image is acquired under a uniform diffused light source, and the pixels of the image are 512×512; the acquired image is grayscale processed, and 3-layer decomposition is performed using the Haar wavelet basis. The high-frequency subband coefficients are processed by a soft threshold function to suppress Gaussian noise and quantization error, and the discontinuity of the grayscale is smoothed. The result is as Figure 3 shown.

[0041] (2) Image sharpness feature acquisition: The improved Tenengrad gradient operator is used to calculate the preprocessed image in step (1) to obtain the image sharpness feature. The result of the Tenengrad gradient operator is normalized, and the normalization range is 0~255 to generate a Tenengrad gradient image; guided filtering is used to perform smoothing processing on the local gradient mutation of the normalized result. The result is as Figure 4 shown.

[0042] (3) Concave-convex area recognition: First, statistical processing is performed on the normalized Tenengrad gradient image in step (2) T norm ; then, the gradient values are sorted in descending order, and the top 5% of the extremely high gradient values are removed; then, the area where the gradient value is less than or equal to the threshold T is defined as the concave area, and the area greater than the threshold T is defined as the convex area, and the means μ(T) and probabilities ω(T) of the concave area and the convex area are calculated respectively; under the condition of satisfying the spatial continuity constraint condition, the threshold that maximizes the between-class variance is selected as the final segmentation threshold. The segmentation threshold is 82, and the gradient image is segmented into a concave area and a convex area. The result is asFigure 5 as shown, where the gray value of the concave region is 0 and the gray value of the convex region is 255; (4)Estimation of the depth of concave and convex regions: Analyze the mapping relationship between the Tenengrad gradient and the surface height, and construct a surface depth estimation model:

[0043] where the calibration coefficient k is 3, T max and T min are the global gradient extrema.

[0044] Input the Tenengrad gradient data into the depth estimation model to obtain the depth values of the concave and convex regions. The results are as Figure 6 shown, where the bottom point of the hole P 1 is -2.922 mm, P 2 is -2.919 mm, P 3 is -2.902 mm.

[0045] Example 2 The surface concave and convex recognition method based on image sharpness evaluation of the present invention is specifically implemented according to the following steps: (1)Image acquisition and preprocessing: Use a high-resolution industrial camera to vertically face the type-II concave and convex surface. The material of the type-I concave and convex part is 6032 aluminum alloy, and the height of the convex platform h 2 is 3 mm. The results are as Figure 7 shown. Collect a single image under a uniform diffused light source. The pixels of the image are 512×512; perform gray-scale processing on the collected image, and perform 3-layer decomposition using the Haar wavelet basis. Process the high-frequency sub-band coefficients through a soft threshold function to suppress Gaussian noise and quantization error, and smooth the discontinuity of the gray scale. The results are as Figure 8 shown.

[0046] (2)Obtaining image sharpness features: Use the improved Tenengrad gradient operator to calculate the preprocessed image in step 1 to obtain the image sharpness features. Normalize the results of the Tenengrad gradient operator, and the normalization range is 0~255 to generate a Tenengrad gradient image; use guided filtering to perform smoothing processing on the local gradient mutations of the normalized results. The results are as Figure 9 shown.

[0047] (3)Recognition of concave and convex regions: First, perform statistical processing on the normalized Tenengrad gradient image T norm in step (2); then, sort the gradient values in descending order and remove the top 5% of the extremely high gradient values; then, the gradient values less than or equal to the thresholdT The area less than the threshold is defined as the concave area, and the area greater than the threshold T is defined as the convex area, and the means of the concave area and the convex area are calculated respectively μ(T) and probabilities ω(T) ; Under the condition of satisfying the spatial continuity constraint, select the threshold that maximizes the variance between classes T ∗ as the final segmentation threshold. The threshold is 82, and the gradient image is segmented into a concave area and a convex area. The result is as Figure 10 shown, where the gray value of the concave area is 0 and the gray value of the convex area is 255; (4)Estimation of the depth of concave and convex areas: Analyze the mapping relationship between the Tenengrad gradient and the surface height, and construct a surface depth estimation model:

[0048] where the calibration coefficient k is 3, T max , T min are the global gradient extrema.

[0049] Input the Tenengrad gradient data into the depth estimation model to obtain the depth values of the concave and convex areas. The result is as Figure 11 shown, where the depth of the boss point Q 1 is 2.912 mm, Q 2 is 2.923 mm, Q 3 is 2.901 mm.

[0050] From the above Examples 1 and 2, it can be seen that the concave and convex depth values of the object surface estimated by the method of the present invention are very close to the actual values, and the error is not greater than 0.1 mm; this shows that the recognition result of this method is accurate.

[0051] Example 3 Collect a single image of the object surface, perform grayscale processing on the image, and use wavelet transform to eliminate image noise and quantization error; use an improved Tenengrad gradient operator to obtain the image sharpness feature and generate a normalized Tenengrad gradient image; use the improved Otsu algorithm to determine the optimal threshold of the Tenengrad gradient image, and perform binary segmentation on the Tenengrad gradient image, where the pixels with gradient values less than or equal to the optimal threshold are the concave areas; construct a surface depth estimation model, and complete the estimation of the depth of the concave and convex areas through the relationship between the Tenengrad gradient and the height.

[0052] Example 4 A method for identifying surface concavity and convexity based on image sharpness evaluation is specifically implemented according to the following steps: Step 1: Use an industrial camera to obtain a single image of the object surface, grayscale the collected image, and apply wavelet transform to the grayscale image for denoising and quantization error processing to generate a preprocessed image; The method for obtaining a single image of the object surface is as follows: Use a high-resolution industrial camera to face the object surface vertically, and collect a single image under a uniform diffused light source to avoid specular reflection interference; The method for denoising and quantization error processing of the grayscale image is as follows: Select the Haar wavelet basis for three-layer decomposition, process the high-frequency subband coefficients through a soft threshold function to suppress Gaussian noise and quantization error, and smooth the discontinuity of the grayscale; Step 2: Use an improved Tenengrad gradient operator to calculate the preprocessed image, obtain the image sharpness feature, normalize the result of the Tenengrad gradient operator, and generate a Tenengrad gradient image; The improved Tenengrad gradient operator uses a multi-scale gradient fusion method, calculates the gradient magnitude of the image through the combination of 3×3, 5×5, and 7×7 multi-scale Sobel operators, combines the multi-level features of the Gaussian pyramid, generates a normalized Tenengrad gradient image, and uses guided filtering to smooth local gradient mutations to avoid texture interference.

[0053] Step 3: Use an improved Otsu algorithm to determine the optimal threshold of the Tenengrad gradient image, and perform binary segmentation on the Tenengrad gradient image according to the optimal threshold to identify concave and convex regions; Step 4: Analyze the mapping relationship between the Tenengrad gradient and the surface height, construct a surface depth estimation model, and input the Tenengrad gradient data calculated in Step 2 into the surface depth estimation model to obtain the depth values of the concave and convex regions.

[0054] Example 5 Based on Example 4, Step 2 is as follows: Use an improved Tenengrad gradient operator to obtain the image sharpness feature, that is:

[0055] where, G x (s) ,G y (s) is the Sobel operator at the s scale, that is s =1, the Sobel kernel size is 3×3; s =2, the Sobel kernel size is 5×5; s= 3, the Sobel kernel size is 7×7, I s (x,y) is the image of the s layer of the Gaussian pyramid, α s is the weight coefficient, α s and its value ranges from 0 to 1; Normalize the result of the Tenengrad gradient operator to generate the Tenengrad gradient image, that is:

[0056] Among them, T(x,y) represents the gradient value at position ( x , y ), T min and T max represent the minimum gradient value and the maximum gradient value in the Tenengrad gradient image respectively, T norm ( x , y ) represents the gradient value of the normalized Tenengrad gradient image at position ( x , y ); Use guided filtering to smooth the local gradient mutation of the normalization result, which is expressed as:

[0057] Among them, T smooth ( x , y ) represents the gradient value of the smoothed gradient image at position ( x , y ), Ω( x , y ) represents the local neighborhood window centered on the pixel point ( x , y ), λ is the normalization factor, representing the reciprocal of the sum of the weight coefficients in the neighborhood, is the weight coefficient of the guided filtering, that is:

[0058] Among them, represents the average value of the gradient values within the local neighborhood window Ω ( x , y ), α is the adjustment parameter,α is a constant greater than 0.

[0059] Example 6 The surface unevenness recognition method based on image sharpness evaluation of the present invention, as Figure 1 shown, is specifically implemented according to the following steps: Use a high-resolution industrial camera to vertically face the uneven surface, and collect a single surface image under a uniform diffused light source; perform grayscale processing on the collected image, and perform 3-layer decomposition using the Haar wavelet basis, and process the high-frequency sub-band coefficients through a soft threshold function to suppress Gaussian noise and quantization error, and smooth the discontinuity of grayscale.

[0060] Use an improved Tenengrad gradient operator to calculate the image sharpness feature, that is:

[0061] Among them, G x (s) ,G y (s) is the Sobel operator at the s scale, that is s =1, the Sobel kernel size is 3×3; s =2, the Sobel kernel size is 5×5; s =3, the Sobel kernel size is 7×7, I s (x,y) is the image of the s layer of the Gaussian pyramid, α s is the weight coefficient.

[0062] Normalize the result of the Tenengrad gradient operator to generate a Tenengrad gradient image, that is:

[0063] Among them, T(x,y) represents Tenengrad the gradient value of the gradient image at the position ( x , y ), T min and T max respectively represent the minimum gradient value and the maximum gradient value in the Tenengrad gradient image, T norm ( x , y ) represents the gradient image after normalization at the position ( x ,y ) gradient value at

[0064] Use guided filtering to smooth the local gradient mutations in the normalized result of the Tenengrad gradient image, that is:

[0065] where, T smooth ( x , y ) represents the gradient value of the smoothed gradient image at the position ( x , y ), Ω( x , y ) represents the local neighborhood window centered on the pixel point ( x , y ), λ is the normalization factor, w ( i , j ) is the weight coefficient of the guided filtering, that is:

[0066] where, μ Ω ( x , y ) represents the average value of the gradient values within the local neighborhood window Ω ( x , y ), α is the adjustment parameter.

[0067] Statistically process the normalized Tenengrad gradient image, calculate the probability distribution T smooth ( x , y ) of each gradient value P ( T smooth ), sort the gradient values in descending order, and remove the top 5% of the extremely high gradient values. For each possible threshold T , divide the gradient values into two parts: those less than or equal to T are the concave regions, and those greater than T are the convex regions, and calculate the mean and probability of the concave and convex regions respectively. Then the between-class variance can be expressed as:

[0068] where, μ 凹 (T) represents the mean of the concave region, μ 凸(T) represents the convex region mean, ω 凹 (T) represents the concave region probability, ω 凸 (T) represents the convex region probability.

[0069] Under the condition of satisfying the spatial continuity constraint, select the threshold that maximizes the between-class variance as the final segmentation threshold. That is:

[0070] According to the determined threshold , segment the gradient image into concave and convex regions:

[0071] The expression of the surface depth estimation model is:

[0072] where k is the calibration coefficient, T max , T min are the global gradient extrema.

Claims

1. A method for identifying surface unevenness based on image sharpness evaluation, characterized in that, Collect a single image of the object surface, grayscale the image, and use wavelet transform to eliminate image noise and quantization error; adopt an improved Tenengrad gradient operator to obtain the image sharpness feature and generate a normalized Tenengrad gradient image; use the improved Otsu algorithm to determine the optimal threshold of the Tenengrad gradient image and perform binary segmentation on the Tenengrad gradient image, where pixels with gradient values less than or equal to the optimal threshold are concave regions; construct a surface depth estimation model and estimate the depth of concave and convex regions through the relationship between Tenengrad gradient and height. The improved Tenengrad gradient operator adopts a multi-scale gradient fusion method, calculates the gradient amplitude of the image through the combination of 3×3, 5×5, and 7×7 multi-scale Sobel operators, combines the multi-level features of the Gaussian pyramid, generates a normalized Tenengrad gradient image, and uses guided filtering to smooth local gradient mutations to avoid texture interference. The improved Otsu algorithm is based on the traditional maximum between-class variance, introduces spatial continuity constraints, and excludes the top 5% of extremely high gradient values, i.e., abnormal noise points, according to the image gradient distribution histogram to determine the optimal threshold.

2. The surface unevenness recognition method based on image sharpness evaluation according to claim 1, wherein Specifically, it is implemented according to the following steps: Step 1: Use an industrial camera to obtain a single image of the object surface, grayscale the collected image, and perform denoising and quantization error processing on the grayscale image using wavelet transform to generate a preprocessed image. Step 2: Use the improved Tenengrad gradient operator to calculate the preprocessed image, obtain the image sharpness feature, normalize the result of the Tenengrad gradient operator, and generate a Tenengrad gradient image. Step 3: Use the improved Otsu algorithm to determine the optimal threshold of the Tenengrad gradient image, and perform binary segmentation on the Tenengrad gradient image according to the optimal threshold to identify concave and convex regions. Step 4: Analyze the mapping relationship between the Tenengrad gradient and the surface height, construct a surface depth estimation model, and input the Tenengrad gradient data calculated in Step 2 into the surface depth estimation model to obtain the depth values of concave and convex regions.

3. The surface unevenness recognition method based on image sharpness evaluation according to claim 2, characterized in that The method for obtaining a single image of the object surface is as follows: Use a high-resolution industrial camera to vertically face the object surface and collect a single image under a uniform diffused light source to avoid specular reflection interference.

4. The surface unevenness recognition method based on image sharpness evaluation according to claim 2, characterized in that The method for denoising and quantization error processing of the grayscale image is specifically as follows: Select the Haar wavelet basis for 3-layer decomposition, process the high-frequency subband coefficients through a soft threshold function to suppress Gaussian noise and quantization error and smooth the discontinuity of grayscale.

5. The surface unevenness recognition method based on image sharpness evaluation according to claim 4, characterized in that Step 2 is specifically as follows: Use the improved Tenengrad gradient operator to obtain the image sharpness feature, that is: Among them, G x (s) ,G y (s) is the Sobel operator at scale s , that is s = 1, the Sobel kernel size is 3×3; s = 2, the Sobel kernel size is 5×5; s = 3, the Sobel kernel size is 7×7, I s (x,y) is the image of the s th layer of the Gaussian pyramid, α s is the weight coefficient, α s and its value ranges from 0 to 1; Normalize the result of the Tenengrad gradient operator to generate a Tenengrad gradient image, that is: Among them, T(x,y) represents the gradient value at the position ( x , y ); T min and T max respectively represent the minimum gradient value and the maximum gradient value in the Tenengrad gradient image; T norm ( x , y ) represents the gradient value of the normalized Tenengrad gradient image at the position ( x , y ). Use guided filtering to smooth the local gradient mutation of the normalized result, expressed as: Among them, T smooth ( x , y ) represents the gradient value of the smoothed gradient image at the position ([[]] x , y ). Ω([[]] x , y ) represents the local neighborhood window centered on the pixel point ([[]] x , y ), λ is the normalization factor, representing the reciprocal of the sum of the weight coefficients in the neighborhood, is the weight coefficient of the guided filter, that is: Among them, represents the local neighborhood window Ω ( x , y ) is the average value of the gradient values within it, α is the adjustment parameter, α is a constant greater than 0.

6. The surface concavity and convexity recognition method based on image sharpness evaluation according to claim 5, wherein, Step 3 is specifically as follows: Step 3.1: Smooth the normalized Tenengrad gradient image and calculate each gradient value T smooth ( x , y ) probability distribution P ( T smooth ), and statistically calculate the histogram of gradient values; Step 3.2: Arrange the gradient values in descending order, and remove the top 5% of the extremely high gradient values. Let the total number of gradient values be N , then the number of extremely high gradient values to be removed is 0.05 N . Denote the set of gradient values after removal as T f ; Step 3.

3. In the gradient value set T f , for each estimated threshold T , divide the gradient values into two parts: those less than or equal to T are the concave regions, and those greater than T are the convex regions, and calculate the mean and probability of the concave region and the convex region respectively. Then the between-class variance is expressed as: Among them, represents the concave region mean, represents the convex region mean, represents the concave region probability, represents the convex region probability; Step 3.4: Introduce a spatial continuity constraint term, that is: Among them, d i represents the Euclidean distance from the pixel i to the gradient mutation region, σ represents the Gaussian kernel width, usually σ = 5 , represents the balance factor, = 0.3 ,n represents the number of pixels in the neighborhood; Step 3.5: Select the threshold that maximizes the between-class variance under the condition of satisfying the spatial continuity constraint as the final segmentation threshold, i.e.: Step 3.

6. According to the determined threshold , segment the gradient image into concave regions and convex regions: 。 7. The surface unevenness recognition method based on image sharpness evaluation according to claim 6, wherein The expression of the surface depth estimation model is as follows: Among them, k is the calibration coefficient, which is used to convert the normalized gradient value into a depth value. and are the global maximum and minimum gradient values.

Citation Information

Patent Citations

  • Image definition judgment method based on improved Retinex algorithm

    CN111062887A

  • NSST and variance time domain and frequency domain combined microscopic image definition evaluation method

    CN115375597A

  • Part image high-precision focusing method and device based on improved gradient weighting

    CN117252915A

  • Low-grade highway construction quality intelligent detection method and system

    CN119648696A

  • Defect identification method and system for molybdenum-rhenium alloy pipe fitting based on high-definition microscopic image

    CN120047407A