A high-precision leaf surface microscopic image pore automatic detection and counting method, system, storage medium and product

CN122530084APending Publication Date: 2026-08-07GUILIN UNIVERSITY OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUILIN UNIVERSITY OF TECHNOLOGY
Filing Date
2026-04-28
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

[0006]针对上述研究的问题,本发明的目的在于提供一种高精度叶面显微图像气孔自动检测与计数方法、系统、存储介质及产品,解决现有技术在复杂背景下容易产生漏检或误检的问题

Benefits of technology

[0071]一、本发明提出的气孔自动检测与计数方法对复杂叶面显微图像具有较强的适应能力,能够在保证气孔高检出率的同时,有效剔除细胞壁、叶脉等干扰结构,显著降低误检率;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122530084A_ABST
    Figure CN122530084A_ABST
Patent Text Reader

Abstract

The application discloses a high-precision leaf surface microscopic image pore automatic detection and counting method and system, a storage medium and a product, relates to the image processing and machine vision application field, in particular to the automatic detection and counting of pores under the plant leaf surface microscopic image, has important application value for the plant physiology research, plant growth condition evaluation and agricultural breeding, and solves the problem that the prior art is prone to missed detection or mis-detection under a complex background. The application inputs a colored leaf surface microscopic image for preprocessing; a multi-direction contrast feature enhancement algorithm is used to extract a pore candidate region based on the preprocessed image; the pore candidate region is represented by a graph, and a trained graph recognition model is used for pore recognition and counting. The application is used for the automatic detection and counting of pores in the leaf surface microscopic image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] A high-precision method, system, storage medium, and product for automatic stomatal detection and counting in leaf micrographs are disclosed. This invention relates to the fields of image processing and machine vision applications, particularly the problem of automatic stomatal detection and counting in plant leaf micrographs. It has significant application value for plant physiology research, plant growth status assessment, and agricultural breeding. Background Technology

[0002] Stomata are the main channels for gas exchange between plant leaves and the external environment. Their density and distribution are key indicators reflecting plant growth status, photosynthetic efficiency, and adaptability to stress. Therefore, high-precision stomatal detection and counting are of great significance in plant science research and agricultural production.

[0003] Traditional stomatal detection methods primarily rely on manual microscopic observation, with professionals manually labeling and counting the collected leaf microscopic images. However, this method is not only inefficient and labor-intensive, but the results are also easily influenced by the observer's subjective experience, making it difficult to meet the needs of large-scale sample processing.

[0004] In recent years, automatic detection methods based on image processing have gradually become a research hotspot, with mainstream techniques including morphological processing, thresholding segmentation, and traditional machine learning classification. These methods typically enhance the target through grayscale transformation first, and then filter based on the geometric features of the pores (such as area and roundness). However, they suffer from the following technical problems:

[0005] Leaf microscopic images often present complex backgrounds, with cell walls, veins, and other structures resembling stomata in grayscale distribution. Furthermore, the diverse morphologies of stomata themselves contribute to the vulnerability of traditional methods to false negatives or missed detections in complex environments, resulting in insufficient detection accuracy for practical applications. Specifically, existing image segmentation and morphological processing methods typically rely on modeling the planar or clump-like grayscale and geometric features of stomata. When leaf images contain intercellular spaces, damaged cells, or impurity particles with similar grayscale, area, and roundness to stomata, these methods struggle to effectively characterize the "intrinsic structural properties" of the target at the level of "local pixel aggregation." They particularly lack the ability to model and discriminate the unique "double-layered" topological morphology of stomata, thus failing to fundamentally distinguish between structurally different interfering substances. Therefore, characterizing and differentiating stomata from interfering substances at the structural level is crucial for improving detection robustness and accuracy. Summary of the Invention

[0006] To address the problems mentioned above, the present invention aims to provide a high-precision method, system, storage medium, and product for automatic detection and counting of stomata in leaf micrographs, thereby solving the problem that existing technologies are prone to missed or false detections in complex backgrounds.

[0007] To achieve the above objectives, the present invention adopts the following technical solution:

[0008] 1. A high-precision method for automatic detection and counting of stomata in leaf micrographs, characterized by comprising the following steps:

[0009] Step 1: Input a color microscopic image of the leaf surface for preprocessing, then proceed to Step 2;

[0010] Step 2: Based on the preprocessed image, a multi-directional contrast feature enhancement algorithm is used to extract candidate stomatal regions, and then proceed to Step 3;

[0011] Step 3: Represent the candidate stomata region with a stomata map, and use the trained graph recognition model to identify and count stomata.

[0012] 2. The method for automatic detection and counting of stomata in high-precision leaf microscopic images according to claim 1, characterized in that step 1 includes the following steps:

[0013] Step 1.1: Convert the color leaf micrograph to a grayscale image. As shown in equation (1):

[0014] (1)

[0015] in, , and These represent the red and green channels of the output grayscale image and the color leaf micrograph, respectively.

[0016] Step 1.2: Reduce the grayscale image to its original size. To obtain a preprocessed image As shown in equation (2):

[0017] (2)

[0018] in, , These represent the width and height of the grayscale image, respectively.

[0019] 3. The method for automatic detection and counting of stomata in high-precision leaf microscopic images according to claim 2, characterized in that: step 2 includes the following steps:

[0020] Step 2.1: Generate Overlay arrive Angle range There are 1 directional vectors, and each directional vector is normalized to the smallest integer representation, as shown in equation (3):

[0021] (3)

[0022] in, Represents the set of direction vectors. and They represent the first The components of each direction vector on the horizontal and vertical axes of the preprocessed image are coprime integers.

[0023] Step 2.2: For the preprocessed image For each pixel within the boundary region, calculate its vertical uniform grayscale enhancement contrast in each direction. The specific steps are as follows:

[0024] Step 2.2.1: Along the direction To preprocess images For each pixel within the boundary region, obtain the radius of the current center pixel. The coordinates of all pixels within the area are shown in equation (4):

[0025] (4)

[0026] in, Represents radius Inward direction The set of coordinates of all pixels. The coordinates of the current center pixel. For step size index variable, The preset search radius;

[0027] Step 2.2.2: Based on the coordinates of all pixels obtained in Step 2.2.1 Obtain the pixel coordinates of the beginning and end of the preprocessed image. The sum of the pixel values ​​at the corresponding positions is shown in equation (5):

[0028] (5)

[0029] Step 2.2.3: Calculate the preprocessed image In direction The average value of all pixels As shown in equation (6):

[0030] (6)

[0031] in, Represents pixel coordinates The corresponding pixel value;

[0032] Step 2.2.4: Obtaining Direction two perpendicular directions and As shown in equation (7):

[0033] , (7)

[0034] Step 2.2.5: Calculate the preprocessed images respectively Each pixel is in two vertical directions , The average value of all pixels , As shown in equations (8) and (9) respectively:

[0035] (8)

[0036] (9)

[0037] Step 2.2.6: Take the average value of the pixels. and The larger average value is shown in equation (10):

[0038] (10)

[0039] Step 2.2.7: Based on the results obtained in Steps 2.2.2 and 2.2.6, calculate the direction. The vertical direction uniform grayscale enhances the contrast, as shown in Equation (11):

[0040] (11)

[0041] in, Represents pixel coordinates The corresponding pixel value;

[0042] Step 2.3: For each pixel, after traversing all directions obtained in Step 2.1, obtain the maximum contrast value. and current direction :

[0043] (12)

[0044] (13)

[0045] in, This represents the independent variable corresponding to the maximum value, i.e., traversing all directions. Calculate the contrast in each direction. Returns the direction vector that maximizes the contrast value;

[0046] Step 2.4: Calculate the final response value. The specific steps are as follows:

[0047] Step 2.4.1: In the optimal direction , Extend the search radius to ;

[0048] Step 2.4.2: Obtain the extended search radius The set of pixel coordinates within As shown in equation (14):

[0049] (14)

[0050] in, Indicates the best direction , Search radius from Extended to The set of all pixels within the range , These are the horizontal and vertical coordinate components of the optimal direction vector, respectively.

[0051] Step 2.4.3: Based on the set of pixel coordinates Calculate preprocessed images The minimum pixel value at the corresponding position is shown in equation (15):

[0052] (15)

[0053] Step 2.4.4: Calculate pixel coordinates based on the minimum value The final response value at the given point is shown in equation (16):

[0054] (16)

[0055] Step 2.5: Obtain the response feature map based on the final response values ​​of all pixels. ;

[0056] Step 2.6: Process the response feature map Perform normalization mapping to The range is determined by using a preset threshold. Segmentation, retaining response values ​​greater than or equal to The pixels, which constitute a set of high-response regions, where 0 ;

[0057] Step 2.7: Set the high-response regions for each response point The coordinates and the final response value obtained in step 2.4.4 are used as three-dimensional features. Clustering is performed using a clustering method that does not require initializing the number of clusters. After clustering, each cluster is regarded as a stomatal candidate region, and the cluster center of each cluster is used as the central response point. The final set of stomatal candidate regions can be represented as:

[0058] (17)

[0059] in, Indicates the number of candidate stomatal regions. Indicates the first One pore candidate region.

[0060] 4. The method for automatic detection and counting of stomata in high-precision leaf microscopic images according to claim 2, characterized in that: step 3 includes the following steps:

[0061] Step 3.1: Remove non-porosity structures from the candidate pore regions obtained in Step 2.6, and then, based on each candidate pore region after removal... The porosity diagram is constructed as shown in equation (18):

[0062] (18)

[0063] in, The set of nodes consists of candidate stomatal regions that have been eliminated. The central response point is the center and the radius. Composed of low grayscale pixels within the range, Indicates the first 1 node Let be the set of edges, describing the adjacency relationships between nodes. If two nodes are adjacent in a 4-connected direction, the corresponding edge has a value of 1; otherwise, it has a value of 0. This is a node attribute matrix, where each node's attribute vector contains its spatial coordinates, the original image grayscale value, and the response value. Indicates the first A diagram of individual pores is provided.

[0064] Step 3.2: Based on the stomatal map representation constructed in Step 3.1, collect multiple labeled samples and train them using a graph convolutional neural network to obtain a classification model with a two-layer ring topology for the stomatal map representation. The prediction process ultimately retains only candidate pore regions that satisfy the characteristics of a double-layered surrounding structure, as shown in the formula:

[0065] (19)

[0066] in, This represents the trained graph convolutional neural network, i.e., a classification model with a two-layer ring topology, where the stomatal map of the input stomatal candidate region is used. When the output is 1, it indicates that the region is a real stomata; when the output is 0, it indicates that the region is a non-stomata region. The final set... The number of elements is the number of stomata detected in the leaf micrograph.

[0067] A high-precision leaf microscopic image stomatal automatic detection and counting system includes a memory, a processor, and a computer program stored in the memory, characterized in that: the processor executes the computer program to implement the steps of the high-precision leaf microscopic image stomatal automatic detection and counting method.

[0068] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method for automatic detection and counting of stomata in high-precision leaf micrographs.

[0069] A computer program product includes a computer program that, when executed by a processor, implements the steps of the high-precision leaf microscopic image automatic stomatal detection and counting method.

[0070] Compared with the prior art, the beneficial effects of this invention are as follows:

[0071] I. The automatic stomatal detection and counting method proposed in this invention has a strong adaptability to complex leaf microscopic images. It can effectively remove interfering structures such as cell walls and leaf veins while ensuring a high detection rate of stomata, and significantly reduce the false detection rate.

[0072] Second, this invention employs a multi-directional contrast feature enhancement algorithm, which solves the problem of incomplete extraction of stomata candidate regions in traditional methods. Through multi-directional search and vertical uniform gray-scale enhancement contrast calculation, the central region of the stomata can be accurately located, providing a high-quality candidate set for subsequent accurate identification. This solves the problem of missed detection of candidate regions caused by the variable orientation of stomata in traditional methods. By traversing all directions to search for the best response, it ensures that the central region of the stomata can be stably captured regardless of its rotation angle, thus achieving a high recall rate.

[0073] Third, this invention describes the structural differences between stomata and cell walls from a topological perspective by constructing a stomatal diagram. Stomata exhibit a double-ring structure, while cell walls show a single-chain or tree-like topology. After training with a graph convolutional neural network, a classification model is obtained, which achieves accurate differentiation between the two with high discriminative ability. This breaks through the limitations of traditional methods that rely only on low-level geometric features such as grayscale and area. For the first time, it distinguishes the "double-ring" morphology of stomata from the "single-chain / tree-like" morphology of cell walls from the topological structure. This solves the problem of traditional methods misclassifying interfering objects such as cell walls and damaged cells with similar grayscale as stomata, and can further improve the accuracy.

[0074] Fourth, the graph-based pore recognition method proposed in this invention can be used as a general post-processing technique and widely embedded in various pore detection algorithms to further eliminate false targets and improve detection accuracy. Attached Figure Description

[0075] Figure 1 For the entire algorithm design process;

[0076] Figure 2 This is a schematic diagram of a leaf microscopic image acquired in an embodiment of the present invention, in which the location of stomata is marked with a red box. It can be seen that, while maintaining a consistent basic morphology, the long axis of the stomata exhibits a clear multidirectional orientation.

[0077] Figure 3 This is a schematic diagram of the stomatal candidate region obtained after preprocessing the input microscopic image and extracting the candidate region. It includes both real stomata and a small amount of non-stomatal structures such as cell walls.

[0078] Figure 4 The visualization of the candidate pore region after being represented by the pore map shows that the topological structure of pores in the low grayscale pixel region is significantly different from that of non-pores. Detailed Implementation

[0079] The present invention will now be further described in conjunction with the accompanying drawings and specific embodiments.

[0080] This invention provides a high-precision method for automatic stomatal detection and counting in leaf micrographs. The technical problem it aims to solve is how to accurately distinguish stomata from interfering structures such as cell walls in complex leaf micrographs, ensuring a high stomatal detection rate while effectively reducing the false detection rate, thereby achieving a high-precision automatic stomatal detection and counting method. The overall algorithm design framework is as follows: Figure 1 As shown, the steps include:

[0081] A high-precision method for automatic detection and counting of stomata in leaf micrographs includes the following steps:

[0082] Step 1: Input a color microscopic image of the leaf surface for preprocessing; including the following steps:

[0083] Step 1.1: Convert the color leaf micrograph to a grayscale image. As shown in equation (1):

[0084] (1)

[0085] in, , and The red and green channels represent the output grayscale image and the color leaf micrograph, respectively. Since the strong contrast between the leaf surface and stomata is mainly reflected in the green channel, this study adopts a weighted grayscale strategy, giving the green channel a higher weight and discarding the blue channel, which has a lower contrast contribution, in order to enhance the recognizability of the stomatal structure.

[0086] Step 1.2: Reduce the grayscale image to its original size. To obtain a preprocessed image As shown in equation (2):

[0087] (2)

[0088] in, , These represent the width and height of the grayscale image, respectively. In this example, the resolution of the microscopic image is reduced to 824×516.

[0089] Step 2: Extract candidate stomatal regions based on the preprocessed image using a multi-directional contrast feature enhancement algorithm; including the following steps:

[0090] Step 2.1: Generate Overlay arrive Angle range There are 1 directional vectors, and each directional vector is normalized to the smallest integer representation, as shown in equation (3):

[0091] (3)

[0092] in, Represents the set of direction vectors. and They represent the first The components of each direction vector on the horizontal and vertical axes of the preprocessed image are coprime integers; Step 2.2: For the preprocessed image For each pixel within the boundary region, calculate its vertical uniform grayscale enhancement contrast in each direction. The specific steps are as follows:

[0093] Step 2.2.1: Along the direction To preprocess images For each pixel within the boundary region, obtain the radius of the current center pixel. The coordinates of all pixels within the area are shown in equation (4):

[0094] (4)

[0095] in, Represents radius Inward direction The set of coordinates of all pixels. The coordinates of the current center pixel. For step size index variable, In this example, the preset search radius is used. Set to 5;

[0096] Step 2.2.2: Based on the coordinates of all pixels obtained in Step 2.2.1 Obtain the pixel coordinates of the beginning and end of the preprocessed image. The sum of the pixel values ​​at the corresponding positions is shown in equation (5):

[0097] (5)

[0098] Step 2.2.3: Calculate the preprocessed image In direction The average value of all pixels As shown in equation (6):

[0099] (6)

[0100] in, Represents pixel coordinates The corresponding pixel value;

[0101] Step 2.2.4: Obtaining Direction two perpendicular directions and As shown in equation (7):

[0102] , (7)

[0103] Step 2.2.5: Calculate the preprocessed images respectively Each pixel is in two vertical directions , The average value of all pixels , As shown in equations (8) and (9) respectively:

[0104] (8)

[0105] (9)

[0106] Step 2.2.6: Take the average value of the pixels. and The larger average value is shown in equation (10):

[0107] (10)

[0108] Step 2.2.7: Based on the results obtained in Steps 2.2.2 and 2.2.6, calculate the direction. The vertical direction uniform grayscale enhances the contrast, as shown in Equation (11):

[0109] (11)

[0110] in, Represents pixel coordinates The corresponding pixel value;

[0111] Step 2.3: For each pixel, after traversing all directions obtained in Step 2.1, obtain the maximum contrast value. and current direction :

[0112] (12)

[0113] (13)

[0114] in This represents the independent variable corresponding to the maximum value, i.e., traversing all directions. Calculate the contrast in each direction. Returns the direction vector that maximizes the contrast value;

[0115] Step 2.4: Calculate the final response value. The specific steps are as follows:

[0116] Step 2.4.1: In the optimal direction , Extend the search radius to In this example, It is 13;

[0117] Step 2.4.2: Obtain the extended search radius The set of pixel coordinates within As shown in equation (14):

[0118] (14)

[0119] in, Indicates the best direction , Search radius from Extended to The set of all pixels within the range , These are the horizontal and vertical coordinate components of the optimal direction vector, respectively.

[0120] Step 2.4.3: Based on the set of pixel coordinates Calculate preprocessed images The minimum pixel value at the corresponding position is shown in equation (15):

[0121] (15)

[0122] Step 2.4.4: Calculate pixel coordinates based on the minimum value The final response value at the given point is shown in equation (16):

[0123] (16)

[0124] Step 2.5: Obtain the response feature map based on the final response values ​​of all pixels. ;

[0125] Step 2.6: Process the response feature map Perform normalization mapping to The range is determined by using a preset threshold. Segmentation, retaining response values ​​greater than or equal to The pixels, which constitute a set of high-response regions, where 0 The preset threshold in this example is 0.8;

[0126] Step 2.7: Set the high-response regions for each response point The coordinates and the final response value obtained in step 2.4.4 are used as three-dimensional features. Clustering is performed using a clustering method that does not require initializing the number of clusters. After clustering, each cluster is regarded as a stomatal candidate region, and the cluster center of each cluster is used as the central response point. The final set of stomatal candidate regions can be represented as:

[0127] (17)

[0128] in, This indicates the number of candidate regions for stomata. In this example, 16 candidate regions are obtained, including 9 stomata and 7 non-stomata. Indicates the first One pore candidate region.

[0129] Step 3: Represent the candidate stomatal regions using stomatal maps, and then use a trained map recognition model to identify and count stomata. This includes the following steps:

[0130] Step 3.1: The candidate stomatal region obtained in Step 2.6 may still contain a small number of non-stomatal structures (such as strong edges in the image), which need to be further removed to improve the accuracy of stomatal detection. Considering that in microscopic images, stomata are usually located in low grayscale areas and exhibit a clear double-layered elliptical surrounding structure, while false edges often show a tree-like topology or a single chain-like structure, the two have significant differences in topological morphology (such as...). Figure 4 As shown in the figure, after the removal, a stomatal map representation needs to be constructed. That is, non-porosity structures contained in the stomatal candidate regions obtained in step 2.6 are removed, and then a stomatal map representation is constructed based on each removed stomatal candidate region. The porosity diagram is constructed as shown in equation (18):

[0131] (18)

[0132] in, The set of nodes consists of candidate stomatal regions that have been eliminated. The central response point is the center and the radius. Composed of low grayscale pixels within the range, Indicates the first 1 node Let be the set of edges, describing the adjacency relationships between nodes. If two nodes are adjacent in a 4-connected direction, the corresponding edge has a value of 1; otherwise, it has a value of 0. This is a node attribute matrix, where each node's attribute vector contains its spatial coordinates, the original image grayscale value, and the response value. Indicates the first The pore diagram in this example represents... .

[0133] Step 3.2: Based on the stomatal map representation constructed in Step 3.1, collect multiple labeled samples and train them using a graph convolutional neural network to obtain a classification model with a two-layer ring topology for the stomatal map representation. The prediction process ultimately retains only candidate pore regions that satisfy the characteristics of a double-layered surrounding structure, as shown in the formula:

[0134] (19)

[0135] in, This represents the trained graph convolutional neural network, i.e., a classification model with a two-layer ring topology, where the stomatal map of the input stomatal candidate region is used. When the output is 1, it indicates that the region is a real stomata; when the output is 0, it indicates that the region is a non-stomata region. The final set... The number of elements is the number of stomata detected in the leaf micrograph.

[0136] This example collected and constructed stomatal map representation samples of 362 stomatal candidate regions, including 162 positive samples (stomata) and 200 negative samples (non-stomatal structures such as cell walls). Model training employed a graph convolutional neural network (GAT) based on a three-layer graph attention mechanism, using binary cross-entropy as the loss function and the Adam optimizer for parameter optimization. Of course, other networks can also be used; generally, two to three layers of graph convolutional networks are sufficient for feature extraction, such as GCN.

[0137] Effectively distinguishing stomata from interfering structures such as cell walls is crucial for improving detection accuracy. This invention proposes a novel stomatal detection method. First, a multi-directional contrast feature enhancement algorithm is used to extract candidate stomatal regions. Then, a highly discriminative graph representation is constructed for these candidate regions. Leveraging the fundamental difference between the unique double-loop topology of stomata and the single-chain or tree-like topology of cell walls, a graph classification model is trained to achieve accurate stomatal identification and counting. This topology-based discrimination method is more robust than traditional detection methods based on grayscale or simple geometric features, effectively eliminating interfering targets such as cell walls and significantly improving the accuracy of stomatal detection and counting.

[0138] The above are merely representative embodiments among the many specific applications of this invention, and do not constitute any limitation on the scope of protection of this invention. All technical solutions formed by transformation or equivalent substitution fall within the scope of protection of this invention.

Claims

1. A high-precision method for automatic detection and counting of stomata in leaf micrographs, characterized in that, Includes the following steps: Step 1: Input a color microscopic image of the leaf surface for preprocessing, then proceed to Step 2; Step 2: Based on the preprocessed image, a multi-directional contrast feature enhancement algorithm is used to extract candidate stomatal regions, and then proceed to Step 3; Step 3: Represent the candidate stomata region with a stomata map, and use the trained graph recognition model to identify and count stomata.

2. The method for automatic detection and counting of stomata in high-precision leaf microscopic images according to claim 1, characterized in that, Step 1 includes the following steps: Step 1.1: Convert the color leaf micrograph to a grayscale image. As shown in equation (1): (1) in, , and These represent the red and green channels of the output grayscale image and the color leaf micrograph, respectively. Step 1.2: Reduce the grayscale image to its original size. To obtain a preprocessed image As shown in equation (2): (2) in, , These represent the width and height of the grayscale image, respectively.

3. The method for automatic detection and counting of stomata in high-precision leaf microscopic images according to claim 2, characterized in that: Step 2 includes the following steps: Step 2.1: Generate Overlay arrive Angle range There are 1 directional vectors, and each directional vector is normalized to the smallest integer representation, as shown in equation (3): (3) in, Represents the set of direction vectors. and They represent the first The components of each direction vector on the horizontal and vertical axes of the preprocessed image are coprime integers. Step 2.2: For the preprocessed image For each pixel within the boundary region, calculate its vertical uniform grayscale enhancement contrast in each direction. The specific steps are as follows: Step 2.2.1: Along the direction To preprocess images For each pixel within the boundary region, obtain the radius of the current center pixel. The coordinates of all pixels within the area are shown in equation (4): (4) in, Represents radius Inward direction The set of coordinates of all pixels. The coordinates of the current center pixel. For step size index variable, The preset search radius; Step 2.2.2: Based on the coordinates of all pixels obtained in Step 2.2.1 Obtain the preprocessed image by finding the pixel coordinates of the beginning and end. The sum of the pixel values ​​at the corresponding positions is shown in equation (5): (5) Step 2.2.3: Calculate the preprocessed image In direction The average value of all pixels As shown in equation (6): (6) in, Represents pixel coordinates The corresponding pixel value; Step 2.2.4: Obtaining Direction two perpendicular directions and As shown in equation (7): , (7) Step 2.2.5: Calculate the preprocessed images respectively Each pixel is in two vertical directions , The average value of all pixels , As shown in equations (8) and (9) respectively: (8) (9) Step 2.2.6: Take the average value of the pixels. and The larger average value is shown in equation (10): (10) Step 2.2.7: Based on the results obtained in Steps 2.2.2 and 2.2.6, calculate the direction. The vertical direction uniform grayscale enhances the contrast, as shown in Equation (11): (11) in, Represents pixel coordinates The corresponding pixel value; Step 2.3: For each pixel, after traversing all directions obtained in Step 2.1, obtain the maximum contrast value. and current direction : (12) (13) in, This represents the independent variable corresponding to the maximum value, i.e., traversing all directions. Calculate the contrast in each direction. Returns the direction vector that maximizes the contrast value; Step 2.4: Calculate the final response value. The specific steps are as follows: Step 2.4.1: In the optimal direction , Extend the search radius to ; Step 2.4.2: Obtain the extended search radius The set of pixel coordinates within As shown in equation (14): (14) in, Indicates the best direction , Search radius from Extended to The set of all pixels within the range , These are the horizontal and vertical coordinate components of the optimal direction vector, respectively. Step 2.4.3: Based on the set of pixel coordinates Calculate preprocessed images The minimum pixel value at the corresponding position is shown in equation (15): (15) Step 2.4.4: Calculate pixel coordinates based on the minimum value The final response value at the given point is shown in equation (16): (16) Step 2.5: Obtain the response feature map based on the final response values ​​of all pixels. ; Step 2.6: Process the response feature map Perform normalization mapping to The range is determined by using a preset threshold. Segmentation, retaining response values ​​greater than or equal to The pixels, which constitute a set of high-response regions, where 0 ; Step 2.7: Set the high-response regions for each response point The coordinates and the final response value obtained in step 2.4.4 are used as three-dimensional features. Clustering is performed using a clustering method that does not require initializing the number of clusters. After clustering, each cluster is regarded as a stomatal candidate region, and the cluster center of each cluster is used as the central response point. The final set of stomatal candidate regions can be represented as: (17) in, Indicates the number of candidate stomatal regions. Indicates the first One pore candidate region.

4. The method for automatic detection and counting of stomata in high-precision leaf microscopic images according to claim 3, characterized in that: Step 3 includes the following steps: Step 3.1: Remove non-porosity structures from the candidate pore regions obtained in Step 2.6, and then, based on each candidate pore region after removal... The porosity diagram is constructed as shown in equation (18): (18) in, The set of nodes consists of candidate stomatal regions that have been eliminated. The central response point is the center and the radius. Composed of low grayscale pixels within the range, Indicates the first 1 node Let be the set of edges, describing the adjacency relationships between nodes. If two nodes are adjacent in a 4-connected direction, the corresponding edge has a value of 1; otherwise, it has a value of 0. This is a node attribute matrix, where each node's attribute vector contains its spatial coordinates, the original image grayscale value, and the response value. Indicates the first A diagram of individual pores is provided. Step 3.2: Based on the stomatal map representation constructed in Step 3.1, collect multiple labeled samples and train them using a graph convolutional neural network to obtain a classification model with a two-layer ring topology for the stomatal map representation. The prediction process ultimately retains only candidate pore regions that satisfy the characteristics of a double-layered surrounding structure, as shown in the formula: (19) in, This represents the trained graph convolutional neural network, i.e., a classification model with a two-layer ring topology, where the stomatal map of the input stomatal candidate region is used. When the output is 1, it indicates that the region is a real stomata; when the output is 0, it indicates that the region is a non-stomata region. The final set... The number of elements is the number of stomata detected in the leaf micrograph.

5. A high-precision automatic stomatal detection and counting system for leaf surface microscopic images, characterized in that, The method includes a memory, a processor, and a computer program stored in the memory, characterized in that: the processor executes the computer program to implement the steps of the method according to any one of claims 1-5.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When executed by a processor, the computer program implements the steps of the method according to any one of claims 1-5.

7. A computer program product, comprising a computer program, characterized in that: When executed by a processor, the computer program implements the steps of the method according to any one of claims 1-5.