A visual image recognition method for online water distribution in metal foam flow field fuel cells

Through image preprocessing, scoring and classification methods, the problem of difficult to visualize and quantitatively analyze the distribution state of liquid water in the metal foam flow field is solved, and the effective quantitative analysis of liquid water content is achieved, which improves the ability to optimize fuel cell performance.

CN117809091BActive Publication Date: 2025-03-18TIANJIN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311818467.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-27
Publication Date
2025-03-18
Estimated Expiration
2043-12-27

AI Technical Summary

Technical Problem

The prior art is difficult to effectively visualize and distinguish the distribution state of liquid water in metal foam flow fields, especially under different working conditions, which makes it difficult to conduct quantitative analysis, affecting the optimization of fuel cell performance.

Method used

The image preprocessing, scoring and classification methods are used to identify the position and distribution state of liquid water through thresholding and background differential methods, and different scores are given to the liquid water in different regions, and the score interval is mapped to 0-100 through nonlinear mapping to achieve quantitative analysis of the liquid water content.

Benefits of technology

It realizes effective distinction and quantitative analysis of liquid water in different states in the metal foam flow field, maintains the real gas-liquid two-phase transmission process, provides the analysis ability of online visualization results, and helps optimize fuel cell performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117809091B_ABST
    Figure CN117809091B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for visual image recognition of online water distribution of metal foam flow field fuel cells, and the technical method includes three processes: image preprocessing, scoring, and classification. Then the calculation method of each of the above processes is described in detail. It includes: division of ligament and pore areas; image segmentation mechanism; using background difference method to identify liquid water, and judging whether it is in the ligament or pore area according to the position of liquid water. By judging the droplet diameter, the score of each block image is mapped to the 0-100 interval, and the state classification is performed according to the score result, thereby obtaining the flow law and distribution state information of liquid water in multiple consecutive working images. The present invention does not need to add dyes to distinguish liquid water from ligaments and diffusion layer backgrounds, can maintain the real gas-liquid transmission process, and provides the ability to analyze the visualization results of online metal foam flow field fuel cells. It is helpful to optimize the design of foam flow field structure and formulate corresponding water management strategies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of fuel cells, and in particular relates to a method for identifying water distribution images of a visualized flow field of a fuel cell. Background Art

[0002] The energy conversion efficiency of proton exchange membrane fuel cells is as high as 60-80%. It is a green and pollution-free energy conversion device. It is an effective improvement of environmental pollution. Fuel cells are very suitable as a power source for transportation devices. Liquid water is the only product of fuel cells. Studying the formation process and transmission law of liquid water inside proton exchange membrane fuel cells (PEMFC) will help to explore the transmission mechanism of liquid water in fuel cells and provide more comprehensive design and optimization ideas for R&D products. The reactants in the fuel cell flow field are distributed on the membrane electrode, and also have an important impact on the discharge of liquid water. In recent years, a large number of research results have shown that metal foam flow fields exhibit better performance than traditional flow fields. Therefore, it is of great significance to carry out visualization research on metal foam flow fields and deeply understand the formation process, flow law and distribution state of liquid water in metal foam flow fields to establish optimization criteria. However, the current research on gas-liquid two-phase in metal foam flow fields usually requires the addition of dyes to distinguish the difference between liquid water and background, which is inconsistent with the actual flow process and cannot be tested by online visualization. The difficulty of this step is that liquid water in the metal foam flow field does not have a clear dividing line like the fuel cell with the traditional groove-ridge structure flow field. Liquid water will be distributed in any area of ​​the metal foam flow field. And because the metal foam material is opaque, when liquid water attaches to or stagnates at a certain position in the flow field, obvious reflection will occur. It can be clearly distinguished from the gas diffusion layer on the low-reflectivity black surface, which makes it difficult to clearly capture the flow process of water during threshold processing, because the process is highly random and difficult to quantify. Therefore, it is of great significance to establish an image recognition method that can effectively distinguish the different states of liquid water in the metal foam flow field fuel cell and realize the quantitative analysis of the liquid water content under different working conditions, which is of great significance to further optimize the performance of the fuel cell. Summary of the invention

[0003] In view of the fact that metal foam materials are opaque, which makes it difficult to visualize images of the actual water flow process in the metal foam, the present invention has established an image recognition method that can effectively distinguish the different states of liquid water in a metal foam flow field fuel cell, and can quantitatively analyze the liquid water content under different working conditions.

[0004] The technical solution adopted by the present invention is: a method for online water distribution visual image recognition of a metal foam flow field fuel cell, including three processes of image preprocessing, scoring, and classification, and the steps contained in each process are as follows:

[0005] (1) Image preprocessing process: First, the metal foam flow field image without liquid water in the fuel cell in the non-operating state is taken as the original image, and the metal foam ligament position information image is obtained through threshold processing, and the metal foam flow field is divided into ligament area and pore area. Then, the image of the liquid water in the metal foam flow field of the fuel cell in the operating state is obtained and used as the working image. According to the shooting results of the metal foam flow field in the fuel cell, the original image, ligament position information image, and working image are divided into image blocks.

[0006] (2) Scoring process: Based on the position of liquid water in the ligaments and pores, it is judged that the liquid water exists in the ligament area or the pore area. Due to the inconsistent reflection degree of the gas diffusion layer and the ligament, different scoring methods are given to the liquid water in the ligament area or the pore area. The droplet diameter is judged according to the reflection point of the liquid water in the metal foam. The farther the reflection center point is from the ligament, the larger the droplet diameter is, the greater the possibility of filling the hole, and the higher the score is. Through nonlinear mapping, the score of each block image is mapped to the range of 0-100;

[0007] (3) Classification process: According to the score coefficient of the block image, images with scores of 0-19 are classified as water-free; images with scores of 20-79 are classified as wet; and images with scores of 80-100 are classified as flooded.

[0008] Then the calculation method of each of the above processes is described in detail, including: the specific division method and steps of the ligament area and the pore area; the steps of the image segmentation method; the method and steps of identifying liquid water using the background difference method, judging the presence of liquid water in the ligament area or the pore area according to the position of liquid water in the ligament and pore; the method and steps of judging the droplet diameter based on the reflective points of liquid water in the metal foam, and mapping each block image score to the range of 0-100 through nonlinear mapping; the method and steps of state classification based on the block image score results, and obtaining the flow law and distribution state information of liquid water in multiple continuous working images. Through multiple continuous images, the operation process and distribution law of liquid water in the metal foam flow field can be captured.

[0009] The characteristics and beneficial effects of the present invention are:

[0010] (1) Thresholding image processing of the working images and original images in the ligament area and pore area helps to capture the precise flow process of liquid water in the metal foam flow field.

[0011] (2) Quantitative analysis of the liquid water content in the metal foam flow field will help to conduct a deeper study on the water management of the metal foam flow field, further optimize the foam flow field structure design scheme and formulate corresponding water management strategies.

[0012] (3) This identification method does not require the addition of dyes to distinguish liquid water from the ligament and gas diffusion layer background, can maintain the true gas-liquid two-phase transport process, and provides the ability to analyze the visualization results of online metal foam flow field fuel cells. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 This is a logical connection flow chart of the three processes of image preprocessing, scoring, and classification in the recognition method of the present invention.

[0014] Figure 2 The present invention visualizes an image of the metal foam flow field when the fuel cell is not in operation, and uses this image as the original image. At this time, the fuel cell is not in operation, and there is no liquid water in the flow field.

[0015] Figure 3 The present invention visualizes the image of the metal foam flow field during the online test of the fuel cell and uses it as the working image. At this time, liquid water exists inside the flow field.

[0016] Figure 4 For Figure 1 The ligament position information image is obtained after binarization processing, where the white part represents the ligament area and the black part represents the pore area.

[0017] Figure 5 The working image with the dimension of 1000×1000 is divided into The process of dividing the image into blocks with a dimension of 50×50.

[0018] Figure 6 It is a block image representing the same physical position of the original image, working image, difference image and ligament position information image.

[0019] Figure 7 Figure 3 shows the scoring results and classification status of the block images at the same physical position in the working image of the fuel cell under different operating conditions. The scoring result of (a) is 17.37 points, which is classified as an anhydrous state; the result of (b) is 62.22 points, which is classified as a wet state; and the result of (c) is 83.52 points, which is classified as a flooded state.

[0020] Figure 8 The liquid water distribution states of multiple working images with dimensions of 1000×1000 under different operating conditions of the fuel cell. Each state in the working image corresponds to the state classification of the block image at that location. DETAILED DESCRIPTION

[0021] The method of the present invention is further described in detail below in conjunction with a specific image processing example. It should be noted that any further limitation or replacement of equivalent calculation results based on the method of the present invention falls within the protection scope of the present invention.

[0022] The method for visual image recognition of online water distribution of metal foam flow field fuel cells includes three processes: image preprocessing, scoring, and classification. The steps of each process are as follows:

[0023] (1) Image preprocessing process: First, the metal foam flow field image without liquid water in the fuel cell in the non-operating state is taken as the original image, and the metal foam ligament position information image is obtained through threshold processing, and the metal foam flow field is divided into ligament area and pore area. Then, the image of the liquid water in the metal foam flow field of the fuel cell in the operating state is obtained and used as the working image. According to the shooting results of the metal foam flow field in the fuel cell, the original image, ligament position information image, and working image are divided into image blocks.

[0024] (2) Scoring process: Based on the position of liquid water in the ligaments and pores, it is judged that the liquid water exists in the ligament area or the pore area. Due to the inconsistent reflection degree of the gas diffusion layer and the ligament, different scoring methods are given to the liquid water in the ligament area or the pore area. The droplet diameter is judged according to the reflection point of the liquid water in the metal foam. The farther the reflection center point is from the ligament, the larger the droplet diameter is, the greater the possibility of filling the hole, and the higher the score is. Through nonlinear mapping, the score of each block image is mapped to the range of 0-100;

[0025] (3) Classification process: According to the score coefficient of the block image, images with a score of 0-20 are classified as water-free; images with a score of 20-80 are classified as wet; and images with a score of 80-100 are classified as flooded.

[0026] The calculation methods for each process are described in detail below:

[0027] 1. The metal foam flow field is divided into ligament area and pore area by threshold processing. The specific division steps include:

[0028] (1) Taking the metal foam flow field image without liquid water in the fuel cell in the non-operating state as the original image, the image is grayed to obtain: A * ∈R m*m ,

[0029] Where: R is a real number set, A * It is an m*m matrix on a real number field that represents the original image, where m is the number of rows and columns of the matrix.

[0030] (2) According to the reflective characteristics of the metal foam material, the threshold boundary is set and the binary processing is performed.

[0031] The image after binarization is defined as the ligament position information image, and we get: D * ∈R m*m ,

[0032] Where: D * It is an m*m matrix on a real number field that represents the ligament position information image.

[0033] (3) The metal foam ligament has a high reflectivity and is designated as number 1 in the ligament position information image matrix, where 1 represents the ligament area.

[0034] (4) The fuel cell gas diffusion layer has a low reflectivity and is defined as number 0 in the ligament position information image matrix, where 0 represents the pore area.

[0035] 2. Divide the original image, ligament position information image and working image into blocks to improve the efficiency and calculation accuracy of the algorithm. The specific steps include:

[0036] (1) Read the original image A * ∈R m*m , get an image matrix with a dimension of m*m, and divide the original image into blocks A block image with dimension n*n.

[0037] n is the number of rows and columns of the new matrix after the m*m matrix is ​​divided into blocks. The m*m image matrix can be evenly divided into blocks as follows An image matrix with dimension n*n.

[0038] (2) Reading ligament position information image D * ∈R m*m , and obtain an image matrix with a dimension of m*m. The ligament position information image is divided into blocks: A block image with dimension n*n.

[0039] (3) Read the image of the liquid water in the fuel cell flowing in the metal foam flow field under the running state, and grayscale the image to obtain the working image: B * ∈R m*m . Divide the working image matrix of dimension m*m into blocks There are n*n block images, B * It is an m*m matrix on a real number field that represents the ligament position information image.

[0040] 3. Use the background difference method to identify liquid water. According to the position of liquid water in the ligaments and pores, it is determined whether the liquid water exists in the ligament area or the pore area. The specific steps include:

[0041] (1) Read the block images representing the same physical position in the working image and the original image, which are the working image B∈R n*n With the original image A∈R n*n , use the background difference method to transform the working image B∈R n*n With the original image A∈R n*n Subtract and get the difference image C∈R n*n , C = BA. Its threshold is related to the content of liquid water.

[0042] (2) Read the ligament position information image D∈R n*n , establish the conditional distance matrix E∈R n*n , whose matrix dimension is the same as the original image A∈R n*n , working image B∈R n*n , difference image C∈R n*n and ligament position information image D∈R n*n Consistent. i,j is the element at a specific position (i, j) of the matrix, each E i,j is a set that contains all the entities that satisfy the condition D u,v =1 to the given position (i,j).

[0043]

[0044] in:

[0045] A is an n*n matrix on a real number field representing a block image in the original image;

[0046] B is an n*n matrix on a real number field representing a block image in the working image;

[0047] C is an n*n matrix in a real field representing the difference image;

[0048] D is an n*n matrix on a real number field representing a block image in the ligament position information image;

[0049] E is the conditional distance matrix, each element of which is a set containing all the distances that satisfy condition D. u,v = 1 to a given position (i,j). u,v,i,j are the indices of the matrix rows and columns.

[0050] (3) Based on the results of the conditional distance matrix E, establish the distance matrix E'∈R n*n , E' i,j Indicates that in the set E i,j The minimum value among all Euclidean distance values ​​in represents the minimum value at a given position (i, j) that satisfies the condition D u,v=1, thereby representing the shortest distance between this position and the ligament in physical space.

[0051] E' i,j =min E i,j

[0052] Where: E' is the distance matrix, E' i,j Indicates that in the set E i,j The minimum value among all Euclidean distance values ​​in .

[0053]

[0054] Read the distance matrix E'∈R n*n Each element E' i,j When E' i,j When the value of is equal to 0, it is judged that the position in the physical space belongs to the ligament area. i,j When the value of is not equal to 0, it is judged that the position belongs to the pore area in the physical space.

[0055] 4. Determine the droplet diameter based on the reflection points of liquid water in the metal foam. The steps of mapping each block image score to the range of 0-100 by nonlinear mapping include:

[0056] (1) Read the difference image C∈R n*n With the distance matrix E'∈R n*n , establish the rating matrix S∈R n*n , S i,j It represents the score value of the working image at a given position (i, j). When E' i,j = 0, S i,j The score is the difference image C i,j The value of .

[0057] S i,j =C i,j *(E' i,j q +1)

[0058] Where: S is the rating matrix, S i,j It represents the score value of the working image at a given position (i, j); q is the nonlinear adjustment coefficient.

[0059] C i,j The value is related to the liquid water content; when E' i,j ≠0, S i,j Score and difference image C i,j The value and distance matrix E' i,j The value of E' i,jThe larger the value of , the farther the liquid water is from the ligament, the higher the possibility of forming large droplets and the greater the possibility of filling the pores.

[0060] (2) Setting the nonlinear adjustment coefficient q to formulate the score interval,

[0061]

[0062] Where: r is the working image B∈R n*n The score result can be mapped to the range of 0-100 through the nonlinear adjustment coefficient q.

[0063] By calculating the rating matrix S∈R n*n The average value of all elements in the work image B∈R n*n The score result r of the working image is mapped to the range of 0-100 by adjusting the nonlinear adjustment coefficient q.

[0064] 5. The steps of classifying the state of the block image score results include:

[0065]

[0066] Where: f (r) For the working image B∈R n*n The classification status based on the score result r.

[0067] Read the working image B∈R n*n The score result r is as follows: when the score is less than 20, the working image is classified as a waterless state; when the score is greater than or equal to 20 and less than 80, the working image is classified as a wet state; when the score is greater than or equal to 80, the working image is classified as a flooded state.

[0068] 6. Perform the above steps 1-5 on all the block images of a working image to obtain the state distribution information of liquid water on this working image.

[0069] 7. By performing the above steps 1-6 on a plurality of consecutive working images, the flow law and distribution state information of the liquid water in the plurality of consecutive working images can be obtained.

[0070] 8. The dimension of the block image determines the recognition accuracy of liquid water in the working image. It is necessary to ensure that the block image can clearly show the positional relationship between the ligaments and the pores, and through multiple consecutive images, the movement process and distribution law of liquid water in the metal foam flow field can be captured.

[0071] The following images are used for further explanation and illustration. The images shown were taken using a fuel cell visualization test device.

[0072] like Figure 2As shown, an image of the metal foam flow field in a non-operating visualized fuel cell is captured. Since no reactants are introduced, no electrochemical reaction occurs in the fuel cell, the metal foam flow field is in a dry state, and no liquid water exists. This image is defined as the original image.

[0073] like Figure 3 As shown, an image of the metal foam flow field is captured when the fuel cell is online tested with liquid water in the operating state. Liquid water, as a product of electrochemical reaction, gradually diffuses from the battery catalyst layer to the metal foam flow field. At this time, liquid water exists in the metal foam flow field. This image is defined as a working image.

[0074] Figure 3 and Figure 2 By comparison, it can be clearly seen that a large amount of liquid water remains in the metal foam flow field. The liquid water is attached to the ligaments in the form of clumps or stays in the pores in the form of droplets. The local pores have been filled with liquid water, and the pores in the metal foam have become significantly smaller.

[0075] Figure 4 Yes Figure 2 The original image is binarized to obtain the ligament position information image. For clear display, the ligament area and the pore area are represented by black and white patterns, where the white part represents the ligament area and the black part represents the pore area.

[0076] like Figure 5 As shown in the figure, an image with a dimension of 1000×1000 is divided into block images with a dimension of 50×50. One image is composed of 400 block images. By scoring each block image, the overall liquid water distribution state of the image can be obtained. Therefore, the dimension of the block image 50×50 determines the recognition accuracy of liquid water in the working image, and it is necessary to ensure that the block image can clearly show the positional relationship between ligaments and pores.

[0077] Figure 6 The original image is shown ( Figure 6 (a))、Working Image( Figure 6 (b)), difference image ( Figure 6 (c)) and ligament position information image ( Figure 6 (d)) corresponds to Figure 5 The original image and the working image are obtained by graying the captured image. The original image reflects the situation where there is no liquid water in the metal foam flow field, and the working image reflects the situation where there is liquid water in the metal foam flow field. The difference image is obtained by background difference between the working image and the original image, which can reflect the location information of liquid water. The ligament location information image is obtained by binarization of the original image, which can distinguish the ligament area from the pore area.

[0078] Figure 7 The scoring results and classification status of the block images at the same physical position in the working image of the fuel cell under different operating conditions are shown. Figure 7 The liquid water content in (a) is low, and no obvious liquid water can be observed in the ligaments and pore areas. After being processed by the metal foam flow field fuel cell online water distribution visual image recognition method, the obtained score is 17.37, which is classified as a water-free state. Figure 7 (b) Liquid water appears in both the ligament and pore regions, and the liquid water exists in the pores in the form of water droplets. After being processed by the metal foam flow field fuel cell online water distribution visual image recognition method, the obtained score is 62.22, which is classified as a wet state. Figure 7 In (c), the liquid water has completely filled the pores. After being processed by the metal foam flow field fuel cell online water distribution visual image recognition method, the score obtained is 83.52, which is classified as a flooded state.

[0079] Figure 8 The distribution of liquid water in multiple working images of different dimensions under different operating conditions of the fuel cell is shown. Each working image has a dimension of 1000×1000. The image is composed of 50×50 block images. Figure 8 (a) The working image shown has a low liquid water content, and all block images are in an anhydrous state. As the electrochemical reaction proceeds, the liquid water production increases. Figure 8 (b) The internal segmented block image is transformed into a wet state. Figure 8 (c) The internal flooding state occurs for the first time. Figure 8 (d) Internal flooding is increasing. Figure 8 (e) shows the liquid water distribution in the working image under steady state.

[0080] The following are specific embodiments:

[0081] According to the original image A * ∈R m*m ; Read working image B * ∈R 1000*1000 ; Then read the ligament position information image D * ∈R 1000*1000 ( Figure 4 middle white part).

[0082] Original image A * ∈R 1000*1000 , get an image matrix with a dimension of 1000*1000, and divide the original image into blocks The image is divided into blocks with a dimension of 50*50.

[0083] Working Image B * ∈R 1000*1000, get an image matrix with a dimension of 1000*1000, and divide the original image into blocks The image is divided into blocks with a dimension of 50*50.

[0084] Ligament position information image D * ∈R 1000*1000 , get an image matrix with a dimension of 1000*1000, and divide the original image into blocks The classification process is as follows: Figure 5 shown.

[0085] C=BA

[0086] A∈R 50*50 , B∈R 50*50 , D∈R 50*50 A * ∈R 1000*1000 , B * ∈R 1000*1000 , D * ∈R 1000*1000 The block images representing the same physical location in . Using the background difference method, B∈R 50*50 With A∈R 50*50 Subtract, and we get C∈R 50*50 , whose threshold is related to the content of liquid water, such as Figure 6 .

[0087]

[0088] With D∈R 50*50 Establish the conditional distance matrix E∈R 50*50 , whose matrix dimension is the same as A∈R 50*50 , B∈R 50*50 , C∈R 50 *50 and D∈R 50*50 Consistent. i,j is the element at a specific position (i, j) of the matrix, each E i,j is a set that contains all the entities that satisfy the condition D u,v =1 to the given position (i,j).

[0089] E' i,j =min E i,j

[0090] Based on the results of E, establish the distance matrix E'∈R 50*50 , which is in the set E i,j The minimum value among all Euclidean distance values ​​in represents the minimum value at a given position (i, j) that satisfies the condition D u,v= 1. This is used to represent the shortest distance between this position and the ligament in physical space.

[0091]

[0092] Read E'∈R 50*50 Each E' i,j When E' i,j When the value of is equal to 0, it is judged that the position in physical space belongs to the ligament area; when E' i,j When the value of is not equal to 0, it is judged that the position belongs to the pore area in the physical space.

[0093] S i,j =C i,j *(E' i,j q +1)

[0094] According to C∈R 50*50 With E'∈R 50*50 Establish a rating matrix S∈R 50*50 , S i,j The block image B∈R represents the working image 50*50 The score value at a given position (i, j) when E' i,j = 0, S i,j The score is the difference image C i,j The value of C i,j Related to the liquid water content; when E' i,j ≠0, S i,j Score with C i,j The value of E' i,j The value of E' i,j The larger the value of , the farther the liquid water is from the ligament, and the greater the possibility of forming large droplets that fill the pores.

[0095]

[0096] By calculating the rating matrix S∈R 50*50 The average value of all elements in B∈R 50*50 The score results r and q are used to formulate the score interval: q is adjusted to 2 so that the scores of the block images of the working image are mapped to the interval of 0-100.

[0097]

[0098] According to B∈R 50*50 From the score result r, we know that when the score is less than 20, the block image is classified as a waterless state; when the score is greater than or equal to 20 and less than 80, the block image is classified as a wet state; when the score is greater than or equal to 80, the block image is classified as a flooded state.

[0099] Block images B∈R of the working image of the fuel cell under different operating conditions, representing the same physical location 50*50 The scoring results and classification status are as follows Figure 7 shown.

[0100] For all block images B∈R of a working image 50*50 Execute all the above steps to get a working image B∈R 1000*1000 The state distribution information of liquid water on the image. 1000*1000 Execute all the above steps to obtain the flow law and distribution state information of liquid water in multiple consecutive working images. Figure 8 shown.

[0101] The present invention establishes an image recognition method that can effectively distinguish different states of liquid water in a metal foam flow field fuel cell, thereby realizing quantitative analysis of the liquid water content under different working conditions. This is of great significance for the in-depth implementation of fuel cell water management and helps to further develop and optimize the fuel cell flow field.

Claims

1. A method for visually identifying online water distribution in a metal foam flow field fuel cell, characterized in that: The recognition method includes three processes: image preprocessing, scoring, and classification. The steps in each process are as follows: (1) Image preprocessing process: taking the metal foam flow field image without liquid water in the fuel cell in the non-operating state as the original image, obtaining the metal foam ligament position information image through threshold processing, and dividing the metal foam flow field into the ligament area and the pore area; obtaining the image of the liquid water flowing in the metal foam flow field of the fuel cell in the operating state, and taking it as the working image, and dividing the original image, the ligament position information image, and the working image into blocks according to the shooting results of the metal foam flow field in the fuel cell; (2) Scoring process: Based on the position of liquid water in the ligaments and pores, it is judged that the liquid water exists in the ligament area or the pore area. Due to the inconsistent reflection degree of the gas diffusion layer and the ligament, different scoring methods are given to the liquid water in the ligament area or the pore area. The droplet diameter is judged according to the reflection point of the liquid water in the metal foam. The farther the reflection center point is from the ligament, the larger the droplet diameter is, the greater the possibility of filling the hole, and the higher the score is. Through nonlinear mapping, the score of each block image is mapped to the range of 0-100; (3) Classification process: According to the scores of the block images, images with scores of 0-19 are classified as water-free; images with scores of 20-79 are classified as wet; and images with scores of 80-100 are classified as flooded. The specific steps of judging whether liquid water exists in the ligament area or the pore area include: (1) Read the block images representing the same physical position in the working image and the original image, which are respectively the working image B∈R n*n With the original image A∈R n*n , use the background difference method to transform the working image B∈R n*n With the original image A∈R n*n Subtract and get the difference image C∈R n*n , C = BA, and its threshold is related to the content of liquid water; (2) Read the ligament position information image D∈R n*n , establish the conditional distance matrix E∈R n*n , whose matrix dimension is the same as the original image A∈R n*n , working image B∈R n*n , difference image C∈R n*n and ligament position information image D∈R n*n Consistent, E i,j is the element at a specific position (i, j) of the matrix, each E i,j is a set that contains all the entities that satisfy condition D u,v =1 is the Euclidean distance from the position (u,v) to the given position (i,j); in: A is an n*n matrix on a real number field representing a block image in the original image; B is an n*n matrix on a real number field representing a block image in the working image; C is an n*n matrix in a real field representing the difference image; D is an n*n matrix on a real number field representing a block image in the ligament position information image; E is the conditional distance matrix, each element of which is a set containing all the distances that satisfy condition D. u,v =1 is the Euclidean distance from the position (u,v) to the given position (i,j); u, v, i, j are the indices of the matrix rows and columns; (3) Based on the results of the conditional distance matrix E, establish the distance matrix E'∈R n*n , E' i,j Indicates that in the set E i,j The minimum value among all Euclidean distance values ​​in represents the minimum value at a given position (i, j) that satisfies the condition D u,v =1, which represents the shortest distance between this position and the ligament in physical space; It's i,j =min E i,j Where: E' is the distance matrix, E' i,j Indicates that in the set E i,j The minimum value among all Euclidean distance values ​​in ; Read the distance matrix E'∈R n*n Each element E' i,j When E' i,j When the value of is equal to 0, it is judged that the position in the physical space belongs to the ligament area. i,j When the value of is not equal to 0, it is judged that the position belongs to the pore area in the physical space.

2. The method for online water distribution visual image recognition of metal foam flow field fuel cell according to claim 1, characterized in that: The metal foam ligament position information image is obtained through the thresholding process, and the metal foam flow field is divided into a ligament area and a pore area. The specific division steps include: (1) Taking the metal foam flow field image without liquid water in the fuel cell in the non-operating state as the original image, the image is grayed to obtain: A * ∈R m*m ; Where: R is a real number set, A * It is an m*m matrix on a real number field representing the original image, where m is the number of rows and columns of the matrix; (2) According to the reflective characteristics of the metal foam material, a threshold boundary is set and a binary processing is performed; The image after binarization is defined as the ligament position information image, and we get: D * ∈R m*m , Where: D * It is an m*m matrix on a real number field that represents the ligament position information image; (3) The metal foam ligament has a high reflectivity and is designated as number 1 in the ligament position information image matrix, where 1 represents the ligament area; (4) The fuel cell gas diffusion layer has a low reflectivity and is defined as number 0 in the ligament position information image matrix, where 0 represents the pore area.

3. The method for online water distribution visual image recognition of metal foam flow field fuel cell according to claim 1, characterized in that: The original image, the ligament position information image and the working image are divided into blocks to improve the efficiency and calculation accuracy of the algorithm. The specific steps include: (1) Read the original image A * ∈R m*m , get an image matrix with a dimension of m*m, and divide the original image into blocks A block image with dimension n*n; n is the number of rows and columns of the new matrix after the m*m matrix is ​​divided into blocks. The m*m image matrix can be evenly divided into blocks as follows An image matrix with dimension n*n; (2) Reading the ligament position information image D * ∈R m*m , and obtain an image matrix with a dimension of m*m. The ligament position information image is divided into blocks: A block image with dimension n*n; (3) Reading the image of the liquid water in the fuel cell flowing in the metal foam flow field under the operating state, and graying the image to obtain a working image: B * ∈R m*m ; Divide the working image matrix with dimension m*m into blocks There are n*n block images, B * It is an m*m matrix on a real number field that represents the ligament position information image.

4. The method for online water distribution visual image recognition of metal foam flow field fuel cell according to claim 1, characterized in that: The steps of judging the droplet diameter based on the reflection points of the liquid water in the metal foam and mapping the score of each block image to the range of 0-100 by nonlinear mapping include: (1) Read the difference image C∈R n*n With the distance matrix E'∈R n*n , establish the rating matrix S∈R n*n , S i,j It represents the score value of the working image at a given position (i, j). When E' i,j = 0, S i,j The score is the difference image C i,j The value of S i,j =C i,j *(E' i,j q +1) Where: S is the rating matrix, S i,j Represents the score value of the working image at a given position (i, j); q is the nonlinear adjustment coefficient; C i,j The value is related to the liquid water content; when E' i,j ≠0, S i,j Score and difference image C i,j The value and distance matrix E' i,j The value of E' i,j The larger the value of , the farther the liquid water is from the ligament, the higher the possibility of forming large droplets and filling the pores; (2) Setting the nonlinear adjustment coefficient q to formulate the score interval, Where: r is the working image B∈R n*n The score result is calculated by calculating the score matrix S∈R n*n The average value of all elements in is obtained to obtain r, and by adjusting the nonlinear adjustment coefficient q to 2, the score result r of the working image is mapped to the range of 0-100.

5. The method for online water distribution visual image recognition of metal foam flow field fuel cell according to claim 1, characterized in that: The step of classifying the state of the block image score results includes: Where: f (r) For the working image B∈R n*n Classification status based on the score result r; Read the working image B∈R n*n The score result r is as follows: when the score is less than 20, the working image is classified as a waterless state; when the score is greater than or equal to 20 and less than 80, the working image is classified as a wet state; when the score is greater than or equal to 80, the working image is classified as a flooded state.

6. The method for online water distribution visual image recognition of metal foam flow field fuel cell according to claim 1, characterized in that: By performing the steps described in claim 1 on all the block images of the working image, the state distribution information of the liquid water on the working image can be obtained.

7. The method for online water distribution visual image recognition of metal foam flow field fuel cell according to claim 3, characterized in that: By performing the steps described in claim 3 on a plurality of consecutive working images, the flow law and distribution state information of the liquid water in the plurality of consecutive working images can be obtained.

8. The method for online water distribution visual image recognition of metal foam flow field fuel cell according to claim 1, characterized in that: The dimension of the block image determines the recognition accuracy of liquid water in the working image. It is necessary to ensure that the block image can clearly show the positional relationship between the ligaments and the pores, and the movement process and distribution law of liquid water in the metal foam flow field can be captured through multiple consecutive images.