Plant phenotyping feature extraction method and system based on machine vision
By calculating gradient magnitude and adaptive weights in plant images, the problem of unstable phenotypic feature extraction caused by environmental disturbances is solved, generating stable two-dimensional feature-enhanced images and improving the accuracy and reliability of plant growth status monitoring.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NINGBO BIGDRAGON AGRI TECH
- Filing Date
- 2026-05-22
- Publication Date
- 2026-06-19
AI Technical Summary
In agricultural production scenarios, existing technologies suffer from unstable plant phenotypic feature extraction results due to environmental disturbances. Uneven lighting and high-frequency shaking caused by wind result in severe edge artifacts when fusing multiple frames of images, thus losing the ability to monitor the slow growth trend of plants.
By acquiring the gradient magnitude of plant images, calculating the gradient space mean and variance of local windows, performing decentering and adaptive normalization processing, obtaining single-dimensional relative structural features, and using adaptive weights to perform weighted fusion of multiple images to generate a two-dimensional feature-enhanced image.
It effectively suppresses noise caused by light and wind, ensures the stability and consistency of plant structural information, improves the accuracy and reliability of phenotypic parameter extraction, and truly reflects the growth trend of plants.
Smart Images

Figure CN122243769A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of machine vision and image processing technology, and relates to a method and system for extracting plant phenotypic features based on machine vision. Background Technology
[0002] In modern agricultural and botanical research, the automated extraction and dynamic monitoring of plant phenotypic characteristics (such as leaf area, stem diameter, canopy spread, and leaf angle) are the physical data foundation for assessing plant growth status, screening for stress resistance, and optimizing water and fertilizer management. However, in real agricultural production scenarios, environmental disturbances can interfere with the effectiveness of conventional image processing algorithms. In particular, uneven lighting and high-frequency shaking caused by wind superimpose each other in the time domain, resulting in severe edge artifacts when fusing multiple frames of images. Ultimately, this causes drastic high-frequency fluctuations in the extracted phenotypic parameters over time, leading to a loss of the ability to monitor the slow growth trend of plants.
[0003] Existing temporal correlation statistical algorithms analyze the dependencies of data in the time dimension and quantify the similarity of data at different time points. In the field of image processing, they usually directly calculate the temporal variance of pixels in the image at the same fixed coordinate point at different time points and assign weights to each frame of the image based on this. The final image is then fused based on the weights of the pixels in each frame of the image.
[0004] In the above process, calculating the variance at fixed coordinate points would result in pixels representing the effective structure of the plant having extremely high temporal variances, thus being assigned very low weights by the temporal correlation statistical algorithm. In the automated extraction and dynamic monitoring of plant phenotypic features, if existing temporal correlation statistical algorithms are used to weight and fuse the final image based on the weights of pixels in each frame, the swaying branches and leaves of the plant are completely removed as noise, leading to severely incomplete extracted plant phenotypic features, such as a significant reduction in leaf area, making it impossible to reflect the plant's true growth state. Summary of the Invention
[0005] To address the problems existing in the background technology, this application proposes a method and system for extracting plant phenotypic features based on machine vision.
[0006] To achieve the above objectives, the technical solution adopted in this application is as follows: On the one hand, the present invention provides a method for extracting plant phenotypic features based on machine vision, including: Acquire multiple consecutive plant images of the plant under test within a set time period, and calculate the gradient magnitude of each pixel based on the gray value of each pixel in each plant image; Obtain the local window corresponding to each pixel, calculate the gradient space mean of each local window, and use the gradient space mean of each pixel to perform centering processing on the gradient magnitude of the corresponding pixel. The spatial variance of each local window is calculated based on the gradient magnitude, and the gradient magnitude of the corresponding pixel is adaptively normalized using the spatial variance to obtain the single-dimensional relative structural features of each pixel. The similarity score between corresponding pixels in each pair of adjacent plant images is obtained based on the single-dimensional relative structural features, and the adaptive weight of each pixel in each plant image is obtained based on the similarity score. The single-dimensional relative structural features of corresponding pixels in multiple plant images are weighted and fused according to the adaptive weights to obtain a two-dimensional feature-enhanced image of the plant under test.
[0007] Further, the step of calculating the gradient magnitude of each pixel based on the grayscale value of each pixel in each plant image includes: Calculate the horizontal and vertical grayscale gradients of each pixel based on the grayscale values. The horizontal grayscale gradient and the vertical grayscale gradient are fused to obtain the gradient magnitude of each pixel.
[0008] Furthermore, before performing adaptive normalization on the gradient magnitude of the corresponding pixel using the spatial variance, the method further includes: Zero-prevention correction is applied to the spatial variance.
[0009] Further, obtaining the similarity score between corresponding pixels in adjacent plant images based on the single-dimensional relative structural features includes: Obtain the local matrix corresponding to each pixel in the later image of the adjacent plant image, and the search matrix corresponding to each pixel in the earlier image; Each of the local matrices is used to perform a sliding search in its corresponding search matrix. The cross-covariance statistic corresponding to each sliding search is calculated, and the similarity score of each pixel in the image is obtained based on the cross-covariance statistic.
[0010] Further, obtaining the adaptive weight of each pixel in each of the plant images based on the similarity score includes: Based on the similarity score of each plant image and the plant images preceding it, the temporal mean and temporal variance of the similarity score of each pixel in each plant image are obtained respectively. Based on the time-domain mean and the time-domain variance, the adaptive weight of each pixel in each plant image is calculated.
[0011] Furthermore, before calculating the adaptive weight of each pixel in each of the plant images based on the temporal mean and the temporal variance, the method further includes: Determine whether the time-domain mean is negative; If so, then set the adaptive weight of the pixel corresponding to the time domain mean to 0; If not, then the adaptive weights of each pixel in each of the plant images are calculated based on the temporal mean and the temporal variance.
[0012] Furthermore, before calculating the adaptive weight of each pixel in each of the plant images based on the temporal mean and the temporal variance, the method further includes: Zero-prevention correction is applied to the time-domain variance.
[0013] Furthermore, before performing weighted fusion of the single-dimensional relative structural features of corresponding pixels in multiple plant images according to the adaptive weights, the method further includes: The adaptive weights of each pixel in each plant image are subjected to normalized integral processing.
[0014] On the other hand, the present invention also provides a plant phenotypic feature extraction system based on machine vision, comprising: a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the steps of the method described above are implemented.
[0015] Compared with the prior art, this application has the following beneficial effects: This invention extracts the gradient magnitude of pixels in each frame of an image, then calculates the spatial mean and variance of the gradient within a preset local window. The gradient magnitude is then decentered and adaptively normalized by dividing by the local standard deviation, thereby obtaining the single-dimensional relative structural features of each pixel. This process effectively eliminates the influence of DC components and contrast scaling effects within the local neighborhood, ensuring that the single-dimensional relative structural features of each pixel reflect only the relative changes in plant structure within the image, rather than depending on absolute light intensity or local brightness levels. This suppresses feature value drift and noise amplification caused by light halos, shadow movement, and light fluctuations in field or greenhouse environments, ensuring the consistency and stability of plant edge and texture information in subsequent analysis.
[0016] This invention obtains the similarity score between corresponding pixels in every two adjacent plant images through single-dimensional relative structural features, and uses the historical mean and variance of the similarity score within a long time-domain observation window to generate adaptive weights for each pixel in each frame. This weighting mechanism can accurately identify and reward stable structural regions with consistently high similarity scores on the time axis, while effectively suppressing regions with drastic fluctuations in local matching scores caused by the swaying of branches and leaves in the wind, as well as regions with pure background noise. Thus, it fundamentally solves the problems of structural misalignment, motion artifacts, and edge blurring that occur when multiple frames of images are directly fused according to fixed pixel coordinates.
[0017] This invention utilizes adaptive weights to perform weighted fusion of the single-dimensional relative structural features of corresponding pixels in multiple plant images. The resulting two-dimensional feature-enhanced image significantly improves the signal-to-noise ratio and edge clarity while fully preserving the geometric morphological information of the plant's true structure. This makes the extraction results of phenotypic parameters such as leaf area, stem diameter, and canopy spread more smooth and stable in time series, truly reflecting the objective trend of slow plant growth and greatly improving the reliability and accuracy of automated monitoring. Attached Figure Description
[0018] Figure 1 This is a flowchart of a plant phenotypic feature extraction method based on machine vision according to an embodiment of the present invention; Figure 2 This is a schematic diagram of a machine vision-based plant phenotypic feature extraction system according to an embodiment of the present invention. Detailed Implementation
[0019] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0020] The following reference Figures 1 to 2This invention describes a machine vision-based method and system for extracting plant phenotypic features. In this description, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature, that is, include one or more of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified. When a feature "includes or contains" one or more of the features it encompasses, unless otherwise specifically described, this indicates that other features are not excluded and may be further included.
[0021] In the description of this embodiment, the terms "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0022] This embodiment provides a machine vision-based method for extracting plant phenotypic features. This method can be applied to automated monitoring of plant growth status in greenhouse or field environments, effectively overcoming the interference of uneven lighting and wind swaying on image feature extraction, and generating stable and accurate two-dimensional images of plant phenotypic features.
[0023] like Figure 1 As shown, the method in this embodiment specifically includes the following steps: S1. Acquire multiple consecutive plant images of the plant to be tested within a set time period, and calculate the gradient magnitude of each pixel based on the gray value of each pixel in each plant image. S2. Obtain the local window corresponding to each pixel in each plant image, calculate the gradient space mean of each set local window, and use the gradient space mean of each local window to decenter the gradient magnitude of the corresponding pixel. S3. Calculate the spatial variance of the corresponding preset local window based on the gradient magnitude of each pixel, and use the spatial variance to adaptively normalize the gradient magnitude of the corresponding pixel to obtain the single-dimensional relative structural features of each pixel. S4. Obtain the similarity score between corresponding pixels in adjacent plant images based on the single-dimensional relative structural features of each pixel, and obtain the adaptive weight of each pixel in each plant image based on the similarity score. S5. Based on the adaptive weight of each pixel in each plant image, the single-dimensional relative structural features of corresponding pixels in multiple plant images are weighted and fused to obtain a two-dimensional feature-enhanced image of the plant to be tested.
[0024] In the above S1, in this embodiment, a high frame rate industrial camera with a resolution of 1920×1080 pixels and a frame rate of 60fps is fixedly installed about 1.5 meters in front of the plant to be monitored to ensure that the entire plant is fully included in the field of view. The camera is connected to the edge computing device via gigabit Ethernet.
[0025] At the start of each monitoring session, the camera continuously acquired a sequence of plant images at a fixed frequency of 60Hz for 5 seconds, resulting in 300 consecutive plant images. During the image acquisition process, the plants experienced normal-amplitude swaying of branches and leaves due to natural wind or greenhouse ventilation.
[0026] In this embodiment, taking one plant image as an example, assuming the acquisition time of the plant image is t, the plant image is converted into a grayscale image, that is, the pixel value of each pixel is set in the range of [0.255], where the coordinates are... The grayscale value of the pixel at that location is The methods for obtaining the gradient magnitude of a pixel include: First, the Sobel edge detection operator is used, based on the grayscale value of the pixel. Calculate its grayscale gradient in the horizontal direction. and grayscale gradient in the vertical direction Where the vertical direction is the direction perpendicular to the horizontal direction in the plant image, and: in, The coordinates of the plant image at time t are The horizontal grayscale gradient matrix of the pixel The element in the i-th row and j-th column, This is the horizontal gray-level gradient matrix. The number of rows and columns; The coordinates of the plant image at time t are Vertical grayscale gradient matrix of the pixel The element in the i-th row and j-th column of the vertical gray-level gradient matrix. The number of rows and the horizontal gray-level gradient matrix The number of rows is the same, the number of columns is the same as the horizontal gray-level gradient matrix The number of columns is the same, that is, the vertical gray-level gradient matrix. The number of rows and columns is z. And in the above formula: in, For the preset horizontal convolution kernel, For the preset vertical convolution kernel, The coordinates in the plant image at time t A pixel matrix is constructed centered at point t, where the element in the i-th row and j-th column is the coordinate of the plant image at time t. The grayscale value of the pixel.
[0027] Then, based on the grayscale gradient of the pixel in the horizontal direction and grayscale gradient in the vertical direction Calculate the gradient magnitude of the pixel. ,in: Based on the above method, the gradient magnitude of each pixel in the plant image is calculated sequentially.
[0028] Gradient magnitude in this embodiment This reflects the coordinates in the plant image. The degree of grayscale change within the local neighborhood of a pixel is the basis for subsequent structural feature extraction.
[0029] In S2 and S3 above, based on the gradient magnitude of each pixel, the single-dimensional relative structural features of each pixel in each frame of plant image are extracted through local centering and adaptive normalization. The purpose is to eliminate the influence of uneven lighting or lighting fluctuations on the absolute value of the gradient magnitude.
[0030] by Coordinates in the plant image at time Taking a pixel as an example, first define a square local window centered on that pixel, with the side length of the local window being... Set the vertical distance between the window boundary and the pixel to 9 pixels. That is, the range of values for the local window in the horizontal direction is greater than... Four pixels smaller than The range of values within a 4-pixel range, in the vertical direction, extends from four pixels less than y to four pixels greater than y. Calculate the spatial mean of the gradient magnitudes for all pixels within the local window. Spatial variance : The coordinates are calculated using the following formula: Single-dimensional relative structural features of pixels : In the formula, It is a very small constant, and in this embodiment it takes the value of This is used to prevent the denominator from being zero, i.e., to measure the spatial variance. Zero-prevention correction was implemented.
[0031] In the above formula, the gradient magnitude of the pixel. By subtracting the local spatial mean Decentralization is achieved, making the feature values unaffected by local overall brightness levels. Dividing the decentralized pixel structural features by the local standard deviation allows for adaptive normalization of the pixel structural features, making the single-dimensional relative structural features of the pixels insensitive to changes in illumination contrast. Therefore, even when there is halos or shadows in local areas of the plant image, the single-dimensional relative structural features of the pixels remain unaffected. The numerical distribution remains stable and consistent, truly reflecting the edge information of the plant's physical structure.
[0032] In S4 above, the similarity score between corresponding pixels in adjacent plant images is obtained based on the single-dimensional relative structural features of each pixel, and the adaptive weight of each pixel in each plant image is obtained based on the similarity score.
[0033] The swaying of plant branches and leaves under wind can cause the same physical structure to appear at different pixel coordinates in different frames of plant images. If the mean of the single-dimensional relative structural features of corresponding pixels in consecutive multi-needle plant images is directly calculated and fused, severe motion artifacts and edge blurring will occur. Therefore, this embodiment uses a cross-frame degenerate cross-covariance optimization algorithm to find the most matching displacement position in the local window of adjacent plant images, and uses the maximum similarity as the matching quality evaluation.
[0034] In this embodiment, two adjacent plant images refer to images taken at two adjacent time points. For example, the plant image at time t-1 and the plant image at time t are adjacent plant images, and the plant image at time t-1 is the earlier plant image among the adjacent plant images, while the plant image at time t is the later plant image among the adjacent plant images.
[0035] Let P be the earlier plant image among adjacent plant images, where the coordinates are... Single-dimensional relative structural features of pixels ; in the later plant image is , with its coordinates as Single-dimensional relative structural features of pixels In this embodiment, the obtained plant image is Coordinates are Methods for measuring the cross-covariance statistics of pixels include: First, from the post-plant image The coordinates are determined as follows The local matrix of the pixel at that location, this local matrix is the local matrix of the plant image in the later stage. China and Israel Centered on, with A matrix constructed for each pixel within a local window of a given side length; Then, from prior plant images The coordinates are determined as follows The search matrix for the pixels at that location is the prior plant image. China and Israel Centered on, with R is a matrix constructed for each pixel within a search window of side length, where R can take the value 2r; Finally, a sliding search with a preset step size is performed in the search matrix using the aforementioned local matrix. The preset step size is one pixel, and each preset step size corresponds to a displacement vector. The cumulative average of the products of corresponding elements within the overlapping regions of the local matrix in the later plant image and the search matrix in the earlier plant image is calculated as the cross-covariance statistic. : Cross covariance statistic The larger the value, the more significant the displacement vector. The more similar the structural features of local windows in consecutive adjacent plant images, the more likely the displacement corresponds to the actual physical movement of the plant structure in two adjacent plant images.
[0036] Iterate through all possible combinations of displacements The maximum value of the corresponding cross-covariance statistic is taken as the coordinate in the subsequent plant image. Pixel similarity score : ; By calculating the cross-variance statistics, the minute displacement of plant structures between adjacent frames can be successfully tracked, and the matching quality can be quantified into a similarity score, fundamentally solving the problem of structural misalignment and motion artifacts caused by the swaying of branches and leaves under fixed pixel coordinates.
[0037] In this embodiment, after calculating the similarity score of each pixel in each plant image, it is further incorporated into a longer temporal observation window to obtain adaptive weights that can dynamically distinguish between stable structures and random noise in plant images.
[0038] Specifically, taking the plant image at time t as an example, the plant images preceding this plant image refer to the plant images within the time window from time tL to time t.
[0039] For the current time t, based on the current plant image and its predecessors... The similarity score of the plant images is calculated. In this embodiment, L=30 frames, corresponding to an observation duration of 0.5 seconds. The temporal mean of the similarity score of each pixel in the plant image within the time window from time tL to time t is calculated. and time domain variance : ; ; in, This refers to the coordinates of the plant image at time tk. Similarity score of pixels; temporal mean in the above formula This reflects the average stability of the local structure within the observation window. Real plant structures, due to their continuous motion, typically have higher and more stable matching scores between adjacent frames, resulting in a larger mean. Random noise, on the other hand, lacks stable matching correspondences between frames, leading to generally lower matching scores and a smaller mean. Temporal variance This reflects the volatility of the matching score; the score of a stable structure fluctuates less, while the score of a noisy region fluctuates more.
[0040] In this embodiment, due to similarity score Essentially, it represents the maximum value of the cross-covariance statistic. The covariance can theoretically be negative, indicating a negative correlation between the two matrices. In practical image processing, negative similarity scores typically appear in regions of pure background noise or regions with completely unrelated textures; these regions should not be assigned any effective weight.
[0041] Therefore, before performing weight calculation, this embodiment first determines the temporal mean of the similarity score of the current pixel. Is it a negative value? This indicates that the pixel has consistently shown a negative correlation within the historical observation window and belongs to the background area that should be excluded. Therefore, the adaptive weight corresponding to this pixel is directly applied. Set to 0, and no further calculations will be performed. If so, continue with the step of calculating adaptive weights based on the temporal mean and temporal variance of the pixel similarity score.
[0042] The coordinates of the plant image at time t are obtained. Temporal mean of the corresponding pixel and time domain variance Next, determine the time-domain mean. Is it less than 0? If it is, then the adaptive weight of the pixel is directly set to 0; if it is not less than 0, then the adaptive weight of the pixel is calculated using the following formula. : ; In the formula, This refers to obtaining 0 and If the maximum value in the time domain is negative, then the weights are truncated to the maximum value in the time domain. .
[0043] The design philosophy of the aforementioned weighting formula is as follows: the numerator is the square of the mean, rewarding stable structural regions with consistently high matching scores over time; the denominator is the variance plus a constant, penalizing noisy regions with drastic fluctuations in matching scores. Therefore, realistic plant edges and textured regions receive high weights, while wind-blown branches and leaves, although structurally realistic, have larger fluctuations in matching scores due to deformation and higher variance, resulting in a moderately suppressed weight. Pure background noise regions have low mean and low variance, leading to a low overall weight; thus, wind-blown branches and leaves and pure background noise regions both receive lower weights.
[0044] In step S5, the single-dimensional relative structural features of corresponding pixels in multiple plant images are weighted and fused according to adaptive weights to obtain a two-dimensional feature-enhanced image of the plant to be tested.
[0045] Before using adaptive weights for fusion, the adaptive weights of each pixel in each plant image are first normalized and integrated. The purpose of the normalization and integration is to transform the adaptive weights of the same pixel in all N frames involved in the fusion into a probability distribution form with a sum of 1. This makes the subsequent weighted fusion operation equivalent to the mathematical expectation estimation of the single-dimensional relative structural features of each frame, avoiding the bias in the fusion result caused by excessive differences in the absolute values of the weights in each frame, while ensuring that the scale of the fused feature values is consistent with the scale of the original single-dimensional relative structural features.
[0046] For N consecutive frames of plant images of the plant under test collected within a set time period, at any spatial coordinate... Place, set up the first The original adaptive weight of this pixel in the plant images acquired at each time point is: ( The method for obtaining the adaptive weights after normalized integral processing is as described in step S4. Defined as: In the formula, It is a very small constant (in this embodiment, the value is taken as ). This normalization operation is used to prevent division by zero errors when the sum of all weights is zero. Through this normalization operation, the same pixel is normalized across all... In the frame satisfy (when (When negligible, it equals 1).
[0047] After completing the normalized integral processing, the adaptive weights after normalized integral processing are used. The single-dimensional relative structural features extracted in step S3 Weighted fusion along the time axis is performed to generate the final two-dimensional image of plant phenotypic features. : For each pixel, the normalized adaptive weights are used as the contribution probability of the frame's feature value in the time series. The weighted mathematical expectation of the single-dimensional relative structural features of that pixel across all observed frames is calculated. Since the normalized integral processing ensures that the sum of the weights is 1, the fusion result... The numerical magnitude and the single-frame, single-dimensional relative structural features Maintaining consistency facilitates threshold setting and scaling restoration during subsequent phenotypic parameter extraction.
[0048] Since the adaptive weight of each plant image is calculated based on its similarity score with the previous plant image, and the first plant image does not have a previous frame, its adaptive weight cannot be directly obtained using the method in step S4. In this embodiment, one of the following two methods can be used to handle the weight problem of the first frame: First, set the adaptive weight of each pixel in the first plant image to a uniform preset weight; second, directly copy the adaptive weight of each pixel in the second plant image as the adaptive weight of the corresponding pixel in the first frame. Experimental verification shows that the difference in impact between the two methods on the final fusion result is less than 0.5%, and both can meet the needs of practical applications.
[0049] The generated two-dimensional feature-enhanced image is obtained through the above normalized integral processing and weighted fusion. It features the following characteristics: the edges and textures of the plant's true structure are effectively preserved and enhanced, motion artifacts caused by wind swaying are significantly suppressed, and background noise is effectively smoothed. This two-dimensional feature-enhanced image can be directly used for subsequent extraction of plant phenotypic parameters, such as leaf area, stem diameter, canopy spread, and leaf tilt angle.
[0050] It should be understood that in some embodiments, the components may be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods may be implemented using software or firmware stored in memory and executed by a suitable instruction execution system.
[0051] This embodiment also provides a plant phenotypic feature extraction system based on machine vision, such as... Figure 2 As shown, it includes a memory 20, a processor 10, and a computer program 21 stored on the memory 20 and running on the processor 10. When the computer program 21 is executed by the processor 10, it implements the steps of the machine vision-based plant phenotypic feature extraction method of any of the above embodiments.
[0052] The computer program 21 used to perform the operations of this invention may be assembly instructions, Instruction Set Architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, integrated circuit configuration data, or source code or object code written in one or more programming languages and any combination of procedural programming languages. The computer program 21 may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the latter case, the remote computer may be connected to the user's computer via any type of network, including a Local Area Network (LAN) or Wide Area Network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, to perform aspects of this invention, electronic circuits, including, for example, programmable logic circuits, Field-Programmable Gate Arrays (FPGAs), or Programmable Logic Arrays (PLAs), may execute computer-readable program instructions to personalize the electronic circuits by utilizing status information of the computer-readable program instructions.
[0053] Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for plant phenotyping feature extraction based on machine vision, characterized in that, include: Acquire multiple consecutive plant images of the plant under test within a set time period, and calculate the gradient magnitude of each pixel based on the gray value of each pixel in each plant image; Obtain the local window corresponding to each pixel, calculate the gradient space mean of each local window, and use the gradient space mean of each pixel to perform centering processing on the gradient magnitude of the corresponding pixel. The spatial variance of each local window is calculated based on the gradient magnitude, and the gradient magnitude of the corresponding pixel is adaptively normalized using the spatial variance to obtain the single-dimensional relative structural features of each pixel. The similarity score between corresponding pixels in each pair of adjacent plant images is obtained based on the single-dimensional relative structural features, and the adaptive weight of each pixel in each plant image is obtained based on the similarity score. The single-dimensional relative structural features of corresponding pixels in multiple plant images are weighted and fused according to the adaptive weights to obtain a two-dimensional feature-enhanced image of the plant under test.
2. The method of claim 1, wherein, The step of calculating the gradient magnitude of each pixel based on the grayscale value of each pixel in each plant image includes: Calculate the horizontal and vertical grayscale gradients of each pixel based on the grayscale values. The horizontal grayscale gradient and the vertical grayscale gradient are fused to obtain the gradient magnitude of each pixel.
3. The method of claim 1, wherein, Before performing adaptive normalization on the gradient magnitude of the corresponding pixel using the spatial variance, the method further includes: Zero-prevention correction is applied to the spatial variance.
4. The method according to claim 1, characterized in that, The step of obtaining similarity scores between corresponding pixels in adjacent plant images based on the single-dimensional relative structural features includes: Obtain the local matrix corresponding to each pixel in the later image of the adjacent plant image, and the search matrix corresponding to each pixel in the earlier image; Each of the local matrices is used to perform a sliding search in its corresponding search matrix. The cross-covariance statistic corresponding to each sliding search is calculated, and the similarity score of each pixel in the image is obtained based on the cross-covariance statistic.
5. The method according to claim 1, characterized in that, The step of obtaining the adaptive weight of each pixel in each plant image based on the similarity score includes: Based on the similarity score of each plant image and the plant images preceding it, the temporal mean and temporal variance of the similarity score of each pixel in each plant image are obtained respectively. Based on the time-domain mean and the time-domain variance, the adaptive weight of each pixel in each plant image is calculated.
6. The method according to claim 5, characterized in that, Before calculating the adaptive weight of each pixel in each of the plant images based on the temporal mean and the temporal variance, the method further includes: Determine whether the time-domain mean is negative; If so, then set the adaptive weight of the pixel corresponding to the time domain mean to 0; If not, then the adaptive weights of each pixel in each of the plant images are calculated based on the temporal mean and the temporal variance.
7. The method according to claim 5, characterized in that, Before calculating the adaptive weight of each pixel in each of the plant images based on the temporal mean and the temporal variance, the method further includes: Zero-prevention correction is applied to the time-domain variance.
8. The method according to claim 1, characterized in that, Before performing weighted fusion of the single-dimensional relative structural features of corresponding pixels in multiple plant images according to the adaptive weights, the method further includes: The adaptive weights of each pixel in each plant image are subjected to normalized integral processing.
9. A plant phenotypic feature extraction system based on machine vision, characterized in that, include: A processor and a memory, the memory storing computer program instructions that, when executed by the processor, implement the steps of the method as described in any one of claims 1 to 8.