CN108362698B - Method and device for detecting main stem nodes of seedlings - Google Patents

Method and device for detecting main stem nodes of seedlings Download PDF

Info

Publication number
CN108362698B
CN108362698B CN201810117281.7A CN201810117281A CN108362698B CN 108362698 B CN108362698 B CN 108362698B CN 201810117281 A CN201810117281 A CN 201810117281A CN 108362698 B CN108362698 B CN 108362698B
Authority
CN
China
Prior art keywords
framework
branch
main stem
seedling
contour
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810117281.7A
Other languages
Chinese (zh)
Other versions
CN108362698A (en
Inventor
赵学观
王秀
宋健
张贺
张春凤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Research Center of Intelligent Equipment for Agriculture
Original Assignee
Beijing Research Center of Intelligent Equipment for Agriculture
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Research Center of Intelligent Equipment for Agriculture filed Critical Beijing Research Center of Intelligent Equipment for Agriculture
Priority to CN201810117281.7A priority Critical patent/CN108362698B/en
Publication of CN108362698A publication Critical patent/CN108362698A/en
Application granted granted Critical
Publication of CN108362698B publication Critical patent/CN108362698B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/24Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N2021/8466Investigation of vegetal material, e.g. leaves, plants, fruits

Abstract

The invention provides a method and a device for detecting a main stem node of a seedling, which comprises the following steps: acquiring a skeletonized image of the seedling to be detected; acquiring a sub-contour line corresponding to each framework branch and a contour angle corresponding to each framework branch; and determining whether to prune each framework branch according to the sub-contour line corresponding to each framework branch and the contour angle corresponding to each framework branch, if the fact that all branches of the seedling to be detected have branches and need to be pruned is judged, obtaining the skeletonized image after pruning operation is completed, and obtaining all main stem nodes in the main stem region in the skeletonized image after pruning. According to the invention, redundant skeleton branches are removed by a pruning method, so that the identification efficiency of the intersection point of skeleton lines is improved; the main stem is approximated to be a straight line, and the adaptability of the algorithm is improved by adopting a linear scanning mode within a certain angle range; the main stem node detection of the bag-of-words model has a self-learning function, and the identification accuracy is improved on the whole.

Description

Method and device for detecting main stem nodes of seedlings
Technical Field
The invention relates to the field of agricultural intelligent equipment, in particular to a seedling main stem node detection method and device.
Background
At present, intelligent agriculture is the fusion between agriculture and artificial intelligence technology and modern information technology, and is also a technology which is urgently needed in the global agricultural development at present. The crop growth information acquisition technology is one of important technical supports of intelligent agriculture, and the crop growth condition monitoring and evaluation are realized by establishing a mathematical model for scientifically evaluating the crop growth condition based on multi-information fusion, so that the scientific and intelligent management and decision making of crop production by adopting a computer are possible.
At present, the collection of crop growth information at home and abroad mainly comprises the acquisition of apparent information and intrinsic information, wherein the apparent information comprises leaf area, plant height and biomass measurement, shape identification of leaves and the like, and the intrinsic information is physical and chemical information acquired by means of external means, such as nutrition information monitoring, leaf and canopy temperature, leaf water potential and chlorophyll content.
The characteristics of the tomato seedlings, such as leaf number, leaf length, seedling height, stem thickness, dry matter content and the like, are used as diagnostic indexes, and according to a large number of researches, the significant influences of the seedling internode length and the environmental stress are very sensitive, including water shortage, high temperature at night, lack of sunlight and excessive nitrogen, so that the tomato seedling internode distance can be used as an index for reflecting the seedling growth condition.
In the prior art, quality qualitative observation and judgment are mainly carried out on fruit and vegetable seedlings in different growth stages under different growth environments through manual work, a unified standard does not exist, and misjudgment is easily caused.
Disclosure of Invention
The present invention provides a seedling main stem node detection method and apparatus that overcomes, or at least partially solves, the above-mentioned problems.
According to one aspect of the invention, a seedling main stem node detection method is provided, which comprises the following steps:
s1, acquiring a skeletonized image of the seedling to be detected, wherein the skeletonized image comprises a main stem skeleton of the seedling to be detected, all skeleton branches on a skeleton line of the seedling to be detected and a contour line of the seedling to be detected;
s2, acquiring a sub-contour line corresponding to each framework branch and a contour angle corresponding to each framework branch; the sub-contour line corresponding to each framework branch is a section of the contour line, the contour angle corresponding to each framework branch is an included angle formed by connecting two end points of the sub-contour line corresponding to each framework branch with a node corresponding to each framework branch, and the node corresponding to each framework branch is an intersection point between each framework branch and the main stem framework or an intersection point between each framework branch and other framework branches of the seedling to be detected;
s3, determining whether each framework branch needs to be pruned or not according to the sub-contour line corresponding to each framework branch and the contour angle corresponding to each framework branch, if the fact that all branches of the seedling to be detected have branches and need to be pruned is judged, obtaining the skeletonized image after pruning is completed after pruning operation, and obtaining all main stem nodes in the main stem region in the skeletonized image after pruning.
Preferably, in step S3, determining whether to prune each skeleton branch according to the sub-contour line corresponding to each skeleton branch and the contour angle corresponding to each skeleton branch includes: and for any one of all the framework branches, if the ratio of the length of the sub-contour line corresponding to the any one framework branch to the contour angle corresponding to the any one framework branch is smaller than a preset threshold value, pruning is carried out on the any one framework branch.
Preferably, the length of the sub-contour line corresponding to any one of the skeleton branches is:
OL(bi)=max{Om(kj,kn):kj∈T(li),kn∈T(li)},
wherein, biRepresents a node corresponding to any of the skeleton branches, Om (k)j,kn) Represents kjAnd knContour line between, T (l)i) Representing the sum of b on the contour lineiIs smaller than the set of all points of the preset distance.
Preferably, k isjAnd knThe contour lines between are:
Om(kj,kn)=min(d(kj,kn),d(k1,kN)-d(kj,kn)),
wherein d (k)j,kn) Represents kjAnd knDistance between, k1Representing a first point, k, on said contour lineNRepresenting the last point on the contour, d (k)1,kN) Represents k1And kNThe distance between them.
Preferably, in step S3, the main stem region in the skeletonized image after pruning is acquired through a line scan algorithm.
Preferably, the obtaining of the main stem region in the pruned skeletonized image by the line scanning algorithm specifically includes:
acquiring an interested area in the two-dimensional color image of the seedling to be detected;
taking the lowest point of the main stem of the seedling to be detected as an end point of a scanning straight line, and sequentially changing the inclination angle of the scanning straight line in the region of interest according to a preset increment;
acquiring the number of target points on the scanning straight line corresponding to each inclination angle, and determining the main stem region in the skeletonized image after pruning according to the scanning straight line with the largest number of the target points and the skeletonized image after pruning, wherein the target points comprise all pixel points of the seedlings to be detected in the two-dimensional color image.
Preferably, in step S3, all main stem nodes in the main stem region in the skeletonized image after pruning are obtained through the bag-of-word model.
According to another aspect of the present invention, there is provided a seedling main stem node detecting device, comprising:
the skeleton module is used for acquiring a skeleton image of the seedling to be detected, and the skeleton image comprises a main stem skeleton of the seedling to be detected, all skeleton branches on a skeleton line of the seedling to be detected and a contour line of the seedling to be detected;
the branch module is used for acquiring a sub-contour line corresponding to each framework branch and a contour angle corresponding to each framework branch; the sub-contour line corresponding to each framework branch is a section of the contour line, the contour angle corresponding to each framework branch is an included angle formed by connecting two end points of the sub-contour line corresponding to each framework branch with a node corresponding to each framework branch, and the node corresponding to each framework branch is an intersection point between each framework branch and the main stem framework or an intersection point between each framework branch and other framework branches of the seedling to be detected;
and the main stem node module is used for determining whether to prune each framework branch according to the sub-contour line corresponding to each framework branch and the contour angle corresponding to each framework branch, if the fact that all branches of the seedling to be detected have branches and need to be pruned is judged, obtaining the skeletonized image after pruning is completed after pruning operation, and obtaining all main stem nodes in the main stem region in the skeletonized image after pruning.
According to yet another aspect of the present invention, there is provided a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, cause the computer to perform a seedling main stem node detection method.
According to another aspect of the present invention, there is provided a non-transitory computer readable storage medium storing computer instructions for causing a computer to perform a seedling main stem node detection method.
The invention provides a seedling main stem node detection method and device, which remove redundant framework branches by a pruning method of a skeleton image, improve the identification efficiency of the intersection point of a framework line, determine whether to prune according to the ratio of the length of a contour line to the angle of the contour line, have the inherent integral property and have good noise resistance. The path of the main stem is approximated to a straight line, and a linear scanning mode in a certain angle range is adopted, so that the adaptability of the algorithm is improved, and the accuracy of detecting each main stem node is improved by a linear scanning method. The main stem node detection of the bag-of-words model has a self-learning function, and the identification accuracy is improved on the whole.
Drawings
FIG. 1 is a flow chart of a seedling main stem node detection method according to one embodiment of the present invention;
FIG. 2 is a schematic diagram of the hardware system components in the seedling main stem node detection method according to a preferred embodiment of the present invention;
FIG. 3 is a schematic diagram of a skeletonized image of a section in a seedling main stem node detection method according to a preferred embodiment of the present invention;
FIG. 4 is a schematic diagram illustrating a pruning process in a seedling stem node detection method according to a preferred embodiment of the present invention;
FIG. 5 is a schematic diagram showing the selection of main stem regions in a seedling main stem node detection method according to a preferred embodiment of the present invention;
FIG. 6 is a schematic diagram of a method for detecting the nodes of the main stem of a seedling according to a preferred embodiment of the present invention, in which the nodes of the main stem are obtained by a bag-of-word model;
fig. 7 is a schematic structural diagram of a seedling main stem node detection device according to an embodiment of the invention.
Detailed Description
The following detailed description of embodiments of the present invention is provided in connection with the accompanying drawings and examples. The following examples are intended to illustrate the invention but are not intended to limit the scope of the invention.
Fig. 1 is a flow chart of a seedling main stem node detection method according to an embodiment of the present invention, as shown in fig. 1, the method includes:
s1, acquiring a skeletonized image of the seedling to be detected, wherein the skeletonized image comprises a main stem skeleton of the seedling to be detected, all skeleton branches on a skeleton line of the seedling to be detected and a contour line of the seedling to be detected;
s2, acquiring a sub-contour line corresponding to each framework branch and a contour angle corresponding to each framework branch; the sub-contour line corresponding to each framework branch is a section of the contour line, the contour angle corresponding to each framework branch is an included angle formed by connecting two end points of the sub-contour line corresponding to each framework branch with a node corresponding to each framework branch, and the node corresponding to each framework branch is an intersection point between each framework branch and the main stem framework or an intersection point between each framework branch and other framework branches of the seedling to be detected;
s3, determining whether each framework branch needs to be pruned or not according to the sub-contour line corresponding to each framework branch and the contour angle corresponding to each framework branch, if the fact that all branches of the seedling to be detected have branches and need to be pruned is judged, obtaining the skeletonized image after pruning is completed after pruning operation, and obtaining all main stem nodes in the main stem region in the skeletonized image after pruning.
The skeletonized image of the seedling to be detected can be obtained by a skeletonization method, the skeletons in the skeletonized image are communicated and are single-pixel, but because the skeletons have unstable influence on boundary noise, the influence of the skeletons on the boundary noise means that because the boundary of the seedling to be detected has tiny protrusions or depressions, the limited part of the corresponding skeleton will have great change, and the phenomenon of redundant skeleton support usually occurs. In order to overcome the noise sensitivity of the skeletonization process, necessary measures are taken to pre-process the boundary of the seedling to be detected or directly prune the redundant skeleton branch, namely, the redundant skeleton branch is removed.
Therefore, it is necessary to determine whether each skeleton branch in the skeletonized image is a redundant skeleton branch, and the determination method is as follows: taking one of the framework branches as an example, taking a certain section of the contour line of the seedling to be detected as the sub-contour line corresponding to the framework branch, taking two end points of the sub-contour line corresponding to the framework branch as A and B respectively, taking A, B as AO and BO respectively, taking the angle AOB as the contour included angle corresponding to the branch, and judging whether the branch is a redundant framework branch or not according to the sub-contour line corresponding to the framework branch and the contour angle corresponding to the branch.
The node O may be an intersection point of the skeleton branch and the main stem skeleton, or an intersection point of the skeleton branch and other skeleton branches, if the intersection point of the skeleton branch and the main stem skeleton is present, the node O is a main stem node, and if the intersection point of the skeleton branch and other skeleton branches is present, the node O is a non-main stem node.
According to a great deal of practical experience, the length of the sub-contour line corresponding to the general main stem node is large, and the corresponding contour angle is small; and the length and the contour angle of the character contour line corresponding to the non-main stem node have no obvious difference, so that the ratio of the length and the contour angle of the sub-contour line is taken as reference, if the ratio is smaller than a preset threshold value, the skeleton branch corresponding to the node is indicated to be a redundant skeleton branch, and pruning is carried out on the redundant skeleton branch.
By the method, each framework branch is judged, whether the framework branch is a redundant framework branch is judged, and if yes, the framework branch is cut. And after all the skeleton branches are judged, obtaining a skeleton image after pruning.
The main stem straight line is regarded as the position where the main stem is basically located in the skeletonized image, after the main stem straight line is determined, nodes far away from the main stem straight line are removed, and the nodes are regarded as not on the main stem and cannot be used as candidate nodes of branch points. In the skeletonized image of the seedling to be detected after pruning, the main stems of the seedling can be connected to form an approximate straight line from the top to the root to determine the main stem area.
The path of the main stem is approximated to a straight line, and a linear scanning mode in a certain angle range is adopted, so that the adaptability of the algorithm is improved, and the accuracy of detecting each main stem node is improved by a linear scanning method.
And finally, acquiring all candidate nodes in the main stem region through a bag-of-words model, and classifying all candidate nodes through a support vector machine to obtain main stem nodes and non-main stem nodes.
The embodiment of the invention provides a seedling main stem node detection method, which removes redundant framework branches by a pruning method of a framework image, improves the identification efficiency of the intersection point of a framework line, determines whether pruning is carried out or not according to the ratio of the length of a contour line to the angle of the contour line, has the inherent integral property and also has good noise resistance. The path of the main stem is approximated to a straight line, and a linear scanning mode in a certain angle range is adopted, so that the adaptability of the algorithm is improved, and the accuracy of detecting each main stem node is improved by a linear scanning method. The main stem node detection of the bag-of-words model has a self-learning function, and the identification accuracy is improved on the whole.
On the basis of the foregoing embodiment, preferably, in step S3, determining whether to prune each skeleton branch according to the sub-contour line corresponding to each skeleton branch and the contour angle corresponding to each skeleton branch specifically includes:
and for any one of all the framework branches, if the ratio of the length of the sub-contour line corresponding to the any one framework branch to the contour angle corresponding to the any one framework branch is smaller than a preset threshold value, pruning is carried out on the any one framework branch.
On the basis of the above embodiment, preferably, the length of the sub-contour line corresponding to any one of the skeleton branches is:
OL(bi)=max{Om(kj,kn):kj∈T(li),kn∈T(li)},
wherein, biRepresents a node corresponding to any of the skeleton branches, Om (k)j,kn) Represents kjAnd knContour line between, T (l)i) Representing the sum of b on the contour lineiIs less than a predetermined distanceThe set of all points.
OL(bi) When the sub-outline corresponding to the framework branch is determined, the node b corresponding to the framework branch is determinediThen, the T (l) corresponding to the skeleton branch is determinedi),T(li) Represents the sum of b on the contour lineiIs less than the set of all points of the preset distance, the sub-outline OL (b) corresponding to the skeleton branchi) Is set T (l)i) The medium largest sub-contour.
Specifically, kjAnd knThe contour lines between are:
Om(kj,kn)=min(d(kj,kn),d(k1,kN)-d(kj,kn)),
wherein d (k)j,kn) Represents kjAnd knDistance between, k1Representing a first point, k, on said contour lineNRepresenting the last point on the contour, d (k)1,kN) Represents k1And kNThe distance between them.
For a contour line between any two points, the contour line is defined as a smaller contour line consisting of two end points.
On the basis of the above embodiment, preferably, in step S3, the main stem region in the skeletonized image after pruning is acquired through a line scan algorithm.
The embodiment of the invention further improves the accuracy of selecting the main stem nodes in the main stem region by using a linear scanning algorithm during the selection of the main stem region.
Specifically, the obtaining of the main stem region in the pruned skeletonized image through the linear scanning algorithm specifically includes:
determining whether to prune each framework branch according to the sub-contour line corresponding to each framework branch and the contour angle corresponding to each framework branch, which specifically comprises the following steps:
and for any one of all the framework branches, if the ratio of the length of the sub-contour line corresponding to the any one framework branch to the contour angle corresponding to the any one framework branch is smaller than a preset threshold value, pruning is carried out on the any one framework branch.
Fig. 2 is a schematic diagram of the hardware system in the seedling main stem node detection method according to a preferred embodiment of the present invention, and as shown in fig. 2, the hardware system mainly comprises hardware such as a PC 1, a PCI-1428 image acquisition card 2, and a vision sensor 3, and the vision sensor 3 includes a camera for acquiring a side image of a seedling to be detected.
Next, ossifying the side image to obtain a skeletonized image, fig. 3 is a schematic diagram of a skeletonized image of a certain section in the seedling main stem node detection method according to a preferred embodiment of the present invention, as shown in fig. 3, skeletons in the skeletonized image are connected and single-pixel, but because the skeletons have unstable influence on boundary noise, it means that a limited portion of the corresponding skeleton will be greatly changed due to a minute protrusion or recess existing on the boundary of the seedling to be detected, and a phenomenon of redundant skeleton support will usually occur. In order to overcome the noise sensitivity of the skeletonization process, necessary measures are taken to pre-process the boundary of the seedling to be detected or directly prune the redundant skeleton branch, namely, the redundant skeleton branch is removed.
Therefore, it is necessary to determine whether each skeleton branch in the skeletonized image is a redundant skeleton branch, and the determination method is as follows: taking a skeleton branch in FIG. 3 as an example, as shown in FIG. 3, the node b corresponding to the skeleton branchiThe node b corresponding to the skeleton branch is the intersection point of the skeleton branch and other skeleton branchesiBelonging to a node of a non-main stem, from each point on the contour line to biIf the distance is less than the preset distance, all the points less than the preset distance are combined into a set T (l)i) Set T (l)i) The contour line of the maximum length determined by any two points in the process is taken as a node biThe corresponding sub-contour line is the sub-contour line corresponding to the branch of the framework.
Specifically, the length of the sub-contour line corresponding to the skeleton branch is:
OL(bi)=max{Om(kj,kn):kj∈T(li),kn∈T(li)},
wherein, biRepresents the node corresponding to the skeleton branch, Om (k)j,kn) Represents kjAnd knContour line between, T (l)i) Represents the sum of b on the contour lineiIs smaller than the set of all points of the preset distance.
The process of solving the skeleton is the process of solving the central axis of the image, and the skeleton is a line with one pixel width. Therefore, the intersection point of the branches can find the contour corresponding to the branch as the central axis. Assume that the contour line O of the image object consists of N ordered points O ═ pi:i∈[1,N]}. Wherein, any two points k on the contour linejAnd knThe contour lines between are defined as:
Om(kj,kn)=min(d(kj,kn),d(k1,kN)-d(kj,kn)),
wherein d (k)j,kn) Represents kjAnd knDistance between, k1Representing a first point, k, on the contour lineNRepresenting the last point on the contour, d (k)1,kN) Represents k1And kNThe distance between them.
Two end points of the sub-contour line corresponding to the framework branch are kaAnd kbThen, the corresponding contour angle of the skeleton branch is:
Figure BDA0001570994130000101
wherein dis (k)a,kb) Is kaPoint and kbLinear distance of points, dis (k)a,bi) Is kaPoint and biLinear distance of points, dis (k)b,bi) Is kbPoint and biThe straight line distance of the points, the criterion for judging the framework branch as a redundant framework branch is as follows:
Figure BDA0001570994130000102
wherein, represents a preset threshold value, and λ represents a ratio.
Fig. 4 is a schematic diagram of a pruning process in a seedling stem node detection method according to a preferred embodiment of the present invention, as shown in fig. 4, (a) shows an original image of a section of a seedling to be detected, (b) shows a skeletonized image, and (c) shows a skeletonized image after pruning.
Therefore, by means of the pruning method for the skeletonized image, redundant skeleton branches are removed, the identification efficiency of the skeleton line intersection point is improved, whether pruning is carried out or not is determined according to the ratio of the length of the contour line to the angle of the contour line, the integral property is inherent, and the anti-noise performance is good.
Next, a stem region in the pruned skeletonized image is selected, and a tomato seedling is taken as an example for explanation, fig. 5 is a schematic diagram of the selection of the stem region in the seedling stem node detection method according to a preferred embodiment of the present invention, as shown in fig. 5, a stem straight line is considered to be a position where a stem is basically located in the image, and next, nodes farther away from the stem straight line are removed, and the nodes are considered not to be on the stem and cannot be used as candidate nodes of a skeleton branch point. In the skeletonized image after pruning of the tomato seedlings, the main stems of the tomato seedlings can be connected approximately in a straight line from the top to the root, so as to determine the main stem area. Accordingly, the stem region extraction detection algorithm based on linear scanning is adopted, and the specific steps are as follows:
because the stem of tomato seedling receives the influence of accidental factor, can not guarantee self vertical, often appear the slope as shown in the figure, if directly adopt the linear scanning method to cause inefficiency. Therefore, the method firstly judges the lowest point of the main stem in the two-dimensional color image of the tomato seedling, namely the middle position O of the diameter of the lowest end, then scans and extracts the leftmost end position A and the rightmost end position B of the seedling image, takes OC as a bisector of the angle AOB, and selects 25-degree angle for scanning by taking the bisector OC as a central line and selecting bilateral symmetry through statistics of the inclination angle of the tomato seedling. The sector area determined by the AOB is the region OF interest OF the embodiment OF the present invention, and the lowest point OF the main stem in the region OF interest is used as an end point OF the scanning line, and the inclination angles OF the scanning line are sequentially changed according to a preset increment, wherein OD and OF are a certain line in the scanning process, and OO' is the main stem line to be searched.
And during scanning, taking the point O as an end point, setting the preset increment of a scanning line to be 2 degrees, generating straight lines with different slopes, counting the number of target points falling on the straight lines, and finally taking the straight line containing the most target points as a main stem straight line.
And acquiring the number of target points on the scanning straight line corresponding to each inclination angle, and determining a main stem region according to the scanning straight lines of the number of the target points, wherein the target points are all points on the framework of the seedling to be detected.
Most of interference nodes are removed through candidate node selection in the main stem region, but some nodes which are not main stem nodes still exist in the main stem region. Through observation, the framework branch point regions of different seedlings have differences, but common places of the framework branch point regions can be found, for example, in finer parts such as branch points, too large differences can not be observed, main stem node part characteristics and non-main stem node part characteristics of different seedlings can be extracted and used as visual vocabularies for identifying the class of targets, namely, the seedlings are classified through a Bag-of-words model (English full name: Bag-of-words).
Fig. 6 is a schematic diagram of main stem nodes obtained by the bag-of-words model in the seedling main stem node detection method according to a preferred embodiment of the present invention, and as shown in fig. 6, the flow of obtaining the main stem nodes in the main stem region by the bag-of-words model is as follows:
because the SIFT algorithm is applied to the most extensive algorithm when extracting the local invariant features in the image, the SIFT algorithm is adopted to extract the SIFT features of each image in the training set in the embodiment of the invention. The images in the training set comprise images of the characteristic regions of the manually selected main stem nodes and images of the characteristic regions of the non-main stem nodes, and SIFT characteristics of each image are extracted.
And performing cluster analysis on the SIFT characteristics of each image in the training set by using a K-Means algorithm to obtain K clusters, merging each cluster into visual vocabularies with similar word senses, and constructing a word list containing the K vocabularies.
And finally, counting the occurrence frequency of each word in the word list in the image, so that the image is represented as a K-dimensional numerical value vector, and a bag-of-words model histogram is generated.
And for the skeletonized image of the seedling to be detected after pruning, extracting SIFT features of all nodes in the image, expressing the SIFT features into a numerical vector histogram by using words in the word list, and classifying by using a support vector machine to see which nodes belong to main stem nodes and which nodes belong to non-main stem nodes.
It should be noted that Support Vector Machines (SVMs) were first proposed in cornnacortex and Vapnik, which are the same as those proposed in 1995, show many specific advantages in solving small sample, nonlinear and high-dimensional pattern recognition, and can be popularized and applied to other Machine learning problems such as function fitting. In machine learning, support vector machines (SVMs, and also support vector networks) are supervised learning models associated with associated learning algorithms that can analyze data, identify patterns, and use them for classification and regression analysis.
Fig. 7 is a schematic structural view of a seedling main stem node detection device according to an embodiment of the present invention, as shown in fig. 7, the device includes:
the skeleton module is used for acquiring a skeleton image of the seedling to be detected, and the skeleton image comprises a main stem skeleton of the seedling to be detected, all skeleton branches on a skeleton line of the seedling to be detected and a contour line of the seedling to be detected;
the branch module is used for acquiring a sub-contour line corresponding to each framework branch and a contour angle corresponding to each framework branch; the sub-contour line corresponding to each framework branch is a section of the contour line, the contour angle corresponding to each framework branch is an included angle formed by connecting two end points of the sub-contour line corresponding to each framework branch with a node corresponding to each framework branch, and the node corresponding to each framework branch is an intersection point between each framework branch and the main stem framework or an intersection point between each framework branch and other framework branches of the seedling to be detected;
and the main stem node module is used for determining whether to prune each framework branch according to the sub-contour line corresponding to each framework branch and the contour angle corresponding to each framework branch, if the fact that all branches of the seedling to be detected have branches and need to be pruned is judged, obtaining the skeletonized image after pruning is completed after pruning operation, and obtaining all main stem nodes in the main stem region in the skeletonized image after pruning.
The specific implementation process of this apparatus embodiment is the same as the execution process of the above method embodiment, and please refer to the above method embodiment specifically, which is not described herein again.
On the basis of the foregoing embodiment, preferably, in the branch module, the determining whether to prune any branch according to the sub-contour line corresponding to any skeleton branch node and the contour angle corresponding to any branch specifically includes:
and if the ratio of the length of the sub-contour line corresponding to any skeleton branch node to the contour angle corresponding to any skeleton branch node is smaller than a preset threshold value, pruning any branch.
An embodiment of the present invention discloses a computer program product, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, which when executed by a computer, enable the computer to perform the methods provided by the above-mentioned method embodiments, for example, including: acquiring a skeletonized image of a seedling to be detected, wherein the skeletonized image comprises a main stem skeleton of the seedling to be detected, all skeleton branches on a skeleton line of the seedling to be detected and a contour line of the seedling to be detected; acquiring a sub-contour line corresponding to each framework branch and a contour angle corresponding to each framework branch; the sub-contour line corresponding to each framework branch is a section of the contour line, the contour angle corresponding to each framework branch is an included angle formed by connecting two end points of the sub-contour line corresponding to each framework branch with a node corresponding to each framework branch, and the node corresponding to each framework branch is an intersection point between each framework branch and the main stem framework or an intersection point between each framework branch and other framework branches of the seedling to be detected; and determining whether to prune each framework branch according to the sub-contour line corresponding to each framework branch and the contour angle corresponding to each framework branch, if the fact that all branches of the seedling to be detected have branches and need to be pruned is judged, obtaining the skeletonized image after pruning operation is completed, and obtaining all main stem nodes in the main stem region in the skeletonized image after pruning.
An embodiment of the present invention provides a non-transitory computer-readable storage medium storing computer instructions that cause a computer to perform a method provided by the above method embodiments, for example, including: acquiring a skeletonized image of a seedling to be detected, wherein the skeletonized image comprises a main stem skeleton of the seedling to be detected, all skeleton branches on a skeleton line of the seedling to be detected and a contour line of the seedling to be detected; acquiring a sub-contour line corresponding to each framework branch and a contour angle corresponding to each framework branch; the sub-contour line corresponding to each framework branch is a section of the contour line, the contour angle corresponding to each framework branch is an included angle formed by connecting two end points of the sub-contour line corresponding to each framework branch with a node corresponding to each framework branch, and the node corresponding to each framework branch is an intersection point between each framework branch and the main stem framework or an intersection point between each framework branch and other framework branches of the seedling to be detected; and determining whether to prune each framework branch according to the sub-contour line corresponding to each framework branch and the contour angle corresponding to each framework branch, if the fact that all branches of the seedling to be detected have branches and need to be pruned is judged, obtaining the skeletonized image after pruning operation is completed, and obtaining all main stem nodes in the main stem region in the skeletonized image after pruning.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, the method of the present invention is only a preferred embodiment and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (8)

1. A seedling main stem node detection method is characterized by comprising the following steps:
s1, acquiring a skeletonized image of the seedling to be detected, wherein the skeletonized image comprises a main stem skeleton of the seedling to be detected, all skeleton branches on a skeleton line of the seedling to be detected and a contour line of the seedling to be detected;
s2, acquiring a sub-contour line corresponding to each framework branch and a contour angle corresponding to each framework branch; the sub-contour line corresponding to each framework branch is a section of the contour line, the contour angle corresponding to each framework branch is an included angle formed by connecting two end points of the sub-contour line corresponding to each framework branch with a node corresponding to each framework branch, and the node corresponding to each framework branch is an intersection point between each framework branch and the main stem framework or an intersection point between each framework branch and other framework branches of the seedling to be detected;
s3, determining whether each framework branch needs to be pruned or not according to the sub-contour line corresponding to each framework branch and the contour angle corresponding to each framework branch, if the fact that all branches of the seedling to be detected have branches and need to be pruned is judged, obtaining a skeletonized image after pruning is completed after pruning operation is completed, and obtaining all main stem nodes in a main stem region in the skeletonized image after pruning;
determining whether to prune each framework branch according to the sub-contour line corresponding to each framework branch and the contour angle corresponding to each framework branch, which specifically comprises the following steps:
and for any one of all the framework branches, if the ratio of the length of the sub-contour line corresponding to the any one framework branch to the contour angle corresponding to the any one framework branch is smaller than a preset threshold value, pruning is carried out on the any one framework branch.
2. The method of claim 1, wherein the length of the sub-contour line corresponding to any one of the skeleton branches is:
OL(bi)=max{Om(kj,kn):kj∈T(li),kn∈T(li)},
wherein, biRepresents a node corresponding to any of the skeleton branches, Om (k)j,kn) Represents kjAnd knContour line between, T (l)i) Representing the sum of b on the contour lineiIs smaller than the set of all points of the preset distance.
3. The method of claim 2, wherein k isjAnd knThe contour lines between are:
Om(kj,kn)=min(d(kj,kn),d(k1,kN)-d(kj,kn)),
wherein d (k)j,kn) Represents kjAnd knDistance between, k1Representing a first point, k, on said contour lineNRepresenting the last point on the contour, d (k)1,kN) Represents k1And kNThe distance between them.
4. The method according to claim 1, wherein in step S3, the main stem region in the skeletonized image after pruning is obtained by a line scan algorithm.
5. The method according to claim 4, wherein the obtaining of the main stem region in the skeletonized image after pruning by the line scan algorithm specifically comprises:
acquiring an interested area in the two-dimensional color image of the seedling to be detected;
taking the lowest point of the main stem of the seedling to be detected as an end point of a scanning straight line, and sequentially changing the inclination angle of the scanning straight line in the region of interest according to a preset increment;
acquiring the number of target points on the scanning straight line corresponding to each inclination angle, and determining the main stem region in the skeletonized image after pruning according to the scanning straight line with the largest number of the target points and the skeletonized image after pruning, wherein the target points comprise all pixel points of the seedlings to be detected in the two-dimensional color image.
6. The method according to claim 1, wherein in step S3, all nodes of the main stem in the main stem region in the skeletonized image after pruning are obtained through the bag-of-words model.
7. The utility model provides a seedling stem node detection device which characterized in that includes:
the skeleton module is used for acquiring a skeleton image of the seedling to be detected, and the skeleton image comprises a main stem skeleton of the seedling to be detected, all skeleton branches on a skeleton line of the seedling to be detected and a contour line of the seedling to be detected;
the branch module is used for acquiring a sub-contour line corresponding to each framework branch and a contour angle corresponding to each framework branch; the sub-contour line corresponding to each framework branch is a section of the contour line, the contour angle corresponding to each framework branch is an included angle formed by connecting two end points of the sub-contour line corresponding to each framework branch with a node corresponding to each framework branch, and the node corresponding to each framework branch is an intersection point between each framework branch and the main stem framework or an intersection point between each framework branch and other framework branches of the seedling to be detected;
the main stem node module is used for determining whether each framework branch is pruned or not according to the sub-contour line corresponding to each framework branch and the contour angle corresponding to each framework branch, if the fact that all branches of the seedling to be detected have branches and need to be pruned is judged, after pruning operation is completed, a skeletonized image after pruning is obtained, and all main stem nodes in a main stem region in the skeletonized image after pruning are obtained;
determining whether to prune each framework branch according to the sub-contour line corresponding to each framework branch and the contour angle corresponding to each framework branch, which specifically comprises the following steps:
and for any one of all the framework branches, if the ratio of the length of the sub-contour line corresponding to the any one framework branch to the contour angle corresponding to the any one framework branch is smaller than a preset threshold value, pruning is carried out on the any one framework branch.
8. A non-transitory computer-readable storage medium storing computer instructions that cause a computer to perform the method of any one of claims 1 to 6.
CN201810117281.7A 2018-02-06 2018-02-06 Method and device for detecting main stem nodes of seedlings Active CN108362698B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810117281.7A CN108362698B (en) 2018-02-06 2018-02-06 Method and device for detecting main stem nodes of seedlings

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810117281.7A CN108362698B (en) 2018-02-06 2018-02-06 Method and device for detecting main stem nodes of seedlings

Publications (2)

Publication Number Publication Date
CN108362698A CN108362698A (en) 2018-08-03
CN108362698B true CN108362698B (en) 2020-08-11

Family

ID=63004685

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810117281.7A Active CN108362698B (en) 2018-02-06 2018-02-06 Method and device for detecting main stem nodes of seedlings

Country Status (1)

Country Link
CN (1) CN108362698B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20220168915A (en) * 2021-06-17 2022-12-26 라온피플 주식회사 Apparatus and method for measuring length of leaf stem

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001048681A9 (en) * 1999-12-23 2002-08-29 Univ Singapore Automated fingerprint identification system
CN1421815A (en) * 2001-11-29 2003-06-04 田捷 Fingerprint image enhancement method based on knowledge
CN101853524A (en) * 2010-05-13 2010-10-06 北京农业信息技术研究中心 Method for generating corn ear panoramic image by using image sequence
JP4665191B2 (en) * 2005-03-19 2011-04-06 康二 三宅 Thinning method of binary image
CN103337092A (en) * 2013-06-05 2013-10-02 北京农业信息技术研究中心 An extraction method for a fruit tree limb skeleton
CN103729621A (en) * 2013-12-20 2014-04-16 华南农业大学 Plant leaf image automatic recognition method based on leaf skeleton model
CN104156997A (en) * 2014-07-28 2014-11-19 北京航空航天大学 Quick volume data skeleton extraction method based on rendering

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7006709B2 (en) * 2002-06-15 2006-02-28 Microsoft Corporation System and method deghosting mosaics using multiperspective plane sweep

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001048681A9 (en) * 1999-12-23 2002-08-29 Univ Singapore Automated fingerprint identification system
CN1421815A (en) * 2001-11-29 2003-06-04 田捷 Fingerprint image enhancement method based on knowledge
JP4665191B2 (en) * 2005-03-19 2011-04-06 康二 三宅 Thinning method of binary image
CN101853524A (en) * 2010-05-13 2010-10-06 北京农业信息技术研究中心 Method for generating corn ear panoramic image by using image sequence
CN103337092A (en) * 2013-06-05 2013-10-02 北京农业信息技术研究中心 An extraction method for a fruit tree limb skeleton
CN103729621A (en) * 2013-12-20 2014-04-16 华南农业大学 Plant leaf image automatic recognition method based on leaf skeleton model
CN104156997A (en) * 2014-07-28 2014-11-19 北京航空航天大学 Quick volume data skeleton extraction method based on rendering

Non-Patent Citations (8)

* Cited by examiner, † Cited by third party
Title
Feature Analysis Using Line Sweep Thinning Algorithm;Chang,F;《IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE》;19990228;第21卷(第2期);第145-158页 *
Node Detection and Internode Length Estimation of Tomato Seedlings Based on Image Analysis and Machine Learning;Yamamoto,K;《SENSORS》;20160731;第16卷(第7期);全文 *
On Plant Detection of Intact Tomato Fruits Using Image Analysis and Machine Learning Methods;Yamamoto,K;《SENSORS》;20140731;第14卷(第7期);第12191页-12206页 *
Research on Node Detection Algorithm of Tomato Seedlings Based on Digital Image;Xue-guan ZHAO;《2017 2nd International Conference on Computer, Mechatronics and Electronic Engineering》;20171231;第380-385页 *
Using hyperspectral imaging technology to identify diseased tomato leaves;Li,Cuiling;《INFRARED, MILLIMETER-WAVE, AND TERAHERTZ TECHNOLOGIES IV》;20161231;第10030卷;全文 *
基于模糊距离变换的骨架剪枝算法;张国栋;《沈阳航空航天大学学报》;20120229;第29卷(第1期);第64-69页 *
应用图象处理技术进行蔬菜苗特征量识别;陈晓光;《农业工程学报》;19951231;第11卷(第4期);第23-26页 *
改进视觉词袋模型的快速图像检索方法;张祯伟;《计算机系统应用》;20161231;第25卷(第12期);第126-131页 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20220168915A (en) * 2021-06-17 2022-12-26 라온피플 주식회사 Apparatus and method for measuring length of leaf stem
KR102590772B1 (en) * 2021-06-17 2023-10-19 라온피플 주식회사 Apparatus and method for measuring length of leaf stem

Also Published As

Publication number Publication date
CN108362698A (en) 2018-08-03

Similar Documents

Publication Publication Date Title
Pérez-Zavala et al. A pattern recognition strategy for visual grape bunch detection in vineyards
Scharr et al. Leaf segmentation in plant phenotyping: a collation study
CN110046631B (en) System and method for automatically inferring changes in spatiotemporal images
Wosner et al. Object detection in agricultural contexts: A multiple resolution benchmark and comparison to human
CN110569747A (en) method for rapidly counting rice ears of paddy field rice by using image pyramid and fast-RCNN
Liu et al. The recognition of apple fruits in plastic bags based on block classification
KR20150000435A (en) Recongnition of Plant Growth Steps and Environmental Monitoring System and Method thereof
CN111160451A (en) Flexible material detection method and storage medium thereof
Zhang et al. Automatic identification algorithm of the rice tiller period based on PCA and SVM
Wang et al. An maize leaf segmentation algorithm based on image repairing technology
Li et al. Performance evaluation of crop segmentation algorithms
CN108362698B (en) Method and device for detecting main stem nodes of seedlings
CN113191334B (en) Plant canopy dense leaf counting method based on improved CenterNet
CN104573701A (en) Automatic detection method of corn tassel traits
CN105631451A (en) Plant leave identification method based on android system
JP4270254B2 (en) Image signal processing apparatus and image processing method
CN116416523A (en) Machine learning-based rice growth stage identification system and method
Auleria et al. A review on KN earest neighbour based classification for object recognition
CN116258844A (en) Rapid and accurate identification method for phenotype character of cotton leaf
WO2022137242A1 (en) Deep learning system for estimating object volume, weight and crop yields based on remote imaging
Gai et al. Plant localization and discrimination using 2D+ 3D computer vision for robotic intra-row weed control
CN112488230A (en) Crop water stress degree judging method and device based on machine learning
Maqbool et al. Identification of mango leaves by using artificial intelligence
Seethalakshmi et al. Complex type seed variety identification and recognition using optimized image processing techniques
Chang et al. A feature extraction approach based on Hough transform to estimate growth responses of leaf lettuce

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant