Surface concavity and convexity recognition method based on image clarity evaluation
Through the method based on image clarity evaluation, industrial cameras, improved Tenengrad gradient operators and Otsu algorithms are used to identify the concave and convex areas of the object surface, solving the recognition limitations of traditional methods in weak textures and complex lighting environments, and achieving efficient and accurate surface concave and convex recognition.
Patent Information
- Application Number
- CN202510779668.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-12
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2045-06-12
AI Technical Summary
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.
Using an image clarity evaluation method, single images of the object surface are collected through industrial cameras, grayscale processing is performed, and noise cancellation is eliminated using wavelet transform. Combined with the improved Tenengrad gradient operator and Otsu algorithm, the concave and convex regions are identified and the surface depth estimation model is constructed.
It realizes rapid and accurate identification of surface concave and convex areas under weak texture or complex lighting environments, improves identification accuracy and efficiency, and reduces equipment costs.
Smart Images

Figure CN120318307B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of image processing, and in particular relates to a surface concave-convex recognition method based on image clarity evaluation. Background Art
[0002] Surface asperity recognition primarily distinguishes uneven areas on an object's surface through various measurement methods. It is crucial for research in fields such as precision manufacturing, semiconductor testing, materials science, biomedical imaging, and cultural relic restoration. Accurately identifying surface asperities is crucial for assessing product surface quality (such as scratches, pits, and bumps), analyzing material microscopic properties (such as roughness and wear), and reconstructing 3D topography.
[0003] At present, surface concave-convex recognition methods mainly include:
[0004] (1) Multi-viewing method: Using two or more cameras to capture the same object from different perspectives, the surface depth is determined by matching corresponding points and calculating disparity. However, this method requires camera calibration and surfaces with rich surface textures to achieve reliable matching.
[0005] (2) Structured light method: This method actively projects a specific pattern of light (such as stripes or spots) onto the surface of an object and accurately calculates the three-dimensional coordinates by analyzing the deformed pattern. This method has high accuracy. However, this method has high equipment costs, is sensitive to ambient light, and has limited scanning speed.
[0006] (3) Interference method: This method uses the interference principle of light waves to measure surface height changes with an accuracy of nanometers. However, this method requires complex equipment and is sensitive to environmental vibrations.
[0007] (4) Scattering method: When light is irradiated on the surface of an object, the surface structure will cause the light to scatter. The distribution of the scattered light is related to the surface structure and other characteristics. By detecting the intensity and angular distribution of the scattered light, the degree of surface roughness can be evaluated. However, the intensity of scattered light is easily affected by various factors such as the environment, making it difficult to establish a quantitative relationship between the scattering signal and the surface roughness. Summary of the Invention
[0008] The purpose of the present invention is to provide a surface concavity and convexity recognition method based on image clarity evaluation, which solves the limitations of traditional surface concavity and convexity recognition methods in weak-texture or textureless surfaces, complex lighting environments, and monocular imaging, low-cost, and rapid detection application scenarios.
[0009] The technical solution adopted by the present invention is a surface concave-convex recognition method based on image clarity evaluation, which specifically includes the following steps:
[0010] Step 1: Image acquisition and preprocessing: Use an industrial camera to acquire a single image of the object surface, convert the acquired image into grayscale, and use wavelet transform to remove noise and quantize the grayscale image.
[0011] Step 2: Image clarity feature acquisition: Use the improved Tenengrad gradient operator to calculate the preprocessed image in step 1 to obtain image clarity features, normalize the Tenengrad gradient operator results, and generate a Tenengrad gradient image;
[0012] Step 3: Concave-convex region identification: The improved Otsu algorithm is used to determine the optimal threshold of the Tenengrad gradient image, and the Tenengrad gradient image is binarized according to the optimal threshold to identify concave-convex regions;
[0013] Step 4: Depth estimation of concave and convex areas: Analyze the mapping relationship between Tenengrad gradient and surface height, build a surface depth estimation model, and input Tenengrad gradient data into the depth estimation model to obtain the depth value of the concave and convex area.
[0014] The present invention is also characterized in that, as a preferred embodiment, the specific process of step 1 is: using a high-resolution industrial camera to face the surface of the object vertically and capture a single image under a uniform diffuse light source; grayscale processing is performed on the captured image, and a three-layer decomposition is performed using a Haar wavelet basis, and the high-frequency subband coefficients are processed by a soft threshold function to suppress Gaussian noise and quantization error and smooth grayscale discontinuities.
[0015] Preferably, in step 2, an improved Tenengrad gradient operator is used to obtain the image clarity feature, namely:
[0016]
[0017] in, G x (s) ,G y (s) For the s The Sobel operator under scale, that is s =1, Sobel kernel size is 3×3; s =2, Sobel kernel size is 5×5; s =3, Sobel kernel size is 7×7, I s (x,y) Gaussian pyramid s layer images, α s is the weight coefficient, between 0 and 1.
[0018] Normalize the Tenengrad gradient operator result to generate the Tenengrad gradient image, namely:
[0019]
[0020] in, T(x,y) Indicates location ( 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 normalized Tenengrad gradient image at position ( x , y ) is the gradient value at .
[0021] Guided filtering is used to smooth the local gradient mutation of the normalized result, which can be expressed as:
[0022]
[0023] in, T smooth ( x , y ) indicates the smoothed gradient image at position ( x , y ), Ω( x , y ) indicates the pixel point ( x , y ) is the local neighborhood window centered on λ is the normalization factor, which represents the inverse of the sum of the weight coefficients in the neighborhood. is the weight coefficient of the guided filter, that is:
[0024]
[0025] in, Represents a local neighborhood window Ω ( x , y ) the average value of the internal gradient, α To adjust the parameters, α is a constant greater than 0.
[0026] Preferably, step 3 specifically includes:
[0027] S31, smooth the normalized Tenengrad gradient image and calculate each gradient value T smooth ( x , y ) P ( T smooth ), and the histogram of the gradient values is statistically calculated.
[0028] S32. Arrange the gradient values in descending order and remove the top 5% of extremely high gradient values; let the total number of gradient values be N , then the number of extremely high gradient values removed is 0.05 N , the gradient value set after removal is T f .
[0029] S33, in the gradient set T f For each possible threshold T , divide the gradient value into two parts: less than or equal to T The concave area is larger than T is a convex area, and the mean and probability of the concave area and the convex area are calculated respectively, then the between-class variance can be expressed as:
[0030]
[0031] in, μ 凹 (T) represents the mean value of the concave area, μ 凸 (T) represents the mean of the convex region, ω 凹 (T) represents the concave area probability, ω 凸 (T) represents the probability of convex area.
[0032] S34. Introduce spatial continuity constraints, namely:
[0033]
[0034] in, d i Represents pixels i The Euclidean distance to the gradient mutation area, σ Represents the Gaussian kernel width, usually σ=5 , Represents the balance factor, usually =0.3, n Indicates the number of pixels in the neighborhood.
[0035] S35. Under the condition of satisfying spatial continuity constraints, select the threshold that maximizes the inter-class variance As the final segmentation threshold, that is:
[0036]
[0037] S36, according to the determined threshold , divide the gradient image into concave and convex areas:
[0038]
[0039] Preferably, in step 4, the expression of the surface depth estimation model is:
[0040]
[0041] in, k is the calibration coefficient, which is used to convert the normalized gradient value into a depth value. 、 are the global gradient maximum and minimum.
[0042] The beneficial effects of the present invention are:
[0043] (1) The surface concave-convex recognition method based on image clarity evaluation proposed in the present invention can quickly and accurately identify surface concave-convex areas through image clarity;
[0044] (2) The improved Tenengrad gradient operator proposed in this invention obtains image clarity features, and integrates the multi-scale Sobel operator with the multi-level features of the Gaussian pyramid to solve the multi-scale contradiction problem in concave-convex recognition;
[0045] (3) This paper proposes an improved Otsu algorithm that incorporates constraints such as spatial continuity and exclusion of extremely high gradient values to overcome the over-segmentation problem of the traditional Otsu algorithm on low-contrast surfaces. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 This is a flow chart of the surface concave-convex recognition method based on image clarity evaluation of the present invention.
[0047] Figure 2 This is a structural diagram of type I concave-convex parts in Example 1.
[0048] Figure 3 This is the I-type concave-convex surface image of Example 1.
[0049] Figure 4 This is the Tenengrad gradient image of the I-type concave-convex surface of Example 1.
[0050] Figure 5 This is the image recognition result of type I concave-convex surface in Example 1.
[0051] Figure 6 This is the depth estimation result of the I-type concave-convex surface in Example 1.
[0052] Figure 7 This is a structural diagram of type II concave-convex parts in Example 1.
[0053] Figure 8 This is the type II concavoconvex surface image of Example 2.
[0054] Figure 9 This is the Tenengrad gradient image of the type II concave-convex surface of Example 2.
[0055] Figure 10 This is the result of type II concave-convex surface image recognition in Example 2.
[0056] Figure 11 This is the depth estimation result of the type II concave-convex surface in Example 2. DETAILED DESCRIPTION
[0057] The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0058] Example 1
[0059] The surface concave-convex recognition method based on image clarity evaluation of the present invention is specifically implemented according to the following steps:
[0060] (1) Image acquisition and preprocessing: A high-resolution industrial camera is used to face the I-shaped concave-convex surface vertically. The I-shaped concave-convex part is made of 6032 aluminum alloy with a hole depth of h 1 is 3 mm, the result is as follows Figure 2 As shown. A single image is collected under a uniform diffuse light source, and the image pixels are 512×512. The collected image is grayscaled and decomposed into three layers using the Haar wavelet basis. The high-frequency subband coefficients are processed by the soft threshold function to suppress Gaussian noise and quantization error and smooth the discontinuity of grayscale. The results are shown in Figure 3 shown.
[0061] (2) Image clarity feature acquisition: The improved Tenengrad gradient operator is used to calculate the pre-processed image in step 1 to obtain the image clarity feature, and the Tenengrad gradient operator result is normalized to a range of 0 to 255 to generate a Tenengrad gradient image; the guided filter is used to smooth the local gradient mutation of the normalized result, and the result is as follows: Figure 4 shown.
[0062] (3) Concave and convex area recognition: First, the normalized Tenengrad gradient image in step (2) is T norm Perform statistical processing; then, sort the gradient values in descending order and remove the top 5% of extremely high gradient values; then, select the gradient values less than or equal to the threshold T The area is defined as a concave area, which is greater than the threshold T The area is defined as the convex area, and the mean of the concave area and the convex area are calculated separately μ(T) and probability ω(T) ; Under the condition of satisfying spatial continuity constraints, select the threshold that maximizes the inter-class variance As the final segmentation threshold, the segmentation threshold is 82, and the gradient image is divided into concave and convex areas. The results are as follows Figure 5 As shown, the grayscale value of the concave area is 0, and the grayscale value of the convex area is 255;
[0063] (4) Depth estimation of concave and convex areas: Analyze the relationship between Tenengrad gradient and surface height mapping and build a surface depth estimation model:
[0064]
[0065] Among them, the calibration coefficient k is 3, T max 、 T min is the global gradient extremum.
[0066] Input the Tenengrad gradient data into the depth estimation model to obtain the depth value of the concave and convex area. The result is as follows Figure 6 As shown, the bottom point of the hole P 1 is -2.922mm, P 2 is -2.919mm, P 3 is -2.902 mm.
[0067] Example 2
[0068] The surface concave-convex recognition method based on image clarity evaluation of the present invention is specifically implemented according to the following steps:
[0069] (1) Image acquisition and preprocessing: A high-resolution industrial camera is used to face the II-type concave-convex surface vertically. The I-type concave-convex part is made of 6032 aluminum alloy, and the boss height is h 2 is 3 mm, the result is as follows Figure 7 As shown. A single image is collected under a uniform diffuse light source, and the image pixels are 512×512. The collected image is grayscaled and decomposed into three layers using the Haar wavelet basis. The high-frequency subband coefficients are processed by the soft threshold function to suppress Gaussian noise and quantization error and smooth the discontinuity of grayscale. The results are shown in Figure 8 shown.
[0070] (2) Image clarity feature acquisition: The improved Tenengrad gradient operator is used to calculate the pre-processed image in step 1 to obtain the image clarity feature, and the Tenengrad gradient operator result is normalized to a range of 0 to 255 to generate a Tenengrad gradient image; the guided filter is used to smooth the local gradient mutation of the normalized result, and the result is as follows: Figure 9 shown.
[0071] (3) Concave-convex area recognition: First, the normalized Tenengrad gradient image in step (2) is T norm Perform statistical processing; then, sort the gradient values in descending order and remove the top 5% of extremely high gradient values; then, select the gradient values less than or equal to the threshold T The area is defined as a concave area, which is greater than the threshold T The area is defined as the convex area, and the mean of the concave area and the convex area are calculated separately μ(T) and probability ω(T) ; Under the condition of satisfying spatial continuity constraints, select the threshold that maximizes the inter-class variance T ∗ As the final segmentation threshold, the threshold is 82, and the gradient image is segmented into concave and convex areas. The results are as follows Figure 10 As shown, the grayscale value of the concave area is 0, and the grayscale value of the convex area is 255;
[0072] (4) Depth estimation of concave and convex areas: Analyze the relationship between Tenengrad gradient and surface height mapping and build a surface depth estimation model:
[0073]
[0074] Among them, the calibration coefficient k is 3, T max 、 T min is the global gradient extremum.
[0075] Input the Tenengrad gradient data into the depth estimation model to obtain the depth value of the concave and convex area. The result is as follows Figure 11 As shown, the boss point Q 1 is 2.912 mm, Q 2 is 2.923mm, Q 3 is 2.901 mm.
[0076] From the above-mentioned Example 1 and Example 2, it can be seen that the surface concave-convex depth value estimated by the method of the present invention is very close to the actual value, with an error of no more than 0.1 mm, which indicates that the recognition result of the method is accurate.
[0077] Example 3
[0078] A single image of the object surface is captured, grayscaled, and wavelet transform is used to eliminate image noise and quantization errors. An improved Tenengrad gradient operator is used to obtain image clarity features and generate a normalized Tenengrad gradient image. The improved Otsu algorithm is used to determine the optimal threshold of the Tenengrad gradient image, and the Tenengrad gradient image is binarized and segmented. Pixels with gradient values less than or equal to the optimal threshold are considered concave areas. A surface depth estimation model is constructed, and the depth of concave and convex areas is estimated by analyzing the relationship between the Tenengrad gradient and the height.
[0079] Example 4
[0080] The surface concave-convex recognition method based on image clarity evaluation is specifically implemented according to the following steps:
[0081] Step 1: Use an industrial camera to obtain a single image of the object surface, convert the acquired image into grayscale, and use wavelet transform to remove noise and quantize the error of the grayscale image to generate a preprocessed image;
[0082] The method for acquiring a single image of the object surface is as follows: a high-resolution industrial camera is used to face the object surface vertically and capture a single image under a uniform diffuse light source to avoid interference from mirror reflections;
[0083] The method for denoising and processing quantization errors of grayscale images is as follows: Haar wavelet basis is used for three-layer decomposition, and the high-frequency subband coefficients are processed by soft threshold function to suppress Gaussian noise and quantization error and smooth grayscale discontinuity;
[0084] Step 2: Use the improved Tenengrad gradient operator to calculate the preprocessed image, obtain the image clarity features, normalize the Tenengrad gradient operator results, and generate a Tenengrad gradient image;
[0085] The improved Tenengrad gradient operator adopts a multi-scale gradient fusion method. It calculates the gradient amplitude of the image by combining 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.
[0086] 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 based on the optimal threshold to identify concave and convex areas;
[0087] Step 4: Analyze the mapping relationship between Tenengrad gradient and surface height, build 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 value of the concave and convex area.
[0088] Example 5
[0089] Based on Example 4, step 2 is as follows:
[0090] The improved Tenengrad gradient operator is used to obtain the image clarity feature, namely:
[0091]
[0092] in, G x (s) ,G y (s) For the s The Sobel operator under scale, that is s =1, Sobel kernel size is 3×3; s =2, Sobel kernel size is 5×5; s =3, Sobel kernel size is 7×7, I s (x,y) Gaussian pyramid s layer images, α s is the weight coefficient, α s The value range is 0 to 1;
[0093] Normalize the Tenengrad gradient operator result to generate the Tenengrad gradient image, namely:
[0094]
[0095] in, T(x,y) Indicates location ( x , y ), T min and T max Represent the minimum gradient value and maximum gradient value in the Tenengrad gradient image, Tnorm ( x , y ) represents the normalized Tenengrad gradient image at position ( x , y ) at the gradient value;
[0096] Guided filtering is used to smooth the local gradient mutation of the normalized result, which can be expressed as:
[0097]
[0098] in, T smooth ( x , y ) indicates the smoothed gradient image at position ( x , y ), Ω( x , y ) indicates the pixel point ( x , y ) is the local neighborhood window centered on λ is the normalization factor, which represents the inverse of the sum of the weight coefficients in the neighborhood. is the weight coefficient of the guided filter, that is:
[0099]
[0100] in, Represents a local neighborhood window Ω ( x , y ) the average value of the internal gradient, α To adjust the parameters, α is a constant greater than 0.
[0101] Example 6
[0102] The surface concave-convex recognition method based on image clarity evaluation of the present invention is as follows: Figure 1 As shown, please follow the steps below:
[0103] A high-resolution industrial camera is used to capture a single image of the surface perpendicular to the concave and convex surface under a uniform diffuse light source. The captured image is grayscaled and decomposed into three layers using the Haar wavelet basis. The high-frequency subband coefficients are processed using a soft threshold function to suppress Gaussian noise and quantization error and smooth out grayscale discontinuities.
[0104] The improved Tenengrad gradient operator is used to calculate the image clarity feature, namely:
[0105]
[0106] in, G x (s) ,G y (s) For the s The Sobel operator under scale, that is s =1, Sobel kernel size is 3×3; s =2, Sobel kernel size is 5×5; s =3, Sobel kernel size is 7×7, I s (x,y) Gaussian pyramid s layer images, α s is the weight coefficient.
[0107] Normalize the Tenengrad gradient operator result to generate the Tenengrad gradient image, namely:
[0108]
[0109] in, T(x,y) express Tenengrad The gradient image 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 normalized gradient image at position ( x , y ) is the gradient value at .
[0110] Guided filtering is used to smooth the local gradient mutation of the Tenengrad gradient image normalization result, that is:
[0111]
[0112] in, T smooth ( x , y ) indicates the smoothed gradient image at position ( x , y ), Ω( x , y ) indicates the pixel point ( x , y) is the local neighborhood window centered on λ is the normalization factor, w ( i , j ) is the weight coefficient of the guided filter, that is:
[0113]
[0114] in, μ Ω ( x , y ) represents the local neighborhood window Ω ( x , y ) the average value of the internal gradient, α is the adjustment parameter.
[0115] Statistically process the normalized Tenengrad gradient image and calculate each gradient value T smooth ( x , y ) P ( T smooth ), sort the gradient values in descending order and remove the top 5% of extremely high gradient values. For each possible threshold T , divide the gradient value into two parts: less than or equal to T The concave area is larger than T is a convex area, and the mean and probability of the concave area and the convex area are calculated respectively, then the between-class variance can be expressed as:
[0116]
[0117] in, μ 凹 (T) represents the mean value of the concave area, μ 凸 (T) represents the mean of the convex region, ω 凹 (T) represents the concave area probability, ω 凸 (T) represents the probability of convex area.
[0118] Under the condition of satisfying spatial continuity constraints, select the threshold that maximizes the inter-class variance As the final segmentation threshold. That is:
[0119]
[0120] According to the determined threshold , divide the gradient image into concave and convex areas:
[0121]
[0122] The expression of the surface depth estimation model is:
[0123]
[0124] in, k is the calibration coefficient, T max 、 T min is the global gradient extremum.
Claims
1. A surface concave-convex recognition method based on image clarity evaluation, characterized in that: A single image of the object surface is captured, grayscaled, and wavelet transform is used to eliminate image noise and quantization errors. An improved Tenengrad gradient operator is used to obtain image clarity features and generate a normalized Tenengrad gradient image. The improved Otsu algorithm is used to determine the optimal threshold of the Tenengrad gradient image, which is then binarized and segmented. Pixels with gradient values less than or equal to the optimal threshold are considered concave regions. A surface depth estimation model is constructed, and the depth of concave and convex regions is estimated using the relationship between the Tenengrad gradient and height. The improved Tenengrad gradient operator adopts a multi-scale gradient fusion method. It calculates the gradient amplitude of the image by combining 3×3, 5×5, and 7×7 multi-scale Sobel operators. It combines the multi-level features of the Gaussian pyramid to generate a normalized Tenengrad gradient image. It also uses guided filtering to smooth local gradient mutations and avoid texture interference. The improved Otsu algorithm introduces spatial continuity constraints on the basis of the traditional inter-class variance maximization, 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. Please follow the steps below to implement: Step 1: Use an industrial camera to obtain a single image of the object surface, convert the acquired image into grayscale, and use wavelet transform to remove noise and quantize the error of the grayscale image to generate a preprocessed image; Step 2: Use the improved Tenengrad gradient operator to calculate the preprocessed image, obtain the image clarity features, normalize the Tenengrad gradient operator results, and generate the Tenengrad gradient image; the details are as follows: The improved Tenengrad gradient operator is used to obtain the image clarity feature, namely: in, G x (s) ,G y (s) For the s The Sobel operator under scale, that is s =1, Sobel kernel size is 3×3; s =2, Sobel kernel size is 5×5; s =3, Sobel kernel size is 7×7, I s (x,y) Gaussian pyramid s layer images, α s is the weight coefficient, α s The value range is 0 to 1; Normalize the Tenengrad gradient operator result to generate the Tenengrad gradient image, namely: in, T(x,y) Indicates location ( x , y ), T min and T max Represent the minimum gradient value and maximum gradient value in the Tenengrad gradient image, T norm ( x , y ) represents the normalized Tenengrad gradient image at position ( x , y ) at the gradient value; Guided filtering is used to smooth the local gradient mutation of the normalized result, which can be expressed as: in, T smooth ( x , y ) indicates the smoothed gradient image at position ( x , y ), Ω( x , y ) indicates the pixel point ( x , y ) is the local neighborhood window centered on λ is the normalization factor, which represents the inverse of the sum of the weight coefficients in the neighborhood. is the weight coefficient of the guided filter, that is: in, Represents a local neighborhood window Ω ( x , y ) the average value of the gradient within, α To adjust the parameters, α is a constant greater than 0; 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 based on the optimal threshold to identify concave and convex areas; Step 4: Analyze the mapping relationship between Tenengrad gradient and surface height, build 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 value of the concave and convex area.
2. The surface concave-convex recognition method based on image clarity evaluation according to claim 1, characterized in that: The method for acquiring a single image of the object surface is as follows: a high-resolution industrial camera is used to face the object surface vertically, and a single image is collected under a uniform diffuse light source to avoid interference from mirror reflection.
3. The surface concave-convex recognition method based on image clarity evaluation according to claim 1, characterized in that: The method for grayscale image denoising and quantization error processing is as follows: Haar wavelet basis is used for three-layer decomposition, high-frequency subband coefficients are processed by soft threshold function, Gaussian noise and quantization error are suppressed, and grayscale discontinuity is smoothed.
4. The surface concave-convex recognition method based on image clarity evaluation according to claim 1, characterized in that: Step 3 is as follows: Step 3.1: Smooth the normalized Tenengrad gradient image and calculate each gradient value T smooth ( x , y ) P ( T smooth ), and the histogram of the statistical gradient value; Step 3.2: Arrange the gradient values in descending order, remove the top 5% of extremely high gradient values, and set the total number of gradient values to N , then the number of extremely high gradient values removed is 0.05 N , the gradient value set after removal is T f ; Step 3.3, in the gradient value set T f For each estimated threshold T , divide the gradient value into two parts: less than or equal to T The concave area is larger than T is a convex area, and the mean and probability of the concave area and the convex area are calculated respectively, then the between-class variance is expressed as: in, represents the mean value of the concave area, represents the mean of the convex region, represents the concave area probability, represents the probability of convex area; Step 3.4: Introduce the spatial continuity constraint, namely: in, d i Represents pixels i The Euclidean distance to the gradient mutation area, σ represents the Gaussian kernel width, σ=5 , represents the balance factor, =0.3 ,n Indicates the number of pixels in the neighborhood; Step 3.5: Select the threshold that maximizes the inter-class variance while satisfying the spatial continuity constraint. As the final segmentation threshold, that is: Step 3.6: Based on the determined threshold , divide the gradient image into concave and convex areas: 。 5. The surface concave-convex recognition method based on image clarity evaluation according to claim 4, characterized in that: The expression of the surface depth estimation model is: in, k is the calibration coefficient, which is used to convert the normalized gradient value into a depth value. 、 are the global gradient maximum and minimum.
Citation Information
Patent Citations
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