Plant leaf appearance character detection method and system
By using reference planes of known sizes and European distance methods, the appearance trait detection of plant leaves is simplified, the problems of low efficiency and high cost in the prior art are solved, and efficient and non-destructive leaf size and chromaticity detection are achieved. Suitable for non-professional equipment.
Patent Information
- Application Number
- CN202411352681.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-09-26
AI Technical Summary
The prior art has low efficiency in the detection of plant leaf appearance traits, large measurement errors, traditional methods consume time and effort, making it difficult to achieve large-scale leaf measurements, and leaf color information detection methods are highly destructive, costly, and have limited scope of application.
Using a reference plane of known size as the calculation reference standard, the blade size and area are obtained through image processing technology, and the chromaticity information of the blade is determined using the European distance, eugeneous distance, and the steps of manually distinguishing the blade position or selecting the blade profile are eliminated, and the image processing algorithm is simplified to make it Can run on low-computer hardware devices.
It improves detection efficiency, reduces computing power requirements, and realizes non-destructive leaf color information detection. It is suitable for non-professional hardware equipment, with a wide range of application and low cost, and is suitable for daily use and promotion.
Smart Images

Figure CN119205702A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of plant feature recognition, and in particular to a method and system for detecting appearance traits of plant leaves. Background Art
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] Leaves are the main organs of plants for photosynthesis. By obtaining the appearance characteristics of plant leaves, we can help understand important information such as the plant canopy structure, leaf nutrition and health status, as well as the leaf maturity and quality of some plants that use leaves as harvested organs. This helps to guide scientific cultivation management measures such as reasonable density layout and nutrient supply, and can further be used for yield and quality prediction.
[0004] For leaf shape detection in leaf appearance trait detection, the more primitive and traditional methods are leaf area coefficient method (manually measure leaf length and leaf width, and calculate the leaf area according to the formula "maximum leaf length * maximum leaf width * leaf area coefficient"), shape tracing and number grid method (spread the leaf to be tested on graph paper, trace the leaf shape along the leaf edge, and obtain the leaf shape data by counting the number of occupied squares), shape tracing and weighing method (on a specific coordinate paper, trace the outline of the leaf to be tested and cut the coordinate paper according to the leaf shape, weigh the leaf shape coordinate paper, and calculate the leaf area according to the formula), punching and weighing method (use a hole puncher to punch holes in the leaf, dry the punched part and the remaining leaf separately to constant weight, and calculate the leaf area according to the weight ratio).
[0005] Traditional methods are time-consuming, labor-intensive, and inefficient, and it is difficult to measure the leaf area of a large number of leaves; manual measurement of leaf length and width usually results in significant measurement errors and is not accurate enough. When calculating leaf area using the leaf area coefficient, subjective human judgment of the position of the maximum leaf length and width can easily lead to measurement errors, making it difficult to apply to leaves with complex leaf shapes; the shape-tracing weighing method and the shape-tracing grid method require the preparation of specific coordinate paper or grid paper, and the measurement steps are cumbersome. The leaf edges are complex and the errors are large, making it difficult to measure leaves with a larger area; the punching weighing method requires the destruction of the leaves, which is not conducive to subsequent processing and analysis of the leaves; the shape-tracing weighing method and the punching weighing method cannot measure leaf length and width.
[0006] The method of calculating leaf area using image processing software is as follows: after obtaining the digital image of the leaf, the leaf shape data is obtained according to the pixel ratio of the leaf in the image to the reference object through steps such as image geometric correction, binarization, and pixel extraction;
[0007] Professional leaf analysis software: such as LA-S plant image analyzer system and QT-LS02 plant leaf analysis system, equipped with scanner, leaf area analysis software, backlight device, etc., connected to computer configuration software to obtain relevant data.
[0008] Blade measurement mobile phone software: (such as Digital Chart APP) By placing the blade in the effective area of a specific background plate, using positioning markers and marking the blades, the blade geometric parameters are measured.
[0009] The products include different types of leaf area meters, such as the portable laser leaf area meter CI-202, handheld leaf area meter, etc. The leaf is clamped between the measuring arms or placed on the measuring board, and the leaf length, leaf width and leaf area are automatically measured through instrument scanning.
[0010] The method of using image processing software (even relatively professional blade analysis software) requires a series of operations on the image, which requires strong professional knowledge and technical requirements. It is applicable to a limited group of people and is difficult to promote and apply.
[0011] Current mobile phone software for leaf measurement often requires a fixed background board. When the leaf area exceeds the positioning mark position of the background board, the leaf cannot be measured through the software. At the same time, positioning marks and manual leaf marks are also required during measurement. Photos often need to be corrected and cropped, and the measurement steps are relatively cumbersome.
[0012] Leaf area meters are expensive and are usually only used for scientific research. They require certain instrument operation capabilities and are limited in work efficiency due to the number of instruments. They are not suitable for the general public and for actual promotion and application. They are usually suitable for small leaves, but not for large leaves and are not suitable for actual production promotion and application. The data batch reading, storage and output functions need to be improved.
[0013] For the detection of leaf color information in the detection of leaf appearance traits, the traditional method is to make subjective judgments or to detect based on color cards; or to use laboratory chemical analysis and measurement methods, by destructively treating leaves and extracting pigments, with the help of experimental instruments (such as spectrophotometers, liquid chromatographs, etc.), to detect the pigment content to determine the leaf color information; chemical analysis methods are destructive to the collected leaf samples, so they are generally suitable for scientific research institutes or specialized institutions. Although non-destructive methods can use image processing software, using the red (R), green (G), and blue (B) values of the leaves extracted from the image, and constructing color feature parameters through calculation and combination to obtain results, or through a spectrometer, using the reflection, transmission, or emission spectrum of the leaves to light, according to the existing or newly established mathematical relationship model between the spectrum and the pigment, the processed spectral data is converted into the pigment content.
[0014] The visual method is highly subjective and has a low degree of quantification, making it difficult to achieve scientific and detailed quantitative evaluation. The laboratory chemical analysis measurement method is a destructive detection method that will cause permanent damage to the leaf samples and is not suitable for rapid acquisition of test results. The image analysis method requires the pre-design of an algorithm model and relies on a large amount of data training, which is costly. In the method using a spectrometer, the spectral characteristics of leaves from different plants, different growth stages, and even different locations may usually differ. The quantitative mathematical relationship model between the spectrum and the pigment is often specific, and the measurement conditions will also affect the measurement results. A sufficient number of data sets are required for targeted modeling. In addition, the instrument is expensive and the cost is too high, so it is usually limited to scientific research exploration and application. Summary of the invention
[0015] In order to solve the technical problems existing in the above-mentioned background technology, the present invention provides a method and system for detecting the appearance characteristics of plant leaves, which uses a reference plane of known size as a calculation basis to obtain the size and area of the leaves, eliminating the steps of manually distinguishing the leaf positions or selecting the leaf contours, so that the image processing part can be installed in hardware devices with lower computing power.
[0016] In order to achieve the above object, the present invention adopts the following technical solution:
[0017] A first aspect of the present invention provides a method for detecting plant leaf appearance traits, comprising the following steps:
[0018] In the same field of view, the edge shape of the reference plane is used to perform image correction;
[0019] Obtain image information containing the reference plane and the blade to be measured and perform color space conversion, use the set color space range to distinguish the reference plane and the blade, and extract the blade contour in the image;
[0020] Determine the relationship between the size of the reference plane in the image and the number of pixels corresponding to the reference plane, and obtain the leaf width and leaf length according to the number of pixels of the length and width of the minimum circumscribed rectangular frame of the leaf outline;
[0021] A mask is created according to the set color space range and the image is binarized to determine the ratio of the number of pixels of the leaf contour to the number of pixels of the reference plane contour, and the leaf area is calculated according to the area of the reference plane;
[0022] The Euclidean distance between the color of the leaf to be tested in the image and each color in the colorimetric card list is calculated, and the results are sorted. The color corresponding to the minimum Euclidean distance in the colorimetric card list is used as the relative chromaticity information of the leaf to be tested.
[0023] Furthermore, within the same field of view, image correction is performed using the edge shape of the reference plane, including the following steps:
[0024] A transparent plate with a certain weight is used to cover the blade to be tested, so that the blade to be tested is spread out on a horizontal plane;
[0025] Place the blade to be measured and a reference plane with known dimensions on a flat surface and place them within the shooting range at the same time;
[0026] In the field of view of the image, the blade to be measured and the reference plane are simultaneously displayed in the image correction frame;
[0027] By adjusting the shooting angle, when the edge of the reference plane is parallel to the edge of the image correction frame, the correction is completed.
[0028] Furthermore, image information including the reference plane and the blade to be measured is obtained and color space conversion is performed, specifically: the obtained image is converted into the HSV color space.
[0029] Furthermore, the reference plane and the leaves are distinguished by using the set color space range, and the leaf contour in the image is extracted. Specifically, the image is processed using the interval range of the leaf color saturation in the HSV color space to distinguish the reference plane and the leaves. The boundary between the reference plane and the leaves is the leaf contour.
[0030] Furthermore, the relationship between the size of the reference plane in the image and the number of pixels corresponding to the reference plane is determined, and the leaf width and leaf length of the leaf are obtained according to the number of pixels of length and width of the minimum circumscribed rectangular border of the leaf contour. Specifically, the number of pixels of length and width of the minimum circumscribed rectangular border of the leaf contour is determined, and according to the length and width of the reference plane and the number of pixels of length and width of the minimum circumscribed rectangular border, the length and width of the rectangular border in the image are calculated, which is the leaf width and leaf length of the leaf.
[0031] Furthermore, a mask is created according to the set color space range and the image is binarized to determine the ratio of the number of pixels of the leaf contour to the number of pixels of the reference plane contour. The leaf area is calculated according to the area of the reference plane, specifically:
[0032] A mask is created using the range of the leaf to be tested in the HSV color space, and binarized, and morphological operations are used to remove noise and fill gaps;
[0033] By searching for contours and traversing all contours, the number of pixels of the contour with the largest area and the number of pixels of the contour with the largest reference plane area are determined, and the ratio between the two is further determined. The leaf area is calculated in combination with the reference plane area.
[0034] Furthermore, the function for calculating the Euclidean distance is shown below:
[0035] Euclidean distance = √((r2-r1) 2 +(g2-g1)2 +(b2-b1) 2 );
[0036] Among them, r1, g1, b1 and r2, g2, b2 are the RGB values of the two colors respectively.
[0037] Furthermore, the Euclidean distance between the color of the leaf to be tested in the image and each color in the colorimetric card list is calculated, and the obtained results are sorted, specifically: the obtained results are arranged in ascending order.
[0038] Furthermore, the color corresponding to the minimum Euclidean distance in the colorimetric card list is used as the relative chromaticity information of the leaf to be tested. Specifically, according to the serial number of the closest color, its neighbor color is determined, and the distance between the neighbor color and the target color is determined based on the interpolation method to calculate the score, and the color similarity score is obtained, and the most similar color is used as the relative chromaticity information of the leaf.
[0039] A second aspect of the present invention provides a plant leaf appearance trait detection system, comprising:
[0040] The image correction and extraction module is configured to: perform image correction using the edge shape of the reference plane within the same field of view, and obtain image information including the reference plane and the blade to be measured;
[0041] The leaf contour extraction module is configured to: perform color space conversion on the obtained image information, distinguish the reference plane and the leaf using a set color space range, and extract the leaf contour in the image;
[0042] The leaf size extraction module is configured to: determine the relationship between the size of the reference plane in the image and the number of pixels corresponding to the reference plane, and obtain the leaf width and leaf length of the leaf according to the number of length and width pixels of the minimum circumscribed rectangular frame of the leaf outline;
[0043] The leaf area extraction module is configured to: create a mask according to a set color space range and binarize the image, determine the ratio of the number of leaf contour pixels to the number of reference plane contour pixels, and calculate the leaf area according to the reference plane area;
[0044] The leaf chromaticity extraction module is configured to: calculate the Euclidean distance between the color of the leaf to be tested in the image and each color in the color comparison card list, sort the results, and use the color corresponding to the minimum Euclidean distance in the color comparison card list as the relative chromaticity information of the leaf to be tested.
[0045] Compared with the prior art, one or more of the above technical solutions have the following beneficial effects:
[0046] 1. Using a reference plane of known size as the reference size, the size and area of the leaf can be inferred by calculating the relationship between the number of pixels and the size of the reference plane. This method is more efficient than traditional methods. Compared with existing image processing algorithms, it eliminates the steps of manually distinguishing the position of leaves or selecting the contour of leaves, reduces computing power requirements, and can be installed on non-professional hardware devices such as mobile phones. It is fast, convenient and easy to promote.
[0047] 2. Using Euclidean distance as the benchmark to determine the chromaticity information of leaves will not cause damage to the leaves, and the judgment basis is more objective. It does not rely on the mathematical relationship model between spectrum and pigment, and is fast, convenient and easy to promote.
[0048] 3. The choice of reference plane is not limited to a specific type. Any plane object of known size, such as common A4 paper, notebooks, etc., can be used, making the method more conducive to daily use by non-professionals and easy to promote. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0050] Figure 1 It is a schematic diagram of a process for detecting plant leaf appearance traits provided by one or more embodiments of the present invention. DETAILED DESCRIPTION
[0051] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0052] It should be noted that the following detailed descriptions are exemplary and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0053] It should be noted that the terms herein are only intended to describe specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0054] Terminology explanation:
[0055] Leaf appearance traits refer to parameters such as leaf shape and leaf size, which reflect the appearance of the leaf. For example:
[0056] Blade shape:
[0057] Basic shape: The shapes of leaves vary, the most common ones are scale-shaped, strip-shaped, thorn-shaped, needle-shaped, cone-shaped, lanceolate, spoon-shaped, ovate, oblong, diamond-shaped, heart-shaped, kidney-shaped, elliptical, triangular, circular, fan-shaped, sword-shaped, etc. These shapes can be distinguished by the length-to-width ratio and the position of the widest point.
[0058] Leaf tip: The shape of the top of the leaf, such as slightly convex, convex head, tail tip, gradually pointed, abruptly pointed, slightly concave, sharp tip, inverted heart shape, etc., describes the specific shape and characteristics of the leaf tip.
[0059] Leaf base: About 1 / 3 of the leaf blade close to the tip of the stem, its shape may be decurrent, gradually narrowing, wedge-shaped, truncated, rounded, earlobe-shaped, shield-shaped, fused through the stem, arrow-shaped, halberd-shaped, etc., reflecting the growth pattern and shape of the base of the leaf blade.
[0060] Leaf margin: The edge morphology of the leaf, such as entire, serrate, doubly serrate, blunt-toothed, toothed, wavy edge, notched, etc., describes the smoothness or tooth-like characteristics of the leaf edge.
[0061] Leaf size, length and width: The length and width of a leaf are the basic parameters for describing its size, usually measured in centimeters. The leaf sizes of different plants vary greatly, from tiny scale-like leaves to huge lotus leaves.
[0062] Leaf Texture and Color:
[0063] Texture: The texture of the leaves can be thick and solid or thin and soft, depending on the plant species and ecological environment.
[0064] Color: The leaves are mostly green, but there are also variations such as red, yellow, and purple. The top of the leaves are usually darker and more shiny than the back.
[0065] Blade surface features:
[0066] Hairs: Some plants have various hairs on both sides of their leaves or only on the back side, such as soft hairs, downy hairs, stiff hairs, prickly hairs, scaly hairs, or branched star-shaped hairs radiating in all directions.
[0067] Veins: Veins of different sizes are distributed in the leaves, which are crucial for the support and conduction of the leaves. The main vein is usually distributed along the central longitudinal axis of the leaf, and the lateral veins extend from the main vein to both sides, forming a network or parallel shape.
[0068] The growth patterns of leaves include along the length of the stem, hugging the length of the stem, passing through the middle, with sheaths, alternate, opposite, and whorled.
[0069] As introduced in the background technology, traditional methods for detecting the appearance characteristics of plant leaves are inefficient. Some image recognition technologies that use computer resources require the preliminary design of algorithm models and a large amount of training data as support. The initial investment cost is high, and some detection equipment is too professional and not suitable for rapid detection and promotion.
[0070] Therefore, the following embodiments provide a method and system for detecting the appearance characteristics of plant leaves, which uses a reference plane of known size as a calculation basis to obtain the size and area of the leaves, simplify the image processing algorithm, and eliminate the steps of manually distinguishing the position of leaves or selecting the contour of leaves, so that the image processing part can be installed in hardware devices with lower computing power.
[0071] Embodiment 1:
[0072] like Figure 1 As shown, the method for detecting the appearance characteristics of plant leaves comprises the following steps:
[0073] In the same field of view, the edge shape of the reference plane is used to perform image correction;
[0074] Obtain image information containing the reference plane and the blade to be measured and perform color space conversion, distinguish the reference plane and the blade using the set color space range, and extract the blade contour in the image;
[0075] Determine the relationship between the size of the reference plane in the image and the number of pixels corresponding to the reference plane, and obtain the leaf width and leaf length according to the number of pixels of the length and width of the minimum circumscribed rectangular frame of the leaf outline;
[0076] A mask is created according to the set color space range and the image is binarized to determine the ratio of the number of pixels of the leaf contour to the number of pixels of the reference plane contour, and the leaf area is calculated according to the area of the reference plane;
[0077] The Euclidean distance between the color of the leaf to be tested in the image and each color in the colorimetric card list is calculated, and the results are sorted. The color corresponding to the minimum Euclidean distance in the colorimetric card list is used as the relative chromaticity information of the leaf to be tested.
[0078] In this embodiment, a mobile phone is used as a hardware device for image acquisition to obtain image information of the blade to be measured. It should be noted that this embodiment does not limit the specific type of hardware device, and can be any hardware device with image acquisition, photo taking or video recording functions.
[0079] The specific steps of image acquisition are:
[0080] (1) By adjusting the lens so that it is visually parallel to the shooting surface, a red image correction frame is displayed on the image acquisition interface.
[0081] (2) A transparent plate with a certain weight is used to cover the blade so that the blade is spread out on the background plate; the blade to be measured and a reference plane of any size are placed on a flat plane and placed within the shooting range at the same time; within the shooting area, the blade and the reference plane are simultaneously displayed in the image correction frame; in this embodiment, the reference plane of "any size" refers to a reference plane whose area and size can be measured, so that the size information of the blade is determined based on the reference plane.
[0082] (3) Adjust the shooting angle. When the four sides of the reference plane are parallel to the four sides of the image correction frame, the correction frame turns green, indicating that the shooting lens is completely parallel to the plane where the leaf is located. Execute the photo to obtain the image of the leaf to be measured.
[0083] In this embodiment, the transparent plate can be made of glass, PVC, acrylic and other materials. The area of the transparent plate is not limited and can be larger or smaller than the blade area. It only needs to hold down the key position where the blade cannot unfold naturally and allow the blade to unfold flatly.
[0084] In this embodiment, the reference plane can be a standard size paper such as A4 paper, B5 paper, or other regular rectangular paper or flat reference plane with clear dimensions, and the color is not limited, and a single color that can be distinguished from the leaves is sufficient. The shape of the reference plane is consistent with the properties of the correction frame, and a rectangle is generally selected.
[0085] In this embodiment, the blades and the background plate can overlap, but their complete edge contours must be exposed; if the blades are smaller than the background plate, they can be placed on the background plate; if the background plate is smaller than the blades, the background plate can also be placed on the blades.
[0086] The acquired image is judged to distinguish the background plate and the leaves, including the following steps:
[0087] Convert the obtained image from BGR color space to HSV color space;
[0088] Define the range of green (leaf color) in the HSV space, use the defined range to distinguish the background plate and the leaves, and extract the leaf contour in the image.
[0089] In this embodiment, HSV is a color space created based on the intuitive characteristics of color, and the color parameters are hue (H), saturation (S) and lightness (V). Hue (H) is measured by angle, with a value range of 0-180°, starting from red and calculated in a counterclockwise direction, and green is 35-77°; saturation (S) indicates the degree to which the color is close to the spectral color, and green is 43-255%; lightness (V) indicates the brightness of the color, and green is 46-255%.
[0090] After extracting the leaf outline, determine the length and width of the minimum circumscribed rectangular frame of the leaf outline in pixels, and calculate the leaf width and length of the leaf in the image based on the length and width of the background board and the length and width of the minimum circumscribed rectangular frame in pixels.
[0091] Since the length and width of the background plate are known, the length and width of the rectangular frame corresponding to the leaf outline can be inferred based on the relationship between the length and width of the background plate and the number of pixels in the image.
[0092] Create a mask using the range of green (leaf color) in HSV space, perform binarization, and use morphological operations to remove noise and fill gaps;
[0093] By searching for contours and traversing all contours, the number of pixels of the contour with the largest area is found, and the number of pixels of the contour with the largest area of the background plate is found in the same way; this embodiment searches for contours on the background plate to obtain contours of the leaf surface and the leaf surface texture, veins, etc., and the contour with the largest area is the area corresponding to the leaf surface, thereby removing the interference caused by the leaf surface texture and vein contours;
[0094] Determine the ratio of the number of leaf pixels to the number of background pixels, and calculate the leaf area based on the known background area.
[0095] Calculating the relative chromaticity of leaves according to the color chart includes the following steps:
[0096] (1) Define the Euclidean distance and use the function to calculate the Euclidean distance between two colors (RGB values);
[0097] In this embodiment, Euclidean distance = √((r2-r1) 2 +(g2-g1) 2 +(b2-b1) 2 )
[0098] Among them, (r1, g1, b1) and (r2, g2, b2) are the RGB values of two colors respectively.
[0099] (2) Calculate the distance between the target color (the color of the current leaf to be tested) and each color in the colorimetric card list. For a given colorimetric card color list, use the function in step (1) to calculate the Euclidean distance between the target color and each color in the list.
[0100] (3) Sort the obtained colors and their distances from small to large, and select the first few colors closest to the target color;
[0101] (4) Based on the sequence number of the closest color, find its neighbor colors and use the interpolation formula to calculate the scores based on their distance from the target color;
[0102] (5) Output the result and return the color similarity score calculated in step (4).
[0103] Data output and export.
[0104] After data processing is completed, for a single image, the maximum length, maximum width, leaf area and relative chromaticity of the leaf in the image are directly displayed;
[0105] For multiple consecutive photos, the maximum leaf length, maximum width, leaf area and relative chromaticity are displayed in a table in the order of the photos.
[0106] The overall process of the above method is simple. A reference plane of known size is used as the reference size. The size and area of the leaf are deduced by calculating the relationship between the number of pixels and the size of the reference plane. Compared with traditional methods, the above method is more efficient. Compared with existing image processing algorithms, the algorithm flow is simpler, eliminating the steps of manually distinguishing the leaf position or selecting the leaf contour, reducing the computing power requirements, and can be carried on non-professional hardware devices such as mobile phones. It is quick, convenient and easy to promote.
[0107] Using Euclidean distance as a benchmark to determine the chromaticity information of leaves will not cause damage to the leaves, and the judgment basis is more objective. It does not rely on the mathematical relationship model between spectrum and pigment, and is quick, convenient and easy to promote.
[0108] The choice of reference plane is not limited to a specific type, and any plane object of known size, such as common A4 paper, notebooks, etc., can be used, so that the method as a whole is more conducive to daily use by non-professionals and easy to promote.
[0109] Embodiment 2:
[0110] Plant leaf appearance trait detection system, including:
[0111] The image correction and extraction module is configured to: perform image correction using the edge shape of the reference plane within the same field of view, and obtain image information including the reference plane and the blade to be measured;
[0112] The leaf contour extraction module is configured to: perform color space conversion on the obtained image information, distinguish the reference plane and the leaf using a set color space range, and extract the leaf contour in the image;
[0113] The leaf size extraction module is configured to: determine the relationship between the size of the reference plane in the image and the number of pixels corresponding to the reference plane, and obtain the leaf width and leaf length of the leaf according to the number of length and width pixels of the minimum circumscribed rectangular frame of the leaf outline;
[0114] The leaf area extraction module is configured to: create a mask according to a set color space range and binarize the image, determine the ratio of the number of leaf contour pixels to the number of reference plane contour pixels, and calculate the leaf area according to the area of the reference plane;
[0115] The leaf chromaticity extraction module is configured to: calculate the Euclidean distance between the color of the leaf to be tested in the image and each color in the color comparison card list, sort the results, and use the color corresponding to the minimum Euclidean distance in the color comparison card list as the relative chromaticity information of the leaf to be tested.
[0116] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for detecting plant leaf appearance traits, characterized in that: The steps include: In the same field of view, the edge shape of the reference plane is used to perform image correction; Obtain image information containing the reference plane and the blade to be measured and perform color space conversion, use the set color space range to distinguish the reference plane and the blade, and extract the blade contour in the image; Determine the relationship between the size of the reference plane in the image and the number of pixels corresponding to the reference plane, and obtain the leaf width and leaf length according to the number of pixels of the length and width of the minimum circumscribed rectangular frame of the leaf outline; A mask is created according to the set color space range and the image is binarized to determine the ratio of the number of pixels of the leaf contour to the number of pixels of the reference plane contour, and the leaf area is calculated according to the area of the reference plane; The Euclidean distance between the color of the leaf to be tested in the image and each color in the colorimetric card list is calculated, and the results are sorted. The color corresponding to the minimum Euclidean distance in the colorimetric card list is used as the relative chromaticity information of the leaf to be tested.
2. The method for detecting plant leaf appearance traits according to claim 1, characterized in that: In the same field of view, image correction is performed using the edge shape of the reference plane, including the following steps: A transparent plate with a certain weight is used to cover the blade to be tested, so that the blade to be tested is spread out flat on the background plate; Place the blade to be measured and a reference plane with known dimensions on a flat surface and place them within the shooting range at the same time; In the field of view of the image, the blade to be measured and the reference plane are simultaneously displayed in the image correction frame; By adjusting the shooting angle, when the edge of the reference plane is parallel to the edge of the image correction frame, the correction is completed.
3. The method for detecting plant leaf appearance traits according to claim 1, characterized in that: Image information including the reference plane and the blade to be measured is obtained and color space conversion is performed, specifically: the obtained image is converted into the HSV color space.
4. The method for detecting plant leaf appearance traits according to claim 1, characterized in that: The reference plane and the leaves are distinguished by using the set color space range, and the leaf contour in the image is extracted. Specifically, the image is processed using the interval range of the leaf color saturation in the HSV color space to distinguish the reference plane and the leaves. The boundary between the reference plane and the leaves is the leaf contour.
5. The method for detecting plant leaf appearance traits according to claim 1, characterized in that: Determine the relationship between the size of the reference plane in the image and the number of pixels corresponding to the reference plane, and obtain the leaf width and leaf length according to the number of pixels of length and width of the minimum circumscribed rectangular frame of the leaf contour. Specifically, determine the number of pixels of length and width of the minimum circumscribed rectangular frame of the leaf contour, and calculate the length and width of the rectangular frame in the image according to the length and width of the reference plane and the number of pixels of length and width of the minimum circumscribed rectangular frame, which is the leaf width and leaf length of the leaf.
6. The method for detecting plant leaf appearance traits according to claim 1, characterized in that: Create a mask according to the set color space range and binarize the image to determine the ratio of the number of leaf contour pixels to the number of reference plane contour pixels. Calculate the leaf area based on the reference plane area, as follows: A mask is created using the range of the leaf to be tested in the HSV color space, and binarized, and morphological operations are used to remove noise and fill gaps; By searching for contours and traversing all contours, the number of pixels of the contour with the largest area and the number of pixels of the contour with the largest area on the reference plane are determined, and the ratio between the two is further determined. The leaf area is calculated in combination with the area of the reference plane.
7. The method for detecting plant leaf appearance traits according to claim 1, characterized in that: The function for calculating the Euclidean distance is shown below: Euclidean distance = √((r2-r1) 2 +(g2-g1) 2 +(b2-b1) 2 ); Among them, r1, g1, b1 and r2, g2, b2 are the RGB values of the two colors respectively.
8. The method for detecting plant leaf appearance traits according to claim 1, characterized in that: The Euclidean distance between the color of the leaf to be tested in the image and each color in the colorimetric card list is calculated, and the obtained results are sorted. Specifically, the obtained results are arranged in ascending order.
9. The method for detecting plant leaf appearance traits according to claim 1, characterized in that: The color corresponding to the minimum Euclidean distance in the color comparison card list is used as the relative chromaticity information of the leaf to be tested. Specifically, according to the serial number of the closest color, its neighbor color is determined, and the distance between the neighbor color and the target color is determined based on the interpolation method to calculate the score, and the color similarity score is obtained. The most similar color is used as the relative chromaticity information of the leaf.
10. A plant leaf appearance trait detection system, characterized in that: include: The image correction and extraction module is configured to: perform image correction using the edge shape of the reference plane within the same field of view, and obtain image information including the reference plane and the blade to be measured; The leaf contour extraction module is configured to: perform color space conversion on the obtained image information, distinguish the reference plane and the leaf using a set color space range, and extract the leaf contour in the image; The leaf size extraction module is configured to: determine the relationship between the size of the reference plane in the image and the number of pixels corresponding to the reference plane, and obtain the leaf width and leaf length of the leaf according to the number of length and width pixels of the minimum circumscribed rectangular frame of the leaf outline; The leaf area extraction module is configured to: create a mask according to a set color space range and binarize the image, determine the ratio of the number of leaf contour pixels to the number of reference plane contour pixels, and calculate the leaf area according to the area of the reference plane; The leaf chromaticity extraction module is configured to: calculate the Euclidean distance between the color of the leaf to be tested in the image and each color in the color comparison card list, sort the results, and use the color corresponding to the minimum Euclidean distance in the color comparison card list as the relative chromaticity information of the leaf to be tested.
Citation Information
Patent Citations
Plant leaf identification system and method based on deep learning
CN106599925A
Cotton leaf blight detection method and system based on color features and superpixel clustering
CN113298777A
Flue-cured tobacco virus tracing method, medium and system
CN117314908A
System and method for effectively performing a white balance operation
US20020131635A1
Outputting gray color values in color-managed CMYK to CMYK color conversions based on input gray color values
US20110109943A1
Cited By
A computer vision-based method for high-throughput extraction, segmentation and functional trait inversion of plant leaf multi-dimensional phenotypes
CN122335827B
