Leaf area image measurement method based on saturation segmentation

Through methods based on saturation segmentation and perspective distortion correction, the stability problem of leaf area measurement in low light and complex environments with existing technology is solved, and accurate leaf area extraction under low light and tilted shooting is achieved, which is suitable for complex applications. Shooting environment, low cost and simple operation.

CN112435290BInactive Publication Date: 2024-09-27NANJING FORESTRY UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011051069.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-29
Publication Date
2024-09-27
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing leaf area measurement methods based on image processing are difficult to stably extract leaf areas under low light, uneven light and complex shooting environments, and are not suitable for tilted shooting.

Method used

Using a saturation-based segmentation method, the image is segmented in the HSI color space through perspective distortion correction and hybrid threshold methods. It combines connected domain analysis and shape feature extraction to count the area of ​​the leaf area, adapting to low-light and oblique shooting environments.

Benefits of technology

It can stably extract leaf areas under low illumination and uneven illumination conditions. It is suitable for oblique shooting within a certain angle range. It has low cost, simple operation and is adaptable to complex shooting environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112435290B
    Figure CN112435290B
Patent Text Reader

Abstract

The present invention provides a leaf area image measurement method based on saturation segmentation, the method comprising the following steps: S1, shooting a leaf image and sending it to a processor; S2, the processor performs the following operations, and performs perspective distortion correction on the leaf image according to the coordinates of a rectangular calibration frame on the leaf image background; S3, transforming the image pixels after perspective distortion correction from an RGB color space to an HSI color space, and performing threshold segmentation on the saturation component of the image using a mixed threshold method; S4, performing connected domain analysis on the segmented binary image, extracting shape features to distinguish between a leaf area and a standard block area, and counting the ratio of the number of pixels in the leaf area to the number of pixels in the standard block area, and obtaining the actual area of ​​the leaf according to the actual area of ​​the standard block. The present invention has low cost, is easy to operate, and can adapt to complex shooting environments such as low light, uneven light, and tilted shooting.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of leaf area measurement, in particular to leaf area measurement based on image processing, specifically to a leaf area measurement method for leaf segmentation using image saturation. Background Art

[0002] Leaves are the main part of crop production for organic nutrients and photosynthesis. Their size is an important indicator for measuring crop growth and yield, and is also the main basis for crop disease and pest detection and cultivation management. Therefore, quickly and accurately measuring plant leaf area is of great significance in modern agricultural production.

[0003] Traditional leaf area measurement methods include the grid method, copy weighing method, regression equation method, and leaf area meter measurement method. The grid method and copy weighing method have high accuracy, but are complicated to operate. The regression equation method is simple to operate, but the accuracy is not high, and the leaf area meter is expensive. With the development of computer technology, leaf area measurement methods based on image processing have developed rapidly and are widely used in leaf area measurement of crops such as rice, wheat, and corn, as well as leaf area measurement of economic forests. In recent years, researchers have combined leaf area image measurement methods with smartphones, which have the advantages of flexible measurement methods, accurate and fast, simple operation, and easy to carry.

[0004] Segmenting leaves from an image is a key step in leaf area measurement. Existing methods mainly adopt the following two methods: (1) extracting leaf areas by detecting green pixels in color spaces such as RGB and YCbCr; (2) extracting leaf areas by using image segmentation algorithms such as threshold method and watershed after graying the image. However, the above methods have high requirements on the shooting lighting environment and cannot be applied to complex shooting environments such as low light and uneven light. Summary of the invention

[0005] The purpose of the present invention is to solve the problem of image leaf area measurement in complex shooting environments. The present invention proposes an image leaf area measurement method based on saturation segmentation, which can stably extract leaf areas in low illumination and the presence of light spot shadows. At the same time, tilted shooting within a certain angle range can be achieved through perspective distortion correction.

[0006] The technical solution of the present invention is:

[0007] The present invention provides a leaf area image measurement method based on saturation segmentation, the method comprising the following steps:

[0008] S1, take a leaf image and send it to a processor;

[0009] S2, the processor performs the following operation to correct the perspective distortion of the leaf image according to the coordinates of the rectangular calibration frame on the leaf image background;

[0010] S3, transforming the image pixels after perspective distortion correction from RGB color space to HSI color space, and performing threshold segmentation on the saturation component of the image using a mixed threshold method;

[0011] S4. Perform connected domain analysis on the segmented binary image, extract shape features to distinguish the leaf area and the standard block area, count the ratio of the number of pixels in the leaf area to the number of pixels in the standard block area, and obtain the actual area of ​​the leaf according to the actual area of ​​the standard block.

[0012] Furthermore, S1 is specifically as follows: a rectangular calibration frame is drawn on a white background paper, and a green square standard block is placed in the rectangular calibration frame; a leaf is placed in the rectangular frame and photographed, and care is taken not to block the standard block.

[0013] Furthermore, S2 is specifically:

[0014] S2-1. Select the four vertices of the rectangular calibration box in the original image, i.e. the distorted image, and obtain their coordinates

[0015] S2-2, use the following formula to correct the perspective distortion of the distorted image, and convert the four vertices of the rectangular calibration box in the distorted image into with 4 vertices of the rectified image One-to-one correspondence, obtain the homography matrix T:

[0016]

[0017]

[0018] Where: (x, y) represents the pixel coordinates of the corrected image; (X, Y) represents the pixel coordinates of the distorted image, and a, b, c, d, e, f, g, h represent the parameters in the homography matrix;

[0019] S2-3. For each point in the corrected image, the pixel coordinates (X, Y) in the distorted image are obtained point by point according to the image perspective transformation equation, and the pixel value at the pixel coordinate (X, Y) position is used as the pixel value of the corresponding point in the corrected image.

[0020] Furthermore, S2 also includes cropping the image after perspective distortion correction to remove the residual rectangular calibration frame.

[0021] Furthermore, S3 is specifically:

[0022] S3-1, transforming the corrected image pixels from the RGB color space to the HSI color space, that is, using the following formula to transform the image pixels from the red R, green G, blue B color space to the hue H, saturation S, brightness I color space;

[0023]

[0024]

[0025] Among them, θ represents the intermediate parameter; Represents the floor operator;

[0026] S3-2, according to the saturation S of the corrected image, obtain the Otsu method segmentation threshold T o and the minimum error segmentation threshold T e ;

[0027] S3-3, calculating the binary image segmentation threshold T;

[0028] T=αT o +(1-α)T e

[0029] Among them, T o represents the segmentation threshold of Otsu method; T e represents the segmentation threshold of the minimum error method; α represents the segmentation coefficient, and its value range is (0, 1);

[0030] S3-4. Segment the saturation S of each point in the corrected image according to the binary image segmentation threshold T to obtain a binary image.

[0031] Furthermore, in S3-3, α is set to 0.4.

[0032] Furthermore, S4 is specifically:

[0033] S4-1, processing the segmented binary image, using connected region analysis to mark all connected regions in the binary image, filling holes in the connected regions, and obtaining the largest two connected regions as the leaf region and the standard block region;

[0034] S4-2, calculating the pixel area and pixel perimeter of the two connected regions, extracting the shape feature F, taking the region with smaller F as the standard block, and taking the region with larger F as the leaf;

[0035]

[0036] Where: A represents the pixel area of ​​the connected region, C represents the pixel perimeter of the connected region;

[0037] S4-3. Count the ratio of the number of pixels in the leaf area to the number of pixels in the standard block area, and use the following formula to obtain the actual area A of the leaf: l :

[0038]

[0039] Where: A0 represents the actual area of ​​the standard block; N0 represents the number of pixels in the standard block area; Nl Indicates the number of pixels in the leaf area.

[0040] Further, in S1: the shooting inclination angle is 0-50°.

[0041] Beneficial effects of the present invention:

[0042] The image leaf area measurement method based on saturation segmentation of the present invention can stably extract the leaf area under low illumination and in the presence of light spot shadows. At the same time, the processing of obliquely shot images within a certain angle range is realized through perspective distortion correction. The method is low in cost and easy to operate, and can adapt to complex shooting environments such as low light, uneven illumination and oblique shooting.

[0043] Other features and advantages of the present invention will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] The above and other objects, features and advantages of the present invention will become more apparent through a more detailed description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, wherein like reference numerals generally represent like components throughout the exemplary embodiments of the present invention.

[0045] Figure 1 A schematic diagram of leaf image capture in an embodiment of the present invention is shown.

[0046] Figure 2 A schematic diagram of performing perspective distortion correction on a leaf image, i.e., a distorted image, in an embodiment of the present invention is shown: (a), distorted image; (b), corrected image.

[0047] Figure 3 A schematic diagram of image segmentation based on saturation components in an embodiment of the present invention is shown.

[0048] Figure 4 The photographed images at different inclination angles in the embodiment of the present invention are shown.

[0049] Figure 5 The images of blades taken in different directions in the embodiment of the present invention are shown.

[0050] Figure 6 The figure shows the comparison results of the image method and the grid method for leaf area measurement in an embodiment of the present invention. DETAILED DESCRIPTION

[0051] The preferred embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the preferred embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited to the embodiments set forth herein.

[0052] A leaf area image measurement method based on saturation segmentation, the method comprising the following steps:

[0053] S1. Take a leaf image and send it to the processor; draw a rectangular calibration frame on a white background paper (you can also choose black, gray and other low-saturation colors) and place a green (you can also choose red, blue and other high-saturation colors) square standard block in the rectangular calibration frame; put the leaf into the rectangular frame and take a picture, taking care not to block the standard block, such as Figure 1 As shown;

[0054] S2. The processor performs the following operations to correct the perspective distortion of the leaf image according to the coordinates of the rectangular calibration frame on the leaf image background, specifically:

[0055] S2-1. Select the four vertices of the rectangular calibration box in the original image, i.e. the distorted image, and obtain their coordinates

[0056] S2-2, use the following formula to correct the perspective distortion of the distorted image, such as Figure 2 , which is a schematic diagram of perspective distortion correction for a leaf image, i.e., a distorted image: (a), distorted image; (b), corrected image;

[0057] The four vertices of the rectangular calibration box in the distorted image with 4 vertices of the rectified image One-to-one correspondence, obtain the homography matrix T:

[0058]

[0059]

[0060] Where: (x, y) represents the pixel coordinates of the corrected image; (X, Y) represents the pixel coordinates of the distorted image, and a, b, c, d, e, f, g, h represent the parameters in the homography matrix;

[0061] S2-3, for each point in the corrected image, the pixel coordinates (X, Y) of each point in the distorted image are obtained point by point according to the image perspective transformation equation, and the pixel value at the pixel coordinate (X, Y) position is used as the pixel value of the corresponding point in the corrected image;

[0062] S2-4. After perspective distortion correction, the image is cropped to remove the residual rectangular calibration frame.

[0063] S3, transform the image pixels after perspective distortion correction from RGB color space to HSI color space, and use the mixed threshold method to perform threshold segmentation on the saturation component of the image, specifically:

[0064] S3-1, transforming the corrected image pixels from the RGB color space to the HSI color space, that is, using the following formula to transform the image pixels from the red R, green G, blue B color space to the hue H, saturation S, brightness I color space;

[0065]

[0066]

[0067] Among them, θ represents the intermediate parameter; Represents the floor operator;

[0068] S3-2, according to the saturation S of the corrected image, obtain the Otsu method segmentation threshold T o and the minimum error segmentation threshold T e ;

[0069] S3-3, calculating the binary image segmentation threshold T;

[0070] T=αT o +(1-α)T e

[0071] Among them, T o represents the segmentation threshold of Otsu method; T e represents the segmentation threshold of the minimum error method; α represents the segmentation coefficient, and its value range is (0, 1);

[0072] S3-4, according to the binary image segmentation threshold T, the saturation S of each point in the corrected image is segmented to obtain a binary image; take α as 0.4 as an example; Figure 3 As shown in the figure, the saturation image and the segmented binary image under three lighting conditions: indoor natural light, indoor energy-saving lamp, and darkroom flash light are given; it can be seen that the saturation image is almost unaffected by lighting changes, and the standard block area and leaf area can be well segmented in low-light and uneven lighting environments.

[0073] S4, perform connected domain analysis on the segmented binary image, extract shape features to distinguish the leaf area and the standard block area, count the ratio of the number of pixels in the leaf area to the number of pixels in the standard block area, and obtain the actual area of ​​the leaf according to the actual area of ​​the leaf, specifically:

[0074] S4-1, processing the segmented binary image, using connected region analysis to mark all connected regions in the binary image, filling holes in the connected regions, and obtaining the largest two connected regions as the leaf region and the standard block region;

[0075] S4-2, calculating the pixel area and pixel perimeter of the two connected regions, extracting the shape feature F, taking the region with smaller F as the standard block, and taking the region with larger F as the leaf;

[0076]

[0077] Where: A represents the pixel area of ​​the connected region, C represents the pixel perimeter of the connected region;

[0078] S4-3. Count the ratio of the number of pixels in the leaf area to the number of pixels in the standard block area, and use the following formula to obtain the actual area A of the leaf: l :

[0079]

[0080] Where: A0 represents the actual area of ​​the standard block; N0 represents the number of pixels in the standard block area; N l Indicates the number of pixels in the leaf area.

[0081] When implementing:

[0082] The experiment was shot with a Xiaomi 6 smartphone, with an image size of 4032×3016. After perspective distortion correction and cropping, the image size was 3833×2817. The green standard block size was 400mm×400mm, and the white background paper was A4 paper. A rectangular calibration frame of 240mm×180mm was drawn with a pencil. Complete and healthy leaves were collected for the experiment, including 9 plants: Ligustrum lucidum, Murraya osmanthus, Peperomia chinensis, Chenopodium album, Polygonum multiflorum, Chives, Clover, Toona sinensis, and Cinnamomum camphora. The leaf information is shown in Table 1.

[0083] Table 1 Blade information

[0084]

[0085] The No. 11 bean green leaf was selected to test the effect of shooting inclination angle on measurement accuracy. The shooting distance was 30 cm, and the shooting inclination angles were 0°, 10°, 20°, 30°, 40°, 50°, 60°, and 70°. Figure 4 Table 2 shows the blade area at different inclination angles, and the relative error is calculated based on the blade area at 0° inclination angle. It can be seen that when the inclination angle is too large, the image is severely deformed, resulting in a large measurement error. The appropriate shooting inclination angle is 0-50°, at which the error is controlled within ±8.7mm. 2 Inside.

[0086] Table 2 Leaf area at different shooting angles

[0087]

[0088] Select leaves 1-10 for leaf area measurement experiment. Take the shooting distance as 20cm, rotate each leaf at 45° intervals, and measure 8 times in total. Figure 5Table 3 shows the leaf area measurement results. It can be seen that the method in this paper has good repeatability, and the maximum standard deviation of 8 measurements is 12.9 mm 2 , and has good consistency with the grid method (5mm×5mm grid), such as Figure 6 shown.

[0089] Table 3 Leaf area measurement results

[0090]

[0091] The embodiments of the present invention have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments.

Claims

1. A leaf area image measurement method based on saturation segmentation, characterized in that: The method comprises the following steps: S1, take a leaf image and send it to a processor; S2, the processor performs the following operation to correct the perspective distortion of the leaf image according to the coordinates of the rectangular calibration frame on the leaf image background; S3, transforming the image pixels after perspective distortion correction from RGB color space to HSI color space, and performing threshold segmentation on the saturation component of the image using a mixed threshold method; S4, performing connected domain analysis on the segmented binary image, extracting shape features to distinguish the leaf area and the standard block area, counting the ratio of the number of pixels in the leaf area to the number of pixels in the standard block area, and obtaining the actual area of ​​the leaf according to the actual area of ​​the standard block; S2 is specifically: S2-1. Select the four vertices of the rectangular calibration box in the original image, i.e. the distorted image, and obtain their coordinates S2-2, use the following formula to correct the perspective distortion of the distorted image, and convert the four vertices of the rectangular calibration box in the distorted image into with 4 vertices of the rectified image One-to-one correspondence, obtain the homography matrix T: Where: (x, y) represents the pixel coordinates of the corrected image; (X, Y) represents the pixel coordinates of the distorted image. a, b, c, d, e, f, g, h represent the parameters in the homography matrix; S2-3, for each point in the corrected image, the pixel coordinates (X, Y) of each point in the distorted image are obtained point by point according to the image perspective transformation equation, and the pixel value at the pixel coordinate (X, Y) position is used as the pixel value of the corresponding point in the corrected image; S4 is specifically: S4-1, processing the segmented binary image, using connected region analysis to mark all connected regions in the binary image, filling holes in the connected regions, and obtaining the largest two connected regions as the leaf region and the standard block region; S4-2, calculating the pixel area and pixel perimeter of the two connected regions, extracting the shape feature F, taking the region with smaller F as the standard block, and taking the region with larger F as the leaf; Where: A represents the pixel area of ​​the connected region, C represents the pixel perimeter of the connected region; S4-3. Count the ratio of the number of pixels in the leaf area to the number of pixels in the standard block area, and use the following formula to obtain the actual area A of the leaf: l : Where: A0 represents the actual area of ​​the standard block; N0 represents the number of pixels in the standard block area; N l Indicates the number of pixels in the leaf area.

2. The leaf area image measurement method based on saturation segmentation according to claim 1 is characterized in that S1 specifically includes: drawing a rectangular calibration frame on a white background paper, placing a green square standard block in the rectangular calibration frame; placing the leaf in the rectangular frame and photographing it, and placing it on one side of the standard block.

3. The leaf area image measurement method based on saturation segmentation according to claim 1 is characterized in that S2 also includes cropping the image after perspective distortion correction to remove the residual rectangular calibration frame.

4. The leaf area image measurement method based on saturation segmentation according to claim 1 is characterized in that S3 is specifically: S3-1, transforming the corrected image pixels from the RGB color space to the HSI color space, that is, using the following formula to transform the image pixels from the red R, green G, blue B color space to the hue H, saturation S, brightness I color space; Among them, θ represents the intermediate parameter; Represents the floor operator; S3-2, according to the saturation S of the corrected image, obtain the Otsu method segmentation threshold T o and the minimum error segmentation threshold T e ; S3-3, calculating the binary image segmentation threshold T; T=αT o +(1-α)T e Among them, T o represents the segmentation threshold of Otsu method; T e represents the segmentation threshold of the minimum error method; α represents the segmentation coefficient, and its value range is (0,1); S3-4. Segment the saturation S of each point in the corrected image according to the binary image segmentation threshold T to obtain a binary image.

5. The leaf area image measurement method based on saturation segmentation according to claim 4 is characterized in that In S3-3, α is set to 0.

4.

6. The leaf area image measurement method based on saturation segmentation according to claim 1 is characterized in that In S1: the shooting angle is 0-50°.