Method for batch determination of leaf phenotypic traits and related apparatus

By processing images of randomly placed leaves and performing PCA analysis, the problems of cumbersome and inefficient leaf phenotypic measurement procedures were solved, achieving efficient and accurate leaf parameter measurement and supporting population phenotypic analysis and variety breeding.

CN116105691BActive Publication Date: 2026-03-20ZHEJIANG FORESTRY UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211716930.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-29
Publication Date
2026-03-20
Estimated Expiration
2042-12-29

AI Technical Summary

Technical Problem

In existing technologies, the measurement of leaf phenotypic traits requires placing the leaves in a specific orientation, which makes the measurement process cumbersome and inefficient.

Method used

By acquiring multiple images containing randomly placed blades, image preprocessing and noise removal are performed. Opening and closing operations are performed using structuring elements to mark the blade outline and internal pixels. Combined with PCA analysis, the blades are twisted to a vertical or horizontal orientation, and the area, perimeter, length, and width parameters are calculated.

Benefits of technology

This method enables batch measurement of randomly placed leaves, improving measurement efficiency and accuracy, simplifying the process, providing a basis for population phenotypic analysis, and offering a basis for variety breeding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116105691B_ABST
    Figure CN116105691B_ABST
Patent Text Reader

Abstract

The application provides a method and device for batch measuring leaf phenotype traits, electronic equipment and a storage medium. The method for batch measuring leaf phenotype traits comprises: acquiring images containing at least two to-be-measured leaves; the images comprise a background area and at least two leaf areas randomly distributed in the background area; the color of the background area is different from that of the leaf areas, and the placement direction of the leaves in the leaf areas is random; the images are preprocessed to make the color of the leaf areas white and the color of the background area black, thereby obtaining binary images; open operation processing and close operation processing are performed to obtain to-be-measured images; contour recognition is performed to obtain coordinate information of pixel points of the contours of the to-be-measured leaves and coordinate information of internal pixel points; and area parameters, perimeter parameters, length parameters and width parameters of the at least two to-be-measured leaves are calculated respectively. The length parameters and width parameters of leaves with random placement directions can be accurately measured in batches, and the efficiency is high.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of plant phenotype trait measurement, and in particular to a method and device for batch measurement of leaf phenotype traits, electronic equipment and a storage medium. BACKGROUND

[0002] Leaves are the main organs for photosynthesis of plants. Leaf phenotype shape is determined or influenced by genes and environmental factors, and can reflect all physical, physiological, biochemical characteristics and traits of plant structure and composition, plant growth and development process and results. Analysis of leaf phenotype parameters is closely related to breeding. It is an important parameter for input or output of many models for estimating plant characteristic parameters, and is commonly used in plant biochemistry, physiology, ecology, crop cultivation management and breeding research and application.

[0003] For measurement of leaf phenotype related parameters, related technologies need to place leaves in a specific direction, and have the problems of complicated measurement steps and low measurement efficiency.

[0004] Therefore, there is an urgent need for a new method for measuring leaf phenotype traits. SUMMARY

[0005] Therefore, the present application aims to provide a method and device for batch measurement of leaf phenotype traits, electronic equipment and a storage medium.

[0006] To achieve the above purpose, the present application provides a method for batch measurement of leaf phenotype traits, comprising:

[0007] obtaining an image containing at least two leaves to be measured; the image includes a background area and at least two leaf areas randomly distributed in the background area; the color of the background area is different from that of the leaf area, and the placement direction of the leaves in the leaf area is random;

[0008] preprocessing the image to make the color of the leaf area white and the color of the background area black, obtaining a binary image; in the binary image, the pixels of the leaf area have a first value, and the pixels of the background area have a second value; the first value is different from the second value;

[0009] performing open operation processing and close operation processing on the binary image by using a structure element with a preset shape and a preset size, to remove image noise in the binary image and repair leaf damage in the leaf area, obtaining a to-be-measured image;

[0010] The pixel values ​​of the pixels in the image to be tested are scanned in a first preset order, and the pixels are marked so that the pixels have marked values, thereby obtaining the coordinate information of the pixels of the outline of the blade to be tested and the coordinate information of the pixels inside the blade; wherein, the marked values ​​of the pixels of the outline of the blade to be tested are different from the marked values ​​of the pixels inside the blade; the marked values ​​of the pixels of the outline of at least two blades to be tested are all different, and the marked values ​​of the pixels inside the at least two blades to be tested are all different.

[0011] Calculate the area, perimeter, length and width parameters of at least two blades to be tested in the second preset order.

[0012] The calculation of the area and perimeter parameters of the blade to be tested includes: determining the first number of pixels of the outline of the blade to be tested, the second number of pixels inside the blade to be tested, and the sum of the first and second numbers based on the pixel marking values; obtaining the area parameter of the blade to be tested based on the sum and the area of ​​a single pixel in the image; and obtaining the perimeter parameter of the blade to be tested based on the first number and the length of a single pixel.

[0013] The calculation of the length and width parameters of the blade to be tested includes:

[0014] The coordinate information of each pixel of the blade profile is saved as a two-dimensional matrix and PCA analysis is performed so that the blade is placed in a vertical or horizontal direction to obtain the first profile of the blade in the vertical direction and the second profile of the blade in the horizontal direction.

[0015] The length parameter of the blade to be tested is obtained by taking the difference between the maximum and minimum ordinates of the pixels of the first contour and the length of a single pixel. The width parameter of the blade to be tested is obtained by taking the difference between the maximum and minimum ordinates of the pixels of the second contour and the length of a single pixel.

[0016] This application also provides an apparatus for batch determination of leaf phenotypic traits, comprising:

[0017] An image acquisition module is used to acquire images containing at least two leaves to be tested; the images include a background area and at least two leaf areas randomly distributed in the background area; the background area and the leaf areas are of different colors, and the leaf areas are randomly positioned;

[0018] A preprocessing module is used to preprocess the image to make the leaf region white and the background region black, resulting in a binarized image; in the binarized image, the pixels in the leaf region have a first value, and the pixels in the background region have a second value; the first value and the second value are different.

[0019] The to-be-tested image processing module is configured to perform open operation processing and close operation processing on the binary image by using a structure element with a preset shape and a preset size, so as to remove image noise points in the binary image and repair blade damage in a blade area, and obtain a to-be-tested image;

[0020] The identification module is configured to scan pixel values of pixel points of the to-be-tested image in a first preset order, and mark the pixel points so that the pixel points have mark values, to obtain coordinate information of pixel points of a contour of the to-be-tested blade and coordinate information of internal pixel points; the mark values of the pixel points of the contour of the to-be-tested blade are different from the mark values of the internal pixel points; the mark values of the pixel points of the contours of the at least two to-be-tested blades are different from each other, and the mark values of the internal pixel points of the at least two to-be-tested blades are different from each other.

[0021] The calculation module is configured to calculate area parameters, perimeter parameters, length parameters, and width parameters of the at least two to-be-tested blades in a second preset order.

[0022] The calculation of the area parameters and the perimeter parameters of the to-be-tested blade includes: determining a first number of the pixel points of the contour of the to-be-tested blade, a second number of the internal pixel points of the to-be-tested blade, and a sum of the first number and the second number according to the mark values of the pixel points; obtaining the area parameters of the to-be-tested blade according to the sum and an area of a single pixel of the image; and obtaining the perimeter parameters of the to-be-tested blade according to the first number and a length of a single pixel.

[0023] The calculation of the length parameters and the width parameters of the to-be-tested blade includes:

[0024] The coordinate information of each pixel point of the contour of the to-be-tested blade is saved as a two-dimensional matrix, and PCA analysis is performed, so that the placement direction of the to-be-tested blade is a vertical direction or a horizontal direction, to obtain a first contour of the to-be-tested blade in the vertical direction and a second contour of the to-be-tested blade in the horizontal direction.

[0025] The length parameters of the to-be-tested blade are obtained according to a difference between a maximum longitudinal coordinate and a minimum longitudinal coordinate of the pixel points of the first contour and a length of a single pixel, and the width parameters of the to-be-tested blade are obtained according to a difference between a maximum longitudinal coordinate and a minimum longitudinal coordinate of the pixel points of the second contour and the length of the single pixel.

[0026] The embodiments of the present application also provide an electronic device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, and the processor implements the method according to any one of the preceding embodiments when executing the program.

[0027] The embodiments of the present application also provide a non-transitory computer readable storage medium, which stores computer instructions for causing a computer to execute the method according to any one of the preceding embodiments.

[0028] As can be seen from the above, the method, apparatus, electronic device, and storage medium for batch determination of leaf phenotypic traits provided in this application extract the contours of different leaves from images of at least two leaves to be tested, and mark the pixels of the contours and the pixels inside the leaves differently. Combined with PCA analysis of the positional information of the leaf contours, the tilted leaves are twisted to be vertical or horizontal, thereby measuring the length, width, perimeter, and area of ​​the leaves to be tested. This achieves batch identification of the length and width parameters of multiple randomly placed leaves, with high accuracy and advantages such as simple process and high efficiency. It can provide a basis for the correlation analysis between the phenotypic and geographical factors of a population, and provide a basis for the analysis of leaf phenotypic variation characteristics between and within different populations. It can also use the phenotypic differences obtained from the analysis as one of the evaluation criteria for variety breeding. Attached Figure Description

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

[0030] Figure 1 This is a schematic flowchart illustrating an exemplary method for batch determination of leaf phenotypic traits according to an embodiment of this application.

[0031] Figure 2 This is a schematic diagram of at least two images of the blade to be tested obtained according to an embodiment of this application;

[0032] Figure 3 To Figure 2 A schematic diagram of the grayscale image obtained after grayscale conversion of the image shown.

[0033] Figure 4 To Figure 3 A schematic diagram of the binarized image obtained after binarizing the image shown.

[0034] Figure 5 To Figure 4 A schematic diagram of the image to be tested obtained after processing the image;

[0035] Figure 6a To Figure 5 A schematic diagram of the pixel values ​​of the first leaf in the image shown;

[0036] Figure 6b To Figure 6athe image after scanning;

[0037] Figure 6c for the image after scanning; Figure 6b the image after scanning;

[0038] Figure 6d for the image after scanning; Figure 6c the image after scanning;

[0039] Figure 6e for the image after scanning; Figure 6d the image after scanning;

[0040] Figure 6f for the image after scanning; Figure 6e the image after scanning;

[0041] Figure 7 the image after scanning;

[0042] Figure 8a the image after scanning;

[0043] Figure 8b the image after scanning;

[0044] Figure 9 the image after scanning;

[0045] Figure 10 the image after scanning; DETAILED DESCRIPTION

[0046] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below with reference to specific embodiments and the accompanying drawings.

[0047] It should be noted that the technical terms or scientific terms used in the embodiments of the present application should be understood as the general meaning understood by the person skilled in the art in the field to which the present application belongs, unless otherwise defined. The terms "first", "second" and the like used in the embodiments of the present application do not represent any order, number or importance, but are only used to distinguish different components. The terms "include" or "contain" and the like mean that the elements or objects before the terms cover the elements or objects listed after the terms and their equivalents, and do not exclude other elements or objects. The terms "connect" or "connected" and the like are not limited to physical or mechanical connection, but can include electrical connection, whether direct or indirect. The terms "upper", "lower", "left", "right" and the like are only used to represent relative positional relationships, and when the absolute positions of the described objects change, the relative positional relationships may also change accordingly.

[0048] For plants of the same variety, there can be large differences in leaf phenotypic traits of plants in different regions. Studying the leaf phenotypes of the same plant variety in different regions can well understand the differences between the plant variety in different regions. Therefore, determining the leaf phenotypic traits of the same plant variety is of great significance for the growth and development of the same variety in different regions.

[0049] In the related art, image recognition is used to determine the phenotypic traits of plant leaves. The measurement of the phenotypic traits of plant leaves often requires placing the leaves in a specific direction, such as placing the leaves in a vertical direction. In this way, it will cause the leaf phenotype determination to have problems such as slow determination speed and low determination efficiency.

[0050] Therefore, the embodiments of the present application provide a method for batch determining leaf phenotypic traits and related equipment. By extracting the contours of different leaves and marking different leaves respectively, and performing PCA analysis on the position information of the leaf contours, the inclined leaves are twisted to be vertical or horizontal, so that the length, width, circumference and leaf area of the leaves and other parameters are measured. To some extent, the problems of complicated leaf phenotype shape measurement steps and low measurement efficiency in the related art can be solved.

[0051] Figure 1 The flowchart of the exemplary method for batch determining leaf phenotypic traits of the embodiments of the present application is shown.

[0052] In step S100, a plurality of to-be-measured leaves and a background object for placing the to-be-measured leaves are provided. The plurality of to-be-measured leaves can be from the leaves of the same plant variety collected in different regions in autumn and winter. For example, they can be forest varieties distributed in different altitude regions. The background object can be paper or a test table, etc. to place the to-be-measured leaves. The plurality of to-be-measured leaves can also be from the leaves of different plant varieties in the same region.

[0053] The background object can be selected as a pure color to facilitate subsequent identification. In some embodiments, the background object can be selected as white to better distinguish from the color of the leaves. The background object can be selected as paper, such as A4 paper or weighing paper, etc. In some embodiments, the background object can be selected as weighing paper, which has the advantages of not easy to stick and low cost, etc. In some embodiments, the background object can be rectangular, with a determined total area N, a determined horizontal coordinate (i.e. length direction) r, and a determined vertical coordinate (i.e. width direction) c.

[0054] In step S200, a plurality of to-be-tested leaves are respectively placed on a background object (such as weighing paper). When placed, according to the size of the leaves and the size of the background object, the number of leaves placed on a single background object is determined. When placed, the direction of the leaves can be randomly placed, without the need to be placed in a specific direction, and the leaves can not overlap. It should be understood that when the number of to-be-tested leaves is as many as hundreds or thousands, the to-be-tested leaves need to be respectively placed on different weighing papers.

[0055] In step S300, an image containing at least two to-be-tested leaves is acquired. Specifically, the image can be obtained by photographing or scanning the weighing paper on which at least two to-be-tested leaves are placed. It should be understood that the image can be set as multiple images. When photographing, the shooting angle of the camera needs to be fixed, and the weighing paper on which at least two to-be-tested leaves are placed needs to be placed in a fixed area, so that the size difference between multiple images is small and almost the same. In some embodiments, the image is obtained by scanning, which has the advantage that the size difference between multiple images is small.

[0056] In step S400, an image containing at least two to-be-tested leaves is acquired, as shown in Figure 2 The image can be loaded in such a way that it includes a background region and at least two leaf regions randomly distributed in the background region. That is, the horizontal projection of each leaf region overlaps with the horizontal projection of the background region, and the horizontal projection of adjacent leaf regions does not overlap. The color of the background region is different from that of the leaf region, and the placement direction of the leaves in the leaf region is random.

[0057] It should be understood that after loading, the horizontal row length (such as n), the vertical row length (such as m), and the total area (such as N) of the background region in the image are obtained, the number of pixels corresponding to the horizontal row and the number of pixels corresponding to the vertical row are obtained, and the total number of pixels of the image (such as N0) can be calculated according to the rectangular area formula, the actual area of a single pixel (such as N / N0), the horizontal row length of a single pixel (such as n / r), and the vertical row length of a single pixel (such as m / c).

[0058] At step S500, a blue component image of the leaf is extracted, and the image is converted into a grayscale image, as shown in Figure 3 The blue component image of the leaf is extracted in the RGB color space of g0, so that the blue light with the smallest proportion in the color emitted by the leaf in autumn and winter can be well utilized, and the image is converted into a grayscale image to better distinguish the leaf from the white background.

[0059] At step S600, the grayscale image is binarized according to a preset grayscale threshold, the pixels in the leaf region are assigned a first value, and the pixels in the background region are assigned a second value. The pixels in the leaf region are white, and the pixels in the background region are black, to obtain a binarized image, as shown in Figure 4 (that is, img1). The first value and the second value are different. For example, the first value can be 1, and the second value can be 0.

[0060] In some embodiments, the binarization can be performed by formula (1). In this way, the pixel value of the background region is 1, and the pixel value of the leaf region is 0.

[0061]

[0062] At step S700, the binarized image is subjected to an opening operation and a closing operation to remove image noise in the binarized image and repair leaf damage in the leaf region, to obtain a to-be-detected image, as shown in Figure 5 In some embodiments, the opening operation can be performed first, and then the closing operation can be performed. Alternatively, the closing operation can be performed first, and then the opening operation can be performed.

[0063] In some embodiments, the opening operation and the closing operation can be performed by using a structure element with a predetermined shape and size. That is, the opening operation and the closing operation are performed by using a structure element with a predetermined shape and a predetermined size. The structure element can be set to a symmetrical shape, such as a rectangle or a cross, so as to avoid the leaf being subjected to asymmetrical processing caused by an asymmetrical shape, thereby avoiding increasing the calculation error. The maximum size (for example, the size in the length direction) of the structure element can be selected according to the actual number of image pixels, and can be less than or equal to the average pixel width of the petiole and greater than or equal to the diameter width of the image noise. In this way, the structure element size can be prevented from being too large, so that the small parts (for example, the petiole) in the leaf are inevitably lost in the opening operation, and the structure element size can be prevented from being too small, so that the image noise is difficult to remove or the leaf damage is difficult to repair.

[0064] The opening operation can be that a binary image is first eroded and then dilated by a preset shape and a preset size of a structural element to eliminate impurity noise points outside the leaf, and hardly eliminate the leaf itself. The closing operation can be that an image after the opening operation is first dilated and then eroded by a preset shape and a preset size of a structural element to fill possible damage in the leaf, and hardly expand the area of the leaf itself.

[0065] Specifically, the erosion operation can include moving a structural element in a preset direction to judge a pixel point in the binary image. When the structural element is located at the coordinates of a certain pixel point and completely located in the leaf region, it is determined that the current pixel point is a white pixel point, otherwise it is determined that the current pixel point is a black pixel point. When the pixel points around and at the diagonal direction of the current pixel point are all white, the color of the region where the structural element is located is displayed as white; when there is a black pixel point around and at the diagonal direction of the current pixel point, the color of the region where the structural element is located is displayed as black.

[0066] In actual application, the region where S is located in the binary image is recorded as S(r,c), and the region where the white pixel is located is recorded as A. A-S represents that A is eroded by S, for example, starting from the upper left corner of the image, moving the position of the structural element in sequence, when the structural element is located at the coordinates of a certain pixel point, and the structural element is completely located in A at this time, the value of the pixel is set to 1, otherwise it is 0. The erosion result of S to A can be represented as: For example, when S is a 3x3 rectangular structural element, it is preserved as white only when there is a white pixel around and at the diagonal direction of a certain pixel point, otherwise the region where the structural element is located is modified to black.

[0067] Specifically, the dilation operation can include moving a structural element in a preset direction to judge a pixel point in the binary image. When the structural element is located at the coordinates of a certain pixel point and only partially located in the leaf region, it is determined that the current pixel point is a white pixel point, otherwise it is determined that the current pixel point is a black pixel point. When there is a white pixel point around and at the diagonal direction of the current pixel point, the color of the region where the structural element is located is displayed as white; when there is no white pixel point around and at the diagonal direction of the current pixel point, the color of the region where the structural element is located is displayed as black. It should be understood that the structural element of the dilation operation is completely the same as that of the erosion operation.

[0068] In practical applications, the region where S is located in the binary image is denoted as S(r, c), and the region where the white pixel is located is denoted as A. A + S represents that S is used to dilate A, that is, starting from the upper left corner of the image, the position of the structural element is sequentially moved, when the structural element is located at the coordinate of a certain pixel point, and there is an intersection between the structural element and A at this time, the value of the pixel is set to 1, otherwise 0. The dilated result of S on A can be represented as: For example, when S is a 3x3 rectangular structural element, when there is any white pixel around and in the diagonal direction of a certain pixel point, it is retained as white, and the rest is black.

[0069] In practical applications, A o S represents that S is used to perform an opening operation on A. That is, A o S = (A - S) + S. A o S represents that S is used to perform a closing operation on A. That is, A o S = (A + S) - S.

[0070] In some embodiments, when the diameter of the image noise (for example, impurities) is greater than the diameter of the petiole, the size of the structural element is smaller than the diameter of the petiole, and at this time the image noise can be eliminated through subsequent steps.

[0071] In step S800, the pixel values of the pixel points of the to-be-tested image are scanned according to a first preset order, and the pixel points are marked so that the pixel points have a mark value, to obtain coordinate information of the pixel points of the outline of the to-be-tested leaf and coordinate information of the internal pixel points; wherein the mark value of the pixel points of the outline of the to-be-tested leaf is different from the mark value of the internal pixel points; the mark values of the pixel points of the outlines of the at least two to-be-tested leaves are different from each other, and the mark values of the internal pixel points of the at least two to-be-tested leaves are different from each other.

[0072] In some embodiments, in the to-be-tested image, from left to right and from top to bottom, the mark values of the pixel points of the outlines of all the to-be-tested leaves can be sequentially increased. For example, the mark value of the first to-be-tested leaf can be 2, the mark value of the second to-be-tested leaf can be 3, and the mark value of the nth to-be-tested leaf can be n + 1.

[0073] In some embodiments, the scanning of the pixel values of the pixel points of the to-be-tested image according to the first preset order, and the marking of the pixel points so that the pixel points have a mark value, to obtain the coordinate information of the pixel points of the outline of the to-be-tested leaf and the coordinate information of the internal pixel points include the following sub-steps:

[0074] S810, scanning the image to be tested in a first preset order, setting a first pixel point with a first value scanned first as a first contour point, and updating the value of the pixel of the first contour point as a first marker value; the first marker value is greater than the first value. In some embodiments, the first preset order can be to scan all pixel points from left to right and from top to bottom starting from the top left origin of the image to be tested. It should be understood that each pixel point has a corresponding coordinate and a corresponding value (such as a first value or a second value), so that Figure 5 The value of the pixel point corresponding to the first leaf in the middle is as shown in Figure 6a .

[0075] In actual application, a variable NUB = 2 can be defined, and scanning can be performed from left to right and from top to bottom starting from the top left origin of the image (such as Figure 6a ). The coordinate of the currently scanned pixel point is img3(r, c). When the value of the currently scanned pixel point img3(r, c) is the first value (such as 1), the value of the currently scanned pixel point is set as the first marker value (such as img3(r, c) = NUB), and the pixel point is listed as the first contour point, as shown in Figure 6b .

[0076] S820, taking the first contour point as a first center and the pixel point nearest to the first contour point in the first preset order as a first starting point, reading the pixel values of the surrounding pixel points of the first contour point in a clockwise order, setting the surrounding pixel point with the second value as a first external point, setting the first surrounding pixel point with the first value as a second contour point, and updating the value of the second contour point as the first marker value. The surrounding pixel points can include eight pixel points adjacent to the first contour point and pixel points diagonal to the first contour point.

[0077] In actual application, starting from the first starting point (such as the pixel point with the coordinate img3(r, c-1), the values of the pixel points adjacent to the first contour point with the coordinate img3(r, c) are read in a clockwise order. If the value of the read pixel point is 0, it is recorded as the first external point (such as img3(r1, c1)), and if the value is 1, it is recorded as the second contour point (such as img3(r2, c2)), and the value of the second contour point is updated as the first marker value (such as img3(r2, c2) = NUB), that is, the step is ended, as shown in Figure 6c .

[0078] S830, taking the second contour point as a second center and the first external point nearest to the second contour point in the clockwise direction as a second starting point, reading the pixel values of the surrounding pixel points of the second contour point in a clockwise order, setting the surrounding pixel point with the second value as a second external point, and setting the surrounding pixel point with the first value greater than or equal to the first value as a third contour point.

[0079] In practical application, the pixel values of the surrounding pixel points are read clockwise around the second contour point (pixel point marked as img3(r2, c2)), and if the value of the pixel point is 0, it is recorded as the second external point (pixel point marked as img3(r3, c3)), and if the value of the pixel point is greater than or equal to 1, it is recorded as the third contour point (pixel point marked as img3(r4, c4)), as shown in FIG. 8B. Figure 6d

[0080] S840, judging the value of the third contour point, when the value of the third contour point is the first mark value, determining that the first contour point, the second contour point and the third contour point are the contour points of the first blade to be measured; when the value of the third contour point is the first value, returning to the step S830, taking the third contour point as the updated second center, and taking the second external point closest to the third contour point as the updated second starting point to obtain an updated third contour point, until the value of the updated third contour point is the first mark value, and determining that the first contour point, the second contour point, the third contour point and the updated third contour point are the contour points of the first blade to be measured. At this time, all the pixel points with the first mark value are obtained, and the detection of the contour of the first blade region (i.e. the first blade) in the image to be measured is completed.

[0081] In practical application, if the value of the third contour point (pixel point marked as img3(r4, c4)) is greater than 1, i.e. NUB, the contour tracking is completed, and the next step is performed. Otherwise, the second external point is the updated second seventh point (for example, img3(r1, c1)=img3(r3, c3)), the third contour point is the updated second center (img3(r2, c2)=img3(r4, c4)), and the operation of the step S830 and the step S840 is returned to the step S830, until the value of the updated third contour point is the first mark value, and the image as shown in FIG. 8C is obtained. Figure 6e

[0082] S850, reading the pixel values of the surrounding pixel points clockwise around the first contour point, updating the values of the surrounding pixel points with the first value to the second mark value, taking all the pixel points with the second mark value as the internal pixel points of the first blade to be measured, and obtaining the coordinate information of the pixel points of the contour of the first blade to be measured and the coordinate information of the internal pixel points, as shown in FIG. 8D. Figure 7

[0083] ​​​In some embodiments, the second mark value is the same as the absolute value of the first mark value, and is the positive or negative number of the first mark value. The pixel values of the surrounding pixel points are read clockwise around the first contour point, the value of the adjacent pixel point with the first value is updated to the second mark value, and all pixel points with the second mark value are taken as the pixel points inside the first to-be-measured blade, which can specifically include:

[0084] The adjacent pixel points with the first value are recorded in the form of a list. The list can include multiple record points, and each record point corresponds to a pixel point with the first value.

[0085] The values of the adjacent pixel points with the first value recorded in the list are updated to the second mark value, and the corresponding record points in the list are deleted.

[0086] In actual application, the value of the pixel point can be read clockwise around the first contour point (for example, the pixel point img3(r, c)), if the value is 1, the pixel point is marked as img3(r0, c0) and the value updating step is performed, otherwise, the same operation as the first contour point is performed along each pixel point in the contour point with the value NUB. Let img3(r0, c0) = -NUB, read and record the adjacent pixel points equal to 1 in the list, and modify the values of these points to -NUB, that is, the values of the adjacent pixel points with the value 1 are modified to the second mark value (-NUB). Starting from the first record point, read and record the adjacent pixel points equal to 1 in the list, modify the value of the record point to -NUB, delete the first record point and the second record point, and so on until the record point list is empty, as shown in Figure 6f .

[0087] In step S900, the area parameter, the perimeter parameter, the length parameter and the width parameter of at least two to-be-measured blades are respectively calculated in a second preset order. The second preset order can be the same as the first preset order, or can be different from the first preset order. In some embodiments, the second preset order is the same as the first preset order, and the area parameter, the perimeter parameter, the length parameter and the width parameter of all to-be-measured blades can be calculated from left to right and from top to bottom starting from the left side of the to-be-measured picture.

[0088] The first number of the pixel points of the contour of the to-be-measured blade, the second number of the pixel points inside the to-be-measured blade, and the sum of the first number and the second number are determined according to the mark value of the pixel point; the area parameter of the to-be-measured blade is obtained according to the sum value and the area of a single pixel of the image; and the perimeter parameter of the to-be-measured blade is obtained according to the first number and the length of a single pixel. It should be understood that, in actual parameter calculation, the parameters of the to-be-measured blades are calculated one by one, that is, the parameters of a to-be-measured blade are calculated, and then the parameters of the next to-be-measured blade are calculated.

[0089] In practical applications, the number of pixel points of the profile of the to-be-tested leaf and the number of pixel points inside are a1 (i.e., the sum is a1), the actual area of a single pixel is N / N0, and thus the actual area of the leaf is a1*N / N0. The number of pixel points of the profile of the to-be-tested leaf is a2 (i.e., the first number is a2), the length of a single pixel in a horizontal row is n / r, and thus the actual perimeter of the leaf is a2*n / r.

[0090] In some embodiments, the method further includes determining that the to-be-tested leaf is image noise when the actual area of the to-be-tested leaf is less than the minimum estimated value X of the area of the to-be-tested leaf. In this case, the image noise can be discarded, and subsequent calculation of the perimeter parameter, the length parameter, and the width parameter, etc. is not performed.

[0091] In the formula, the coordinate information of each pixel point of the profile of the to-be-tested leaf is saved as a two-dimensional matrix, and PCA analysis is performed to make the placement direction of the to-be-tested leaf a vertical direction or a horizontal direction, so as to obtain a first profile of the to-be-tested leaf in the vertical direction and a second profile of the to-be-tested leaf in the horizontal direction, as shown in Figure 8a or Figure 8b .

[0092] Specifically, by performing PCA analysis, a first direction (i.e., the direction of the first principal component) straight line with the smallest coordinate projection distance of all pixel points and a second direction (i.e., the direction of the second principal component) straight line perpendicular to the first direction can be obtained. The straight line of the first direction is the length direction of the leaf, and the straight line of the second direction is the width direction of the leaf.

[0093] In the formula, the length parameter of the to-be-tested leaf is obtained according to the difference between the maximum longitudinal coordinate and the minimum longitudinal coordinate of the pixel points of the first profile and the length of a single pixel, and the width parameter of the to-be-tested leaf is obtained according to the difference between the maximum longitudinal coordinate and the minimum longitudinal coordinate of the pixel points of the second profile and the length of a single pixel. In this way, the length and the width of the leaf with an arbitrary placement direction are identified, so that an image of the to-be-tested leaf placed vertically does not need to be provided, the process of leaf phenotype shape detection is simplified, and a high accuracy is achieved.

[0094] In practical applications, the most distant pixel interval a3 on the Y axis is taken as the length of the leaf, the most distant pixel a4 interval on the X axis is taken as the width of the leaf, and the length of a single pixel in a horizontal row is n / r. Thus, the actual length parameter of the to-be-tested leaf is a3*n / r, and the actual width parameter of the to-be-tested leaf is a4*n / r.

[0095] In this way, the area parameter, the perimeter parameter, the length parameter, and the width parameter of all to-be-tested leaves in the to-be-tested image are obtained.

[0096] In some embodiments, the area parameter, the perimeter parameter, the length parameter and the width parameter of all the test leaves can also be outputted.

[0097] In some embodiments, the test leaves comprise at least two varieties, i.e. the test leaves comprise multiple varieties, and each variety comprises multiple test leaves collected from multiple regions. The area parameter, the perimeter parameter, the width parameter and the length parameter of the multiple test leaves of each variety can be compared respectively, and the phenotypic difference of the multiple test leaves can be analyzed. For example, statistical analysis of the phenotypic difference can be performed to obtain a statistical difference result of the multiple test leaves, and the difference of each variety in different regions can be analyzed to further analyze the stability of each variety.

[0098] The phenotypic difference analysis results of the multiple varieties can be compared, and the variety with the smallest phenotypic difference can be outputted. For example, according to the statistical difference result, the variety with the smallest difference in different regions among the multiple varieties can be screened as one of the evaluation criteria for variety selection.

[0099] Verification example

[0100] The method of the embodiments of the present application is used to determine the phenotypic shape of 387 leaves collected from different regions of the same forest variety, and the parameters of the leaf area, length, width and perimeter are outputted. The total time is 29.4s, and the average time of a single leaf is 13.2s / s. The accuracy of the method is compared with the accuracy of manual measurement using EXCEL software, and the accuracy of the method is compared with the accuracy of manual measurement. See Table 1.

[0101] Table 1 Accuracy of the method for batch determination of leaf phenotypic traits

[0102] Blade area Length Width Accuracy 96.60% 96.57% 95.78% Correlation coefficient 0.997149552 0.989596837 0.989948311

[0103] It should be noted that the method of the embodiments of the present application can be executed by a single device, such as a computer or a server. The method of the embodiments can also be applied in a distributed scenario, and can be completed by multiple devices cooperating with each other. In this distributed scenario, one of the multiple devices can only execute one or more steps in the method of the embodiments of the present application, and the multiple devices can interact with each other to complete the method.

[0104] It should be noted that some embodiments of the present application have been described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in a different order than the order described above and still achieve desirable results. In addition, the processes depicted in the figures do not necessarily require the particular order shown, or sequential order, to achieve the desired results. In certain implementations, multitasking and parallel processing can be advantageous.

[0105] Based on the same inventive concept, the application also provides a device for batch determining leaf phenotypic traits corresponding to the method of any of the above embodiments.

[0106] With reference to Figure 9 , the device for batch determining leaf phenotypic traits 10 can comprise:

[0107] An image acquisition module 101 is configured to acquire an image containing at least two leaves to be measured; the image comprises a background region and at least two leaf regions randomly distributed in the background region; the color of the background region is different from that of the leaf regions, and the placement direction of the leaves in the leaf regions is random.

[0108] A preprocessing module 102 is configured to pre-process the image so that the color of the leaf regions is white and the color of the background region is black, thereby obtaining a binary image; in the binary image, the pixels of the leaf regions have a first value, and the pixels of the background region have a second value; the first value is different from the second value.

[0109] A to-be-measured image processing module 103 is configured to perform opening operation processing and closing operation processing on the binary image by using a structure element with a preset shape and a preset size, so as to remove image noise points in the binary image and repair leaf damage of the leaf regions, thereby obtaining a to-be-measured image.

[0110] An identification module 104 is configured to scan pixel values of pixel points of the to-be-measured image in a first preset order, mark the pixel points so that the pixel points have mark values, and obtain coordinate information of pixel points of a contour of a to-be-measured leaf and coordinate information of internal pixel points; wherein the mark value of the pixel points of the contour of the to-be-measured leaf is different from the mark value of the internal pixel points; the mark values of the pixel points of the contours of the at least two to-be-measured leaves are different from each other, and the mark values of the internal pixel points of the at least two to-be-measured leaves are different from each other.

[0111] A calculation module 105 is configured to calculate area parameters, perimeter parameters, length parameters and width parameters of the at least two to-be-measured leaves in a second preset order.

[0112] Wherein, the number of to-be-measured leaves, the second number and the sum of the first number and the second number of internal pixel points of the to-be-measured leaves are determined according to the mark values of the pixel points; the area parameters of the to-be-measured leaves are obtained according to the sum and the area of a single pixel of the image; and the perimeter parameters of the to-be-measured leaves are obtained according to the first number and the length of a single pixel.

[0113] The coordinate information of each pixel point of the profile of the to-be-tested blade is saved as a two-dimensional matrix, and PCA analysis is performed to make the placement direction of the to-be-tested blade vertical or horizontal, so as to obtain a first profile of the to-be-tested blade in the vertical direction and a second profile of the blade in the horizontal direction.

[0114] A length parameter of the to-be-tested blade is obtained according to the difference between the maximum longitudinal coordinate and the minimum longitudinal coordinate of the pixel points of the first profile and the length of a single pixel, and a width parameter of the to-be-tested blade is obtained according to the difference between the maximum longitudinal coordinate and the minimum longitudinal coordinate of the pixel points of the second profile and the length of a single pixel.

[0115] In some embodiments, the scanning of the pixel values of the pixel points of the to-be-tested image in the first preset order, and the marking of the pixel points to make the pixel points have the mark value, to obtain the coordinate information of the pixel points of the profile of the to-be-tested blade and the coordinate information of the internal pixel points include:

[0116] The to-be-tested image is scanned in the first preset order, the first pixel point with the first value scanned is set as a first profile point, and the value of the pixel of the first profile point is updated to a first mark value; the first mark value is greater than the first value;

[0117] The first profile point is taken as a first center, a pixel point with a longitudinal coordinate smaller than the first profile point and adjacent to the first profile point is taken as a first starting point, the pixel values of the surrounding pixel points of the first profile point are read in sequence clockwise, the surrounding pixel points with the first value are set as potential profile points, and the values of the potential profile points are updated to the first mark value, and the surrounding pixel points with the second value are set as first external points;

[0118] The potential profile point is taken as a second center, the first external point is taken as a second starting point, the pixel values of the surrounding pixel points of the potential profile point are read in sequence clockwise, the surrounding pixel points with values greater than or equal to the first value are set as possible profile points, and the surrounding pixel points with the second value are set as second external points;

[0119] When the values of the possible profile points are all the first mark value, the possible profile points are determined as the profile points of the first to-be-tested blade;

[0120] The pixel values of the surrounding pixel points around the first profile point are read in sequence clockwise, the values of the adjacent pixel points with the first value are updated to a second mark value, and all the pixel points with the second mark value are taken as the internal pixel points of the first to-be-tested blade;

[0121] The un-identified regions in the to-be-tested image are scanned in a preset order, the above steps are repeated, and the coordinate information of the pixel points of the profile of the remaining to-be-tested blades in the to-be-tested image and the coordinate information of the internal pixel points are obtained.

[0122] In some embodiments, the method further comprises a cycle module, when the value of the possible contour point is a first value, taking the possible contour point as a second center and a second external point as a third starting point, reading the pixel values of the surrounding pixel points of the possible contour point in clockwise order, and setting the surrounding pixel points with values greater than or equal to the first value as second possible contour points.

[0123] When the values of the second possible contour points are all the first mark value, the second possible contour points are determined as the pixel points of the contour of the first side blade.

[0124] In some embodiments, the preset shape is a symmetrical rectangle or a cross; and the preset size is less than or equal to the average pixel width of the petiole of the blade to be measured and greater than or equal to the diameter width of the image noise.

[0125] In some embodiments, the preset shape is a symmetrical rectangle or a cross; and the preset size is less than the average pixel width of the petiole of the blade to be measured and less than the diameter width of the image noise.

[0126] The method further comprises comparing the blade to be measured when the area of the blade to be measured is less than the minimum estimated value of the blade area, and determining that the blade to be measured is image noise.

[0127] In some embodiments, the image is preprocessed so that the color of the blade region is white and the color of the background region is black, and a binary image is obtained by:

[0128] A blue component image of the blade is extracted, and the image is converted to grayscale to obtain a grayscale image.

[0129] The grayscale image is binarized according to a preset grayscale threshold, so that the pixels of the blade region have a first value and the pixels of the background region have a second value; and the pixels of the blade region are white and the pixels of the background region are black, thereby obtaining a binary image.

[0130] In some embodiments, the blade to be measured includes at least two varieties, each variety including a plurality of blades to be measured from a plurality of collection areas; and a difference analysis module is further included for comparing the area parameters, perimeter parameters, width parameters and length parameters of the plurality of blades to be measured of each variety, and analyzing the phenotypic differences of the plurality of blades to be measured.

[0131] The phenotypic difference analysis results of the plurality of varieties are compared, and the variety with the smallest phenotypic difference is output.

[0132] For the convenience of description, the above device is described as various modules in function. Of course, the functions of the modules can be implemented in one or more software and / or hardware in the implementation of the present application.

[0133] The device of the above embodiments is used to implement the method of batch determining leaf blade phenotypic traits in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which are not repeated here.

[0134] Based on the same inventive concept, the present application also provides an electronic device corresponding to the method of any of the above embodiments, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method of batch determining leaf blade phenotypic traits according to any of the above embodiments when executing the program.

[0135] Figure 10 A more specific hardware structure schematic diagram of an electronic device provided by the present embodiment is shown, which can include a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 for communication within the device.

[0136] The processor 1010 can be implemented in the form of a general-purpose CPU (Central Processing Unit), a microprocessor, an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits, etc., for executing related programs to implement the technical solutions provided by the present embodiment.

[0137] The memory 1020 can be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, etc. The memory 1020 can store an operating system and other application programs, and when the technical solutions provided by the present embodiment are implemented by software or firmware, the related program codes are stored in the memory 1020 and executed by the processor 1010.

[0138] The input / output interface 1030 is used to connect input / output modules to realize information input and output. The input / output modules can be configured as components in the device (not shown in the figure) or externally connected to the device to provide corresponding functions. The input devices can include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output devices can include a display, a speaker, a vibrator, an indicator light, etc.

[0139] The communication interface 1040 is configured to connect a communication module (not shown in the figure) to realize the communication interaction between the device and other devices. The communication module can realize communication through wired mode (such as USB, network cable, etc.), or can realize communication through wireless mode (such as mobile network, WIFI, Bluetooth, etc.).

[0140] The bus 1050 includes a path for transmitting information between various components (such as the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040) of the device.

[0141] It should be noted that although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040, and the bus 1050, in the specific implementation process, the device can also include other components necessary for normal operation. In addition, those skilled in the art can understand that the above device can also only contain the components necessary for the implementation of the embodiments of the present application, and does not have to contain all the components shown in the figure.

[0142] The electronic device of the above embodiment is used to implement the method for batch determining the leaf blade phenotypic traits in any of the above embodiments, and has the beneficial effects of the corresponding method embodiments, which are not described here.

[0143] Based on the same inventive concept, corresponding to the method of any of the above embodiments, the present application also provides a non-transitory computer readable storage medium, which stores computer instructions for causing the computer to execute the method for batch determining the leaf blade phenotypic traits according to any of the above embodiments.

[0144] The computer readable medium of the present embodiment includes permanent and non-permanent, removable and non-removable media, which can be realized by any method or technology to store information. The information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible by a computing device.

[0145] The storage medium of the above embodiments stores computer instructions for causing the computer to execute the method of batch determining blade phenotypic traits as described in any of the above embodiments, and has the beneficial effects of the corresponding method embodiments, which are not described here again.

[0146] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to suggest that the scope of the application (including the claims) is limited to these examples; the above embodiments or technical features among different embodiments can also be combined, steps can be implemented in any order, and there are many other variations of the aspects of the embodiments of the application as described above, which are not provided in detail in order to be brief. They are within the scope of the application.

[0147] In addition, in order to simplify the description and discussion, and so as not to make the embodiments of the application difficult to understand, the well-known power / ground connections of integrated circuit (IC) chips and other components can or can not be shown in the provided drawings. In addition, devices can be shown in block diagram form in order to avoid making the embodiments of the application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform to be implemented in the embodiments of the application (i.e., these details should be fully within the understanding of those skilled in the art). Where specific details (e.g., circuitry) are set forth in order to describe an illustrative embodiment of the application, it will be apparent to those skilled in the art that the embodiments of the application can be practiced without these specific details or with variations on these specific details. Therefore, these descriptions should be considered as illustrative rather than limiting.

[0148] Although the application has been described in conjunction with specific embodiments thereof, many alternatives, modifications and variations will be apparent to those skilled in the art in light of the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) can use the embodiments discussed.

[0149] The embodiments of the application are intended to cover all such alternatives, modifications and variations as falling within the broad scope of the appended claims. Accordingly, any omission, modification, equivalent replacement, improvement, etc. made within the spirit and principle of the embodiments of the application should be included in the protection scope of the application.

Claims

1. A method for batch determination of leaf phenotypic traits, characterized in that, include: Acquire an image containing at least two leaf regions to be tested; the image includes a background region and at least two leaf regions randomly distributed within the background region; The background area and the leaf area are different colors, and the leaf placement direction in the leaf area is random; The image is preprocessed to make the leaf region white and the background region black, resulting in a binarized image. In the binarized image, the pixels in the leaf region have a first value, and the pixels in the background region have a second value. The first value and the second value are different. By performing opening and closing operations on the binarized image using structuring elements of preset shape and size, image noise in the binarized image is removed and leaf damage in the leaf area is repaired to obtain the image to be tested. The pixel values ​​of the pixels in the image to be tested are scanned in a first preset order, and the pixels are marked so that the pixels have a marked value, thereby obtaining the coordinate information of the pixels of the outline of the blade to be tested and the coordinate information of the pixels inside the blade; wherein, the marked value of the pixels of the outline of the blade to be tested is different from the marked value of the pixels inside the blade; the marked values ​​of the pixels of the outline of at least two blades to be tested are all different, and the marked values ​​of the pixels inside the at least two blades to be tested are all different. Calculate the area, perimeter, length and width parameters of at least two blades to be tested in the second preset order. The calculation of the area and perimeter parameters of the blade to be tested includes: determining the first number of pixels of the outline of the blade to be tested, the second number of pixels inside the blade to be tested, and the sum of the first and second numbers based on the pixel marking values; obtaining the area parameter of the blade to be tested based on the sum and the area of ​​a single pixel in the image; and obtaining the perimeter parameter of the blade to be tested based on the first number and the length of a single pixel. The calculation of the length and width parameters of the blade to be tested includes: The coordinate information of each pixel of the blade profile is saved as a two-dimensional matrix and PCA analysis is performed so that the blade is placed in a vertical or horizontal direction to obtain the first profile of the blade in the vertical direction and the second profile of the blade in the horizontal direction. The length parameter of the blade to be tested is obtained by the difference between the maximum and minimum ordinates of the pixels of the first contour and the length of a single pixel; the width parameter of the blade to be tested is obtained by the difference between the maximum and minimum ordinates of the pixels of the second contour and the length of a single pixel. The leaves to be tested include at least two varieties, and each variety includes multiple types of leaves to be tested from multiple collection areas; the method further includes: The phenotypic differences among various leaf samples were analyzed by comparing the area, perimeter, width, and length parameters of multiple leaf samples for each variety. Compare the phenotypic difference analysis results of at least two varieties and output the variety with the smallest phenotypic difference.

2. The method for batch determination of leaf phenotypic traits according to claim 1, characterized in that, The step of scanning the pixel values ​​of the image to be tested in a first preset order, marking the pixels so that the pixels have marked values, and obtaining the coordinate information of the pixel points of the outline of the blade to be tested and the coordinate information of the internal pixels includes the following steps: The image to be tested is scanned in a first preset order, the first pixel with a first value is set as a first contour point, and the value of the first contour point is updated to a first marker value; the first marker value is greater than the first value. Taking the first contour point as the first center and the pixel closest to the first contour point in the first preset order as the first starting point, the pixel values ​​of the surrounding pixels of the first contour point are read in a clockwise direction, the surrounding pixels with the second value are set as the first outer point, the first surrounding pixel with the first value is set as the second contour point, and the value of the second contour point is updated to the first marker value. Using the second contour point as the second center and the first outer point closest to the second contour point in the clockwise direction as the second starting point, the pixel values ​​of the surrounding pixels of the second contour point are read in a clockwise direction. The surrounding pixels with the second value are set as the second outer point, and the surrounding pixels with the first value greater than or equal to the first value are set as the third contour point. Determine the value of the third contour point. When the value of the third contour point is the first mark value, determine the first contour point, the second contour point, and the third contour point as the contour points of the first blade to be tested. Read the pixel values ​​of surrounding pixels clockwise around the first contour point, update the values ​​of adjacent pixels with the first value to the second marker value, and take all pixels with the second marker value as the pixels inside the first blade to be tested; Scan the unrecognized areas in the image to be tested in the first preset order, and repeat the above steps to obtain the coordinate information of the pixel points of the outline of the remaining blade to be tested in the image to be tested and the coordinate information of the internal pixel points.

3. The method for batch determination of leaf phenotypic traits according to claim 2, characterized in that, The step of determining the value of the third contour point also includes... When the value of the third contour point is the first value, return to the step of taking the second contour point as the second center, take the third contour point as the updated second center, take the second external point closest to the third contour point as the updated second starting point, and obtain the updated third contour point, until the value of the updated third contour point is the first mark value, and determine the first contour point, the second contour point, the third contour point and the updated third contour point as the contour points of the first blade to be tested.

4. The method for batch determination of leaf phenotypic traits according to claim 1, characterized in that, The preset shape is a symmetrical rectangle or cross; the preset size is greater than or equal to the diameter of the image noise and less than or equal to the average pixel width of the petiole of the leaf to be tested.

5. The method for batch determination of leaf phenotypic traits according to claim 1, characterized in that, The preset shape is a symmetrical rectangle or cross; the preset size is smaller than the average pixel width of the petiole of the leaf to be tested, and smaller than the diameter width of the image noise. The method further includes identifying the blade under test as image noise when the area of ​​the blade under test is less than the minimum estimated value of the area of ​​the blade under test.

6. The method for batch determination of leaf phenotypic traits according to claim 1, characterized in that, The preprocessing of the image to make the leaf region white and the background region black, resulting in a binarized image, includes: Extract the blue component image of the leaf and convert the image to grayscale to obtain a grayscale image; The grayscale image is binarized according to a preset grayscale threshold, so that the pixels in the leaf region have a first value and the pixels in the background region have a second value; and the pixels in the leaf region are made white and the pixels in the background region are made black, thus obtaining a binarized image.

7. An apparatus for batch determination of leaf phenotypic traits, used to implement the method for batch determination of leaf phenotypic traits according to any one of claims 1 to 6, characterized in that, include: An image acquisition module is used to acquire images containing at least two leaves to be tested; the images include a background area and at least two leaf areas randomly distributed in the background area; The background area and the leaf area are different colors, and the leaf placement direction in the leaf area is random; A preprocessing module is used to preprocess the image to make the leaf region white and the background region black, resulting in a binarized image; in the binarized image, the pixels in the leaf region have a first value, and the pixels in the background region have a second value; the first value and the second value are different. The image processing module is used to perform opening and closing operations on the binarized image using structuring elements of preset shape and preset size, so as to remove image noise in the binarized image and repair leaf damage in the leaf area to obtain the image under test. The recognition module is used to scan the pixel values ​​of the pixels in the image to be tested according to a first preset order, and mark the pixels so that the pixels have a marked value, thereby obtaining the coordinate information of the pixels of the outline of the blade to be tested and the coordinate information of the pixels inside the blade; wherein, the marked values ​​of the pixels of the outline of the blade to be tested are different from the marked values ​​of the pixels inside the blade; the marked values ​​of the pixels of the outline of at least two blades to be tested are all different, and the marked values ​​of the pixels inside the at least two blades to be tested are all different; The calculation module is used to calculate the area parameters, perimeter parameters, length parameters and width parameters of at least two blades to be tested in a second preset order. The difference analysis module is used to compare the area, perimeter, width, and length parameters of multiple test leaves of each variety, and to analyze the phenotypic differences of multiple test leaves. Compare the phenotypic difference analysis results of multiple varieties and output the variety with the smallest phenotypic difference; The calculation of the area and perimeter parameters of the blade to be tested includes: determining the first number of pixels of the outline of the blade to be tested, the second number of pixels inside the blade to be tested, and the sum of the first and second numbers based on the pixel marking values; obtaining the area parameter of the blade to be tested based on the sum and the area of ​​a single pixel in the image; and obtaining the perimeter parameter of the blade to be tested based on the first number and the length of a single pixel. The calculation of the length and width parameters of the blade to be tested includes: The coordinate information of each pixel of the blade profile is saved as a two-dimensional matrix and PCA analysis is performed so that the blade is placed in a vertical or horizontal direction to obtain the first profile of the blade in the vertical direction and the second profile of the blade in the horizontal direction. The length parameter of the blade to be tested is obtained by the difference between the maximum and minimum ordinates of the pixels of the first contour and the length of a single pixel; the width parameter of the blade to be tested is obtained by the difference between the maximum and minimum ordinates of the pixels of the second contour and the length of a single pixel. The leaves to be tested include at least two varieties, and each variety includes multiple types of leaves to be tested from multiple collection areas. It also includes the ability to compare the area, perimeter, width, and length parameters of multiple test leaves for each variety, and to analyze the phenotypic differences among the multiple test leaves. Compare the phenotypic difference analysis results of multiple varieties and output the variety with the smallest phenotypic difference.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the program to implement the method as claimed in any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the method of any one of claims 1 to 6.

Citation Information

Patent Citations

  • Threshing quality evaluation method for dense tobacco leaf recognition and system thereof

    CN112704259A

  • Tea tree leaf image extraction method and device, equipment and storage medium

    CN114299097A