An artificial intelligence-based forestry seedling detection method and device

Through image processing technology based on artificial intelligence, the main branches and leaves characteristics of seedlings are identified and analyzed, and combined with tone value detection, the problems of low seedling detection efficiency and poor accuracy in the existing technology are solved, and fast and non-destructive seedling quality detection is achieved.

CN115082789BActive Publication Date: 2025-07-22JINXIANG COUNTY FORESTRY PROTECTION & DEV SERVICE CENT (JINXIANG COUNTY WETLAND PROTECTION CENT JINXIANG COUNTY WILDLIFE PROTECTION CENT JINXIANG COUNTY STATE-OWNED BAIWA FOREST FARM)
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210707655.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-22
Publication Date
2025-07-22
Estimated Expiration
2042-06-22

AI Technical Summary

Technical Problem

The existing forestry seedling detection methods have high labor intensity and low efficiency, which can easily cause harm to seedlings. The sorting results are greatly affected by personnel level and subjectiveness, making it difficult to ensure the stability of seedling quality.

Method used

Using an artificial intelligence-based detection method, by obtaining the binary map of seedlings in the nursery, using Hough detection and image processing technology to identify the main branch and leaf connection domain, calculate the Euro-style distance and variance change rate, and conduct detection with the blade tone value to achieve non-destructive rapid detection.

Benefits of technology

The rapid and non-destructive testing of the growth status of multiple forestry seedlings is achieved, the detection efficiency is improved, artificial errors are reduced, and the stability of seedling quality is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115082789B_ABST
    Figure CN115082789B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image processing, and particularly relates to a forestry seedling detection method and device based on artificial intelligence, including: obtaining a binary image of each row of seedlings in a nursery; performing Hough detection on the binary image to obtain the main branches of each seedling; obtaining the set of leaf connected domains of each main branch; calculating the Euclidean distance between the vertical point corresponding to each leaf connected domain in the set and the center point of the connected domain to obtain the candidate belonging seedlings of each leaf connected domain; obtaining the intersection points of the main component directions of the connected domains at the same height in the set and their corresponding main branches, and calculating the distance between adjacent two intersection points; using the two distances to obtain the leaf connected domains that do not belong to the main branches; calculating the variance change rate of the leaf connected domains that do not belong to the main branches of the seedlings and belong to the candidate belonging seedlings to obtain all the leaves on the main branches of each seedling; detecting each row of seedlings in the nursery according to the hue values of all the leaves of each seedling. The above method is used for forestry seedling detection and can improve the detection efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing, and particularly to a method and device for detecting forestry seedlings based on artificial intelligence. Background Art

[0002] For forestry seedlings, the quality of seedlings is vulnerable to many factors. Nowadays, with the rapid development of social economy, it is of great significance to ensure the qualified quality of seedlings. However, at present, forestry seedlings are affected by low management level, human factors, etc., resulting in certain quality problems. In addition, affected by external natural disasters and other factors, it is easy to cause quality problems during the growth stage of seedlings, and finally lead to unqualified quality. It is a major problem faced by current enterprises that the quality of seedlings is difficult to be guaranteed. Due to the uncertainty of quality, it causes serious economic losses to enterprises.

[0003] The existing methods mainly rely on manual picking as the main means to record and judge parameters such as the size, quality, and pests and diseases of each forestry seedling. This method has a high labor intensity, low efficiency, is easy to damage the seedlings, and the sorting results are greatly affected by the level and subjectivity of the sorting personnel. Therefore, there is an urgent need for a method to improve the detection efficiency of forestry seedlings and achieve rapid and non-destructive detection of forestry seedlings. Summary of the Invention

[0004] The present invention provides a method and device for detecting forestry seedlings based on artificial intelligence, including: obtaining a binary image of each row of seedlings in a nursery; performing Hough detection on the binary image to obtain the main branches of each seedling; obtaining the set of leaf connected regions of each main branch; calculating the Euclidean distance between the vertical point corresponding to each leaf connected region in the set and the center point of the connected region to obtain the candidate belonging seedlings of each leaf connected region; obtaining the intersection points of the main component directions of the connected regions at the same height in the set and their corresponding main branches, and calculating the distance between adjacent intersection points; using the two distances to obtain the leaf connected regions that do not belong to the main branches; calculating the variance change rate of the leaf connected regions that do not belong to the main branches of the seedlings and belong to the candidate belonging seedlings to obtain all the leaves on the main branches of each seedling; detecting each row of seedlings in the nursery according to the hue values of all the leaves of each seedling. Compared with the prior art, the present invention combines image processing and machine vision, obtains the main branches and complete leaf information of each seedling according to the distribution characteristics of the main branches and leaves of each row of seedlings in the nursery, and uses the hue values of the leaves of each seedling to detect the growth state of the seedlings. The present invention can achieve rapid and non-destructive detection of the growth states of multiple forestry seedlings at the same time and improve the detection efficiency.

[0005] To achieve the above object, the present invention adopts the following technical solution. A method for detecting forestry seedlings based on artificial intelligence includes:

[0006] Obtaining a binary image of each row of seedlings in the nursery to be detected.

[0007] Perform Hough line detection on the binary image, cluster the high-brightness points in the obtained Hough space, and obtain the candidate clustering clusters of the main branches according to the number of high-brightness points and the abscissa span in each clustering cluster.

[0008] Obtain the clustering clusters of the main branches by using the aggregation rate and the central rate of each candidate clustering cluster of the main branches, and obtain the main branches of each seedling in the binary image.

[0009] Obtain the set of leaf connected regions belonging to the main branch of each seedling by using the pixel points on the main branch of each seedling in the binary image.

[0010] Calculate the Euclidean distance between the vertical point corresponding to each leaf connected region in the set of leaf connected regions and the center point of the leaf connected region, and obtain the candidate belonging main branch of each leaf connected region.

[0011] Obtain the intersection points of the main component directions of the leaf connected regions at the same height in the set of leaf connected regions of each seedling main branch and the corresponding seedling main branch, and calculate the distance between adjacent intersection points.

[0012] Use the Euclidean distance between the vertical point corresponding to each leaf connected region in the set of leaf connected regions of each seedling main branch and the center point of the leaf connected region, and the distance between the intersection points of the main component directions of the adjacent leaf connected regions at the same height and the corresponding seedling main branch to judge whether each leaf connected region in the set of leaf connected regions belongs to the seedling main branch, and obtain the leaf connected regions that do not belong to the seedling main branch.

[0013] Calculate the variance change rate of the leaf connected regions that do not belong to the seedling main branch in the set of leaf connected regions of each seedling main branch belonging to the candidate belonging main branch, and determine the belonging main branch to which the leaf connected regions that do not belong to the seedling main branch belong according to the variance change rate, and obtain all the leaves on each seedling main branch.

[0014] Detect the growth status of each row of seedlings in the nursery to be detected according to the hue values of all the leaves on each seedling branch.

[0015] Further, for the method for detecting forestry seedlings based on artificial intelligence, the main branches of each seedling in the binary image are obtained in the following manner:

[0016] Perform Hough line detection on the binary image, perform threshold segmentation on the points in the Hough space corresponding to the lines in the binary image, and obtain the high-brightness points in the Hough space.

[0017] Project the high-brightness points onto the abscissa of the Hough space to obtain the projection points.

[0018] Cluster the projection points to obtain all the clustering clusters.

[0019] Calculate the difference between the maximum and minimum abscissas of the projection points in each cluster to obtain the abscissa span of each cluster.

[0020] Count the number of projection points in each cluster, and take the cluster with a larger number of projection points and a smaller abscissa span as the candidate cluster for the main trunk.

[0021] Calculate the aggregation rate of each candidate cluster for the main trunk based on the maximum and minimum abscissas in each candidate cluster for the main trunk.

[0022] Calculate the mean abscissa of all projection points in each candidate cluster for the main trunk, and take this mean as the direction value of the candidate cluster for the main trunk.

[0023] Sort the direction values of all candidate clusters for the main trunk to obtain a sequence of direction values.

[0024] Calculate the central rate of each candidate cluster for the main trunk by using the direction value of each candidate cluster for the main trunk and the maximum and minimum values in the sequence of direction values.

[0025] Multiply the aggregation rate and the central rate of each candidate cluster for the main trunk, and take the candidate cluster for the main trunk with the largest product value as the cluster for the main trunk, to obtain the main trunk of each seedling in the binary image.

[0026] Further, for the method for detecting forestry seedlings based on artificial intelligence, the set of leaf connected domains belonging to each main trunk of the seedling is obtained in the following manner:

[0027] Use the pixel points on each main trunk of the seedling in the binary image as the initial points for seed filling to obtain all leaf connected domains in the binary image.

[0028] Draw perpendicular lines perpendicular to each main trunk of the seedling through the center points of each leaf connected domain to obtain all perpendicular points.

[0029] Use each perpendicular point as the initial center and the center point of each leaf connected domain as the clustering data to cluster all leaf connected domains to obtain all groups of leaf connected domains.

[0030] Take the groups of leaf connected domains at different heights belonging to the same main trunk of the seedling as the leaf connected domains of each main trunk of the seedling in the binary image, and further obtain the set of leaf connected domains belonging to each main trunk of the seedling.

[0031] Further, for the method for detecting forestry seedlings based on artificial intelligence, the candidate main trunk of the seedling to which each leaf connected domain belongs is obtained in the following manner:

[0032] Use the PCA algorithm to obtain the principal component direction of each leaf connected domain.

[0033] For each group of leaf connected components at the same height in the set of leaf connected components of each main stem of the seedlings, the following operations are performed:

[0034] Calculate the Euclidean distance between the vertical point corresponding to the group of leaf connected components and the center point of each leaf connected component in the group of leaf connected components, and obtain the distances from the vertical point to the center points of each leaf connected component.

[0035] Sort the distances from the vertical point to the center points of each leaf connected component in ascending order to obtain an ascending sequence.

[0036] Replace the last element of the ascending sequence with the value of the second last element to obtain a changed ascending sequence, calculate the cosine similarity between the changed and the original ascending sequences. When the cosine similarity is greater than the threshold, the last element is not an outlier; when the cosine similarity is less than or equal to the threshold, the last element is an outlier. Iteratively judge whether other elements in the ascending sequence are outliers according to the above method until only half of the elements in the ascending sequence remain unjudged, and then stop the iteration to obtain all the outliers in the ascending sequence.

[0037] Point the principal component direction of the leaf connected component corresponding to each outlier in the ascending sequence to the nearest main stem of the seedlings as the candidate belonging main stem of the leaf connected component, and obtain the candidate belonging main stem of each leaf connected component.

[0038] Furthermore, for the method for detecting forestry seedlings based on artificial intelligence, the leaf connected components that do not belong to the main stem of the seedlings are obtained in the following manner:

[0039] For each group of leaf connected components at the same height in the set of leaf connected components of each main stem of the seedlings, the following operations are performed:

[0040] Obtain the intersection points of the principal component directions of each leaf connected component in the group of leaf connected components and its corresponding main stem of the seedlings, calculate the distances between adjacent intersection points, and obtain the distances between the intersection points of the principal component direction lines of each leaf connected component and the main stem of the seedlings.

[0041] Sort the distances between the intersection points of the principal component direction lines of each leaf connected component and the main stem of the seedlings in ascending order to obtain an ascending sequence.

[0042] Replace the last element of the ascending sequence with the value of the penultimate element to obtain the changed ascending sequence. Calculate the cosine similarity between the changed and original ascending sequences. When the cosine similarity is greater than the threshold, the last element is not an outlier; when the cosine similarity is less than or equal to the threshold, the last element is an outlier. Iteratively judge whether other elements in the ascending sequence are outliers according to the above method until only half of the elements in the ascending sequence remain unjudged, at which point the iteration stops, and all outlier distances in the ascending sequence are obtained.

[0043] Judge the leaf connected regions corresponding to each outlier distance in the ascending sequence: When the distance from the center point of the leaf connected region to its corresponding perpendicular point is not an outlier distance, the leaf connected region is a true leaf connected region and belongs to the current main stem of the seedling. When the distance from the center point of the leaf connected region to its corresponding perpendicular point is an outlier distance, the leaf connected region does not belong to the current main stem of the seedling.

[0044] Further, for the method for detecting forestry seedlings based on artificial intelligence, all the leaves on each main stem of the seedling are obtained in the following manner:

[0045] Obtain the distance between the center point of each true leaf connected region in the candidate belonging seedlings of the leaf connected regions that do not belong to the current main stem of the seedling and the main stem of the candidate belonging seedlings, to obtain the original distance sequence.

[0046] Calculate the distance from the center point of the leaf connected region that does not belong to the current main stem of the seedling to the main stem of its candidate belonging seedlings, and add this distance to the original distance sequence to obtain a new distance sequence.

[0047] Calculate the variance of the original distance sequence and the variance of the new distance sequence.

[0048] Calculate the variance change rate for dividing the leaf connected regions that do not belong to the main stem of the seedling into candidate belonging seedlings using the variance of the original distance sequence and the variance of the new distance sequence.

[0049] Take the candidate belonging seedling corresponding to the minimum variance change rate as the belonging seedling of the leaf connected regions that do not belong to the current main stem of the seedling, thereby obtaining all the leaves on each main stem of the seedling.

[0050] Further, for the method for detecting forestry seedlings based on artificial intelligence, the process of detecting the growth state of each row of seedlings in the nursery to be detected is specifically as follows:

[0051] Obtain the standard color tone level sequence of the seedlings with good growth.

[0052] Convert the RGB images of each row of seedlings in the nursery to be detected into the HIS color space to obtain the color tone map.

[0053] Overlay the hue map with all the leaf connected regions in the binary map to obtain all the leaf hue values of each seedling.

[0054] Perform multi-threshold segmentation on all the leaf hue values of each seedling to obtain all the hue levels of each seedling.

[0055] Calculate the difference between each hue level of each seedling and each standard hue level in the standard hue level sequence, and take the minimum value of the differences as the characteristic parameter of that hue level, obtaining all the hue level characteristic parameters of each seedling.

[0056] Take the mean value of all the hue level characteristic parameters of each seedling as the state characteristic parameter of that seedling.

[0057] Judge the state characteristic parameter of each seedling: when the state characteristic parameter of each seedling is greater than the threshold, the growth state of that seedling is poor; when the state characteristic parameter of each seedling is less than or equal to the threshold, the growth state of that seedling is good.

[0058] Furthermore, in the above-mentioned forestry seedling detection method based on artificial intelligence, the binary map of each row of seedlings in the nursery to be detected is obtained in the following manner:

[0059] Collect the side view images of each row of seedlings in the nursery to be detected.

[0060] Perform semantic segmentation on the side view images to obtain the RGB images of each row of seedlings in the nursery to be detected.

[0061] Perform grayscale processing on the RGB images to obtain the grayscale images of each row of seedlings in the nursery to be detected.

[0062] Perform threshold segmentation on the grayscale images to obtain the binary maps of each row of seedlings in the nursery to be detected.

[0063] The present invention also provides a forestry seedling detection device based on artificial intelligence, including a collection unit, a processing unit, a calculation unit, and a detection unit:

[0064] The collection unit uses a camera to collect the side view images of each row of seedlings in the nursery to be detected.

[0065] The processing unit processes the images collected by the collection unit by a computer to obtain the binary maps of each row of seedlings in the nursery to be detected, performs Hough line detection on the binary maps to obtain the main branches of each seedling, and preliminarily divides the leaf connected regions of each main branch to obtain the set of leaf connected regions of each main branch.

[0066] The computing unit. The computer calculates the distance between the leaf connected domain of each main branch and the main branch according to the distribution characteristics of the leaf connected domain sets of each main branch obtained by the processing unit, obtains the leaf connected domains that do not belong to the main branch and their candidate affiliated seedlings according to the distance, and calculates the variance change rate of adding the leaf connected domains that do not belong to the main branch to their candidate affiliated seedlings.

[0067] The detection unit. The computer obtains the affiliated seedlings of the leaf connected domains that do not belong to the main branch according to the variance change rate obtained by the computing unit, and detects the growth state of each row of seedlings in the nursery to be detected according to the hue values of all the leaves of each seedling.

[0068] The beneficial effects of the present invention are as follows:

[0069] The present invention combines image processing and machine vision, obtains the main branches and complete leaf information of each seedling according to the distribution characteristics of the main branches and leaves of each row of seedlings in the nursery, and uses the hue values of the leaves of each seedling to detect the growth state of the seedlings. The present invention can realize rapid and non-destructive detection of the growth states of multiple forestry seedlings simultaneously, and improve the detection efficiency. Description of the Drawings

[0070] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following described drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained according to these drawings.

[0071] Figure 1 It is a schematic flow chart of a forestry seedling detection method provided in Embodiment 1 of the present invention;

[0072] Figure 2 It is a schematic flow chart of a forestry seedling detection method provided in Embodiment 2 of the present invention;

[0073] Figure 3 It is a schematic diagram of an initial leaf connected domain group at the same height provided in Embodiment 2 of the present invention;

[0074] Figure 4 It is another schematic diagram of an initial leaf connected domain group at the same height provided in Embodiment 2 of the present invention;

[0075] Figure 5 It is a schematic diagram of a misattribution situation of seedling leaves provided in Embodiment 2 of the present invention;

[0076] Figure 6 It is another schematic diagram of a misattribution situation of seedling leaves provided in Embodiment 2 of the present invention;

[0077] Figure 7 Schematic diagram of abnormal distance of blade connection domain provided in Embodiment 2 of the present invention;

[0078] Figure 8 Schematic diagram of a graph structure provided in Embodiment 2 of the present invention. Specific embodiments

[0079] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0080] Embodiment 1

[0081] The embodiment of the present invention provides a forestry seedling detection method based on artificial intelligence, as Figure 1 shown, including:

[0082] S101. Obtain a binary image of each row of seedlings in the nursery to be detected.

[0083] Among them, a binary image refers to an image in which there are only two gray levels. That is to say, the gray value of any pixel point in the image is either 0 or 255, representing black and white respectively.

[0084] S102. Perform Hough line detection on the binary image, cluster the high-brightness points in the obtained Hough space, and obtain the main branch candidate cluster according to the number and abscissa span of the high-brightness points in each cluster.

[0085] Among them, Hough line detection is used to obtain the lines in the binary image.

[0086] S103. Obtain the main branch cluster by using the aggregation rate and central rate of each main branch candidate cluster, and obtain the main branch of each seedling in the binary image.

[0087] Among them, the main branch of each seedling in the binary image is obtained by multiplying the aggregation rate and the central rate.

[0088] S104. Use the pixel points on the main branch of each seedling in the binary image to obtain the set of blade connection domains belonging to the main branch of each seedling.

[0089] Among them, the set of blade connection domains belonging to the main branch of each seedling is obtained by clustering.

[0090] S105. Calculate the Euclidean distance between the vertical point corresponding to each leaf connected region in the set of leaf connected regions and the center point of the leaf connected region, and obtain the candidate main stem of the seedlings to which each leaf connected region belongs.

[0091] Among them, the Euclidean distance generally refers to the Euclidean metric. In mathematics, the Euclidean distance or Euclidean metric is the "ordinary" (i.e., straight line) distance between two points in Euclidean space.

[0092] S106. Obtain the intersection points of the principal component directions of the leaf connected regions at the same height in the set of leaf connected regions of each seedling main stem and the corresponding seedling main stem, and calculate the distance between adjacent intersection points.

[0093] Among them, the principal component direction of the leaf connected region is obtained by using the PCA algorithm.

[0094] S107. Use the Euclidean distance between the vertical point corresponding to each leaf connected region in the set of leaf connected regions of each seedling main stem and the center point of the leaf connected region, and the distance between the intersection points of the principal component directions of adjacent leaf connected regions at the same height and the corresponding seedling main stem, to judge whether each leaf connected region in the set of leaf connected regions belongs to the seedling main stem, and obtain the leaf connected regions that do not belong to the seedling main stem.

[0095] Among them, the abnormal connected region corresponding to the abnormal distance is called the leaf connected region that does not belong to the seedling main stem.

[0096] S108. Calculate the variance change rate of the leaf connected regions that do not belong to the seedling main stem in the leaf connected regions of each seedling main stem belonging to the candidate main stem of the seedlings to which they belong, and determine the main stem of the seedlings to which the leaf connected regions that do not belong to the seedling main stem belong, so as to obtain all the leaves on each seedling main stem.

[0097] Among them, the variance change rate is used to obtain the main stem of the seedlings to which the leaf connected regions that do not belong to the seedling main stem belong.

[0098] S109. Detect the growth status of each row of seedlings in the nursery to be detected according to the hue values of all the leaves on each seedling stem.

[0099] Among them, the growth status of each seedling is obtained by calculating the difference between the hue value of the seedling leaf and the standard hue value.

[0100] The beneficial effects of this embodiment are as follows:

[0101] This embodiment combines image processing and machine vision to obtain the main trunk and complete leaf information of each seedling based on the distribution characteristics of the main trunks and leaves of each row of seedlings in the nursery, and uses the leaf color tone value of each seedling to detect the growth status of the seedlings. This embodiment can achieve rapid and non-destructive detection of the growth status of multiple forestry seedlings at the same time, improving the detection efficiency.

[0102] Embodiment 2

[0103] The main purpose of this embodiment is to detect the appearance quality of seedlings by machine vision, extract relevant features, and achieve rapid and non-destructive detection of forestry seedlings.

[0104] An embodiment of the present invention provides a forestry seedling detection method based on artificial intelligence, as Figure 2 shown, including:

[0105] S201. Obtain an image containing only forestry seedlings.

[0106] Obtain images of each row of seedlings in the nursery.

[0107] Use DNN semantic segmentation to identify and segment the targets in the image.

[0108] The relevant content of this DNN network is as follows:

[0109] 1. The dataset used is a dataset of forestry seedling images collected from the side view, and the styles of forestry seedlings are diverse.

[0110] 2. The pixels to be segmented are divided into two categories. That is, the label annotation process for the training set is: a single-channel semantic label, where the pixels at the corresponding positions are labeled 0 if they belong to the background class and 1 if they belong to forestry seedlings.

[0111] 3. The task of the network is classification, and the loss function used is the cross-entropy loss function.

[0112] Multiply the 0-1 mask image obtained by semantic segmentation with the original image to obtain an image that contains only forestry seedlings, removing the interference of the background.

[0113] S202. Obtain the main trunk.

[0114] First, grayscale the RGB image, and then obtain a binary image through the otsu threshold segmentation method.

[0115] First, the branch information in the seedling image is obtained through Hough line detection. Each seedling not only contains the main branch, but also has branches such as bifurcations. The directions of the bifurcated branches of different seedlings are relatively random, but the direction of the main branch is mostly vertically upward. When there are bifurcated branches, they often exist on both sides of the main branch. Therefore, the logic for obtaining the main branch of each seedling through Hough line detection is as follows:

[0116] 1. In the comprehensive statistical information of multiple seedlings, the direction values of the main branches in the image are similar, corresponding to multiple high-brightness points on the same abscissa in the Hough parameter space.

[0117] 2. In the comprehensive statistical information of multiple seedlings, the direction values of the main branches in the image are in the middle position, corresponding in the Hough parameter space to: among multiple high-brightness points, the high-brightness point with a relatively central direction value.

[0118] The process of obtaining the main branch through the Hough space is as follows:

[0119] 1. The voting values of the points in the Hough parameter space are statistically analyzed to obtain a voting value histogram. Through the Otsu threshold segmentation method, the voting threshold l is obtained, and the points with voting values greater than l are called high-brightness points.

[0120] 2. All high-brightness points are projected onto the abscissa to obtain projection points. Then, through the K-MEANS clustering method, different clustering clusters are obtained. The number of different clustering clusters is statistically analyzed, and the clustering cluster with a larger number and a smaller abscissa span is selected as the candidate cluster.

[0121] After statistically analyzing the number of high-brightness points in different clustering clusters, the top ten clusters in terms of the number of high-brightness points are selected. At the same time, the difference between the maximum abscissa and the minimum abscissa in each cluster is calculated, which is called the abscissa span. The top five clusters with the smallest abscissa spans among the top ten clusters in terms of the number of high-brightness points are selected as the main branch candidate clusters. The formula for calculating the aggregation rate of each main branch candidate cluster through the abscissa span is as follows:

[0122]

[0123] D represents the abscissa span of each main branch candidate cluster. The larger the abscissa span, the smaller the probability that the corresponding cluster is the main branch. u represents the aggregation rate of each main branch candidate cluster. The larger the aggregation rate, the greater the probability that the corresponding cluster is the main branch. is the maximum abscissa in each main branch candidate cluster, is the minimum abscissa in each main branch candidate cluster.

[0124] 3. Then calculate the centrality rate of the main branch candidate clusters. The direction values of each main branch candidate cluster are similar. First, use the mean value of all direction values in the cluster (the direction value refers to the abscissa of the high-brightness point in the Hough parameter space) as the representative direction value of the cluster.

[0125] Statistically analyze the representative direction values of all main branch candidate clusters to obtain a sequence of direction values arranged in ascending order of high-brightness points, and calculate the centrality rate of each direction value in the sequence of direction values. The calculation formula for the centrality rate is as follows:

[0126]

[0127] m represents the direction value in the sequence of direction values, represents the i-th element value in the sequence of direction values, min(m) represents the minimum value in the sequence of direction values, that is, the first element in the sequence of direction values, max(m) represents the maximum value in the sequence of direction values, that is, the last element in the sequence of direction values, and v represents the centrality rate. The greater the centrality rate, the greater the probability that the corresponding cluster is the main branch.

[0128] After calculating the corresponding u value and v value for each main branch candidate cluster, calculate the product of the two, and take the main branch candidate cluster corresponding to the maximum product as the main branch cluster, that is, the main branches of each seedling in the image are obtained.

[0129] During detection, some branches will be blocked by leaves. At this time, the Hough line detection method is used to detect the exposed main branches above, and then the complete main branches can be obtained, avoiding the problem that the main branches cannot be detected due to leaf occlusion.

[0130] When there are many branches and leaves, it is difficult to distinguish which branches and leaves belong to which seedling. Therefore, first perform main branch detection, and then, with the main branch as the center, through connected component analysis, obtain the leaf information of each seedling, and then distinguish different seedlings.

[0131] The process of obtaining the leaf information belonging to each main branch through connected component analysis is as follows:

[0132] S203. Obtain the principal component direction of each leaf connected component.

[0133] First, calculate the direction value of each connected component. The calculation process of the connected component direction value is as follows:

[0134] Obtain the coordinates of the pixels in the connected component, and use the PCA algorithm to obtain the principal component direction of these data. K principal component directions can be obtained. Each principal component direction is a 2D unit vector, and each principal component direction corresponds to an eigenvalue.

[0135] Obtain the principal component direction with the largest eigenvalue, which is called the connected component direction, representing the direction with the largest projection variance of these data, that is, the main distribution direction of these data.

[0136] Taking each main branch as the center, the actually affiliated leaves should be radially distributed outward with the main branch as the center. Through this feature, the easily confused leaf connected components are distinguished. For example Figure 3 As shown, leaves 1, 2, 3, 4, 5, and 6 are at the same height, and the main directions of the connected components of these leaves intersect at a point. The probability that these connected components belong to the same main branch is very high. The direction value of the connected component a' does not intersect with the main directions of the connected components of 1, 2, 3, 4, 5, and 6. Therefore, the connected component a' and the connected components 1, 2, 3, 4, 5, and 6 belong to different main branches. Figure 4 Leaves 11, 22, 33, and 44 in [reference] are also at the same height, but the main directions of the connected components do not intersect at a point. Then the probability that these leaf connected components belong to the same main branch is very small.

[0137] S204. Obtain the initial leaf attribution category of the same seedling.

[0138] In the binary image, taking the pixel points on each main branch as the initial points, the leaf connected components on each main branch are obtained by the seed filling method.

[0139] Many leaf connected components are obtained through connected component analysis. First, calculate the perpendicular distance from the center point of each connected component to all the main branch lines. Each connected component can obtain a perpendicular distance sequence, and at the same time, many foot points are obtained, which are called perpendicular points.

[0140] First, taking all the perpendicular points as the initial centers of k-means clustering, taking the center points of each leaf connected component as the clustering data, different clustering categories (called leaf connected component groups) are obtained through k-means clustering. Then, taking the categories corresponding to all the perpendicular points belonging to the same main branch line as the leaf categories at different heights of the same seedling, which is called the initial leaf attribution category. The leaf attribution category refers to the leaves at different heights belonging to the same seedling.

[0141] S205. Obtain the true leaf attribution category of the same seedling.

[0142] The following situation may exist in the initial leaf category Figure 3 As shown, the connected components 1, 2, 3, 4, 5, 6, and a' are attributed to the same seedling. Therefore, this situation needs to be further distinguished to obtain the true leaf attribution category.

[0143] The seedlings corresponding to the deviation values of the deviation directions of the central points of each leaf connected domain group on each seedling are used as the candidate belonging seedlings of the leaves in each seedling. The number of candidate belonging seedlings is related to the distribution density and arrangement pattern of the seedlings. The number of candidate belonging seedlings is, in the extreme case, to which several seedlings the leaves belonging to seedling A may be misattributed. For example, Figure 5 as shown, Figure 6 it means that the leaves of the central point seedling may be misattributed to the three surrounding seedlings at most,

[0144] There are different leaf connected domain groups on a seedling. Taking each vertical point as the center, calculate the abnormal distance between the vertical point and the center point of the connected domain, and use the nearest main branch pointed by the direction of the connected domain corresponding to the abnormal distance as the candidate belonging seedling. For example, Figure 7 as shown, Figure 7 in a, the vertical point is a, and b, c, d, e are the connected domains (leaf connected domains) in the connected domain group corresponding to the vertical point a. The distance of the connected domain e is abnormal. Therefore, select the main branch that first forms an intersection with the connected domain direction line of the connected domain e as the candidate belonging seedling. Figure 7 The value of the direction line in represents the Euclidean distance from the vertical point a to the center points of different connected domains.

[0145] The process of calculating the abnormal distance is as follows:

[0146] First, obtain the distance sequence between the vertical point and the center point of the corresponding connected domain, perform ascending sorting to obtain the ascending sequence,

[0147] (1) First, replace the last element of the ascending sequence with the value of the penultimate element to obtain the virtual sequence 1. Calculate the cosine similarity between the original sequence and the virtual sequence 1. If it is greater than 0.8, it is considered that the maximum value is not the abnormal distance, otherwise the maximum value is considered the abnormal distance.

[0148] (2) Remove the last element of the ascending sequence, replace the penultimate element with the third-to-last element, and calculate the cosine similarity between the sequence before replacement (removing the last element) and the sequence after replacement (removing the last element). If it is greater than 0.8, it is considered that the penultimate element is not the abnormal distance value, otherwise the penultimate element and the subsequent elements are considered the abnormal distance values.

[0149] (3) Remove the last two elements of the ascending sequence, replace the third-to-last element with the fourth-to-last element, and calculate the cosine similarity between the sequence before replacement (removing the last two elements) and the sequence after replacement (removing the last two elements). If it is greater than 0.8, it is considered that the third-to-last element is not the abnormal distance value, otherwise the third-to-last element and the subsequent elements are considered the abnormal distance values.

[0150] (4) Repeat the previous steps until (the position of the middlemost element + 1) stops. For example: In the sequence [0.9 1 1.1 0.9 1 5 6], there are 7 elements in total, and the position of the middlemost element is 4.

[0151] Each seedling has multiple leaf connected component groups. By calculating the abnormal distances of each leaf connected component group, one or more candidate belonging seedlings are obtained. Multiple leaf connected component groups yield multiple candidate belonging seedlings, thereby establishing the connection between different seedlings and forming a graph structure. The formed graph structure is as Figure 8 shown. Figure 8 The circles in it represent seedlings, a2, b2, c2, d2, e2 represent different seedlings, and the direction lines represent the leaf belonging relationships. For example: The direction line from a2 to c2 indicates that in the initial leaf belonging category (the initial leaf belonging category is inaccurate), there are leaves in the leaves of a2 that are attributed to the leaf category of c2; The two-way direction line between a2 and b2 means that each has its own leaves attributed to another seedling, that is, a2 has leaves attributed to b2, and b2 also has leaves attributed to a2.

[0152] By calculating the candidate belonging seedlings of the leaves in different seedlings, the connection between different seedlings is established, and then the graph structure as Figure 8 shown is obtained.

[0153] The candidate belonging seedlings of the leaves in each of the above-mentioned seedlings refer to which seedlings the leaf may only be misclassified into, and these seedlings are called candidate belonging seedlings.

[0154] Two seedlings are relatively close, and the leaf connected components affect each other, making it difficult to distinguish which leaves belong to which seedling. However, it can be judged by whether the main directions of the leaf connected components intersect at the same area. However, the sizes of the intersection areas of different types of seedlings are different, and it is also related to the resolution of the camera, etc. Therefore, in this embodiment, it is selected to judge by calculating the distance from the main branch.

[0155] Since the points with abnormal distances only have a high probability of being caused by the misclassification of leaf belonging categories, it may also be caused by reasons such as the camera shooting angle, etc. Therefore, it is necessary to calculate that the points with abnormal distances in different belonging categories are indeed the leaves caused by misclassification, so as to obtain the complete and correct information representation of each seedling, and then provide a solid foundation for subsequent detection.

[0156] By calculating the distance between the intersection point of the direction line of the connected component corresponding to the normal distance points (for example: Figure 7 a, b, c, d in it) and the main branch line to which the corresponding perpendicular point belongs, a distance sequence is obtained. Select the connected component corresponding to the abnormal distance value in the distance sequence as the misclassified connected component caused by the misclassification of the leaf belonging category. The method of calculating the abnormal distance here is the same as above.

[0157] If the previous distance was abnormal and the current distance is not abnormal, it is considered that it is caused by reasons such as the camera shooting angle, and the corresponding connected component is not misclassified. If the previous distance was abnormal and the current distance is also abnormal, the corresponding connected component is misclassified, and the corresponding connected component needs to be assigned to other main branches of the seedlings.

[0158] For example Figure 3 In, the intersection points of the connected component direction lines of connected components 1, 2, 3, 4, 5, and 6 with the main branch lines to which the corresponding vertical points belong are close, and the distance values are very small. However, the distance between the intersection point of the connected component direction line of connected component a' and the corresponding main branch line and other intersection points is very large. Therefore, it is considered that connected component a' is a leaf connected component misclassified to this main branch.

[0159] The abnormal connected component corresponding to the abnormal distance is called the misclassified connected component. The misclassified connected component needs to be assigned to other seedlings. Here, other seedlings refer to the candidate belonging seedlings corresponding to the seedlings to which the abnormal connected component currently belongs. The candidate belonging seedlings corresponding to each abnormal connected component correspond to the directed vectors from the seedling node to other nodes in the graph structure. For example: Figure 8 In, the candidate belonging seedlings corresponding to the misclassified connected component in node a2 are node a2 and node c2.

[0160] The process of calculating the actual seedlings corresponding to each misclassified connected component is as follows:

[0161] (1) Each seedling calculates the abnormal connected components in the connected component group, and removes the abnormal connected components in each category of the initial leaf attribution category obtained previously, obtaining the true connected components in each leaf attribution category (incomplete, and it will become complete only after the misclassified connected components are divided into the corresponding actual seedlings).

[0162] (2) Calculate the adaptability of each misclassified connected component to each connected component group in the corresponding candidate belonging seedling (here, each connected component group refers to the true connected component, that is, the leaf connected component that can be determined to belong to this seedling). The adaptability is the variance change rate of the distance sequence calculated after adding the misclassified connected component to a certain connected component group in the candidate belonging seedling. The variance change rate The calculation formula is as follows:

[0163]

[0164] represents the sequence variance calculated after adding the misclassified connected component, and s1 represents the variance of the original sequence.

[0165] Add the misclassified connected component to the candidate belonging seedling, calculate the vertical distance between the misclassified connected component and the connected component group (multiple connected component groups, calculate them in turn) of the candidate belonging seedling, add it to the original distance sequence, sort it in ascending order, and obtain a new sequence. The variance change rate is the change rate of the variance between the new sequence and the original sequence (each connected component group here refers to the true connected component, that is, the ascending distance sequence composed of the leaf connected components that can be determined to belong to this seedling).

[0166] After calculating the variance change rate s, select the seedling corresponding to the minimum s, and divide the misclassified connected component into this seedling, that is, complete the reclassification of the misclassified leaf connected components and obtain the complete information of each seedling.

[0167] S206. Detect the seedlings.

[0168] The detected seedlings are in a similar growth environment, and the hue values of the leaves of the seedlings with similar growth states are similar. At the same time, the hue value can also reflect the growth state of the seedlings. By calculating the difference between the hue value of the seedling leaf and the standard hue value, the growth state of each seedling can be obtained.

[0169] The standard hue value can be obtained through manual detection. The standard hue value of the seedlings growing healthily is obtained through manual detection. Compare the hue value of each seedling with the hues in the standard hue value. It is equivalent that the standard hue value is a large standard set, and the hue value of a specific seedling only needs to match several of the hue values.

[0170] The process of calculating the hue value of the seedling is as follows:

[0171] (1) Convert the RGB image obtained in the previous step to the HIS color space, extract the hue channel therein, and obtain a hue map.

[0172] (2) Calculate the superposition of the hue map and the connected components in the binary map, and then obtain the hue map of the leaf connected components.

[0173] (3) Statistically analyze the hue values of all leaf connected components of each seedling. Through the method of multi-threshold segmentation (according to the Fisher criterion, use the principle of the largest between-class variance and the smallest within-class variance to perform multi-threshold segmentation on the luminance map), different hue levels are obtained, and a hue level image is obtained. The hue value of each pixel point in the hue level image is the hue mean of the hue level where the original pixel point is located. Obtain a hue mean sequence, which is called a hue sequence.

[0174] Calculate the matching between the hue sequence of each seedling and the standard hue sequence. The calculation process is as follows:

[0175] (1) Calculate the minimum hue difference between each element in each seedling hue sequence and all elements in the standard hue sequence as the characteristic parameter of this element. The larger the characteristic parameter, the more abnormal the corresponding seedling.

[0176] (2) Multiple characteristic parameters can be calculated for each seedling. Calculate the mean value of all characteristic parameters as the state characteristic parameter of this seedling. Set a threshold. When the state characteristic parameter is greater than the threshold, the corresponding seedling is abnormal.

[0177] The beneficial effect of this embodiment is as follows:

[0178] This embodiment combines image processing and machine vision. According to the main trunk and leaf distribution characteristics of each row of seedlings in the nursery, the main trunk and complete leaf information of each seedling are obtained. The growth state of the seedlings is detected using the leaf hue values of each seedling. This embodiment can achieve rapid and non-destructive detection of the growth states of multiple forestry seedlings simultaneously, improving the detection efficiency.

[0179] Embodiment 3

[0180] A forestry seedling detection device based on artificial intelligence, including a collection unit, a processing unit, a calculation unit, and a detection unit:

[0181] The collection unit uses a camera to collect the side view images of each row of seedlings in the nursery to be detected;

[0182] The processing unit, the computer performs semantic segmentation, grayscale processing, and threshold segmentation on the images collected by the collection unit to obtain the binary images of each row of seedlings in the nursery to be detected. Perform Hough line detection on the binary images to obtain the main trunk of each seedling, and preliminarily divide the leaf connected regions of each main trunk to obtain the initial leaf connected regions of each main trunk;

[0183] The calculation unit, the computer calculates the Euclidean distance between the vertical point corresponding to the initial leaf connected region on each seedling's main trunk and the center point of this initial leaf connected region and the distance between the intersection point of the main component direction line of the initial leaf connected region on each seedling's main trunk and the seedling's main trunk according to the distribution characteristics of the initial leaf connected regions of each main trunk obtained by the processing unit. Obtain the misclassified leaf connected regions and candidate belonging seedlings of each main trunk according to the above two distances, and then calculate the variance change rate of adding the misclassified leaf connected regions to each other candidate belonging seedling;

[0184] The detection unit, the computer obtains the belonging seedlings of the misclassified leaf connected regions according to the minimum value of the variance change rate obtained by the calculation unit, and then obtains all the leaves of each seedling, and detects the growth states of each row of seedlings in the nursery to be detected according to the hue values of all the leaves of each seedling.

[0185] The beneficial effect of this embodiment is as follows:

[0186] This embodiment combines image processing and machine vision to obtain the main branch and complete leaf information of each seedling according to the distribution characteristics of the main branches and leaves of each row of seedlings in the nursery, and uses the leaf tone value of each seedling to detect the growth state of the seedling. This embodiment can realize rapid and non-destructive detection of the growth states of multiple forestry seedlings at the same time, improving the detection efficiency.

[0187] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. An artificial intelligence-based forestry seedling detection method, characterized in that, Including: Obtain the binary image of each row of seedlings in the nursery to be detected; The binary image is a side view image; Perform Hough line detection on the binary image to obtain the main branches of each seedling in the binary image; Use the pixel points on the main branches of each seedling in the binary image to obtain the set of leaf connected regions belonging to the main branches of each seedling; Calculate the Euclidean distance between the vertical points corresponding to each leaf connected region in the set of leaf connected regions and the center point of the leaf connected region, and obtain the candidate belonging main branch of each leaf connected region; Obtain the intersection points of the main component directions of the leaf connected regions at the same height in the set of leaf connected regions of each seedling main branch and the corresponding seedling main branch, and calculate the distance between adjacent intersection points; Use the Euclidean distance between the vertical points corresponding to each leaf connected region in the set of leaf connected regions of each seedling main branch and the center point of the leaf connected region and the distance between the intersection points of the main component directions of adjacent leaf connected regions at the same height and the corresponding seedling main branch to judge whether each leaf connected region in the set of leaf connected regions belongs to the seedling main branch, and obtain the leaf connected regions that do not belong to the seedling main branch; Calculate the variance change rate of adding the leaf connected regions that do not belong to the seedling main branch in the leaf connected regions of each seedling main branch to the candidate belonging main branch, and determine the belonging main branch of the leaf connected regions that do not belong to the seedling main branch according to the variance change rate, and obtain all the leaves on each seedling main branch; Detect the growth status of each row of seedlings in the nursery to be detected according to the hue values of all the leaves on each seedling branch.

2. The method for detecting forestry seeds and seedlings based on artificial intelligence according to claim 1, characterized in that, The main branch of each seedling in the binary image is obtained in the following way: Perform Hough line detection on the binary image, perform threshold segmentation on the points in the Hough space corresponding to the lines in the binary image, and obtain the high-brightness points in the Hough space; Project the high-brightness points onto the abscissa of the Hough space to obtain the projection points; Perform clustering on the projection points to obtain all the clustering clusters; Calculate the difference between the maximum abscissa value and the minimum abscissa value of the projection points in each clustering cluster to obtain the abscissa span of each clustering cluster; Count the number of projection points in each clustering cluster, and take the clustering cluster with a larger number of projection points and a smaller abscissa span as the candidate clustering cluster for the main branch; Calculate the aggregation rate of each candidate clustering cluster for the main branch according to the maximum abscissa value and the minimum abscissa value in each candidate clustering cluster for the main branch; Calculate the abscissa mean value of all the projection points in each candidate clustering cluster for the main branch, and take this mean value as the direction value of the candidate clustering cluster for the main branch; Sort the direction values of all the candidate clustering clusters for the main branch to obtain a sequence of direction values; Calculate the central rate of each candidate clustering cluster for the main branch by using the direction value of each candidate clustering cluster for the main branch and the maximum and minimum values in the sequence of direction values; Multiply the aggregation rate and the central rate of each candidate clustering cluster for the main branch, and take the candidate clustering cluster for the main branch with the largest product value as the clustering cluster for the main branch, and obtain the main branch of each seedling in the binary image.

3. A method for detecting forestry seedlings based on artificial intelligence according to claim 1, characterized in that, The set of leaf connected regions belonging to the main branch of each seedling is obtained in the following way: Perform seed filling with the pixel points on the main branch of each seedling in the binary image as the initial points to obtain all the leaf connected regions in the binary image; Draw a perpendicular line to each main stem of the seedlings through the center point of each leaf connected region, and obtain all the perpendicular points; Using each perpendicular point as the initial center and the center point of each leaf connected region as the clustering data, cluster all the leaf connected regions to obtain all leaf connected region groups; Take the leaf connected region groups at different heights belonging to the same main stem of the seedlings as the leaf connected regions of each main stem of the seedlings in the binary image, and then obtain the set of leaf connected regions belonging to each main stem of the seedlings.

4. A method for detecting forestry seeds and seedlings based on artificial intelligence according to claim 1, characterized in that, The candidate belonging main stem of each leaf connected region is obtained in the following way: Use the PCA algorithm to obtain the principal component direction of each leaf connected region; Perform the following operations on each leaf connected region group at the same height in the set of leaf connected regions of each main stem of the seedlings: Calculate the Euclidean distance between the perpendicular point corresponding to the leaf connected region group and the center point of each leaf connected region in the leaf connected region group to obtain the distance from the perpendicular point to the center point of each leaf connected region; Sort the distances from the perpendicular point to the center point of each leaf connected region in ascending order to obtain an ascending sequence; Replace the last element of the ascending sequence with the value of the second last element to obtain the changed ascending sequence, and calculate the cosine similarity between the changed and the original ascending sequences. When the cosine similarity is greater than the threshold, the last element is not an outlier. When the cosine similarity is less than or equal to the threshold, the last element is an outlier. Iteratively judge whether other elements in the ascending sequence are outliers according to the above method until only half of the elements in the ascending sequence remain unjudged and the iteration stops, and obtain all the outliers in the ascending sequence; Point the principal component direction of the leaf connected region corresponding to each outlier in the ascending sequence to the nearest main stem of the seedlings as the candidate belonging main stem of the leaf connected region, and obtain the candidate belonging main stem of each leaf connected region.

5. A method for detecting forestry seedlings based on artificial intelligence according to claim 1, characterized in that, The leaf connected regions that do not belong to the main stem of the seedlings are obtained in the following way: Perform the following operations on each leaf connected region group at the same height in the set of leaf connected regions of each main stem of the seedlings: Obtain the intersection point of the principal component direction of each leaf connected region in the leaf connected region group and its corresponding main stem of the seedlings, and calculate the distance between adjacent intersection points to obtain the distance between the intersection points of the principal component direction lines of each leaf connected region and the main stem of the seedlings; Sort the distances between the intersection points of the principal component direction lines of each leaf connected region and the main stem of the seedlings in ascending order to obtain an ascending sequence; Replace the last element of the ascending sequence with the value of the second last element to obtain the changed ascending sequence, and calculate the cosine similarity between the changed and the original ascending sequences. When the cosine similarity is greater than the threshold, the last element is not an outlier. When the cosine similarity is less than or equal to the threshold, the last element is an outlier. Iteratively judge whether other elements in the ascending sequence are outliers according to the above method until only half of the elements in the ascending sequence remain unjudged and the iteration stops, and obtain all the outlier distances in the ascending sequence; Judge the leaf connected regions corresponding to each abnormal distance in the ascending sequence: When the distance from the center point of the leaf connected region to its corresponding perpendicular point is not the abnormal distance, then the leaf connected region is a real leaf connected region and belongs to the main stem of the current seedling; when the distance from the center point of the leaf connected region to its corresponding perpendicular point is the abnormal distance, then the leaf connected region does not belong to the main stem of the current seedling.

6. The method for detecting forestry seeds and seedlings based on artificial intelligence according to claim 1, wherein, All the leaves on each main stem of the seedling are obtained in the following way: Obtain the distances from the center points of each real leaf connected region in the candidate belonging seedlings of the leaf connected regions that do not belong to the current main stem of the seedling to the main stem of the candidate belonging seedlings, and obtain the original distance sequence; Calculate the distance from the center point of the leaf connected region that does not belong to the current main stem of the seedling to the main stem of its candidate belonging seedlings, and add this distance to the original distance sequence to obtain a new distance sequence; Calculate the variance of the original distance sequence and the variance of the new distance sequence; Calculate the variance change rate of dividing the leaf connected regions that do not belong to the main stem of the seedling into candidate belonging seedlings by using the variance of the original distance sequence and the variance of the new distance sequence; Take the candidate belonging seedling corresponding to the minimum variance change rate as the belonging seedling of the leaf connected regions that do not belong to the current main stem of the seedling, and thus obtain all the leaves on each main stem of the seedling.

7. A method for detecting forestry seedlings based on artificial intelligence according to claim 1, characterized in that, The process of detecting the growth state of each row of seedlings in the nursery to be detected is specifically as follows: Obtain the standard hue level sequence of the seedlings with good growth; Convert the RGB images of each row of seedlings in the nursery to be detected into the HIS color space to obtain a hue map; Overlay the hue map with all the leaf connected regions in the binary map to obtain all the leaf hue values of each seedling; Perform multi-threshold segmentation on all the leaf hue values of each seedling to obtain all the hue levels of each seedling; Calculate the difference between each hue level of each seedling and each standard hue level in the standard hue level sequence, and take the minimum difference as the characteristic parameter of this hue level to obtain all the hue level characteristic parameters of each seedling; Take the mean value of all the hue level characteristic parameters of each seedling as the state characteristic parameter of this seedling; Judge the state characteristic parameter of each seedling: When the state characteristic parameter of each seedling is greater than the threshold, the growth state of this seedling is poor; when the state characteristic parameter of each seedling is less than or equal to the threshold, the growth state of this seedling is good.

8. A method for detecting forestry seeds and seedlings based on artificial intelligence according to claim 1, characterized in that The binary map of each row of seedlings in the nursery to be detected is obtained in the following way: Collect the side view images of each row of seedlings in the nursery to be detected; Perform semantic segmentation on the side view images to obtain the RGB images of each row of seedlings in the nursery to be detected; Perform grayscale processing on the RGB images to obtain the grayscale images of each row of seedlings in the nursery to be detected; Perform threshold segmentation on the grayscale images to obtain the binary maps of each row of seedlings in the nursery to be detected.

9. An artificial intelligence-based forestry seedling detection device, characterized in that, It includes a collection unit, a processing unit, a calculation unit and a detection unit: The collection unit uses a camera to collect the side view images of each row of seedlings in the nursery to be detected; The processing unit processes the images collected by the acquisition unit by a computer to obtain a binary image of each row of seedlings in the nursery to be detected, performs Hough line detection on the binary image to obtain the main branches of each seedling, and preliminarily divides the leaf connected regions of each main branch to obtain a set of leaf connected regions of each main branch; The computing unit calculates, by a computer, the distances between the leaf connected regions of each main branch and the main branches according to the distribution characteristics of the set of leaf connected regions of each main branch obtained by the processing unit, obtains the leaf connected regions that do not belong to the main branches and their candidate belonging seedlings according to the distances, and calculates the variance change rate of the leaf connected regions that do not belong to the main branches when added to their candidate belonging seedlings; The detection unit obtains, by a computer, the main branches of the belonging seedlings to which the leaf connected regions that do not belong to the main branches belong according to the variance change rate obtained by the computing unit, obtains all the leaves on each seedling main branch, and detects the growth state of each row of seedlings in the nursery to be detected according to the hue values of all the leaves on each seedling branch.

Citation Information

Patent Citations

  • Automatic detection method of wheat seedling emergence

    CN102663397A

  • A method and a system for extracting leaf growth parameters of fruit trees based on clustering segmentation

    CN109166145A