Hydrogen energy bipolar plate defect detection method and equipment based on self-adaptive dark light enhancement

By adopting an adaptive dark light enhancement method, the problem of low accuracy in defect detection of hydrogen energy bipolar plates under dark conditions was solved, achieving rapid and accurate defect detection, effectively suppressing noise, and improving detection accuracy.

CN121724933APending Publication Date: 2026-03-24INNER INTELLIGENT TECHNOLOGY (WUXI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Traditional optical inspection methods are difficult to accurately detect defects such as microcracks and coating peeling in hydrogen energy bipolar plates under low light conditions. They suffer from reduced signal-to-noise ratio and uneven illumination, resulting in low inspection accuracy.

Method used

An adaptive dark-light enhancement method is adopted. By dividing the local region of the image, calculating the reflection intensity and generating a dark area mapping table, a gain function and a nonlinear enhancement function are constructed. The defect structure features are extracted by combining low-pass filtering and multi-directional filtering to achieve adaptive enhancement processing.

Benefits of technology

It enables rapid and accurate defect detection under low-light conditions, effectively suppresses noise, and improves detection accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121724933A_ABST
    Figure CN121724933A_ABST
Patent Text Reader

Abstract

The invention discloses a hydrogen energy bipolar plate defect detection method and equipment based on adaptive dark light enhancement, and relates to the technical field of hydrogen fuel cell manufacturing, and the method comprises the steps: obtaining a to-be-processed image; dividing the to-be-processed image into N local areas and generating a binary dark area mapping table; obtaining a key statistic corresponding to the dark area based on the dark area mapping table; constructing a gain function and a nonlinear enhancement function based on the key statistics, and performing adaptive enhancement processing by using the nonlinear enhancement function; and performing low-pass filtering processing on the enhanced to-be-processed image, and extracting defect structure features of the to-be-processed image after low-pass filtering processing in multiple directions by using a directional filter. The problem that in the prior art, the detection precision is low when defect detection is carried out by carrying out global enhancement on the image during ship type concept design is solved, and defect detection of the hydrogen energy bipolar plate to be detected under the dark light condition is rapidly and accurately completed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of hydrogen fuel cell manufacturing technology, and in particular to a method and device for detecting defects in hydrogen bipolar plates based on adaptive dark light enhancement. Background Technology

[0002] In the quality inspection of hydrogen energy bipolar plates, the strong reflective properties of their metal matrix composite materials pose a major challenge to traditional optical inspection methods: (1) Low defect visibility under dark conditions: Key defects such as microcracks and coating peeling have weak signal intensity in low-light imaging environments and are difficult to distinguish from the background; (2) Severe noise interference: Although extremely dark field imaging can avoid direct reflection interference, the image signal-to-noise ratio is significantly reduced, and the background noise generated by the lattice structure on the material surface is amplified; (3) Uneven illumination problem: Under dark field illumination conditions, there are obvious differences in the illumination intensity of different areas, which affects the accuracy of defect detection.

[0003] To address the aforementioned issues, existing technologies utilize image enhancement techniques to globally enhance images. However, this approach struggles to balance the conflict between enhancing weak defect signals and suppressing noise, easily leading to over-enhancement that introduces false defects or under-enhancement, resulting in low defect detection accuracy. Summary of the Invention

[0004] To address the aforementioned problems and technical requirements, the applicant proposes a method and device for detecting defects in hydrogen bipolar plates based on adaptive low-light enhancement. This method aims to solve the problem of low detection accuracy in existing technologies when performing defect detection by globally enhancing images during ship design, and to achieve rapid and accurate defect detection of hydrogen bipolar plates under low-light conditions.

[0005] This application provides a defect detection method for hydrogen energy bipolar plates based on adaptive dark light enhancement, the method comprising: Acquire the image of the hydrogen energy bipolar plate under test in low light conditions; The image to be processed is divided into N local regions, the reflection intensity of each local region is calculated, and a binarized dark area mapping table corresponding to the image to be processed is generated based on the reflection intensity. The key statistics corresponding to the dark areas are obtained by weighted calculation based on the target pixel values ​​marked as dark areas in the dark area mapping table. The key statistics include: the weighted average brightness of the dark areas and the brightness standard deviation of the dark areas. A gain function is constructed based on the key statistics, and a nonlinear enhancement function corresponding to the hydrogen bipolar plate to be tested is constructed based on the constructed gain function and the key statistics, so as to use the nonlinear enhancement function to perform adaptive enhancement processing on the image to be processed. The enhanced image to be processed is subjected to low-pass filtering, and the defect structure features of the low-pass filtered image to be processed in multiple directions are extracted using a multi-directional filter.

[0006] According to the hydrogen bipolar plate defect detection method based on adaptive dark light enhancement provided in the embodiments of this application, the gain function includes: ; in, Represents the gain function. This represents the weighted average brightness. Indicates the standard deviation of brightness. Represents the base gain coefficient. This indicates the preset target average brightness. This represents the preset target standard deviation. Indicates a preset constant value; The nonlinear enhancement function includes: ; in, Represents a nonlinear enhancement function. This represents the image to be processed.

[0007] According to the hydrogen bipolar plate defect detection method based on adaptive dark light enhancement provided in the embodiments of this application, the enhanced image to be processed is subjected to low-pass filtering, and the defect structure features of the low-pass filtered image to be processed in multiple directions are extracted using a multi-directional filter, including: The enhanced image to be processed is input into a preset filtering formula to obtain the image to be processed after low-pass filtering. The filtering formulas include: ; in, Represents the normalization factor. This represents the pixel coordinates corresponding to the location in the image where denoising and smoothing are being performed. Represents a reference pixel within the local spatial neighborhood. Indicates The local spatial neighborhood centered on the center This represents the first Gaussian algorithm. This represents the second Gaussian algorithm. Indicates and The image corresponding to the Gaussian processing of the corresponding coordinate positions. Indicates and The local image corresponding to the coordinate position when Gaussian processing is performed; The image to be processed after low-pass filtering is input into a preset multi-directional feature extraction formula to obtain the enhancement results in multiple directions; The multi-directional feature extraction formula includes: ; in, This indicates defect structural features in multiple directions. This represents the position coordinates on the image after rotation. This indicates the preset aspect ratio. Indicates the preset wavelength; Based on the enhancement results, defect structural features in multiple directions are obtained.

[0008] According to the hydrogen bipolar plate defect detection method based on adaptive dark light enhancement provided in the embodiments of this application, a binarized dark area mapping table corresponding to the image to be processed is generated based on the reflection intensity, including: Based on the reflection intensity, the local reflection distribution corresponding to each local region is obtained; Based on the pre-created reflection distribution reference model and the local reflection distribution, the KL divergence is calculated, and the binarized dark area mapping table is generated based on the KL divergence.

[0009] According to the hydrogen bipolar plate defect detection method based on adaptive dark light enhancement provided in the embodiments of this application, the KL divergence is calculated based on a pre-created reflection distribution reference model and the local reflection distribution, and the binarized dark area mapping table is generated based on the KL divergence, including: The KL divergence corresponding to each local region is obtained by inputting the reflection distribution reference model and the local reflection distribution into a preset divergence calculation formula. The divergence calculation formula includes: ; in, Denotes KL divergence, Indicates local reflection distribution, Represents the reference model for reflection distribution. Indicates a dynamic threshold, the Based on the reflection distribution reference model and the material characteristics of the hydrogen energy bipolar plate under test.

[0010] According to the hydrogen bipolar plate defect detection method based on adaptive dark light enhancement provided in the embodiments of this application, the determination of the dynamic threshold includes: The mean and standard deviation of the KL divergence samples corresponding to the bipolar plate samples corresponding to the reflection distribution reference model are input into a preset threshold determination formula to obtain the dynamic threshold. The threshold determination formula includes: ; in, This represents the mean. Indicates standard deviation, This represents the adjustment coefficient, which is determined based on the material characteristics of the hydrogen energy bipolar plate under test.

[0011] According to the hydrogen bipolar plate defect detection method based on adaptive dark light enhancement provided in the embodiments of this application, the key statistics corresponding to the dark areas are obtained by weighted calculation based on the target pixel values ​​marked as dark areas in the dark area mapping table, including: The target pixel value is input into a preset brightness calculation formula to obtain the weighted average brightness of the dark area, and the target pixel value is input into a preset standard deviation calculation formula to obtain the brightness standard deviation of the dark area. The formula for calculating brightness includes: ; in, This represents the weighted average brightness. Indicates the target pixel value. This represents the image to be processed; The formula for calculating standard deviation includes: ; in, This represents the standard deviation of brightness.

[0012] According to the defect detection method for hydrogen bipolar plates based on adaptive low-light enhancement provided in the embodiments of this application, the method acquires the image to be processed corresponding to the hydrogen bipolar plate under test under low-light conditions, including: An initial image of the hydrogen energy bipolar plate under test is obtained under low light conditions. The initial image is obtained by fusing a first image of the hydrogen energy bipolar plate under test under dark field light source illumination and a second image of the hydrogen energy bipolar plate under test under Beijing light source illumination. The background light field and flat field response corresponding to the hydrogen energy bipolar plate under test are obtained, and the initial image is corrected using the background light field and the flat field response to obtain the image to be processed.

[0013] According to the hydrogen bipolar plate defect detection method based on adaptive dark light enhancement provided in the embodiments of this application, the background light field and flat field response corresponding to the hydrogen bipolar plate under test are obtained, and the initial image is corrected using the background light field and the flat field response to obtain the image to be processed, including: The background light field is obtained based on a preset background light field calculation formula, and the flat field response is obtained based on a preset flat field response calculation formula. The formula for calculating the background light field includes: ; in, Indicates the background light field. This indicates the number of bipolar plate samples imaged under the same low-light conditions as the hydrogen energy bipolar plate under test. Indicates that the i-th bipolar plate sample is in The pixel value at the coordinate position; The formula for calculating the flat field response includes: ; in, Indicates a draw response. This represents the whiteboard image corresponding to an image formed under the same low-light conditions as the hydrogen energy bipolar plate under test. This represents the average value of all pixels in the whiteboard image; The initial image, the background light field, and the flat field response are input into a preset correction formula to obtain the image to be processed; The correction formula includes: ; in, This represents the image to be processed. This represents the initial image.

[0014] This application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps of the adaptive dark light enhancement-based hydrogen bipolar plate defect detection method as described above.

[0015] This application also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the adaptive dark light enhancement-based hydrogen bipolar plate defect detection method as described above.

[0016] The method and device for defect detection of hydrogen bipolar plates based on adaptive low-light enhancement provided in this application embodiment acquires the image of the hydrogen bipolar plate under test in low-light conditions; divides the image into N local regions, calculates the reflection intensity of each local region, and generates a binary dark area mapping table corresponding to the image under test based on the reflection intensity; performs weighted calculation based on the target pixel values ​​marked as dark areas in the dark area mapping table to obtain key statistics corresponding to the dark areas; constructs a gain function based on the key statistics, and constructs a nonlinear enhancement function corresponding to the hydrogen bipolar plate under test based on the constructed gain function and key statistics, so as to use the nonlinear enhancement function to perform adaptive enhancement processing on each local region. This application performs region division and creates a nonlinear enhancement function to perform image enhancement processing matching the local region; then, the enhanced image under test is low-pass filtered, and the defect structure features of the low-pass filtered image under test are extracted in multiple directions using a directional filter, thus realizing fast and accurate defect detection of the hydrogen bipolar plate under test in low-light conditions. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a schematic flowchart of the hydrogen energy bipolar plate defect detection method based on adaptive dark light enhancement provided in the embodiments of this application; Figure 2 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0020] This application provides a defect detection method for hydrogen energy bipolar plates based on adaptive low-light enhancement. This method can be applied to smart terminals and servers. This application uses the application of this method in a server as an example for illustration, and some other descriptions in the embodiments are for illustrative purposes only and are not intended to limit the scope of protection of this application, and will not be described in detail thereafter. The specific implementation of the method is as follows... Figure 1 As shown: Step 101: Obtain the image to be processed corresponding to the hydrogen energy bipolar plate under low light conditions.

[0021] Step 102: Divide the image to be processed into N local regions, calculate the reflection intensity corresponding to each local region, and generate a binarized dark area mapping table corresponding to the image to be processed based on the reflection intensity.

[0022] Where N is an integer greater than 2.

[0023] Step 103: Perform weighted calculations based on the target pixel values ​​marked as dark areas in the dark area mapping table to obtain the key statistics corresponding to the dark areas.

[0024] Key statistics include the weighted average brightness of the dark area and the standard deviation of the brightness of the dark area.

[0025] Step 104: Construct a gain function based on key statistics, and construct a nonlinear enhancement function corresponding to the hydrogen bipolar plate to be tested based on the constructed gain function and key statistics, so as to use the nonlinear enhancement function to perform adaptive enhancement processing on the image to be processed.

[0026] Step 105: Perform low-pass filtering on the enhanced image to be processed, and use a multi-directional filter to extract the defect structure features of the low-pass filtered image to be processed in multiple directions.

[0027] The method for defect detection of hydrogen bipolar plates based on adaptive low-light enhancement provided in this application involves: acquiring an image of the hydrogen bipolar plate under test in low-light conditions; dividing the image into N local regions, calculating the reflection intensity of each local region, and generating a binarized dark area mapping table corresponding to the image based on the reflection intensity; performing weighted calculations on the target pixel values ​​marked as dark areas in the dark area mapping table to obtain key statistics corresponding to the dark areas; constructing a gain function based on the key statistics, and constructing a nonlinear enhancement function corresponding to the hydrogen bipolar plate under test based on the constructed gain function and key statistics, so as to perform adaptive enhancement processing on each local region using the nonlinear enhancement function. This application performs region division and creates a nonlinear enhancement function to perform image enhancement processing matching the local regions; furthermore, the enhanced image is low-pass filtered, and a directional filter is used to extract the defect structure features of the low-pass filtered image in multiple directions, thus achieving fast and accurate defect detection of the hydrogen bipolar plate under test in low-light conditions.

[0028] In one specific embodiment, the specific implementation of acquiring the image to be processed corresponding to the hydrogen energy bipolar plate under test in low light conditions includes: Acquire the initial image of the hydrogen energy bipolar plate under test under low light conditions; acquire the background light field and flat field response corresponding to the hydrogen energy bipolar plate under test, and use the background light field and flat field response to correct the initial image to obtain the image to be processed.

[0029] The initial image is obtained by fusing a first image of the hydrogen energy bipolar plate under test under dark field illumination and a second image of the hydrogen energy bipolar plate under test under Beijing light source illumination.

[0030] The initial image includes an image of the front side of the hydrogen bipolar plate under test and an image of the back side of the hydrogen bipolar plate under test. The first and second images also each include an image of the front side and an image of the back side.

[0031] Specifically, a dual-light source differential imaging method is used to obtain the initial image, effectively separating background and defect information. A first image is acquired under dark-field illumination, and a second image is acquired under background illumination. The two images are then weighted and fused according to their light intensity ratios to obtain the initial image, as shown in formula (1). …………………………(1) in, Indicates the initial image. Represents the first image. This represents the second image. , This is the light intensity attenuation coefficient.

[0032] in, , The value of is determined based on the light source intensity and satisfies . Typical value = 0.7, =0.3, to ensure that the defect features are highlighted without losing background information.

[0033] In one specific embodiment, the specific implementation of obtaining the background light field and flat field response corresponding to the hydrogen energy bipolar plate under test, and correcting the initial image using the background light field and flat field response to obtain the image to be processed includes: The background light field is obtained based on the preset background light field calculation formula, and the flat field response is obtained based on the preset flat field response calculation formula. The initial image, background light field and flat field response are input into the preset correction formula to obtain the image to be processed.

[0034] Specifically, the formula for calculating the background light field is shown in formula (2): …………………………(2) in, Indicates the background light field. This indicates the number of bipolar plate samples imaged under the same low-light conditions as the hydrogen energy bipolar plate under test. Indicates that the i-th bipolar plate sample is in The pixel value at the coordinate position.

[0035] Specifically, select 3-5 standard defect-free bipolar plate samples that have been manually verified. These samples must be from the same batch, made of the same material, and have the same surface treatment process as the bipolar plate to be tested. Under the same lighting conditions as the actual test (the same dual light source positions, angles, and intensity settings), image each standard sample is captured to obtain an image set. Pixel-level averaging is performed on the images (image set) of multiple standard samples to eliminate individual differences, as shown in formula (2).

[0036] The background light field This reflects the inherent brightness distribution on the surface of the bipolar plate under defect-free conditions, caused by the material's lattice structure, microstructure, and uneven illumination.

[0037] Specifically, the formula for calculating the flat field response is shown in formula (3): …………………………(3) in, Indicates a draw response. This represents the whiteboard image corresponding to an image formed under the same low-light conditions as the hydrogen energy bipolar plate under test. This represents the average value of all pixels in the whiteboard image.

[0038] Specifically, a standard uniform white plate (Lambertian surface, reflectivity >95%) is used as the imaging target, and the size of the white plate should be larger than the imaging field of the hydrogen energy bipolar plate to be tested. Under the same dual-source illumination conditions, the white plate is imaged to obtain the white plate image. The original flat-field image is normalized to make its mean value 1, see formula (3).

[0039] Normalized This reflects the spatial response differences caused by the imaging system (including light source illuminance distribution, lens vignetting, and uneven sensor response). Ideally... It is an all-1 matrix, but in actual imaging systems, it is usually close to 1.0 in the central region of the image, and may drop to 0.7-0.9 in the edge region.

[0040] Specifically, the correction formula is shown in formula (4): ……………………(4) in, This represents the image to be processed. This represents the initial image.

[0041] In one specific embodiment, the specific implementation of calculating the reflection intensity corresponding to each local region includes: The corrected image is divided into N local regions (typically using a 16×16 pixel sliding window), and the reflection intensity is calculated for each local region. Then, a reflection feature space is constructed based on the reflection intensity, as shown in formula (5): ……………………(5) in, Represents the reflection feature space, Indicates the intensity of reflection. This represents the average brightness value of the i-th local region. This represents the global average brightness value of the image to be processed.

[0042] This normalization process converts absolute brightness into relative reflectivity, eliminating the influence of overall light intensity. (Normal reflectivity area) Approaching 1.0, while the Dark Zone The value is significantly less than 1.0.

[0043] Furthermore, the local reflection distribution corresponding to the local region is obtained based on the reflection feature space.

[0044] In one specific embodiment, the specific implementation of generating a binarized dark area mapping table corresponding to the image to be processed based on reflection intensity includes: The local reflection distribution corresponding to each local area is obtained based on the reflection intensity; based on the pre-created reflection distribution reference model and the local reflection distribution, the KL divergence is calculated, and a binary dark area mapping table is generated based on the KL divergence.

[0045] In one specific embodiment, the specific implementation of calculating the KL divergence based on a pre-created reflection distribution reference model and local reflection distribution, and generating a binarized dark area mapping table based on the KL divergence includes: By inputting the reflection distribution reference model and the local reflection distribution into the preset divergence calculation formula, the KL divergence corresponding to each local region is obtained.

[0046] The formula for calculating divergence is given in formula (6): ………………(6) in, Denotes KL divergence, Indicates local reflection distribution, Represents the reference model for reflection distribution. Indicates a dynamic threshold. Based on the reflection distribution reference model and the material characteristics of the hydrogen energy bipolar plate under test.

[0047] Specifically, to detect abnormal areas using KL divergence localization, a reflection distribution reference model is first established: images are taken of qualified bipolar plate samples (at least 10 pieces) from the same batch, and their reflection characteristic distribution is statistically analyzed as the reflection distribution reference model. The local reflection distribution of the hydrogen bipolar plate to be tested. Calculate the KL divergence.

[0048] When the KL divergence exceeds the threshold At that time, the area was determined to be an abnormal dark area.

[0049] In one specific embodiment, determining the dynamic threshold includes: The mean and standard deviation of the KL divergence samples corresponding to the bipolar plate samples of the reflection distribution reference model are input into the preset threshold determination formula to obtain the dynamic threshold.

[0050] The threshold determination formula is shown in formula (7): …………………………(7) in, This represents the mean. Indicates standard deviation, This represents the adjustment coefficient, which is determined based on the material characteristics of the hydrogen energy bipolar plate under test.

[0051] Specifically, The sensitivity is adaptively set based on the reflectivity of the materials in each batch: k = 2.5 for high-reflectivity materials, k = 2.0 for medium-reflectivity materials, and k = 1.5 for low-reflectivity materials. This allows for automatic adjustment of the detection sensitivity according to the material characteristics of different bipolar plate batches.

[0052] Specifically, based on the KL divergence determination results, a binarized dark area mapping table is generated, as shown in formula (8): ……………………(8) in, Represents a binary dark area mapping table.

[0053] To avoid boundary mutations, A 3×3 Gaussian kernel is applied for smoothing to obtain a dark area weight mapping in the continuous value range [0,1]. The weight value represents the degree of enhancement required at that location, providing regional guidance for subsequent targeted enhancement.

[0054] In one specific embodiment, the specific implementation of obtaining the key statistics corresponding to the dark area by weighted calculation based on the target pixel values ​​marked as dark areas in the dark area mapping table includes: Input the target pixel value into the preset brightness calculation formula to obtain the weighted average brightness of the dark area, and input the target pixel value into the preset standard deviation calculation formula to obtain the brightness standard deviation of the dark area.

[0055] The formula for calculating brightness is shown in formula (9): ……………………(9) in, This represents the weighted average brightness. Indicates the target pixel value. This represents the image to be processed.

[0056] The formula for calculating the standard deviation is given in formula (10): …………(10) in, This represents the standard deviation of brightness.

[0057] Specifically, This represents the weighted average brightness of the dark areas, reflecting the overall lighting level. It represents the standard deviation of brightness in dark areas, reflecting the degree of unevenness in illumination.

[0058] In one specific embodiment, the gain function is shown in formula (11): …………(11) in, Represents the gain function. This represents the weighted average brightness. Indicates the standard deviation of brightness. Represents the base gain coefficient. This indicates the preset target average brightness. This represents the preset target standard deviation. This indicates a preset constant value.

[0059] For example, titanium-based bipolar plates =1.8, stainless steel base For example, a target average brightness of 128 and a target standard deviation of 50 represent the desired contrast level. To prevent division by zero, a constant such as 0.01 is used. This is merely an example and is not intended to limit the scope of this application.

[0060] Specifically, the first item The gain is adjusted based on the difference between the current brightness and the target brightness: the gain is adjusted based on the ratio of the current brightness to the target brightness: the darker the dark area, the larger this value, thus increasing the brightness; the second item... The gain is adjusted based on the ratio of the current contrast to the target contrast: the lower the contrast, the larger this value, thus stretching the detail contrast. This achieves adaptive enhancement for areas with different brightness and contrast.

[0061] Specifically, a nonlinear enhancement function adapted to the characteristics of bipolar plates is designed based on Retinex theory, as shown in formula (12): ………………(12) in, Represents a nonlinear enhancement function. This represents the image to be processed.

[0062] Specifically, the physical meaning of this formula is: firstly, through Standardization processing is performed to normalize images under different lighting conditions to a uniform dynamic range, eliminating the influence of overall brightness differences, and then multiplying by a gain coefficient for adaptive enhancement.

[0063] In one specific embodiment, the specific implementation of performing low-pass filtering on the enhanced image to be processed and extracting the defect structure features of the low-pass filtered image to be processed in multiple directions using a multi-directional filter includes: The enhanced image to be processed is input into a preset filtering formula to obtain the image to be processed after low-pass filtering.

[0064] The filtering formula is shown in formula (13): ... (13) in, Represents the normalization factor. This represents the pixel coordinates corresponding to the location in the image where denoising and smoothing are being performed. Represents a reference pixel within the local spatial neighborhood. Indicates The local spatial neighborhood centered on the center This represents the first Gaussian algorithm. This represents the second Gaussian algorithm. Indicates and The image corresponding to the Gaussian processing of the corresponding coordinate positions. Indicates and The local image corresponding to the coordinate position when Gaussian processing is performed.

[0065] in, .

[0066] Specifically, the filter includes two Gaussian kernels, each utilizing spatial distance. and pixel grayscale difference Weighting is applied to smooth out lattice noise on the material surface while preserving the edge features of micro-defects.

[0067] Among them, the Gaussian kernel includes: the spatial domain Gaussian kernel, The standard deviation of the spatial domain Positively correlated with material grain size. Larger grain sizes... It can smooth rough grain textures. Specifically, for grain sizes <10μm, = 3, grain size (10-30μm). = 5 pixels, grain size (>30μm) = 7.

[0068] Gaussian kernel for color gamut: Among them, the standard deviation of color gamut Positively correlated with local contrast. Calculate the contrast within a local 3×3 window. Then set = 20 + 30°C, so that the high-contrast areas, which may be defect edges, maintain a large temperature range. To preserve edges, more powerful smoothing is applied to low-contrast areas.

[0069] Specifically, the low-pass filtered image to be processed is input into a preset multi-directional feature extraction formula to obtain enhanced results in multiple directions.

[0070] The multi-directional feature extraction formula is shown in formula (14): ………………(14) in, This indicates enhancement results in multiple directions. This represents the position coordinates on the image after rotation. This indicates the preset aspect ratio. This indicates the preset wavelength.

[0071] Specifically, multi-directional defect structure features are extracted using a directional Gabor filter bank. Gabor filters in four directions (0°, 45°, 90°, 135°) are applied.

[0072] in, , , This indicates the filter direction angle.

[0073] For example, wavelength Pixels (corresponding to a 0.02mm defect scale), aspect ratio Standard deviation Pixel.

[0074] Furthermore, the final enhancement result is obtained by taking the maximum value of the response in the four directions, as shown in formula (15): …(15) in, This represents the final image, from which multi-directional defect structural features are obtained.

[0075] This application can effectively capture linear defect features (such as microcracks, scratches, etc.) in any direction while suppressing random noise. The final output... It retains subtle defect features while effectively suppressing background noise, and can be directly used for subsequent defect segmentation and identification.

[0076] This application establishes a decoupling space between material reflection characteristics and defect features through KL divergence, enabling precise localization of dark areas. It combines brightness compensation and contrast enhancement using a dynamic gain function to achieve parameter self-adaptation for materials of different specifications and under different lighting conditions. Furthermore, by designing material-related bilateral filtering parameters combined with multi-directional Gabor enhancement, it retains 0.02mm-level micro-defect edge features while reducing noise. In other words, through a three-stage process of precise localization of low-brightness areas, enhancement of dark light features, and dynamic noise suppression, it effectively solves the problem of micro-defect detection in hydrogen bipolar plates under dark lighting conditions.

[0077] Figure 2 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 2As shown, the electronic device may include a processor 201, a communication interface 202, a memory 203, and a communication bus 204. The processor 201, communication interface 202, and memory 203 communicate with each other via the communication bus 204. The processor 201 can call logic instructions from the memory 203 to execute a hydrogen bipolar plate defect detection method based on adaptive low-light enhancement.

[0078] Furthermore, the logical instructions in the aforementioned memory 203 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0079] On the other hand, the present invention also provides a computer program product, the computer program product including a computer program stored on a non-transitory computer-readable storage medium, the computer program including program instructions, and when the program instructions are executed by a computer, the computer is able to execute the hydrogen energy bipolar plate defect detection method based on adaptive dark light enhancement provided by the above methods.

[0080] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the hydrogen bipolar plate defect detection method based on adaptive dark light enhancement provided in the above embodiments.

[0081] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0082] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0083] Finally, it should be noted that the above descriptions are merely preferred embodiments of this application, and this application is not limited to the above embodiments. It is understood that other improvements and variations directly derived or conceived by those skilled in the art without departing from the spirit and concept of this application should be considered to be included within the protection scope of this application.

Claims

1. A defect detection method for hydrogen bipolar plates based on adaptive dark light enhancement, characterized in that, The method includes: Acquire the image of the hydrogen energy bipolar plate under test in low light conditions; The image to be processed is divided into N local regions, the reflection intensity of each local region is calculated, and a binarized dark area mapping table corresponding to the image to be processed is generated based on the reflection intensity. The key statistics corresponding to the dark areas are obtained by weighted calculation based on the target pixel values ​​marked as dark areas in the dark area mapping table. The key statistics include: the weighted average brightness of the dark areas and the brightness standard deviation of the dark areas. A gain function is constructed based on the key statistics, and a nonlinear enhancement function corresponding to the hydrogen bipolar plate to be tested is constructed based on the constructed gain function and the key statistics, so as to use the nonlinear enhancement function to perform adaptive enhancement processing on the image to be processed. The enhanced image to be processed is subjected to low-pass filtering, and the defect structure features of the low-pass filtered image to be processed in multiple directions are extracted using a multi-directional filter.

2. The method for defect detection of hydrogen bipolar plates based on adaptive dark light enhancement according to claim 1, characterized in that, The gain function includes: ; in, Represents the gain function. This represents the weighted average brightness. Indicates the standard deviation of brightness. Represents the base gain coefficient. This indicates the preset target average brightness. This represents the preset target standard deviation. Indicates a preset constant value; The nonlinear enhancement function includes: ; in, Represents a nonlinear enhancement function. This represents the image to be processed.

3. The method for defect detection of hydrogen energy bipolar plates based on adaptive dark light enhancement according to claim 1 or 2, characterized in that, The enhanced image to be processed is subjected to low-pass filtering, and the defect structure features of the low-pass filtered image to be processed in multiple directions are extracted using a multi-directional filter, including: The enhanced image to be processed is input into a preset filtering formula to obtain the image to be processed after low-pass filtering. The filtering formulas include: ; in, Represents the normalization factor. This represents the pixel coordinates corresponding to the location in the image where denoising and smoothing are being performed. Represents a reference pixel within the local spatial neighborhood. Indicated by The local spatial neighborhood centered on the center This represents the first Gaussian algorithm. This represents the second Gaussian algorithm. Indicates and The image corresponding to the Gaussian processing of the corresponding coordinate positions. Indicates and The local image corresponding to the coordinate position when Gaussian processing is performed; The image to be processed after low-pass filtering is input into a preset multi-directional feature extraction formula to obtain the enhancement results in multiple directions; The multi-directional feature extraction formula includes: ; in, This indicates defect structural features in multiple directions. This represents the position coordinates on the image after rotation. This indicates the preset aspect ratio. Indicates the preset wavelength; Based on the enhancement results, defect structural features in multiple directions are obtained.

4. The method for defect detection of hydrogen bipolar plates based on adaptive dark light enhancement according to claim 1 or 2, characterized in that, Generate a binarized dark area mapping table corresponding to the image to be processed based on the reflection intensity, including: Based on the reflection intensity, the local reflection distribution corresponding to each local region is obtained; Based on the pre-created reflection distribution reference model and the local reflection distribution, the KL divergence is calculated, and the binarized dark area mapping table is generated based on the KL divergence.

5. The method for detecting defects in hydrogen bipolar plates based on adaptive dark light enhancement according to claim 4, characterized in that, Based on a pre-created reflection distribution reference model and the local reflection distribution, the KL divergence is calculated, and the binarized dark area mapping table is generated based on the KL divergence, including: The KL divergence corresponding to each local region is obtained by inputting the reflection distribution reference model and the local reflection distribution into a preset divergence calculation formula. The divergence calculation formula includes: ; in, Denotes KL divergence, Indicates local reflection distribution. Represents the reference model for reflection distribution. Indicates a dynamic threshold, the Based on the reflection distribution reference model and the material characteristics of the hydrogen energy bipolar plate under test.

6. The method for defect detection of hydrogen energy bipolar plates based on adaptive dark light enhancement according to claim 5, characterized in that, The determination of the dynamic threshold includes: The mean and standard deviation of the KL divergence samples corresponding to the bipolar plate samples corresponding to the reflection distribution reference model are input into a preset threshold determination formula to obtain the dynamic threshold. The threshold determination formula includes: ; in, This represents the mean. Indicates standard deviation, This represents the adjustment coefficient, which is determined based on the material characteristics of the hydrogen energy bipolar plate under test.

7. The method for defect detection of hydrogen energy bipolar plates based on adaptive dark light enhancement according to claim 1 or 2, characterized in that, Based on the weighted calculation of the target pixel values ​​marked as dark areas in the dark area mapping table, the key statistics corresponding to the dark areas are obtained, including: The target pixel value is input into a preset brightness calculation formula to obtain the weighted average brightness of the dark area, and the target pixel value is input into a preset standard deviation calculation formula to obtain the brightness standard deviation of the dark area. The formula for calculating brightness includes: ; in, This represents the weighted average brightness. Indicates the target pixel value. This represents the image to be processed; The formula for calculating standard deviation includes: ; in, This represents the standard deviation of brightness.

8. The method for defect detection of hydrogen bipolar plates based on adaptive dark light enhancement according to claim 1 or 2, characterized in that, Acquire the image of the hydrogen energy bipolar plate under test in low light conditions, including: An initial image of the hydrogen energy bipolar plate under test is obtained under low light conditions. The initial image is obtained by fusing a first image of the hydrogen energy bipolar plate under test under dark field light source illumination and a second image of the hydrogen energy bipolar plate under test under Beijing light source illumination. The background light field and flat field response corresponding to the hydrogen energy bipolar plate under test are obtained, and the initial image is corrected using the background light field and the flat field response to obtain the image to be processed.

9. The method for defect detection of hydrogen energy bipolar plates based on adaptive dark light enhancement according to claim 8, characterized in that, Acquire the background light field and flat field response corresponding to the hydrogen energy bipolar plate under test, and use the background light field and flat field response to correct the initial image to obtain the image to be processed, including: The background light field is obtained based on a preset background light field calculation formula, and the flat field response is obtained based on a preset flat field response calculation formula. The formula for calculating the background light field includes: ; in, Indicates the background light field. This indicates the number of bipolar plate samples imaged under the same low-light conditions as the hydrogen energy bipolar plate under test. Indicates that the i-th bipolar plate sample is in The pixel value at the coordinate position; The formula for calculating the flat field response includes: ; in, Indicates a draw response. This represents the whiteboard image corresponding to an image formed under the same low-light conditions as the hydrogen energy bipolar plate under test. This represents the average value of all pixels in the whiteboard image; The initial image, the background light field, and the flat field response are input into a preset correction formula to obtain the image to be processed; The correction formula includes: ; in, This represents the image to be processed. This represents the initial image.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the hydrogen bipolar plate defect detection method based on adaptive dark light enhancement as described in any one of claims 1 to 9.