A computer vision-based method for high-throughput extraction, segmentation and functional trait inversion of plant leaf multi-dimensional phenotypes
Patent Information
- Application Number
- CN202610544348.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-23
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2046-04-23
AI Technical Summary
该类方法具有一定精度,但设备成本较高,对样品摆放方式和操作环境要求较强,且多数仅支持单叶片或规则目标测量
[0078]本发明所述的一种基于计算机视觉的植物叶片多维表型高通量提取、分割与功能性状反演方法,将待测植物叶片平铺放置于具有预设物理尺寸的标准化参照物背景上进行拍摄,所述参照物优选为标准A4纸或具有已知长度标记的比例尺。采集图像后,通过本发明方法构建的植物叶片多维表型分析系统(Multiple dimensional Leaf,简称“Multi-Leaf”)导入图像数据。系统自动完成图像解码、颜色空间转换、阈值分割、物理尺寸标定、多叶片目标识别、叶柄分割剔除、叶片轮廓追踪及多维指标计算,并批量输出叶面积、周长、长宽比、圆形度、锯齿数量、锯齿角度、重心位置、对称度、虫损比以及基于厚度、鲜重、干重反演的功能性状等结构化结果数据,输出格式可为CSV、Excel或数据库记录。
Smart Images

Figure CN122335827B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of plant phenotypic feature extraction technology, specifically involving a high-throughput extraction, segmentation, and functional trait inversion method for multidimensional phenotypic features of plant leaves based on computer vision. Background Technology
[0002] Current plant leaf trait measurement and image analysis technologies mainly include the following categories:
[0003] 1. Traditional manual measurement method: This method uses tools such as rulers and vernier calipers to measure the length and width of leaves, and estimates the leaf area using methods such as grid method, tracing method, or weighing conversion method. This type of method is simple to operate, but it mainly relies on manual labor, resulting in low measurement efficiency and repeatability that is greatly affected by the operator's experience.
[0004] 2. Professional leaf area meter or scanning analysis methods: These methods utilize handheld leaf area meters, desktop scanners, or image analysis software to obtain two-dimensional morphological parameters such as leaf area and perimeter. While these methods offer a certain level of accuracy, the equipment is expensive, and they have strict requirements regarding sample placement and the operating environment. Furthermore, most only support measurements of single leaves or regular targets.
[0005] 3. General image processing software or mini-program measurement methods: Some software or mini-programs can extract basic morphological features such as leaf area, length, and width by taking pictures. They are portable and have a certain degree of automation. However, they usually mainly identify the overall connected domain of the leaf, and the feature extraction dimensions are limited. They do not support complex backgrounds, mixed images of multiple leaves, and batch processing scenarios with Chinese paths.
[0006] 4. Single morphological feature extraction methods based on image recognition: Some studies have attempted to extract leaf contour information using methods such as threshold segmentation, edge detection, and contour recognition. However, most existing solutions focus on basic indicators such as area, length, width, and color, and rarely involve the stable and automated extraction of complex phenotypic indicators such as the number of serrations, serration angle, symmetry, and degree of insect damage. Furthermore, they lack the ability to invert functional traits by combining physical data such as thickness, fresh weight, and dry weight. Summary of the Invention
[0007] The problem to be solved by this invention is to establish an efficient high-throughput analysis method for multidimensional traits of plant leaves, and to propose a high-throughput extraction, segmentation and functional trait inversion method for multidimensional phenotypes of plant leaves based on computer vision.
[0008] To achieve the above objectives, the present invention provides the following technical solution:
[0009] A high-throughput method for extracting, segmenting, and inverting functional traits of multidimensional phenotypes in plant leaves based on computer vision includes the following steps:
[0010] S1. Collect plant leaf sample images, perform high-throughput data scheduling and image decoding to obtain a decoded plant leaf sample image matrix;
[0011] S2. The decoded plant leaf sample image matrix obtained in step S1 is mapped to the HSV color space, and then Gaussian convolution processing, adaptive threshold segmentation, and physical scale correction are performed to obtain a binary image of the plant leaf sample.
[0012] S3. Perform multi-target topological separation and petiole segmentation on the binary images of plant leaf samples obtained in step S2 to obtain pure binary images of leaves;
[0013] S4. Based on the pure binary leaf image obtained in step S3, calculate the multidimensional trait index of the leaf, including the basic geometric traits of the leaf, edge morphology and serration features, symmetry and leaf center point, and leaf insect damage ratio.
[0014] S5. Based on the multidimensional leaf trait indices obtained in step S4, deduce the higher-order ecological functional traits of the leaves, including single leaf volume, leaf mass density, specific leaf area, and leaf dry matter content.
[0015] Furthermore, the specific implementation method of step S1 includes the following steps:
[0016] S1.1. First, a file traversaler is constructed to scan the collected plant leaf sample images based on the input directory. The image file paths are filtered using a pattern matching algorithm, and deduplication and serialization sorting are performed to generate a queue of tasks to be processed.
[0017] S1.2. The image file of the task queue to be processed obtained in step S1.1 is read into the memory buffer as a binary data stream, and then the image decoding algorithm is called to reconstruct the binary stream into a three-dimensional pixel matrix to obtain the decoded plant leaf sample image matrix.
[0018] Furthermore, the specific implementation method of step S2 includes the following steps:
[0019] S2.1. Map the decoded plant leaf sample image matrix to the HSV color space, and then perform a two-dimensional convolution operation using a Gaussian kernel, as shown in the following formula:
[0020]
[0021] For image matrix The convolution output is written as:
[0022]
[0023] in, Let be the weight values of the Gaussian filter at pixel coordinates (x, y). Let be the standard deviation of the Gaussian distribution. is the normalization coefficient of the Gaussian kernel, used to ensure that the sum of the kernel weights before and after convolution is 1, and exp is the base of the natural logarithm. and These are the coordinates of the Gaussian kernel center; this yields the Gaussian-denoised plant leaf sample image matrix.
[0024] S2.2. The maximum inter-class variance between the foreground leaves and the background substrate is calculated using the Otsu's method on the Gaussian-denoised plant leaf sample image matrix obtained in step S2.1 to determine the optimal segmentation threshold. Generate a binarized mask ;
[0025] S2.3. Perform physical scale calibration, retrieve the scale geometric features of the plant leaf sample image matrix, calculate the scale pixel length and width based on the rotating caliper algorithm, and establish physical space transformation coefficients in combination with physical dimensions. This yields binary images of plant leaf samples.
[0026] Furthermore, the specific implementation method of step S3 includes the following steps:
[0027] S3.1. Use the boundary tracking algorithm to scan the binary image of the plant leaf sample obtained in step S2, extract all closed topological contours, and based on the contour area screening mechanism, remove noise points with an area less than 0.1% of the total area and background interference greater than 20% to obtain the screened leaf contours.
[0028] S3.2. For the result obtained in step S3.1 For each blade outline, an independent Region of Interest (ROI) is constructed, and a local pure black mask is constructed to obtain the blade outline with the ROI.
[0029] S3.3. Establish the blade profile of the ROI in step S3.2, and perform iterative opening operation using elliptical kernels with increasing size to obtain the extracted candidate connected components;
[0030] S3.4. Establish a topological geometric dimension reduction model for the extracted candidate connected components, including deriving the absolute straightening length, average physical width, and bending-resistant aspect ratio tensor using the target perimeter P and area S, with the following expression:
[0031]
[0032]
[0033]
[0034] in, For absolute straight length, The average physical width, For the aspect ratio tensor of bending resistance;
[0035] Then, the contour that satisfies the elongation threshold and has the largest absolute straight length is selected as the true petiole. The elongation threshold is an empirical lower limit used to determine whether a topological structure possesses an elongated physical morphology. The elongation threshold is set to 5.0, meaning that when the bending aspect ratio tensor... When the candidate region is determined to be a slender petiole;
[0036] S3.5. Perform a difference operation between the real petiole reference mask obtained in step S3.4 and the blade contour of the ROI to obtain a pure binary image of the blade.
[0037] Furthermore, the specific implementation method of step S4 includes the following steps:
[0038] S4.1. Calculate the basic geometric characteristics of the leaf, including leaf area, leaf perimeter, and leaf length-to-width ratio;
[0039] The blade pixel area is calculated based on the discretized form of Green's formula, assuming the blade outline... Consisting of a series of ordered coordinate points Composition, in which Given the total number of contour points, the leaf pixel area is... The expression is:
[0040] Among them, the agreement , is the pixel x-coordinate of the blade outline. y is the pixel coordinate of the blade outline. These are the lateral and longitudinal mean values of the blade profile point set, respectively.
[0041] Convert leaf pixel area to leaf physical area The expression is:
[0042] ;
[0043] The leaf pixel perimeter is obtained by summing the Euclidean distances between adjacent pixels in the leaf contour sequence. The expression is:
[0044]
[0045] , Convert the pixel perimeter of the blade to the physical perimeter of the blade. The expression is:
[0046] ;
[0047] The rotating caliper algorithm is applied to the contour point set to find the minimum bounding rectangle, and the ratio of the major axis to the minor axis is obtained. Let the minor axis of the minimum bounding rectangle be... The major axis is The aspect ratio of the leaf is... The expression is:
[0048]
[0049] Where max is the maximum value function and min is the minimum value function;
[0050] S4.2. Calculate edge morphology and serration features, including extraction of blade roundness, number of blade serrations, and blade serration angle;
[0051] blade roundness The calculation formula is:
[0052] ;
[0053] Then, based on the local sliding window and spatial depth filtering, the effective set of sawtooth tips is extracted; then, for adjacent sawtooth tips, the pixel with the smallest Euclidean distance from the geometric centroid of the blade is retrieved in the original contour slice and established as the true valley bottom with the deepest inward concavity in three-dimensional space.
[0054] After calculating the true spatial angle by constructing vectors between the sawtooth tip and the actual valley floor on the left and right sides, it is compared with the upper limit threshold of the angle. If the true spatial angle is greater than the upper limit threshold, it is determined to be a mathematical measurement illusion caused by the smooth wave edge and is physically removed. The total number of sawtooth tips retained is the number of sawtooths on the blade. The average angle of the included angle in real space is the blade serration angle. ;
[0055] S4.3. Calculate the symmetry and the center point of the blade;
[0056] First, calculate the geometric moments of the image. ,in, The x-coordinate of the pixel is raised to the power of p. The p-th power of the ordinate of the pixel. Image in spatial coordinates The pixel values are set to 1 for the target leaf area and 0 for the background area.
[0057] The center coordinates of the blade center point for:
[0058]
[0059]
[0060] in, Let x be the x-coordinate of the geometric centroid of the blade. Let be the ordinate of the geometric centroid of the blade. Let be the first-order horizontal spatial moment of the image. This represents the total number of pixels on the leaf blade. It is a first-order longitudinal spatial moment;
[0061] Finally, output the physical location of the blade center point. ;
[0062] To calculate blade symmetry using the principal axis segmentation and area difference method, the blade principal axis is first calculated and determined. Then, the blade is divided into a left half, with the center point as the boundary. and the right half Area represents the area, and finally the symmetry of the blade is calculated. The calculation formula is:
[0063] ;
[0064] S4.4. Calculate the leaf damage ratio;
[0065]
[0066] in, This represents the number of damaged pixels. This represents the total number of pixels on the leaf blade.
[0067] Furthermore, the specific implementation method of step S5 includes the following steps:
[0068] S5.1. Set blade thickness to calculate the volume of a single blade. The calculation formula is:
[0069]
[0070] in, For blade thickness;
[0071] S5.2. Based on leaf fresh weight Calculate the mass density of the blade The calculation formula is:
[0072] ;
[0073] S5.3. Based on blade dry weight Calculate specific leaf area The calculation formula is:
[0074] ;
[0075] S5.4. Calculate the leaf dry matter content The calculation formula is:
[0076] .
[0077] The beneficial effects of this invention are:
[0078] This invention discloses a high-throughput extraction, segmentation, and functional trait inversion method for multidimensional phenotypic analysis of plant leaves based on computer vision. The method involves laying the plant leaf flat on a standardized reference background with preset physical dimensions for photographing. The reference background is preferably a standard A4 sheet of paper or a scale bar with known length markings. After image acquisition, the image data is imported into a multidimensional leaf (Multi-Leaf) analysis system constructed using this invention. The system automatically performs image decoding, color space conversion, threshold segmentation, physical size calibration, multi-leaf target recognition, petiole segmentation and removal, leaf contour tracking, and multidimensional index calculation. It then outputs structured results data in batches, including leaf area, perimeter, aspect ratio, roundness, number of serrations, serration angle, centroid position, symmetry, insect damage ratio, and functional traits inverted based on thickness, fresh weight, and dry weight. The output format can be CSV, Excel, or database records.
[0079] The high-throughput extraction, segmentation, and functional trait inversion method for multidimensional phenotypes of plant leaves based on computer vision described in this invention also has the following significant beneficial effects:
[0080] 1. High-throughput concurrent processing capability: This invention introduces binary stream decoding and multi-threaded scheduling mechanism, which breaks through the bottleneck of traditional software being unable to handle Chinese paths and low efficiency of single thread, and realizes "one-click" automated analysis of massive images at the folder level.
[0081] 2. Refined segmentation technology: It innovatively combines topological contour analysis and dynamic ROI masking technology, which can accurately separate and independently calculate multiple leaves with different shapes in a single image, and automatically remove petiole interference, significantly improving the purity and accuracy of leaf shape data.
[0082] 3. General-purpose algorithm architecture: It does not rely on specific commercial software interfaces. Based on general mathematical morphology (opening operation, closing operation) and computational geometry algorithms (Green's formula, rotating calipers), it ensures the underlying generality and portability of the technical solution.
[0083] 4. Low cost and ease of use: High-precision measurements can be completed with just a regular smartphone or camera and A4 paper, without the need to purchase expensive professional scanning equipment, which greatly reduces the threshold for scientific research and application.
[0084] 5. Multi-dimensional in-depth analysis: It can not only obtain conventional length, width and area data, but also independently calculate complex morphological indicators such as the number of serrations, serration angle, and symmetry, as well as ecological indicators such as insect damage ratio, filling the gap in the field of micromorphological quantification of existing low-cost tools.
[0085] 6. Cross-dimensional phenotypic inversion model: This invention breaks through the limitation of traditional computer vision, which can only output two-dimensional planar data. It constructs a cross-dimensional inversion link of "2D visual geometry - 3D / quality ecological characteristics", which integrates the area extracted by vision with the external input dry and fresh weight, and automatically outputs high-order functional traits such as specific leaf area (SLA) and dry matter content (LDMC), which are directly connected to the ecological biomass calculation model.
[0086] 7. Scientific Research Standardization and Field Expansion: This invention establishes a low-cost, high-precision standardized data acquisition process, opening up a new paradigm for phenotypic analysis in the fields of ecology and biology; at the same time, through unified algorithm standards and output formats, it provides a universal research standard for data exchange and comparison between different regions and laboratories. Attached Figure Description
[0087] Figure 1 This is a flowchart of a high-throughput extraction, segmentation, and functional trait inversion method for multidimensional phenotypes of plant leaves based on computer vision, according to the present invention.
[0088] Figure 2 This is a schematic diagram of the experimental sample of the present invention. Detailed Implementation
[0089] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only for explaining the invention and are not intended to limit the invention; that is, the described specific embodiments are merely a part of the embodiments of the invention, and not all of them. The components of the specific embodiments of the invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations, and the invention may also have other embodiments.
[0090] Therefore, the following detailed description of specific embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected specific embodiments of the invention. All other specific embodiments obtained by those skilled in the art based on these specific embodiments without inventive effort are within the scope of protection of this invention.
[0091] To further understand the invention's content, features, and effects, the following specific embodiments are provided, along with accompanying drawings. Figure 1 and attached Figure 2 Detailed explanation is as follows:
[0092] Example 1:
[0093] A high-throughput method for extracting, segmenting, and inverting functional traits of multidimensional phenotypes in plant leaves based on computer vision includes the following steps:
[0094] S1. Collect plant leaf sample images, perform high-throughput data scheduling and image decoding to obtain a decoded plant leaf sample image matrix;
[0095] Furthermore, the specific implementation method of step S1 includes the following steps:
[0096] S1.1. First, a file traversaler is constructed to scan the collected plant leaf sample images based on the input directory. The image file paths are filtered using a pattern matching algorithm, and deduplication and serialization sorting are performed to generate a queue of tasks to be processed.
[0097] Furthermore, the pattern matching algorithm is Pattern Matching; the filtered image file formats are jpg, png, and tif.
[0098] S1.2. The image file of the task queue to be processed obtained in step S1.1 is read into the memory buffer as a binary data stream, and then the image decoding algorithm is called to reconstruct the binary stream into a three-dimensional pixel matrix to obtain the decoded plant leaf sample image matrix.
[0099] Furthermore, multi-threaded concurrency control is implemented: a main thread and daemon thread architecture are separated. The main thread is responsible for UI rendering and state monitoring, while the background computing thread pool handles image processing tasks. A thread-safe callback mechanism is used to report processing progress in real time, preventing UI blocking (ANR) when processing massive amounts of data.
[0100] S2. The decoded plant leaf sample image matrix obtained in step S1 is mapped to the HSV color space, and then Gaussian convolution processing, adaptive threshold segmentation, and physical scale correction are performed to obtain a binary image of the plant leaf sample.
[0101] Furthermore, the specific implementation method of step S2 includes the following steps:
[0102] S2.1. Map the decoded plant leaf sample image matrix to the HSV color space, and then perform a two-dimensional convolution operation using a Gaussian kernel, as shown in the following formula:
[0103]
[0104] For image matrix The convolution output is written as:
[0105]
[0106] in, Let be the weight values of the Gaussian filter at pixel coordinates (x, y). Let be the standard deviation of the Gaussian distribution. is the normalization coefficient of the Gaussian kernel, used to ensure that the sum of the kernel weights before and after convolution is 1, and exp is the base of the natural logarithm. and These are the coordinates of the Gaussian kernel center; this yields the Gaussian-denoised plant leaf sample image matrix.
[0107] Furthermore, the RGB model is sensitive to lighting conditions, while the HSV space can effectively separate chromaticity and luminance, thereby improving the robustness of identifying green areas on leaves. High-frequency noise is removed by smoothing the image to prevent fragmented noise from occurring during subsequent binarization.
[0108] S2.2. The maximum inter-class variance between the foreground leaves and the background substrate is calculated using the Otsu's method on the Gaussian-denoised plant leaf sample image matrix obtained in step S2.1 to determine the optimal segmentation threshold. Generate a binarized mask ;
[0109] S2.3. Perform physical scale calibration, retrieve the scale geometric features of the plant leaf sample image matrix, calculate the scale pixel length and width based on the rotating caliper algorithm, and establish physical space transformation coefficients in combination with physical dimensions. This yields binary images of plant leaf samples.
[0110] Furthermore, physical space conversion coefficients The unit is mm / pixel.
[0111] S3. Perform multi-target topological separation and petiole segmentation on the binary images of plant leaf samples obtained in step S2 to obtain pure binary images of leaves;
[0112] Furthermore, the specific implementation method of step S3 includes the following steps:
[0113] S3.1. Use the boundary tracking algorithm to scan the binary image of the plant leaf sample obtained in step S2, extract all closed topological contours, and based on the contour area screening mechanism, remove noise points with an area less than 0.1% of the total area and background interference greater than 20% to obtain the screened leaf contours.
[0114] S3.2. For the result obtained in step S3.1 For each blade outline, an independent Region of Interest (ROI) is constructed, and a local pure black mask is constructed to obtain the blade outline with the ROI.
[0115] S3.3. Establish the blade profile of the ROI in step S3.2, and perform iterative opening operation using elliptical kernels with increasing size to obtain the extracted candidate connected components;
[0116] S3.4. Establish a topological geometric dimension reduction model for the extracted candidate connected components, including deriving the absolute straightening length, average physical width, and bending-resistant aspect ratio tensor using the target perimeter P and area S, with the following expression:
[0117]
[0118]
[0119]
[0120] in, For absolute straight length, The average physical width, For the aspect ratio tensor of bending resistance;
[0121] Then, the contour that satisfies the elongation threshold and has the largest absolute straight length is selected as the true petiole. The elongation threshold is an empirical lower limit used to determine whether a topological structure possesses an elongated physical morphology. The elongation threshold is set to 5.0, meaning that when the bending aspect ratio tensor... When the candidate region is determined to be a slender petiole;
[0122] S3.5. Perform a difference operation between the real petiole reference mask obtained in step S3.4 and the blade contour of the ROI to obtain a pure binary image of the blade.
[0123] Furthermore, dynamic wide-blade physical severing: after obtaining the real petiole reference mask, based on the calculated real physical width... The system dynamically generates a scaled-up "wide-blade" expansion structural element. This element is then differentially processed with the main leaf mask to completely sever the "trumpet-shaped" adhesions commonly found at the base of the petiole in the topological structure, preserving the largest area connected region as pure mesophyll.
[0124] S4. Based on the pure binary leaf image obtained in step S3, calculate the multidimensional trait index of the leaf, including the basic geometric traits of the leaf, edge morphology and serration features, symmetry and leaf center point, and leaf insect damage ratio.
[0125] Furthermore, the specific implementation method of step S4 includes the following steps:
[0126] S4.1. Calculate the basic geometric characteristics of the leaf, including leaf area, leaf perimeter, and leaf length-to-width ratio;
[0127] The blade pixel area is calculated based on the discretized form of Green's formula, assuming the blade outline... Consisting of a series of ordered coordinate points Composition, in which Given the total number of contour points, the leaf pixel area is... The expression is:
[0128]
[0129] Among them, the agreement , is the pixel x-coordinate of the blade outline. y is the pixel coordinate of the blade outline. These are the lateral and longitudinal mean values of the blade profile point set, respectively.
[0130] Convert leaf pixel area to leaf physical area The expression is:
[0131] ;
[0132] The leaf pixel perimeter is obtained by summing the Euclidean distances between adjacent pixels in the leaf contour sequence. The expression is:
[0133]
[0134] , Convert the pixel perimeter of the blade to the physical perimeter of the blade. The expression is:
[0135] ;
[0136] The rotating caliper algorithm is applied to the contour point set to find the minimum bounding rectangle, and the ratio of the major axis to the minor axis is obtained. Let the minor axis of the minimum bounding rectangle be... The major axis is The aspect ratio of the leaf is... The expression is:
[0137]
[0138] Where max is the maximum value function and min is the minimum value function;
[0139] S4.2. Calculate edge morphology and serration features, including extraction of blade roundness, number of blade serrations, and blade serration angle;
[0140] blade roundness The calculation formula is:
[0141] ;
[0142] Then, based on the local sliding window and spatial depth filtering, the effective set of sawtooth tips is extracted; then, for adjacent sawtooth tips, the pixel with the smallest Euclidean distance from the geometric centroid of the blade is retrieved in the original contour slice and established as the true valley bottom with the deepest inward concavity in three-dimensional space.
[0143] After calculating the true spatial angle by constructing vectors between the sawtooth tip and the actual valley floor on the left and right sides, it is compared with the upper limit threshold of the angle. If the true spatial angle is greater than the upper limit threshold, it is determined to be a mathematical measurement illusion caused by the smooth wave edge and is physically removed. The total number of sawtooth tips retained is the number of sawtooths on the blade. The average angle of the included angle in real space is the blade serration angle. ;
[0144] Furthermore, set an upper limit threshold for the angle. ;
[0145] Furthermore, the method for extracting the effective set of sawtooth tips is as follows:
[0146] ① Local angle scanning: A sliding window with a fixed step size (k) is used to traverse the blade profile. A vector is constructed using the current point and the points with the previous and next step sizes, and the local angle (K-Cosine) is calculated to initially screen out local acute angle protrusions.
[0147] ② Centripetal spatial depth assessment: Calculate the normal vertical depth from the candidate point to the local neighborhood baseline. Forcefully filter out pixel-level undulations with insufficient depth and eliminate false edge noise caused by edge dehydration or lighting shadows.
[0148] ③ Extreme Value and Continuity Refinement: Non-maximum suppression (NMS) is used to cluster candidate points that are physically close, retaining only the tips with the smallest local angles. At the same time, the depth and spacing distribution of the candidate points and their adjacent sawtooths are compared to remove isolated noise points that deviate from the local median, and finally the set of effective sawtooth tips is output.
[0149] S4.3. Calculate the symmetry and the center point of the blade;
[0150] First, calculate the geometric moments of the image. ,in, The x-coordinate of the pixel is raised to the power of p. The p-th power of the ordinate of the pixel. Image in spatial coordinates The pixel values are set to 1 for the target leaf area and 0 for the background area.
[0151] The center coordinates of the blade center point for:
[0152]
[0153]
[0154] in, Let x be the x-coordinate of the geometric centroid of the blade. Let be the ordinate of the geometric centroid of the blade. Let be the first-order horizontal spatial moment of the image. This represents the total number of pixels on the leaf blade. It is a first-order longitudinal spatial moment;
[0155] Finally, output the physical location of the blade center point. ;
[0156] To calculate blade symmetry using the principal axis segmentation and area difference method, the blade principal axis is first calculated and determined. Then, the blade is divided into a left half, with the center point as the boundary. and the right half Area represents the area, and finally the symmetry of the blade is calculated. The calculation formula is:
[0157] ;
[0158] S4.4. Calculate the leaf damage ratio;
[0159]
[0160] in, This represents the number of damaged pixels. This represents the total number of pixels on the leaf blade.
[0161] Furthermore, the insect damage ratio ( ): Utilizing a specific color gamut threshold in the HSV color space (to distinguish between healthy green and diseased spot color), combined with a full leaf outline mask, and employing bitwise AND operations and pixel statistics to calculate the percentage of damaged area, a pest damage discrimination function is defined using a formula. When pixel The value is 1 if the preset threshold is met, and 0 otherwise. The number of damaged pixels is then calculated. Finally, the insect damage ratio is calculated;
[0162] S5. Based on the multidimensional leaf trait indices obtained in step S4, deduce the higher-order ecological functional traits of the leaves, including single leaf volume, leaf mass density, specific leaf area, and leaf dry matter content.
[0163] Furthermore, a cross-dimensional inversion link from 2D visual geometric features to 3D quality ecological features was constructed. After completing the absolute scale mapping from pixels to SI units through a physical scale, the extracted dimensionless geometric topological area was heterogeneously fused with the scalar data (fresh weight, dry weight, thickness) input through the system's reserved interface to deduce higher-order ecological functional traits.
[0164] Furthermore, the specific implementation method of step S5 includes the following steps:
[0165] S5.1. Set blade thickness to calculate the volume of a single blade. The calculation formula is:
[0166]
[0167] in, For blade thickness;
[0168] S5.2. Based on leaf fresh weight Calculate the mass density of the blade The calculation formula is:
[0169] ;
[0170] S5.3. Based on blade dry weight Calculate specific leaf area The calculation formula is:
[0171] ;
[0172] S5.4. Calculate the leaf dry matter content The calculation formula is:
[0173] .
[0174] This invention aims to address the data measurement bottleneck in large-scale plant phenomics research. It employs a "producer-consumer" design pattern and in-memory binary stream decoding technology to achieve recursive traversal and high-speed reading of massive image data within multi-level folders. In the image processing workflow, the method uses standardized reference objects with preset physical dimensions for calibration. HSV color space conversion and the Otsu adaptive threshold segmentation algorithm enhance the robustness of foreground identification of green plants under complex lighting conditions. Through topological contour tracking and dynamic morphological masking techniques, it achieves automatic separation of multiple leaf targets and petiole removal in a single image. Furthermore, by combining discrete geometry algorithms and physical inversion models, it batches and automatically extracts the geometric morphology (such as serrations and symmetry), texture details, and physical functional traits (such as SLA and LDMC) of leaves.
[0175] The application areas of this invention are as follows:
[0176] (1) Plant phenomics and systematics research: This invention can be used for high-throughput extraction of multidimensional phenotypic information such as plant leaf geometry, edge structure, symmetry and damage status. It is suitable for plant phenomics, plant taxonomy, functional ecology and comparative biology research, and provides standardized data support for large-sample, multi-species leaf trait analysis.
[0177] (2) Evaluation and breeding screening of agricultural and forestry germplasm resources: This invention can automatically quantify indicators such as leaf area, perimeter, length-width ratio, roundness, number of serrations, serration angle, and symmetry, and can be used for germplasm identification, screening of superior traits, monitoring of growth status and evaluation of stress resistance of crops, forest trees and horticultural plants.
[0178] (3) Ecological environment monitoring and plant health diagnosis: This invention can use indicators such as insect damage ratio, color change and fluctuation asymmetry to help determine the degree of environmental stress on plant leaves such as insect damage, drought, pollution and nutrient imbalance, and provide technical support for ecological health assessment, forest health monitoring and urban green space maintenance.
[0179] (4) Research on the correlation between plant functional traits and biomass: Based on the extraction of two-dimensional leaf morphological characteristics, this invention can combine external input data such as leaf fresh weight, dry weight, and thickness to further invert ecological functional traits such as leaf volume, leaf mass density, specific leaf area (SLA), and leaf dry matter content (LDMC), providing basic data for plant resource utilization, biomass estimation, and ecosystem function research.
[0180] (5) Construction of digital ecology and intelligent phenotyping platform: This invention can be embedded in desktop software, Web platform, mini program or mobile terminal to build a low-cost, standardized and batch-running automatic plant phenotyping system, which is suitable for scientific research platform, teaching platform and digital management scenarios of ecological research.
[0181] It should be noted that relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0182] Although this application has been described above with reference to specific embodiments, various modifications can be made and components can be replaced with equivalents without departing from the scope of this application. In particular, as long as there is no structural conflict, the features in the specific embodiments disclosed in this application can be combined with each other in any way. The lack of an exhaustive description of these combinations in this specification is merely for the sake of brevity and resource conservation. Therefore, this application is not limited to the specific embodiments disclosed herein, but includes all technical solutions falling within the scope of the claims.
Claims
1. A high-throughput method for extracting, segmenting, and inverting functional traits of multidimensional phenotypes in plant leaves based on computer vision, characterized in that, Includes the following steps: S1. Collect plant leaf sample images, perform high-throughput data scheduling and image decoding to obtain a decoded plant leaf sample image matrix; S2. The decoded plant leaf sample image matrix obtained in step S1 is mapped to the HSV color space, and then Gaussian convolution processing, adaptive threshold segmentation, and physical scale correction are performed to obtain a binary image of the plant leaf sample. S3. Perform multi-target topological separation and petiole segmentation on the binary images of plant leaf samples obtained in step S2 to obtain pure binary images of leaves; S4. Based on the pure binary leaf image obtained in step S3, calculate the multidimensional trait index of the leaf, including the basic geometric traits of the leaf, edge morphology and serration features, symmetry and leaf center point, and leaf insect damage ratio. The specific implementation method of step S4 includes the following steps: S4.
1. Calculate the basic geometric characteristics of the leaf, including leaf area, leaf perimeter, and leaf length-to-width ratio; The blade pixel area is calculated based on the discretized form of Green's formula, assuming the blade outline... Consisting of a series of ordered coordinate points Composition, in which Given the total number of contour points, the leaf pixel area is... The expression is: Among them, the agreement , is the pixel x-coordinate of the blade outline. y is the pixel coordinate of the blade outline. These are the lateral and longitudinal mean values of the blade profile point set, respectively. Convert leaf pixel area to leaf physical area The expression is: in, For physical space conversion coefficients; The leaf pixel perimeter is obtained by summing the Euclidean distances of adjacent pixels in the leaf contour sequence. The expression is: , Convert the pixel perimeter of the blade to the physical perimeter of the blade. The expression is: ; The rotating caliper algorithm is applied to the contour point set to find the minimum bounding rectangle, and the ratio of the major axis to the minor axis is obtained. Let the minor axis of the minimum bounding rectangle be... The major axis is The aspect ratio of the leaf is... The expression is: Where max is the maximum value function and min is the minimum value function; S4.
2. Calculate edge morphology and serration features, including extraction of blade roundness, number of blade serrations, and blade serration angle; blade roundness The calculation formula is: ; Then, based on the local sliding window and spatial depth filtering, the effective set of sawtooth tips is extracted; then, for adjacent sawtooth tips, the pixel with the smallest Euclidean distance from the geometric centroid of the blade is retrieved in the original contour slice and established as the true valley bottom with the deepest inward concavity in three-dimensional space. After calculating the true spatial angle by constructing vectors between the sawtooth tip and the actual valley floor on the left and right sides, it is compared with the upper limit threshold of the angle. If the true spatial angle is greater than the upper limit threshold, it is determined to be a mathematical measurement illusion caused by the smooth wave edge and is physically removed. The total number of sawtooth tips retained is the number of sawtooths on the blade. The average angle of the included angle in real space is the blade serration angle. ; S4.
3. Calculate the symmetry and the center point of the blade; First, calculate the geometric moments of the image. ,in, The x-coordinate of the pixel is raised to the power of p. The p-th power of the ordinate of the pixel. Image in spatial coordinates The pixel values are set to 1 for the target leaf area and 0 for the background area. The center coordinates of the blade center point for: in, Let x be the x-coordinate of the geometric centroid of the blade. Let be the ordinate of the geometric centroid of the blade. Let be the first-order horizontal spatial moment of the image. This represents the total number of pixels on the leaf blade. It is a first-order longitudinal spatial moment; Finally, output the physical location of the blade center point. ; To calculate blade symmetry using the principal axis segmentation and area difference method, the blade principal axis is first calculated and determined. Then, the blade is divided into a left half, with the center point as the boundary. and the right half Area represents the area, and finally the symmetry of the blade is calculated. The calculation formula is: ; S4.
4. Calculate the leaf damage ratio; in, This represents the number of damaged pixels. This represents the total number of pixels on the leaf blade. S5. Based on the multidimensional leaf trait indices obtained in step S4, deduce the higher-order ecological functional traits of the leaves, including single leaf volume, leaf mass density, specific leaf area, and leaf dry matter content.
2. The method for high-throughput extraction, segmentation, and functional trait inversion of multidimensional phenotypes of plant leaves based on computer vision according to claim 1, characterized in that, The specific implementation method of step S1 includes the following steps: S1.
1. First, a file traversaler is constructed to scan the collected plant leaf sample images based on the input directory. The image file paths are filtered using a pattern matching algorithm, and deduplication and serialization sorting are performed to generate a queue of tasks to be processed. S1.
2. The image file of the task queue to be processed obtained in step S1.1 is read into the memory buffer as a binary data stream, and then the image decoding algorithm is called to reconstruct the binary stream into a three-dimensional pixel matrix to obtain the decoded plant leaf sample image matrix.
3. The method for high-throughput extraction, segmentation, and functional trait inversion of multidimensional phenotypes of plant leaves based on computer vision according to claim 2, characterized in that, The specific implementation method of step S2 includes the following steps: S2.
1. Map the decoded plant leaf sample image matrix to the HSV color space, and then perform a two-dimensional convolution operation using a Gaussian kernel, as shown in the following formula: For image matrix The convolution output is written as: in, Let be the weight values of the Gaussian filter at pixel coordinates (x, y). Let be the standard deviation of the Gaussian distribution. is the normalization coefficient of the Gaussian kernel, used to ensure that the sum of the kernel weights before and after convolution is 1, and exp is the base of the natural logarithm. and These are the coordinates of the Gaussian kernel center; this yields the Gaussian-denoised plant leaf sample image matrix. S2.
2. The maximum inter-class variance between the foreground leaves and the background substrate is calculated using the Otsu's method on the Gaussian-denoised plant leaf sample image matrix obtained in step S2.1 to determine the optimal segmentation threshold. Generate a binarized mask ; S2.
3. Perform physical scale calibration, retrieve the scale geometric features of the plant leaf sample image matrix, calculate the scale pixel length and width based on the rotating caliper algorithm, and establish physical space transformation coefficients in combination with physical dimensions. This yields binary images of plant leaf samples.
4. The method for high-throughput extraction, segmentation, and functional trait inversion of multidimensional phenotypes of plant leaves based on computer vision according to claim 3, characterized in that, The specific implementation method of step S3 includes the following steps: S3.
1. Use the boundary tracking algorithm to scan the binary image of the plant leaf sample obtained in step S2, extract all closed topological contours, and based on the contour area screening mechanism, remove noise points with an area less than 0.1% of the total area and background interference greater than 20% to obtain the screened leaf contours. S3.
2. For the result obtained in step S3.1 For each blade outline, an independent Region of Interest (ROI) is constructed, and a local pure black mask is constructed to obtain the blade outline with the ROI. S3.
3. Establish the blade profile of the ROI in step S3.2, and perform iterative opening operation using elliptical kernels with increasing size to obtain the extracted candidate connected components; S3.
4. Establish a topological geometric dimension reduction model for the extracted candidate connected components, including deriving the absolute straightening length, average physical width, and bending-resistant aspect ratio tensor using the target perimeter P and area S, with the following expression: in, For absolute straight length, The average physical width, For the aspect ratio tensor of bending resistance; Then, the contour that satisfies the elongation threshold and has the largest absolute straight length is selected as the true petiole. The elongation threshold is an empirical lower limit value used to determine whether a topological structure possesses an elongated physical morphology. The elongation threshold is set to 5.0, that is, when the bending aspect ratio tensor... When the candidate region is determined to be a slender petiole; S3.
5. Perform a difference operation between the real petiole reference mask obtained in step S3.4 and the blade contour of the ROI to obtain a pure binary image of the blade.
5. The method for high-throughput extraction, segmentation, and functional trait inversion of plant leaf multidimensional phenotypes based on computer vision according to claim 4, characterized in that, The specific implementation method of step S5 includes the following steps: S5.
1. Set blade thickness to calculate the volume of a single blade. The calculation formula is: in, For blade thickness; S5.
2. Based on leaf fresh weight Calculate the mass density of the blade The calculation formula is: ; S5.
3. Based on blade dry weight Calculate specific leaf area The calculation formula is: ; S5.
4. Calculate the leaf dry matter content The calculation formula is: 。
Citation Information
Patent Citations
Image-based leaf form information extraction method
CN115731257A
Plant leaf appearance character detection method and system
CN119205702A
