CN110781746B - Wolfberry identification and positioning method - Google Patents

Wolfberry identification and positioning method Download PDF

Info

Publication number
CN110781746B
CN110781746B CN201910899228.1A CN201910899228A CN110781746B CN 110781746 B CN110781746 B CN 110781746B CN 201910899228 A CN201910899228 A CN 201910899228A CN 110781746 B CN110781746 B CN 110781746B
Authority
CN
China
Prior art keywords
image
value
medlar
chinese wolfberry
branch
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
CN201910899228.1A
Other languages
Chinese (zh)
Other versions
CN110781746A (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.)
Anhui Agricultural University AHAU
Original Assignee
Anhui Agricultural University AHAU
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 Anhui Agricultural University AHAU filed Critical Anhui Agricultural University AHAU
Priority to CN201910899228.1A priority Critical patent/CN110781746B/en
Publication of CN110781746A publication Critical patent/CN110781746A/en
Application granted granted Critical
Publication of CN110781746B publication Critical patent/CN110781746B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/10Terrestrial scenes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent
    • G06T3/08
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/30Noise filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/34Smoothing or thinning of the pattern; Morphological operations; Skeletonisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/68Food, e.g. fruit or vegetables

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • Biophysics (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a medlar identification and positioning method, which comprises the following steps: s1: acquiring binocular images of the medlar; s2: identifying the image by using a BP neural network; s3: filtering the image processed by the BP neural network; s4: performing morphological opening operation processing on the filtered image; s5: acquiring an image two-dimensional coordinate of a tail end point of a vertical branch in an identified medlar image by using a projection method, then calculating a three-dimensional coordinate of the tail end of the vertical branch by using a binocular vision technology, and pulling the branch to be in a horizontal state according to the three-dimensional coordinate; s6: and repeating the steps S1 to S4 on the pulled horizontal branch, obtaining the image two-dimensional coordinates of the individual Chinese wolfberry fruits on the horizontal branch in the image by using a projection method on the identified Chinese wolfberry image, and then calculating the three-dimensional coordinates of all the individual Chinese wolfberry fruits on the branch by using a binocular vision technology. The invention can ensure that the medlar picking robot can effectively identify and accurately position medlar fruits.

Description

Wolfberry identification and positioning method
Technical Field
The invention relates to the field of image processing and visual positioning, in particular to a Chinese wolfberry identification and positioning method.
Background
The fresh medlar is popular with people due to rich nutrition and sweet taste, and the planting scale and the yield of medlar are greatly increased. At present, the picking operation of fresh Chinese wolfberry fruits adopts manual operation, the picking efficiency is low, the picking cost is high, and hands are not enough in a peak period. In order to improve the picking efficiency and reduce the labor cost in the picking process, the research on the automatic wolfberry picking robot has very important significance.
However, the growth environment of the medlar is relatively complex, and the work efficiency of the medlar picking robot is directly determined by accurately identifying and positioning the medlar. The common color characteristics are used for identifying the medlar, the applicability is low, and the influence of the illumination intensity is easy to cause. Therefore, it is desirable to provide a method for effectively identifying and positioning the fruit of lycium barbarum that can be used in a lycium barbarum picking robot to solve the above problems.
Disclosure of Invention
The invention aims to provide a wolfberry fruit identification and positioning method, which can enable a wolfberry picking robot to effectively identify and accurately position wolfberry fruits.
In order to solve the technical problems, the invention adopts a technical scheme that: the wolfberry identification and positioning method comprises the following steps:
s1: acquiring binocular images of the medlar;
s2: identifying the acquired binocular images by adopting a BP neural network;
s3: filtering the image processed by the BP neural network to remove noise;
s4: performing morphological opening operation processing on the filtered image, and removing other interference points to obtain an identified wolfberry image;
s5: acquiring an image two-dimensional coordinate of a tail end point of a vertical branch in an identified medlar image by using a projection method, calculating a three-dimensional coordinate of the tail end of the vertical branch by using a binocular vision technology according to the acquired image two-dimensional coordinate, and pulling the branch to be in a horizontal state according to the three-dimensional coordinate;
s6: and (5) repeating the steps S1 to S4 on the pulled horizontal branch, acquiring the image two-dimensional coordinates of the individual Chinese wolfberry fruits on the horizontal branch in the image of the identified Chinese wolfberry image by using a projection method, and calculating the three-dimensional coordinates of all the individual Chinese wolfberry fruits on the branch by using a binocular vision technology according to the acquired image two-dimensional coordinates.
In a preferred embodiment of the present invention, the step S2 includes the following steps:
six pixel values of RGBHSV of a Chinese wolfberry fruit are used as input data of BP neural network training to judge whether the Chinese wolfberry is used as output data or not, the value range of the number of hidden neurons of the BP neural network is 4-13 through calculation of an empirical formula, a BP neural network prediction model is established, and binarization processing is carried out on the acquired binocular image.
In a preferred embodiment of the present invention, in step S3, the image processed by the BP neural network is filtered by Laplace filtering.
In a preferred embodiment of the present invention, the step S4 includes the following steps:
firstly, selecting a circular structural element to carry out corrosion treatment on the filtered image, then adopting an image corrosion treatment template to carry out expansion treatment on the image, and removing other interference points to obtain the identified medlar image.
In a preferred embodiment of the present invention, in step S5, the method for obtaining two-dimensional coordinates of an image of a terminal point of a vertical branch in the image by using a projection method includes the following steps:
s5.1: reading an image and acquiring the number of rows P and the number of columns Q of the image;
s5.2: horizontally projecting the image to obtain Y values corresponding to the identification points to form an array S;
s5.3: constructing two sliding windows a and b with the length of 5 pixel points, moving downwards along the Y axis from the original point, moving one pixel length at a time until the Y value on the upper side of the sliding window a is more than or equal to the line number P of the image, and when a is more than 5 and b =0, judging that the Y value of the pixel point on the lower side of the sliding window a is the lowest point Y value of the terminal medlar;
s5.4: carrying out vertical projection in the range of [ Y-10, Y ] to obtain X values corresponding to the identification points, and forming an array T;
s5.5: constructing two sliding windows m and n with the length of 5 pixel points, moving the sliding windows m and n from the original point to the right along the X axis, moving the sliding windows m and n by one pixel length each time until the left X value of the sliding window m is more than or equal to the column number Q of the image, and judging that the right pixel point X value of the sliding window n is the left X1 value of the terminal medlar when m =0 and n > 0; when m is greater than 0 and n =0, judging that the value of a right pixel point X of the sliding window m is the value of the right X2 of the terminal Chinese wolfberry;
s5.6: calculating the central X value of the terminal medlar, wherein X =1/2 (X1 + X2);
s5.7: and moving downwards by 5 unit lengths according to the obtained two-dimensional coordinates of the image of the terminal medlar to obtain the two-dimensional coordinates of the image of the terminal grabbing point of the branch.
In a preferred embodiment of the present invention, in step S6, the method for obtaining the two-dimensional coordinates of the image of the individual lycium barbarum fruit on the horizontal branch in the image by using the projection method includes the following steps:
s6.1: reading an image and acquiring the number of rows P and the number of columns Q of the image;
s6.2: carrying out vertical projection on the image to obtain X values corresponding to the identification points, and forming an array S;
s6.3: constructing two sliding windows m and n, moving the sliding windows m and n from the original point to the right along the X axis, moving the sliding windows m and n by one pixel length each time until the X value on the left side of the sliding window m is larger than or equal to the column number Q of the image, and judging that the X value of a pixel point on the right side of the sliding window n is the X1 value on the left side of the Chinese wolfberry when m =0 and n > 1; when m is greater than 1 and n =0, judging that the value X of the right pixel point of the sliding window m is the value X2 of the right side of the Chinese wolfberry;
s6.4: calculating the central X value of the medlar, wherein X =1/2 (X1 + X2);
s6.5: carrying out horizontal projection on each Chinese wolfberry within the range of [ X-5, X +5] to obtain a corresponding Y value to form an array T;
s6.6: constructing two sliding windows a and b, moving downwards along a Y axis from an original point, moving for one pixel length each time, stopping until the Y value on the upper side of the sliding window a is more than or equal to the row number P of the image, and when a =0 and b >2, judging that the X value of a pixel point on the lower side of the sliding window b is the Y1 value on the left side of the Chinese wolfberry; when a is greater than 2 and a =0, judging that the value of a lower pixel point X of the sliding window a is the value of the right Y2 of the Chinese wolfberry;
s6.7: and (3) calculating the central Y value of the medlar, wherein Y =1/2 (Y1 + Y2), and obtaining the image two-dimensional coordinates of each medlar fruit individual.
The invention has the beneficial effects that: according to the invention, effective identification of the wolfberry fruits under different illumination is realized by utilizing a BP neural network, laplace filtering and morphological processing, then the wolfberry is positioned by a projection method and a binocular stereo vision system, the obtained wolfberry three-dimensional information is transmitted to a mechanical arm of the wolfberry picking robot, automatic picking of the wolfberry fruits is realized, the identification and positioning accuracy of the wolfberry is greatly improved, and the applicability is wide.
Drawings
FIG. 1 is a flow chart of a method for identifying and locating Lycium barbarum of the present invention;
FIG. 2 is a schematic diagram of the Laplace template;
FIG. 3 is a schematic view of the image erosion processing template;
FIG. 4 is a flow chart of a method for obtaining two-dimensional coordinates of the terminal point of a vertical shoot;
FIG. 5 is a schematic horizontal projection of a vertical finger;
FIG. 6 is a schematic diagram of a sliding window for determining fruit boundaries;
FIG. 7 is a schematic vertical projection of a vertical finger;
FIG. 8 is a flowchart of a method for obtaining two-dimensional coordinates of an individual of Lycium barbarum fruit;
FIG. 9 is a schematic vertical projection of a horizontal twig;
FIG. 10 is a schematic view of a horizontal projection of a horizontal finger;
FIG. 11 is an illustration of an original view of medlar planting under light conditions;
FIG. 12 is the image of FIG. 11 after the corresponding recognition of the wolfberries;
FIG. 13 is an illustration of an original view of medlar planting under shadow conditions;
FIG. 14 is the original drawing of FIG. 13 after identifying the wolfberries;
fig. 15 is an original view of the medlar corresponding to point a;
fig. 16 is a stereo matching disparity map of the corresponding identified wolfberries of fig. 15;
fig. 17 is an original image of a wolfberry image after branches are pulled up;
fig. 18 is a schematic diagram of stereo matching result of the lycium barbarum corresponding to fig. 17.
Detailed Description
The following detailed description of the preferred embodiments of the present invention, taken in conjunction with the accompanying drawings, will make the advantages and features of the invention easier to understand by those skilled in the art, and thus will clearly and clearly define the scope of the invention.
Referring to fig. 1, an embodiment of the present invention includes:
a wolfberry identification and positioning method is applied to a wolfberry picking robot and comprises the following steps:
s1: acquiring binocular images of the medlar; preferably, binocular images of the medlar are acquired by a binocular camera;
s2: identifying the medlar of the collected binocular images by adopting a BP neural network;
the BP neural network comprises an input layer, a hidden layer and an output layer. The number of neurons in the input layer is the same as the dimension of input data, and the number of neurons in the output layer is the same as the number of data to be fitted.
In this embodiment, six pixel values of R (red), G (green), B (blue), H (hue), S (saturation), and V (brightness) of the fruit of lycium barbarum are used as input data for the training of the BP neural network, and it is determined whether lycium barbarum (1 or 0) is used as output data, so that the number of input neurons is 6, and the number of output neurons is 1. The number of hidden layer neurons is determined by empirical formula (1):
Figure RE-GDA0002302164050000041
wherein, h is the number of hidden layer neurons;
n- - - -number of neurons in the input layer;
m- - -number of neurons in the output layer;
a- - -any constant between 1 and 10;
the network model of 6-h-1 is established in the wolfberry identification experiment through the BP neural network, so n =6,m =1. The value range of h is 4-13 by calculation. In order to finally determine the number of hidden layer neurons, neural network training of different numbers of hidden layer neurons is required, and the optimal number of hidden layer neurons is determined by comparing errors.
Preferably, the number of hidden neurons of the BP neural network is set to be 6, a 6-6-1 BP neural network prediction model is established, and binarization processing is carried out on the acquired binocular image.
S3: filtering the image processed by the BP neural network to remove noise; preferably, the image processed by the BP neural network is filtered by using Laplace filtering. The Laplace operator is the simplest isotropic differential operator, with rotational invariance. The Laplace transform of a two-dimensional image function is the isotropic second derivative, defined as:
Figure RE-GDA0002302164050000051
the Laplace operator can also be represented in the form of a template, and if a bright spot appears in a darker area of the image, the bright spot will become brighter by the Laplace operation. Since the edges in the image are those regions where the gray level jumps, the Laplace sharpening template is very useful in edge detection, and it is difficult to determine the positions of the edge lines for sharp edges and slowly changing edges by general enhancement techniques. However, the operator can be determined by the zero crossing point between the positive peak and the negative peak of the second differential, and is more sensitive to isolated points or end points, so that the operator is particularly suitable for occasions aiming at highlighting the isolated points, the isolated lines or the line end points in the image.
In this embodiment, the template shown in fig. 2 is used to perform convolution operation on the image of the chinese wolfberry, and pixel points with a threshold value greater than 8 in the image are filtered.
S4: performing morphological opening operation processing on the filtered image, and removing other interference points to obtain a recognized wolfberry image;
the morphological opening operation is to perform corrosion processing on the image and then perform expansion processing on the image, and is mainly used for removing noise. In this embodiment, first, a circular structural element is selected to perform corrosion processing on the filtered image, then, an image corrosion processing template as shown in fig. 3 is used to perform expansion processing on the image, and other interference points are removed to obtain an identified image of the lycium barbarum.
S5: acquiring an image two-dimensional coordinate of a tail end point of a vertical branch in an identified wolfberry image by using a projection method, calculating a three-dimensional coordinate of the tail end of the vertical branch according to the acquired image two-dimensional coordinate by using a binocular vision technology, leading the three-dimensional coordinate into a mechanical arm, and pulling the branch into a horizontal state by using the mechanical arm according to the three-dimensional coordinate;
the projection method is a method for detecting according to the projection distribution characteristics of image information in a certain direction, namely accumulation of pixel points, and is essentially a statistical method. The projection method generally has two statistical modes, namely vertical projection and horizontal projection, wherein the vertical projection is a method for accumulating pixel points of an image in the X-axis direction and counting the distribution characteristics of the pixel points in the vertical direction in the image; similarly, horizontal projection is a method for accumulating pixel points of an image in the Y-axis direction and counting the distribution characteristics of the pixel points in the horizontal direction in the image.
Referring to fig. 4, the method for obtaining the two-dimensional coordinates of the image of the terminal point of the vertical branch in the image by using the projection method includes the following steps:
s5.1: reading an image and acquiring the number of rows P and the number of columns Q of the image;
s5.2: with reference to fig. 5, performing horizontal projection on the image to obtain Y values corresponding to the identification points, and forming an array S;
s5.3: because the pixel length of a single Chinese wolfberry fruit individual in an image is about 5, two sliding windows a and b with the length of 5 pixel points are constructed, and the sliding windows a and b are combined with fig. 6, moved downwards along a Y axis from an original point, and moved by one pixel length each time until the Y value of the upper side of the sliding window a is more than or equal to the line number P of the image, and then the sliding windows a are stopped, and when a is greater than 5 and b =0, the Y value of the pixel point of the lower side of the sliding window a is judged to be the lowest point Y value of the terminal Chinese wolfberry;
s5.4: with reference to FIG. 6, performing vertical projection within the range of [ Y-10, Y ] to obtain X values corresponding to the identification points, and forming an array T;
s5.5: constructing two sliding windows m and n with the length of 5 pixel points, moving the sliding windows m and n from the original point to the right along the X axis, moving the sliding windows m and n by one pixel length each time until the left X value of the sliding window m is more than or equal to the column number Q of the image, and judging that the right pixel point X value of the sliding window n is the left X1 value of the terminal medlar when m =0 and n > 0; when m is greater than 0 and n =0, judging that the value of a right pixel point X of the sliding window m is the value of a right X2 of the terminal medlar;
s5.6: calculating the central X value of terminal lycium barbarum, X =1/2 (X1 + X2);
s5.7: and moving downwards by 5 unit lengths according to the obtained two-dimensional coordinates of the image of the terminal medlar to obtain the two-dimensional coordinates of the image of the terminal grabbing point of the branch.
S6: and repeating the steps S1 to S4 on the pulled horizontal branch, obtaining the image two-dimensional coordinates of the individual Chinese wolfberry fruits on the horizontal branch in the image by using a projection method on the identified Chinese wolfberry image, and calculating the three-dimensional coordinates of all the individual Chinese wolfberry fruits on the branch by using a binocular vision technology according to the obtained image two-dimensional coordinates.
Referring to fig. 8, the method for obtaining the image two-dimensional coordinates of the individual lycium barbarum fruits on the horizontal branches in the image by using the projection method comprises the following steps:
s6.1: reading an image and acquiring the number of rows P and the number of columns Q of the image;
s6.2: with reference to fig. 9, performing vertical projection on the image to obtain X values corresponding to the identification points, and forming an array S;
s6.3: constructing two sliding windows m and n, moving the sliding windows m and n from the original point to the right along the X axis, moving the sliding windows m and n by one pixel length each time until the X value on the left side of the sliding window m is larger than or equal to the column number Q of the image, and judging that the X value of a pixel point on the right side of the sliding window n is the X1 value on the left side of the Chinese wolfberry when m =0 and n > 1; when m is greater than 1 and n =0, judging that the value X of the right pixel point of the sliding window m is the value X2 of the right side of the Chinese wolfberry;
s6.4: calculating the central X value of the medlar, wherein X =1/2 (X1 + X2);
s6.5: with reference to FIG. 10, performing horizontal projection on each Chinese wolfberry within the range of [ X-5, X +5] to obtain a corresponding Y value, and forming an array T;
s6.6: constructing two sliding windows a and b, moving downwards along a Y axis from an original point, moving for one pixel length each time, stopping until the Y value on the upper side of the sliding window a is more than or equal to the row number P of the image, and when a =0 and b >2, judging that the X value of a pixel point on the lower side of the sliding window b is the Y1 value on the left side of the Chinese wolfberry; when a is greater than 2 and a =0, judging that the value of a lower pixel point X of the sliding window a is the value of the right Y2 of the Chinese wolfberry;
s6.7: and (3) calculating the central Y value of the medlar, wherein Y =1/2 (Y1 + Y2), and obtaining the image two-dimensional coordinates of each medlar fruit individual.
According to the invention, effective identification of the wolfberry fruits under different illumination is realized by utilizing a BP neural network, laplace filtering and morphological processing, then the wolfberry is positioned by a projection method and a binocular stereo vision system, the obtained wolfberry three-dimensional information is transmitted to a mechanical arm of the wolfberry picking robot, automatic picking of the wolfberry fruits is realized, the identification and positioning accuracy of the wolfberry is greatly improved, and the applicability is wide.
In the test using this method, fig. 11 and 13 show the original images of lycium barbarum under different lighting conditions, and fig. 12 and 14 show the corresponding identified images, respectively, to effectively identify the lycium barbarum fruits.
TABLE 1 terminal matrimony vine coordinates
Figure RE-GDA0002302164050000071
Table 1 lists the two-dimensional coordinates and the corresponding three-dimensional coordinates of the terminal wolfberry fruit and the corresponding three-dimensional coordinates of the terminal branch after recognition, fig. 15 and 16 are a wolfberry fruit original image corresponding to a serial number a and a disparity map after stereo matching thereof, respectively, the position of the point a is a grabbing point at the terminal end of the branch, which is circled in the diagram, and the point is obtained by moving downwards according to the position of the terminal wolfberry fruit of the branch.
TABLE 2 coordinates of individual wolfberry fruit on a pulled horizontal branch
Figure RE-GDA0002302164050000072
Fig. 17 and 18 are disparity maps of the images of the chinese wolfberry after the branches are pulled up and the corresponding stereo matching, respectively. As shown in table 2, namely the two-dimensional coordinates and the corresponding three-dimensional coordinates of the individual fruit of lycium barbarum on the pulled branches, all the points in table 2 are marked with black dots in the right diagram of fig. 17.
The above description is only an embodiment of the present invention, and is not intended to limit the scope of the present invention, and all equivalent structures or equivalent processes performed by the present invention or directly or indirectly applied to other related technical fields are included in the scope of the present invention.

Claims (6)

1. A medlar identification and positioning method comprises the following steps:
s1: acquiring binocular images of the medlar;
s2: identifying the acquired binocular images by adopting a BP neural network;
s3: filtering the image processed by the BP neural network to remove noise;
s4: performing morphological opening operation processing on the filtered image, and removing other interference points to obtain a recognized wolfberry image;
s5: acquiring an image two-dimensional coordinate of a tail end point of a vertical branch in an identified medlar image by using a projection method, calculating a three-dimensional coordinate of the tail end of the vertical branch by using a binocular vision technology according to the acquired image two-dimensional coordinate, and pulling the branch to be in a horizontal state according to the three-dimensional coordinate;
s6: and repeating the steps S1 to S4 on the pulled horizontal branch, obtaining the image two-dimensional coordinates of the individual Chinese wolfberry fruits on the horizontal branch in the image by using a projection method on the identified Chinese wolfberry image, and calculating the three-dimensional coordinates of all the individual Chinese wolfberry fruits on the branch by using a binocular vision technology according to the obtained image two-dimensional coordinates.
2. The identification and location method of Chinese wolfberry as claimed in claim 1, wherein the specific steps of step S2 include:
six pixel values of RGBWHSV of the medlar fruits are used as input data for BP neural network training, whether the medlar is used as output data or not is judged, the value range of the number of hidden neurons of the BP neural network is 4-13 through calculation of an empirical formula, a BP neural network prediction model is established, and binarization processing is carried out on the acquired binocular images.
3. The method according to claim 1, wherein in step S3, laplace filtering is used to filter the processed image of BP neural network.
4. The method for identifying and locating medlar according to claim 1, wherein the specific step of the step S4 comprises:
firstly, selecting a circular structural element to carry out corrosion treatment on the filtered image, then adopting an image corrosion treatment template to carry out expansion treatment on the image, and removing other interference points to obtain the identified medlar image.
5. The method for identifying and locating Lycium chinense as claimed in claim 1, wherein in step S5, the method for obtaining two-dimensional coordinates of end points of vertical branches in an image by projection comprises the following steps:
s5.1: reading an image and acquiring the number of rows P and the number of columns Q of the image;
s5.2: carrying out horizontal projection on the image to obtain Y values corresponding to the identification points to form an array S;
s5.3: constructing two sliding windows a and b with the length of 5 pixel points, moving downwards along the Y axis from the original point, moving one pixel length at a time until the Y value on the upper side of the sliding window a is more than or equal to the line number P of the image, and when a is more than 5 and b =0, judging that the Y value of the pixel point on the lower side of the sliding window a is the lowest point Y value of the terminal medlar;
s5.4: carrying out vertical projection in the range of [ Y-10, Y ] to obtain X values corresponding to the identification points, and forming an array T;
s5.5: constructing two sliding windows m and n with the length of 5 pixel points, moving the sliding windows m and n from the original point to the right along the X axis, moving the sliding windows m and n by one pixel length each time until the X value on the left side of the sliding window m is larger than or equal to the column number Q of the image, and judging that the X value of the pixel point on the right side of the sliding window n is the X1 value on the left side of the terminal medlar when m =0 and n > 0; when m is greater than 0 and n =0, judging that the value of a right pixel point X of the sliding window m is the value of the right X2 of the terminal Chinese wolfberry;
s5.6: calculating the central X value of terminal lycium barbarum, X =1/2 (X1 + X2);
s5.7: and moving downwards by 5 unit lengths according to the obtained two-dimensional coordinates of the image of the terminal medlar to obtain the two-dimensional coordinates of the image of the branch terminal grabbing point.
6. The method for identifying and locating medlar according to claim 1, wherein in step S6, the method for obtaining the two-dimensional coordinates of the image of the medlar fruit individual on the horizontal branch in the image by using the projection method comprises the following steps:
s6.1: reading an image and acquiring the number of rows P and the number of columns Q of the image;
s6.2: carrying out vertical projection on the image to obtain X values corresponding to the identification points, and forming an array S;
s6.3: constructing two sliding windows m and n, moving the sliding windows m and n from the original point to the right along the X axis, moving the sliding windows m and n by one pixel length each time until the value X of the left side of each sliding window m is larger than or equal to the number Q of columns of the image, and when m =0 and n >1, judging that the value X of a right side pixel point of each sliding window n is the value X1 of the left side of the Chinese wolfberry; when m is greater than 1 and n =0, judging that the value of a right pixel point X of the sliding window m is the value of the right X2 of the Chinese wolfberry;
s6.4: calculating the central X value of the medlar, wherein X =1/2 (X1 + X2);
s6.5: carrying out horizontal projection on each Chinese wolfberry within the range of [ X-5, X +5] to obtain a corresponding Y value to form an array T;
s6.6: constructing two sliding windows a and b, moving downwards along a Y axis from an original point, moving for one pixel length each time, stopping until the Y value on the upper side of the sliding window a is larger than or equal to the line number P of the image, and when a =0 and b >2, judging that the X value of a pixel point on the lower side of the sliding window b is the Y1 value on the left side of the Chinese wolfberry; when a is greater than 2 and a =0, judging that the value of a lower pixel point X of the sliding window a is the value of the right Y2 of the Chinese wolfberry;
s6.7: and (3) calculating the central Y value of the medlar, wherein Y =1/2 (Y1 + Y2), and obtaining the image two-dimensional coordinates of each medlar fruit individual.
CN201910899228.1A 2019-09-23 2019-09-23 Wolfberry identification and positioning method Active CN110781746B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910899228.1A CN110781746B (en) 2019-09-23 2019-09-23 Wolfberry identification and positioning method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910899228.1A CN110781746B (en) 2019-09-23 2019-09-23 Wolfberry identification and positioning method

Publications (2)

Publication Number Publication Date
CN110781746A CN110781746A (en) 2020-02-11
CN110781746B true CN110781746B (en) 2023-03-10

Family

ID=69383782

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910899228.1A Active CN110781746B (en) 2019-09-23 2019-09-23 Wolfberry identification and positioning method

Country Status (1)

Country Link
CN (1) CN110781746B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116616045B (en) * 2023-06-07 2023-11-24 山东农业工程学院 Picking method and picking system based on plant growth

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6388806B2 (en) * 2014-08-06 2018-09-12 国立研究開発法人産業技術総合研究所 Projection image generation apparatus, projection image generation program, and projection image generation method
CN108710850B (en) * 2018-05-17 2022-12-06 中国科学院合肥物质科学研究院 Wolfberry fruit identification method and system
CN109448061A (en) * 2018-10-09 2019-03-08 西北工业大学 A kind of underwater binocular visual positioning method without camera calibration

Also Published As

Publication number Publication date
CN110781746A (en) 2020-02-11

Similar Documents

Publication Publication Date Title
CN109447945B (en) Quick counting method for basic wheat seedlings based on machine vision and graphic processing
Liu et al. A method of segmenting apples at night based on color and position information
CN103177445B (en) Based on the outdoor tomato recognition methods of fragmentation threshold Iamge Segmentation and spot identification
CN109345554A (en) A kind of adhesion mushroom vision in-situ measuring method based on RGB-D camera
CN107179272B (en) Acute isolation nerve cell method for catching under a kind of microscope
CN103324935B (en) Vehicle is carried out the method and system of location and region segmentation by a kind of image
CN109684941B (en) Litchi fruit picking area division method based on MATLAB image processing
CN108133471B (en) Robot navigation path extraction method and device based on artificial bee colony algorithm
CN104239886A (en) Image analysis based lawn and background boundary extraction method
CN111695373B (en) Zebra stripes positioning method, system, medium and equipment
Feng et al. A separating method of adjacent apples based on machine vision and chain code information
CN104992448B (en) The automatic positioning method of robot antisitic defect grape-picking
Liu et al. Development of a machine vision algorithm for recognition of peach fruit in a natural scene
CN110781746B (en) Wolfberry identification and positioning method
CN104331702A (en) Image-recognition-based fresh tea leaf furcation number recognition method
CN111985435A (en) Unmanned aerial vehicle water area monitoring and cruising method based on machine vision
CN112329506A (en) Fruit identification method and system, and positioning method and system of wolfberry picking robot
CN114431005A (en) Intelligent agricultural fruit picking, identifying and positioning method, system and device
CN111369497B (en) Walking type tree fruit continuous counting method and device
CN102938052A (en) Sugarcane segmentation and recognition method based on computer vision
Zhang et al. Locating Famous Tea's Picking Point Based on Shi-Tomasi Algorithm.
CN110175582B (en) Intelligent tea tree tender shoot identification method based on pixel distribution
CN116524344A (en) Tomato string picking point detection method based on RGB-D information fusion
CN115601690B (en) Edible fungus environment detection method based on intelligent agriculture
Xie et al. Research on recognition methods of pomelo fruit hanging on trees base on machine vision

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