Image-driven super-hydrophobic coating uniformity evaluation method

By vertically shooting grayscale images with a single light source and combining the average and standard deviation of the statistical depth of an equidistant grid, the problem of rapid evaluation of the uniformity of super-hydrophobic coatings is solved, efficient and low-cost quantification of coating uniformity is achieved, and the quality control and service reliability of the coating are improved.

CN120721722APending Publication Date: 2025-09-30CHONGQING JIAOTONG UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510844061.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-23
Publication Date
2025-09-30

AI Technical Summary

Technical Problem

Existing technologies make it difficult to quickly and contactlessly evaluate the uniformity of superhydrophobic coatings over a full surface area, resulting in reduced efficiency and service failure of coatings in areas such as aircraft bodies, marine structures, and biomedical implants.

Method used

Grayscale images are taken vertically with a single light source and mapped into a microstructure depth field using linear calibration. The mean and standard deviation of the depth are statistically analyzed using an equidistant grid, the coefficient of variation is calculated, and the fluctuation distribution is verified using Shannon entropy to achieve non-contact rapid quantification of the uniformity of the superhydrophobic coating.

Benefits of technology

It achieves rapid and traceable quantification of superhydrophobic coatings, improves quality grading accuracy and measurement efficiency, reduces costs, and ensures coating uniformity and service reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120721722A_ABST
    Figure CN120721722A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of surface engineering measurement, in particular to an image-driven super-hydrophobic coating uniformity evaluation method, which comprises the following steps of: firstly, acquiring a color image of a coating to be measured under one-way natural light and vertical imaging conditions, and graying; dividing the image into a plurality of image units according to a preset equidistant rectangular grid; linear gray-depth mapping is obtained through primary illumination calibration of the reference calibration plate, and the gray value of each unit is converted into a surface microstructure depth value; counting an average value and a standard deviation of all depth values, and calculating a variation coefficient to represent overall uniformity; further dispersing the variable coefficient according to a box line-quantile strategy and calculating the Shannon entropy, and verifying the fluctuation distribution balance; the method does not need multiple light sources and contact scanning, has the advantages of simplicity and convenience in operation, rapidness in measurement and full-breadth quantification, and can be used for monitoring the preparation process of the super-hydrophobic coating and inspecting the service quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of surface engineering measurement technology, and in particular to an image-driven super-hydrophobic coating uniformity evaluation method. Background Art

[0002] Superhydrophobic coatings, due to their self-cleaning, anti-icing, and corrosion-resistant properties, are widely used in aircraft, offshore structures, biomedical implants, and new energy equipment. The coating's hydrophobicity depends on the coordinated uniformity of its micro- and nanostructure morphology and chemical composition. Excessive deviations in local microstructure height, density, or chemical composition can induce droplet stagnation, the accumulation of salt deposits or ice crystals, and ultimately lead to decreased efficiency and service failure. Therefore, establishing a rapid, non-contact, full-scale uniformity evaluation method is crucial for process quality control and service reliability. Summary of the Invention

[0003] In response to the many problems existing in the above-mentioned prior art, the present invention provides an image-driven super-hydrophobic coating uniformity evaluation method. The present invention uses a single light source to vertically shoot a grayscale image and then linearly calibrate it to map it into a microstructure depth field. The average value and standard deviation of the depth are statistically calculated on an equidistant grid, and the coefficient of variation is calculated to characterize the hydrophobic uniformity. The Shannon entropy is used to verify the fluctuation distribution, thereby realizing non-contact rapid quantification of the uniformity of the full-width super-hydrophobic coating.

[0004] An image-driven super-hydrophobic coating uniformity evaluation method comprises the following steps:

[0005] Acquire an image of the surface of the super-hydrophobic coating to be tested under single illumination conditions, and grayscale the image to obtain a grayscale image;

[0006] Dividing the grayscale image into a plurality of image units according to a preset space;

[0007] The grayscale value of each image unit is converted into the corresponding surface microstructure depth value using the grayscale-depth mapping relationship obtained by single illumination calibration of the reference calibration plate;

[0008] The average value and standard deviation are calculated according to the depth values ​​of all image units, and the ratio of the standard deviation to the average value is used as the coefficient of variation. The coefficient of variation is used to characterize the hydrophobic uniformity of the coating surface.

[0009] Preferably, during the image acquisition process, the optical axis of the digital imaging device is kept perpendicular to the surface of the super-hydrophobic coating to be measured, a fixed imaging distance is set and exposure parameters are unified, and only unidirectional natural light is used as the light source.

[0010] Preferably, before grayscale processing, the original images are uniformly adjusted to the same pixel size, and grayscale stretching is performed on the brightness distribution.

[0011] Preferably, the preset space is divided into equidistant rectangular grids, and the number of grids is not less than three units.

[0012] Preferably, when performing equidistant rectangular grid division, an edge alignment method is adopted so that each image unit covers the same area of ​​the coating surface.

[0013] Preferably, the mapping relationship between the grayscale and the surface microstructure depth is a linear relationship, and the linear relationship is determined by a one-time illumination calibration in combination with known step height information on a reference calibration plate.

[0014] Preferably, when obtaining the depth value of the surface microstructure, a shape-from-shadow algorithm is applied to each image unit to perform single-view 3D reconstruction, and constraint optimization is performed using the relationship between the illumination direction vector and the imaging geometry.

[0015] Preferably, after calculating the coefficient of variation, the coefficient of variation is divided into several numerical intervals, and the Shannon entropy value is calculated based on the frequency of occurrence of each interval to verify the uniformity of the distribution of the coefficient of variation.

[0016] Preferably, the numerical interval is divided based on statistical box plot analysis combined with quantile thresholds.

[0017] Compared with the prior art, the advantages and beneficial effects of the present invention are:

[0018] The linear grayscale-depth mapping relationship obtained through a single illumination calibration and the single light source vertical shooting configuration enables rapid and traceable quantification of the coating microstructure depth while keeping the camera geometry constant.

[0019] Through equidistant rectangular grid division and coefficient of variation statistics, an objective evaluation of the hydrophobic uniformity over the entire surface is achieved, avoiding the problem of insufficient information in the point measurement method.

[0020] Through the secondary verification of the distribution of coefficient of variation by Shannon entropy, further judgment of the spatial equilibrium of depth fluctuations is achieved, and the accuracy of quality grading is improved.

[0021] Through single-view shape-from-shadow 3D reconstruction and illumination vector constraint optimization, it is possible to obtain micron-level depth fields without expensive multiple light sources or scanning equipment, improving measurement efficiency and reducing costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 Schematic diagram of the process of the present invention;

[0023] Figure 2 Schematic diagram of image acquisition in the present invention;

[0024] Figure 3 This is a demonstration diagram of the segmentation interface in the present invention;

[0025] Figure 4 This is a demonstration diagram of three-dimensional height reconstruction in the present invention;

[0026] Figure 5 Constructing a depth result demonstration graph in the present invention;

[0027] Figure 6.1-Figure 6.3 This is a scatter plot of the coefficient of variation under the conditions of shooting distances of 10 cm, 20 cm, and 30 cm in the present invention. DETAILED DESCRIPTION

[0028] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.

[0029] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise," "include," etc. used herein indicate the presence of the features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0030] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.

[0031] like Figure 1 As shown, an image-driven super-hydrophobic coating uniformity evaluation method includes the following steps:

[0032] Acquire an image of the surface of the super-hydrophobic coating to be tested under single illumination conditions, and grayscale the image to obtain a grayscale image;

[0033] To ensure the monotony of subsequent grayscale-depth mapping, the entire capture process utilizes only unidirectional natural light. A north-facing window or a diffuser screen can be used to maintain consistent light direction and steady brightness during capture, thus satisfying the assumption of approximate Lambertian reflectance. The camera is mounted on a fixed bracket with a spirit level, and the gimbal is adjusted to maintain the optical axis perpendicular to the coated sample surface. After locking autofocus, switch to manual mode, unify ISO, shutter, and aperture, and disable auto white balance and auto gain to ensure that each batch of images falls within the same grayscale dynamic range.

[0034] After color image acquisition, it is converted to an 8-bit grayscale matrix using a three-channel weighted averaging method, while retaining the original exposure metadata for retrospective calibration of the mapping coefficients. This grayscale matrix serves as the sole input data format for subsequent depth inversion, avoiding uncertainty errors across color spaces.

[0035] In large-scale quality inspections of superhydrophobic coatings, rapidly obtaining the depth distribution of the coating's surface microstructure is crucial for determining hydrophobic uniformity. The described method first uses only unidirectional natural light to vertically image the sample. Its core goal is to ensure a "single-value grayscale-depth mapping." If the illumination direction is not unique or the camera's optical axis is tilted, multiple grayscale values ​​will be generated in the same height region due to the superposition of mirrors and shadows, causing the subsequent linear calibration model T = aG + b to lose its one-to-one correspondence. The camera is mounted on a bracket with a spirit level, and the gimbal is adjusted so that the angle between the optical axis and the sample normal is ≤0.2°, allowing it to be considered an orthogonal projection within a 30cm working distance. This geometric condition, coupled with the Lambertian scattering assumption, means that the grayscale intensity is primarily controlled by the height parameter. After autofocus is complete, switching to manual mode and locking the ISO, shutter, and aperture, while disabling automatic white balance and automatic gain, allows all captured batches to share the same response curve, ensuring consistency in multi-phase comparisons. North-facing windows or diffuser screens are used to suppress direct light flicker, ensuring that light intensity fluctuations are within 5%, and further stabilizing the linear fitting coefficients a and b.

[0036] The color pixel array output is weighted averaged over three channels to obtain an 8-bit grayscale matrix:

[0037] G=0.299R+0.587G+0.114B

[0038] This formula, based on a photosensitivity model where the human eye is more sensitive to the green channel, compresses data without sacrificing texture detail. Compared to single-channel extraction, three-channel weighting reduces grayscale errors caused by color temperature variations from 10% to approximately 3%. Parameters such as shutter and ISO are retained in EXIF, providing data support for retroactively adjusting the b-value in the event of lighting drift.

[0039] Example: An aluminum-based calibration plate with a step height covering 0–40 μm was selected. A reference grayscale was acquired in one shot under the above imaging conditions. The fitting results were a = 0.92 μm / gray, b = -12.5 μm, and the determination coefficient R 2 =0.985. The hydrophobic coating after spraying was then tested, and the grayscale-depth mapping obtained n=81 grid depth values, and the average depth was calculated. Standard deviation σ=7.3μm, coefficient of variation:

[0040]

[0041] If the value is lower than the process upper limit of 0.40, the coating is judged to meet the uniformity requirements. v It rises to 0.45 and a bimodal distribution appears, indicating that multiple light sources destroy the single-value mapping; at the same time, the linear residual increases by 60%, verifying the necessity of the single illumination constraint in this scheme.

[0042] Through the above process, the grayscale matrix becomes the sole input format for depth inversion, avoiding nonlinear distortion caused by cross-color space conversion. After a single calibration, hundreds of samples can be measured in batches, with processing time per sample less than 2 seconds, reducing the time cost by two orders of magnitude compared to scanning electron microscopy. After a one-week trial in the spray shop, the pass rate increased from 83% to 94%, demonstrating that this evaluation method can provide real-time feedback on process fluctuations and guide parameter optimization, thereby improving the preparation consistency and service reliability of superhydrophobic coatings.

[0043] Preferably, Figure 2 As shown, during the image acquisition process, the optical axis of the digital imaging device is kept perpendicular to the surface of the super-hydrophobic coating to be measured, a fixed imaging distance is set and the exposure parameters are unified, and only unidirectional natural light is used as the light source.

[0044] Fixed imaging distance can be achieved using telescopic rails or a scale bracket. Once the bracket base is aligned with the underside of the coated specimen, the distance is locked in place, eliminating the need for individual sample adjustments. To eliminate parallax, a level bulb is installed on the top of the bracket, combined with a laser plummet, for real-time calibration of the camera's optical axis verticality. When switching between batches, only the specimen changes, while other conditions remain constant. If there are slight fluctuations in ambient light, the camera's real-time histogram can be retrieved before exposure, and the exposure can be locked with the peak center aligned with the mid-gray area to maintain a stable grayscale-depth linear relationship.

[0045] In the evaluation process described in the present invention, the camera optical axis remains perpendicular to the coating surface, allowing the projection model to be approximated as an orthogonal projection, avoiding perspective scaling that causes pixel size to vary with position. If the optical axis tilt angle is denoted as θ, the projection length of the same physical length on the photosensitive surface is Lcosθ; when θ>2°, the projection difference between edge pixels and center pixels can exceed 3%, which will directly destroy the global consistency of the grayscale-depth linear relationship T=aG+b. Through dual calibration with a laser plummet and a level bubble, θ is set to ≤0.2°, at which point cosθ≈0.99994, and scale distortion can be ignored.

[0046] The purpose of fixing the imaging distance is to maintain a constant point spread function of the camera's object distance, so that the grayscale distribution is affected only by the surface normal and the height of the microstructure. In the embodiment, the telescopic guide rail is locked at a distance d = 300mm. When inspecting adjacent samples, only the sample is replaced without moving the camera. If the guide rail error Δd reaches 5mm, it will cause the depth of field to change and the blur kernel to increase, and the grayscale variance will increase by 8%, resulting in an 8% increase in the calculated standard deviation σ. Using the ruler bracket to lock the screw once can make Δd ≤ 1mm, and the variance increment can be controlled within 1%.

[0047] Unifying exposure parameters is achieved by locking ISO, shutter, and aperture. Exposure decisions are based on a real-time histogram, with the peak centered at mid-gray (approximately 128) and then locked. This ensures a dynamic grayscale range of 20–240, preventing highlight clipping or shadows from being overwhelmed. If ambient illumination fluctuations are less than 5%, the grayscale-depth mapping residual delta is less than 0.01μm, maintaining the long-term validity of the calibration coefficients. In the event of overcast skies or sudden drops in light, the shutter speed can be manually extended by one stop to maintain the histogram peak position, thereby maintaining a stable linear relationship.

[0048] This camera and light source control strategy can also reduce the number of inter-batch calibrations. During a one-week test, 200 coatings were continuously tested. Only the first batch of coatings were calibrated using the calibration plate with coefficients a and b, and subsequent batches were directly reused. In contrast, the dual-light source oblique illumination solution required an additional four calibrations during the same period, each taking 10 minutes. The statistical coefficient of variation C v When the repeatability was compared, the standard deviation of single-light source vertical imaging was 0.015, while that of the control group was 0.042, verifying that vertical single illumination has smaller error and higher stability.

[0049] In summary, the combination of a vertical camera position, fixed distance, and unidirectional natural light can significantly reduce systematic errors caused by geometric distortion and uneven illumination. Combined with real-time histogram-locked exposure, the grayscale values ​​maintain the same dynamic range across samples, laying a high-confidence data foundation for subsequent grayscale-depth mapping, gridding statistics, and coefficient of variation calculations, thereby improving the repeatability and accuracy of superhydrophobic coating uniformity assessments.

[0050] Preferably, Figure 3 As shown, before grayscale processing, the original images are uniformly adjusted to the same pixel size and grayscale stretching is performed on the brightness distribution.

[0051] To ensure that the physical area corresponding to the grid divisions is consistent, the outer boundaries of the specimen are automatically detected on the grayscale image. The image is then cropped to a circumscribed square and resampled to a uniform size (e.g., N×N pixels) using bicubic interpolation. After normalization, the grayscale histogram is linearly stretched: 0.5% of the cumulative distribution is first truncated to reduce the effects of isolated highlights and vignetting; the remaining grayscale range is then remapped to [0, 255]. This operation preserves texture detail while expanding contrast, resulting in a more stable linear relationship between grayscale values ​​and microstructure depth across the entire range. If multiple images are subsequently processed in batches, the stretching parameters can be solidified as a template to ensure process consistency and reduce algorithmic time.

[0052] In order to ensure that each pixel block corresponds to the same physical area after grid division, the original color image is first normalized. Before graying, the system calls the contour detection algorithm to extract the outer boundary of the sample, obtains the minimum circumscribed rectangle and expands it into a square area to avoid scale distortion caused by the difference in aspect ratio. The cropped result is then resampled to a uniform resolution, such as 1560×1560 pixels, using bicubic interpolation. The bicubic algorithm comprehensively considers 16 neighboring pixels during resampling, which can effectively suppress aliasing and retain high-frequency information of micro-nano textures; if the nearest neighbor interpolation is used instead, the same sample will have edge step artifacts in the depth inversion stage, resulting in a coefficient of variation C v The deviation is about 0.03.

[0053] After the size is unified, the grayscale histogram is linearly stretched. First, the cumulative histogram is calculated and the 0.5% extreme value interval at both ends is truncated: Let the grayscale minimum threshold be G low , the maximum threshold is G high , after truncation, the remaining interval [G low ,G high ]. Perform linear mapping on the remaining segments:

[0054]

[0055] Where G is the original grayscale value, and G' is the grayscale value after stretching. This operation not only suppresses the influence of isolated highlights and dark corners on the fitting slope a, but also expands the effective dynamic range and improves the linear correlation between grayscale and true depth. In the embodiment, the original grayscale range is 36-240, which is mapped to 0-255 after truncation and stretching; the linear fitting determination coefficient R 2 It increased from 0.962 to 0.985, and the error in the coefficient of variation estimation was reduced by 22%.

[0056] To maintain batch processing consistency, the system will {G low ,G highThe template file contains the target resolution and image quality. When lighting conditions change or camera parameters are adjusted, the template is automatically updated and synchronized to all inspection terminals on the production line, preventing discrepancies in results caused by inconsistent stretching thresholds at different sites. For an inspection batch containing 100 images, the overall processing time is reduced from 330s to 210s after introducing the template.

[0057] The core effect of the size normalization and grayscale stretching process is reflected in two aspects: first, to ensure the spatial homogeneity of grid statistics, so that the average depth The first is to increase contrast and eliminate extreme pixel interference, ensuring that the slope and intercept of the grayscale-depth mapping T = aG + b remain stable over long periods of time. Combined with templated deployment, the evaluation system can output highly comparable hydrophobicity uniformity indicators even when ambient illumination fluctuates across different workshops or shifts, providing reliable data support for real-time monitoring and closed-loop control of the coating process.

[0058] Dividing the grayscale image into a plurality of image units according to a preset space;

[0059] By dividing the grayscale image into several equidistant rectangular grids, a grid coordinate system can be established on a two-dimensional plane, so that the pixel distribution forms a one-to-one correspondence with the physical space. When the coating surface is uniform or partially undulating, the pixel set in the grid can approximately represent the local microstructural features; by independently counting each grid unit, the spatial distribution information facing the full image can be obtained. Assuming the grayscale image size is M×M, when the number of grids is n×n (n≥3n), the side length of each image unit can be uniformly set to Pixels are used to keep the scale between units consistent; this resolution can ensure the representativeness of macro-uniformity analysis while avoiding shadow stray or noise amplification caused by too small units.

[0060] Dividing the grayscale image into an equidistant rectangular grid according to a preset space is a key step in the present invention to achieve full-scale hydrophobic uniformity quantification. After size normalization, the grayscale image can be represented as a square area of ​​M×M pixels. The number of grids is set to n×n, where n≥3. The unit side length is calculated by:

[0061]

[0062] Divide the entire image into n equal parts 2 pixel blocks, each pixel block has a unique row and column index (i, j) in the two-dimensional plane, satisfying:

[0063] 0≤i <n,0≤j<n

[0064] This grid coordinate system forms a one-to-one mapping between grayscale pixels and the physical coordinates of the sample: when the pixel resolution is 1560×1560 and n=3, the unit side length L=520 pixels, corresponding to a real scale of approximately 1.5mm×1.5mm (converted to the lens imaging scale factor). This resolution is sufficient to cover the statistical characteristics of the super-hydrophobic microstructure while avoiding the increase in the proportion of shadow noise caused by too small a grid. After the division is completed, the system traverses the pixel set in the order of single element retrieval and calculates the grayscale mean G of each unit. ij The grayscale mean is calibrated once through illumination:

[0065] T ij =aG ij +b

[0066] Converted to surface microstructure depth T ij The advantage of separate statistics is that if there are microscopic defects in the coating (such as weak spraying areas or attached contamination particles), the grayscale-depth deviation of the area from the overall mean will be directly reflected as an abnormal depth of the corresponding unit, thereby improving the sensitivity of defect detection.

[0067] The choice of the number of grids reflects the compromise between scale uniformity and noise suppression. If n = 2 (only four grids), the coverage area of ​​each grid is too large, making it difficult to capture local fluctuations; if n > 6, the unit area decreases rapidly, the proportion of specular reflection and imaging noise increases, and the random fluctuation of the standard deviation σ is amplified. In the process verification environment of the present invention (the spray uniformity tolerance is 40%), experimental comparison shows that the coefficient of variation measurement repeatability is best when n = 3: the same batch is imaged 10 times, σ (C v ) is about 0.015; when n=5, it rises to 0.031.

[0068] Example: For a super-hydrophobic aluminum substrate prepared by laser etching and immersion in a low surface energy solution, grayscale images were collected under the same optical configuration and n=3. After gridding, the depth matrix was obtained:

[0069]

[0070] Calculate the average The standard deviation σ = 0.99 μm, and the coefficient of variation C is obtained v =0.035, which is far below the process threshold of 0.40. If n is changed to 6 on the same sample and measured again after noise reduction, σ increases to 4.2μm, C v It was magnified to 0.15 and mistakenly judged as mild unevenness.

[0071] Meshing also facilitates result visualization: the system displays T as a pseudo-color heat map, with a color scale from blue (light) to red (dark) indicating microstructure depth. When a cell anomaly occurs, quality engineers can directly locate the defective area and trace the origin to the spray parameters. When batch processing multiple images, the partitioning template (n, M, L) only needs to be called once after solidification, with an average computation time of 1.2 seconds per image, meeting the required online inspection cycle.

[0072] In summary, the equidistant rectangular grid realizes physical scale mapping, statistical independent sampling, and visual defect positioning; by reasonably selecting the n value, the depth statistics achieves an optimal balance between noise suppression and resolution, providing highly reliable input data for subsequent coefficient of variation and entropy value evaluation.

[0073] Preferably, the preset space is divided into equidistant rectangular grids, and the number of grids is not less than three units.

[0074] Selecting n ≥ 3n as the lower limit avoids situations where horizontal or vertical comparison cannot be performed using only a single row or column of cells. In practice, when n = 3, the differences between the center and edge regions can be evaluated simultaneously, which helps to reveal uneven coating at the edge and cumulative effects at the center. When the detection resolution is further improved or the sample area to be tested increases, n can be increased to refine the spatial sampling density, but the cell area should be sufficient to cover hundreds of pixels to ensure statistical stability.

[0075] When using an equidistant rectangular grid to divide the grayscale image into two parts, setting the number of grids to at least three units is the basic condition for evaluating hydrophobic uniformity. If there is only one row or one column of units, it is impossible to form a contrast in the horizontal or vertical dimensions, which can easily cause defects such as thin coating at the edge or piled material in the center to be masked by the average value. Assume that the resolution of the grayscale image after size normalization is M×M pixels, select n≥3 and set the unit side length You can get n 2 If M = 1560 and n = 3, then L = 520 pixels, and each unit contains L 2 = 270400 pixels. This pixel size satisfies both statistical stability and detail preservation. The center unit mainly reflects the cumulative effect of spray overlap, while the surrounding units capture the phenomenon of insufficient edge reflow. By comparing, process deviations can be quickly located. When the sample area increases or the camera resolution is improved, n can be increased to refine the sampling. For example, when n = 5, L = 312 pixels; the unit area is still greater than 10 5 If n is increased further, L will drop to less than 20 pixels, and the number of pixels will be only 4×10 2 , the variation coefficient fluctuates significantly due to the influence of the flash point of mirror reflection; the actual measurement shows that σ(C v) can increase from 0.015 to 0.042, exceeding the process control limit. Therefore, the present invention stipulates that while improving spatial resolution, each unit must ensure that it covers a hard threshold of hundreds of pixels to balance defect detection sensitivity and measurement repeatability.

[0076] Example verification: A batch of polydimethylsiloxane-based super-hydrophobic coatings were tested with n=3 and n=5. When n=3, the depth matrix variance was 7.4 μm. 2 , coefficient of variation C v =0.26; when n=5, the variance increases slightly to 7.9 μm 2 , C v = 0.27, the measurement results remain consistent and local notches can be distinguished. If n is blindly increased to 8, the variance soars to 12.1μm 2 , and random peaks appeared, with the misjudgment rate more than doubling. This experiment shows that, with at least three units, the optimal uniformity evaluation robustness and local defect detection capability can be achieved by setting the n value in combination with the actual pixel density.

[0077] Preferably, when performing equidistant rectangular grid division, an edge alignment method is adopted so that each image unit covers the same area of ​​the coating surface.

[0078] To make each image unit cover the same physical area, you can use edge alignment starting from the upper left corner when cropping the grayscale image:

[0079] 1. First read the number of rows and columns M of the grayscale image, Calculate the cell side length;

[0080] 2. Cut off the n rows and n columns of the grid in the center of the main field of view according to the integer multiple of the side length, totaling n 2 units;

[0081] 3. If M is not divisible by n, the image can be cropped or padded with zeros symmetrically around the image to ensure that the number of pixels in each unit is exactly the same.

[0082] This edge alignment process ensures that the rectangular grid is in strict contact with the image boundary, with no overlap or gaps, avoiding systematic errors introduced by differences in sampling scales between units. It also facilitates the direct use of subsequent depth statistics results for coefficient of variation calculation and entropy value verification.

[0083] After the grayscale image is normalized, it needs to be divided into several equidistant rectangular grids to perform local statistics. If the entire image is directly divided into blocks without considering the row and column margins, the last row or column will often have insufficient size residual blocks with fewer pixels than other units, resulting in a loss in the depth mean. and local variance introduces bias in the estimation. To eliminate this systematic error, the present invention adopts an "edge alignment" strategy: taking the upper left corner (0,0) as the origin, arranging grids at a fixed step size to the right and downwards; if the image size M cannot be evenly divided by the number of grids n, then symmetrically crop or pad with zeros around the perimeter to make the number of pixels in each unit consistent. This strategy ensures that the pixel set corresponds one-to-one with the physical area of the coating, without overlap or gaps, and avoids differences in sampling scales between units.

[0084] The specific implementation steps are as follows. First, read the number of rows M and columns of the grayscale image, and calculate the side length L of the unit according to the formula Subsequently, calculate the margin Δ = M - nL. If Δ = 0, n 2 grids can be directly arranged starting from (0,0); if Δ > 0, then crop Δ / 2 pixels around the perimeter of the image, or pad with zeros on the insufficient side to generate a new square area M' = nL. After the image is written into the normalized cache, box the area (iL, (i + 1)L) × (jL, (j + 1)L) as the pixel set of the (i,j) unit, where 0 ≤ i, j < n. This processing ensures that each unit contains L 2 pixels, the unit areas are the same, and the physical scales are also consistent with the camera calibration coefficient.

[0085] Taking a grayscale image with a size of 1560 × 1560 pixels and the number of grids n = 3 as an example, L = 520 and Δ = 0 are obtained; the number of pixels in all nine units is 2704 people. When changing to a size of 1600 × 1600 pixels and n = 4, L = 4 people and Δ = 0 also do not require compensation. If the size is 1620 × 1620 pixels and n = 4, the margin Δ = 20. The system will crop 10 pixels or pad with zeros on the top and bottom, left and right respectively, and then use bicubic interpolation to scale to 1600 × 1600 to maintain sampling balance. The simulation shows that if the edge alignment is ignored and directly segmented, when the number of pixels in the residual block is less than 60% of the average value, the calculated coefficient of variation C v of the entire image will be overestimated by about 0.04; after adopting the alignment strategy of the present invention, the deviation is reduced to 0.008. [[ID=?]]

[0086] Another advantage of edge alignment is that it is convenient for subsequent visualization. Since the matrix coordinates of the grid pixels in each row and column are fixed, the depth matrix T can be directly mapped to a square heat map without color cropping distortion; engineers can quickly locate the coating defect area according to the matrix index. In the batch processing mode, the grid template (n,L) and the cropping rule are written into the configuration file and updated only once when the camera resolution or the number of grids changes, so that the data processing time is controlled within about 1.1 s for each image.

[0087] It should be noted that there is an unclear "2704 people" in the translation of item , which might be a mistake in the original text. You can check and correct it according to the actual situation.By ensuring that each image unit covers the same area through edge alignment, the present invention further improves the comparability of grayscale-depth linear mapping in the spatial dimension, reduces systematic errors caused by residual blocks or overlaps, and provides rigorous and balanced input data for subsequent coefficient of variation and entropy value evaluation.

[0088] The grayscale value of each image unit is converted into the corresponding surface microstructure depth value using the grayscale-depth mapping relationship obtained by single illumination calibration of the reference calibration plate;

[0089] By photographing a reference calibration plate with multiple known step heights under the same lighting and camera geometry as the superhydrophobic coating being tested, a correspondence between grayscale values ​​and actual heights can be established. Because the incident direction of a single light source is fixed, grayscale differences produced by the same normal angle on the step surface primarily reflect geometric height differences. Therefore, the mean grayscale value can be considered a direct proxy for surface microstructure depth. After a single capture, the average grayscale of each step region within the entire image can be extracted and mapped to the known heights to form a sample for calculating the subsequent linear relationship coefficient.

[0090] The use of a reference calibration plate to establish a grayscale-depth mapping is the core link in achieving rapid quantification in this invention. The reference calibration plate uses the same substrate as the coating to be measured, and the surface is processed into multi-level stepped steps with a height sequence of H1, H2, ..., H m The maximum height of the profiler is traceable and calibrated to cover the process allowable range (e.g., 0μm to 40μm). Under vertical illumination from a single light source, the camera's optical axis is perpendicular to the calibration plate and a single shot is taken to obtain a step grayscale image. The grayscale matrix is ​​denoted as G(x,y). Since the incident direction is unique and the normal distribution is constant within the step surface, according to the Lambertian reflectance approximation, the pixel grayscale intensity is monotonically related to the local height. Shadows may exist at the edge of the step, but the grayscale mean of the entire step is calculated as:

[0091]

[0092] where Ω k is the pixel set of the kth step, N k As the number of pixels, the shadow noise can be averaged to make Mainly reflects the geometric height difference. And the corresponding height {H k}paired, the least squares method is used to fit the linear model:

[0093] T=aG+b

[0094] Obtain the slope a and intercept b. After one calibration is completed, (a, b) is solidified in the system configuration file; since the shooting geometry and lighting are constrained, subsequent tests can be directly called without repeated calibration. Example: The calibration plate contains m = 9 steps, with the height increasing from 0μm to 5μm. In the linear coordinate system, it shows a highly correlated straight line, with fitting results of a = 0.92 μm / gray, b = -12.5 μm, and the coefficient of determination R 2 =0.985. Three spray-coated aluminum-based super-hydrophobic coatings were measured using this mapping. Comparison with a white-light interferometer revealed an average absolute error of 0.84 μm, meeting the process control upper limit of 2 μm.

[0095] When the mapping relationship is applied to the grid unit, the grayscale mean G of the pixels in the unit is first calculated. ij , and then calculate the depth:

[0096] T ij =aG ij +b

[0097] This approach significantly reduces pixel-level noise: the standard deviation of a single pixel's grayscale is approximately 3.1 gray, which is reduced to 0.4 gray after unit averaging, corresponding to a depth error of only 0.37 μm. Combined with the aforementioned gridding strategy, the system completes depth field generation and coefficient of variation calculation on a single 1560×1560 pixel image in approximately 1.2 seconds, significantly faster than the minute-level operation of a scanning electron microscope.

[0098] There are two additional advantages to using a stepped calibration plate. First, the calibration plate can be randomly sampled and retested periodically. If an overall offset occurs, the intercept b can be corrected instantly using known heights to offset the system drift introduced by the slow attenuation of illumination. Secondly, if different production lines use the same camera and illumination setup but have slightly different working distances or focal lengths, their respective (a, b) can be calibrated independently, limiting the mapping error to a local range without modifying the main algorithm.

[0099] Through one-time linear calibration, the present invention simplifies the process of converting grayscale values ​​into microstructure depth into a constant time complexity operation, greatly improving the efficiency of online detection. At the same time, the step mean is used to suppress random shadows, achieving submicron depth analysis, and providing high-precision and traceable basic data for subsequent hydrophobic uniformity evaluation.

[0100] Preferably, the mapping relationship between the grayscale and the surface microstructure depth is a linear relationship, and the linear relationship is determined by a one-time illumination calibration in combination with known step height information on a reference calibration plate.

[0101] A linear relationship is fitted to the grayscale-height sample points obtained from the reference calibration plate, and the linear coefficient is fixed as a global calibration parameter. Because the shooting pose and lighting direction remain constant during the test, the linear coefficient does not need to be recalibrated multiple times. To verify the fitting error, multiple sets of grayscale samples are taken at different step positions on the calibration plate. If the residual is less than a predetermined threshold, the linear relationship is confirmed and recorded in the mapping table.

[0102] Grayscale-depth linear mapping is based on the single-light source Lambertian reflection assumption: under the conditions of vertical imaging of the optical axis and constant incident direction, the pixel grayscale G and the actual height T of the surface microstructure are approximately linear functions. Place the reference step calibration plate in the same lighting and geometric environment as the coating to be tested and take a picture once, extracting the average grayscale of each step. With the known height H k Forming a sample set The least squares fitting method is used to obtain:

[0103]

[0104] Calculate the residuals at the same time If max|e k | / maxH k If the error is <0.02, the linear model is determined to meet the measurement accuracy requirements, and the coefficients (a, b) are written to the global parameter table. Because the camera position and light source direction remain fixed during subsequent production inspections, (a, b) are long-term stable and do not require recalibration. Stepwise fitting is only required when the lens or lighting device is replaced.

[0105] Example: The step height range of the calibration plate is 0-40μm. Nine sets of samples are obtained by shooting. Linear regression results show a = 0.91μm / gray, b = -12.3μm, and the determination coefficient R 2 =0.986, with a maximum relative residual of 1.7%. The mapping was applied to three batches of spray-coated samples, totaling 243 images. The grayscale-interferometer comparison achieved an average absolute error of 0.83μm, meeting the process control limit of 2μm. This single-shot calibration strategy significantly shortens production line changeover time, increases batch inspection throughput by approximately 35%, and avoids the cumulative error of multiple calibrations, improving the traceability and consistency of sulfur water uniformity evaluation.

[0106] Preferably, Figure 4 As shown, when obtaining the depth value of the surface microstructure, the shape from shading algorithm is applied to each image unit to perform single-view 3D reconstruction, and the relationship between the illumination direction vector and the imaging geometry is used for constrained optimization.

[0107] When measuring the surface of a super-hydrophobic coating, the shape-from-shadow algorithm is first used for illumination inversion on the entire grayscale image. The illumination direction vector obtained through calibration is used as a known condition. The camera's intrinsic and extrinsic parameters are combined to construct geometric constraints between the pixel gradient and the surface normal vector. The relative depth field of each pixel is obtained through iterative optimization, eliminating grayscale artifacts caused by local shadows.

[0108] In this process, the joint constraints of illumination direction vector and imaging geometry are exploited to improve the stability of single-view depth reconstruction.

[0109] After the relative depth field is solved, the grayscale values ​​of the pixels within the grid cells are averaged and converted to the corresponding surface microstructure depth using a previously established linear mapping table. The converted depth data retains floating-point precision, providing high-resolution input for subsequent calculations of mean and standard deviation, ensuring the sensitivity and reproducibility of the hydrophobic uniformity assessment.

[0110] The single-view shape-from-shading (SFS) algorithm is used to restore a single grayscale image to a relative depth field. Its core assumption is that the grayscale intensity I(x, y) of a diffuse surface under a single known illumination direction is determined only by the angle between the surface normal n(x, y) and the illumination vector l, that is:

[0111] I(x,y)=ρ(n(x,y)·l)

[0112] Where ρ is the isotropic reflectivity. Prior illumination direction Obtained by inversion from the calibration plate at the same camera position, the camera intrinsic parameter matrix K and extrinsic parameters (R, t) are fixed during the adjustment phase. Assume that the normalized image coordinates are (u, v), the relative depth is recorded as Z(u, v), and the pixel gradient and normal satisfy:

[0113]

[0114] The algorithm process is divided into three steps. The first step is to construct the energy function using the illumination equation:

[0115] E(Z)=∫∫ Ω [I(u,v)-ρ(n(u,v)·l)] 2 dudv+λE smooth (Z)

[0116] Among them E smooth is the surface smoothing regularization term, and λ controls the smoothing weight. The second step is to iteratively optimize Z by gradient descent. In each round, the pixel gradient is constrained to the physical coordinate system using the camera projection model K[R|t] to avoid normal drift caused by perspective deformation. The third step is to converge at the threshold. When it is reached, the relative depth field Z is output. Since the grayscale reference has been locked by exposure, ρ is considered a constant and can be incorporated into the coefficient table to speed up the calculation.

[0117] After the depth solution is completed, the grayscale mean value G of each grid unit pixel is ij Mapping to absolute microstructure depth

[0118] T ij =aG ij +b

[0119] where (a, b) is derived from a one-time step calibration. Compared to directly performing a linear transformation on pixel grayscale, the SFS step can correct grayscale artifacts in the presence of local shadows or specular flashes: if a pixel falls into the bright shadow region I→I-δI, the optimization process re-estimates p and q based on the adjacent gradient smoothness constraints, thereby increasing its recovered depth and reducing the impact of shadows on the statistics.

[0120] The example uses a 1560×1560 pixel grayscale image and runs 200 iterations on a GPU platform, with a total time of about 0.9s. Compared with the baseline results without SFS, the average absolute depth error is reduced from 1.25μm to 0.62μm, and the coefficient of variation C is v The inter-batch standard deviation was reduced from 0.024 to 0.011. On a test piece containing sprayed notches, the SFS-corrected surface significantly distinguished the notch units (deepness decreased by approximately 5μm), while the purely linear mapping overestimated the notch depth by 3μm due to shadowing. This result validates the stabilization effect of the combined constraints of the illumination vector and imaging geometry under single-view conditions.

[0121] Depth data is stored in floating-point format, providing high-resolution input for subsequent calculations of mean value T, standard deviation σ, and Shannon entropy H. The entire pipeline does not rely on multiple light sources or stereo systems, and the hardware cost is only equivalent to that of ordinary industrial cameras and fixed light sources, meeting the real-time requirements of online large-scale detection.

[0122] The average value and standard deviation are calculated according to the depth values ​​of all image units, and the ratio of the standard deviation to the average value is used as the coefficient of variation. The coefficient of variation is used to characterize the hydrophobic uniformity of the coating surface.

[0123] The surface microstructure depth values ​​obtained by n image units are recorded as {T1, T2, ..., T n}.

[0124] 1. Calculate the arithmetic mean first:

[0125]

[0126] 2. Calculate the population standard deviation:

[0127]

[0128] 3. Take the ratio of the two to define the coefficient of variation:

[0129]

[0130] Reflects the overall etching depth level; σ describes the local fluctuation amplitude; C v The smaller it is, the weaker the fluctuation of the depth of each unit is and the higher the hydrophobic uniformity of the coating is.

[0131] Example: The statistical table of the coefficient of variation results is shown in Table 1 below. The results are integrated and divided into intervals of 10-20, 20-30, 30-40, and 40-50.

[0132] Table 1 Statistical table of coefficient of variation of cement-based super-hydrophobic coating at shooting height of 10 cm

[0133]

[0134]

[0135] Preferably, after calculating the coefficient of variation, the coefficient of variation is divided into several numerical intervals, and the Shannon entropy value is calculated based on the frequency of occurrence of each interval to verify the uniformity of the distribution of the coefficient of variation.

[0136] To further evaluate C v The spatial distribution of all C v The samples are discretized according to the statistical interval to obtain k closed intervals {I1,I2,…,I k}. Count the frequency of occurrence of each interval and normalize it to probability {p1,p2,…,p k}, calculate the Shannon entropy:

[0137]

[0138] The closer the entropy value H is to log2k (the theoretical upper limit of completely uniform distribution), the more balanced the distribution of the coefficient of variation in each interval, that is, the more consistent the hydrophobic properties on the coating surface; if H is significantly lower, the depth variation is concentrated in a few intervals, indicating the existence of obvious uneven areas.

[0139] Preferably, Figure 5 As shown, the numerical interval is divided based on statistical box plot analysis and combined with quantile thresholds.

[0140] Boxplot analysis includes:

[0141] Calculate the first quartile Q1, median Q2, and third quartile Q3; calculate the interquartile range IQR = Q3-Q1; use [Q1-1.5IQR, Q3+1.5IQR] to determine the valid data range and eliminate extreme outliers.

[0142] Percentile threshold breakdowns include:

[0143] The effective range is subdivided into k intervals according to fixed quantile intervals (such as 10% quantile) or equal width and length, ensuring that the coverage area of ​​each interval is consistent, making the probability estimate robust and easy to reuse under different sample sizes.

[0144] Through the above steps, the C that characterizes the overall fluctuation strength can be obtained at the same time. vTogether with H, which describes the balance of its spatial distribution, it provides a quantitative dual-index evaluation system for the hydrophobic uniformity of superhydrophobic coatings.

[0145] The number and proportion of each interval are shown in Table 2. According to the entropy calculation principle, the frequency distribution is input using the Python algorithm, and the entropy value is (1.976).

[0146] Table 2 Intervals and frequency distribution of each interval

[0147]

[0148] Based on this case, it can be defined that when the coefficient of variation in the project is higher than 40% and the entropy value is lower than 1.976, the coating is highly non-uniform. Adjustments can be made based on actual conditions to reduce the production of unqualified products.

[0149] This digital image algorithm is applicable to matte coatings with a surface roughness not exceeding a threshold of 225, in addition to super-hydrophobic coatings; dual light sources or structured light compensation are required for high-mirror metal coatings.

[0150] like Figure 6.1 The scatter plot of the coefficient of variation of 50 samples measured in batches using the same illumination calibration parameters at a shooting distance of 10 cm is shown. The horizontal axis is the sample number (1-50) and the vertical axis is the coefficient of variation C v (%); the orange horizontal baseline corresponds to C v =40%, used to determine the coating uniformity threshold. Most of the measurement points are distributed below the baseline, indicating that the overall hydrophobic uniformity of the coating is acceptable at a distance of 10 cm, but there are still some abnormal points that exceed the threshold.

[0151] like Figure 6.2 The scatter plot of the coefficient of variation of the samples collected simultaneously under the condition of shooting distance of 20cm is shown. Figure 6.1 Consistent, the scattered points in the figure are relatively discrete, and some samples C v The value is higher than the 40% threshold, which means that after the ranging distance is increased to 20 cm, the illumination attenuation and the increase of parallax affect the grayscale-depth mapping accuracy, and the uniformity evaluation results fluctuate.

[0152] like Figure 6.3 The scatter plot of the coefficient of variation is shown in the working condition of the shooting distance of 30cm. As the imaging distance increases further, the scatter plot generally moves towards high C v Directional deviation, the number of samples exceeding the 40% threshold value increased significantly, verifying that without adjusting the illumination calibration coefficient, excessive shooting distance will weaken the linear correspondence between grayscale and microstructure depth, resulting in a decrease in the credibility of hydrophobic uniformity evaluation.

[0153] Figure 6.1-Figure 6.3Together we present the impact of different shooting distances on the statistical results of the coefficient of variation:

[0154] 1. When the imaging distance is 10cm, the grayscale-depth mapping error is the smallest, C v Most of them are lower than 40%, and the coating uniformity is high;

[0155] 2. When the distance increased to 20cm, some samples showed C v For discrete points >40%, distance correction or recalibration is required to reduce the error;

[0156] 3. When the distance is further increased to 30cm, C v The overall trend is upward, and the proportion of samples exceeding the threshold increases, indicating that imaging from too far away will amplify the disturbance of uneven illumination and pixel parallax on grayscale values.

[0157] Therefore, this set of three figures intuitively verifies the applicable distance range of the grayscale-depth linear mapping under fixed illumination calibration, providing a reference basis for determining the working condition optimization parameters (such as camera-sample distance and additional correction coefficient).

[0158] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware.

[0159] The above are merely embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should be included within the scope of the claims of the present application.

Claims

1. An image-driven super-hydrophobic coating uniformity evaluation method, characterized in that: The following steps are involved: Acquire an image of the surface of the super-hydrophobic coating to be tested under single illumination conditions, and grayscale the image to obtain a grayscale image; Dividing the grayscale image into a plurality of image units according to a preset space; The grayscale value of each image unit is converted into the corresponding surface microstructure depth value using the grayscale-depth mapping relationship obtained by single illumination calibration of the reference calibration plate; The average value and standard deviation are calculated according to the depth values ​​of all image units, and the ratio of the standard deviation to the average value is used as the coefficient of variation. The coefficient of variation is used to characterize the hydrophobic uniformity of the coating surface.

2. The method according to claim 1, characterized in that During the image acquisition process, the optical axis of the digital imaging device is kept perpendicular to the surface of the super-hydrophobic coating to be tested, a fixed imaging distance is set and the exposure parameters are unified, and only unidirectional natural light is used as the light source.

3. The method according to claim 1, characterized in that Before grayscale processing, the original images are uniformly resized to the same pixel size and grayscale stretching is performed on the brightness distribution.

4. The method according to claim 1, wherein The preset space is divided into equidistant rectangular grids, and the number of grids is not less than three units.

5. The method according to claim 4, characterized in that When performing equidistant rectangular grid division, edge alignment is adopted so that each image unit covers the same area of ​​the coating surface.

6. The method according to claim 1, characterized in that The mapping relationship between the grayscale and the surface microstructure depth is a linear relationship, and the linear relationship is determined by a one-time illumination calibration combined with known step height information on a reference calibration plate.

7. The method according to claim 6, characterized in that When obtaining the depth value of the surface microstructure, the shape-from-shadow algorithm is applied to each image unit for single-view 3D reconstruction, and the relationship between the illumination direction vector and the imaging geometry is used for constrained optimization.

8. The method according to claim 1, characterized in that After calculating the coefficient of variation, the coefficient of variation is divided into several numerical intervals, and the Shannon entropy value is calculated based on the frequency of occurrence of each interval to verify the uniformity of the distribution of the coefficient of variation.

9. The method according to claim 8, characterized in that The numerical interval is divided based on statistical box plot analysis and combined with quantile thresholds.

Citation Information

Cited By

  • Method for identifying cervical squamous cell carcinoma and cervical adenocarcinoma through synthetic MRI

    CN120908727A