Next Article in Journal
Mung Bean Is Better Than Soybean in the Legume–Wheat Rotation System for Soil Carbon and Nitrogen Sequestration in Calcareous Soils of a Semiarid Region
Previous Article in Journal
Study of the Effect of Mowing and Drying on the Lipid Composition of Grass Leaves in Permafrost Ecosystems
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Study on the Optimal Grasping Angle Algorithm for Plug Seedlings Based on Machine Vision

1
College of Mechanical Engineering, University of South China, Hengyang 421001, China
2
College of Engineering, China Agricultural University, Beijing 100083, China
*
Author to whom correspondence should be addressed.
Submission received: 15 August 2023 / Accepted: 19 August 2023 / Published: 27 August 2023
(This article belongs to the Section Precision and Digital Agriculture)

Abstract

:
During the replanting operation of a seedling tray, the end-effector needs to repeatedly grab the qualified plug seedlings in the supply tray and release them to the target tray for replanting, and in the process of grasping, the end-effector may cause some mechanical damage to the plug seedlings, thus affecting their quality. Therefore, in order to be able to adjust the position of the hand claw grasping point according to the morphological characteristics of the plug seedlings and select the optimal grasping point, this paper proposes research on the optimal grasping angle algorithm for plug seedlings based on machine vision. Firstly, a rotatable three-jaw end-effector is designed, which uses a three-jaw structure for grasping the burrowing seedlings. The three claws are driven with a telescopic cylinder to carry out clamping and relaxing actions. The rotation of the three claws is controlled with the stepper motor to adjust the optimal grasping position. Secondly, based on the pre-processing of an image of the hole tray seedling, the extraction of feature points in the region of interest, and the calculation of localization, the angle between the angular bisector of the cotyledon leaf blade of the hole tray seedling and the horizontal positive direction is solved. In this paper, two methods are designed to calculate the coordinates of feature points: one is the geometric method and the other is the center-of-mass method. Finally, the optimal grasping angle is calculated by analyzing the angle between the angular bisector of the cotyledon leaf blade and the horizontal positive direction of the cavity seedlings. According to the test, the average calculation error of the proposed algorithm is 3.12 degrees, and the average calculation time is 0.512 sec/sheet, which meet the requirements of the replanting operation.

1. Introduction

Since each seedling is different and receives different light, water, nutrients, etc., during growth, the growth form of each seedling is different, and each seedling in a seedling tray has certain randomness of growth and development. When the end-effector of the replanting machine grabs a plug seedling downstream, squeezing and poking of the seedling’s leaves and the body of the seedling happens from time to time. Damage to seedling leaves and bodies will directly affect the quality and growth of seedling products and bring some economic losses. The structural characteristics of the end-effector directly affect the extraction effect on plug seedlings; therefore, it is important to reduce mechanical damage to seedlings when the end-effector grabs the plug seedlings to improve the quality of replanting operations. Many scholars have researched end transplanting manipulators [1,2,3] and proposed seedling extraction mechanism solutions such as ejector [4], insertion [5,6], ejector clamping [7], and pneumatic types [8].
Lv et al. [9] performed a study on an adjustable floral plug seedling transplanting mechanism. The results of the study showed that the transplanting fingers performed functions including clamping, releasing, and planting seedlings; the operating pressure could function normally as long as it was above 60 psi (pounds per square inch); the transplanting speed was completed at about 675 plants/h; and the success rate of transplanting was above 90%. Zhang et al. [10] designed a new pointer–clamping transplanting jaw mechanism based on pneumatic technology for the end-effector of the transplanting robot. The transplanting claw mainly consisted of a driving cylinder, pointer mounting, and positioning block; a transplanting claw mounting and positioning block; and a spring sleeve, finger cylinder, and clamping pointer. In the transplanting claw four-finger mechanism, the pointer points into the soil at an angle of 10°, the operation of the cylinder drives the pointer along the finger cylinder in a downward movement into the seedling pile when the cylinder is about to fully strike the pointer in the recovery of 3 mm, clamping the seedling pile. Although the pneumatic drive end-effector has many advantages such as easy control and simple and compact structure, the pneumatic drive requires an air source, which increases the cost and the size of the equipment and is not convenient for mobile operation [11]. The compressibility of air also makes its control mode single, and thus it is difficult to achieve accurate position and speed control. Ting et al. [12,13,14] developed an SNS gripper consisting of two tilted pin grippers and near-programmed sensors with transplanting success rates ranging from 50% to 95% for different crop varieties. Choi W C et al. [15] developed a plug seedling transplanter, which had an end-effector consisting mainly of a five-bar mechanism, a pointer driver, and a clamping pointer. The results of their transplanting tests showed that the age of the seedlings, the angle of the clamping pointer, and the speed all affected the success rate of transplanting. For example, the success rate was 97% when the speed was 30 plants/min for 23-day-old plug seedlings. Kang D.H. et al. [16] developed a vegetable transplanting machine. This transplanter mainly consisted of several parts such as the seedling tray transfer mechanism, hole tray seedling clamping mechanism, pot transfer mechanism, and transplanting mechanism. The transplanting test showed that the transplanter was capable of transplanting 2800 pots per hour with a success rate of 99.00%. Zhou and Wang et al. [17] designed a transplanting machine, and its control system was found to be suitable for transplanting plug seedlings. The mechanical structure mainly consisted of a transverse and longitudinal axis and a transplanting manipulator, cavity tray conveying, and other parts, which were driven by a screw. The end-effector of the manipulator used a tilting wedge lever clamping mechanism, and the experimental results showed that the average success rate of transplanting reached 76.11%. Han and Mao et al. [18] designed a light and simple automatic transplanting machine that mainly consisted of several parts, including a transplanting robot arm, seedling picking end-effector, source and destination tray delivery device, and control system. The machine used a pneumatic two-finger, four-pin clamp-type end-effector to pick up seedlings. The test showed that for 72-hole plug seedlings, the integrated yield reached 1000 seedlings per hour, and the success rate of plug seedling transplanting reached 90.70% on average.
Han et al. [19] designed a dual-cylinder-driven swing arm three-position control structure to achieve accurate stopping of the swing arm at the center position for seedling pick-up and release, fast movement at the beginning of the seedling clamping stroke, and clamping of the corresponding position of the plug seedlings with appropriate clamping force when the swing arm swings to the seedling clamping position. They calculated that the clamping force was not more than 23 N, which was less than the maximum squeezing force limit (25 N) for the stem of the plug seedlings when using the drive structure with an l value of 130 mm and an h value of 130 mm. Thus, the seedlings could be picked up and not damaged. Jiang et al. [20] combined the advantages of conventional plugging and clamping end-effectors and designed a single cylinder-driven plugging and clamping end-effector, which continuously completed the insertion and clamping of the seedling substrate within one thrust of the cylinder. The experimental results showed that the end-effector was able to transplant 270 plug seedlings, the transplanting success rate was 100% and the substrate damage rate was 17%, and there was no substrate block damage in 8 out of 27 groups of agronomic factor combinations. Furthermore, at the average transplanting operation rate of 2.8 sec/plant, the end-effector could improve the transplanting success rate and reduce the injury rate. Kang et al. [21,22] proposed a full deep learning neural network and a novel end-to-end geometric perception network A3N based on a full deep learning neural network and a novel end-to-end geometric perception network, respectively, to implement fruit recognition and grasping estimation methods. The experimental results showed that these two methods can accurately perform visual perception and grasping estimation, and they exhibited good performance in terms of accuracy, robustness, and operation speed. Hu et al. [23] designed a machine vision system for real-time measurement of seedling leaf area in each hole that was used to determine whether it was suitable for transplanting operations and the suitable grasping positions for transplanted seedlings.
In summary, the research on low-damage grasping technology for plug seedlings consists of two main aspects [24,25]. The first is to reduce damage to the plug seedling substrate during grasping by optimizing the design of the mechanical structure of the end-effector. The second is to reduce the damage caused by the end-effector to the plug seedling body using certain technical methods in the grasping process. There are several studies that used end-effectors to reduce damage to substrates during plug seedling grasping [26,27,28,29,30,31,32], but there are relatively few studies related to reducing end-effector damage to plug seedling bodies. Adaptive adjustment of the gripping angle of the end-effector according to the growth of the plug seedlings is one of the effective ways to reduce damage during transplanting. Among them, accurate and real-time calculation of the optimal grasping angle for each plug seedling is one of the key aspects. Therefore, this study designs a rotatable three-claw end-effector and applies image processing methods including image segmentation, binarization, filtering, and feature point extraction of regions of interest to design an optimal grasping angle algorithm for plug seedlings. Based on this algorithm, the end-effector can adjust the position of the gripping point of the hand claw according to the morphological characteristics of the plug seedlings and select the optimal gripping point for gripping, directly avoiding damage to the body of plug seedlings caused by the mechanical structure.

2. Materials and Methods

2.1. Experimental Materials and Equipment

The CPU of the computer used in this experiment is an 8th intel core i7 processor, the graphics card is GTX1060, and the algorithm program for testing is performed in Matlab2018b. The test sample was capsicum. Capsicum is an annual or limited perennial herb belonging to the genus Capsicum in the family Solanaceae. The early stage of growth and development of pepper seedlings is the germination stage, and after germination and sowing seeds, they usually emerge from the soil in about 5–8 days. They then grow the first true leaves in about 15 days, after which the flower buds are revealed, which is called the seedling stage. In this study, 20 sample images of pepper seedlings cultivated in a greenhouse were randomly selected for testing after 20 days of cultivation in seedling trays, which had entered the two-leaf-one-heart stage. The name of the pepper variety was the Chinese large pepper, which was cultivated by Beijing Zhongnong Futong Horticultural Co., Ltd., Beijing, China.
The end-effector is based on a rotatable three-jaw end-effector that is able to adjust the position of the hand claw gripping point according to the morphological characteristics of the plug seedlings and to select the optimal point for gripping. The three-dimensional mechanical structure is shown in Figure 1. The mechanical structure of the rotatable three-jaw end-effector mainly includes a hand claw, cylinder, bearing, stepping motor, T-type connecting plate, fixing plate, connecting rod, fixing rod, etc.
(1) Clamping angle design: During the study [33], Tong et al. conducted a test of pressure resistance of a seedling heap under four different clamping angles, namely, 4°, 7°, 10°, and 13°. The test results showed that when the clamping angle was 7° or 10°, the seedling needle horizontal extrusion propulsion of seedling pile pressure resistance value rose gradually and was more stable compared with the angle values of 4° and 13°. In addition, the 7° angle was the most optimal clamping angle when the seedling pile pressure resistance value was the largest. Therefore, in this study, the clamping angle of the end-effector claw was designed as 7°.
(2) Design of the number of hand claws: It is known from study [34] that the use of three-needle and four-needle clamping seedling lumps can achieve a more stable gripping effect, and the seedling lump resistance pressure increases steadily with an increase in the horizontal compression displacement. In comparison, to achieve the same value of seedling heap pressure resistance, the three-pin type needs to increase the horizontal compression displacement. For the end-effector designed in this study, it is necessary to realize low-damage grasping of hole tray seedlings. The three-hand claw design can reduce the grasping point compared to the four-hand claw design, reducing the probability of injury when mechanically grasping of hole tray seedlings. Thus, with comprehensive consideration, this study uses a three-hand claw design.
(3) Hand claw grasping range design: Figure 2 shows the T-type connecting plate and the hand claw with the screw-fixed connection. The T-type connecting plate and cylinder expansion activities occur between the block and the screw connection, but the T-type connecting plate and the relative position of the cylinder expansion activities of the block are adjustable in the range of 0~10 mm. The minimum diameter of the outer circle of the three points of the gripping point of the hand claw is 28 mm, so the diameter of the three claws can be adjusted within the range of 28~48 mm, to apply to different specifications of the hole tray during hole tray seedling gripping.
(4) Horizontal clamping displacement design: From the study [35], it is known that the clamping force required to remove hole tray seedlings along the vertical hole direction is about 1.94 N. From the study [33], it is known that when the horizontal squeezing stroke of the finger pin on the seedling pile is 4 mm, a clamping force of more than 2.6 N can be obtained. This clamping force can overcome the adsorption force between the seedling pile and the hole tray as well as the gravitational force of the seedling pile. Accordingly, the horizontal clamping displacement was set to 4 mm in this study to ensure sufficient clamping force to remove a seedling from the hole tray, and the cylinder stroke was thus determined.
In this case, three hand jaws of the same size are evenly distributed under the end-effector and are connected to the cylinder telescopic movable block with a T-shaped connecting plate. The stepper motor is fixedly connected to the connecting plate with a sleeve, and the cylinder is also fixedly connected to the connecting plate with screws. Bearings are provided between the connecting plates to reduce frictional resistance. The stepper motor output shaft rotation drives the cylinder and hand claw to rotate according to a specified angle, thus adjusting the position of the hand claw grasping point. The fixed rod is fixedly connected to the replanting moving mechanism, and the end-effector is driven to reciprocate with the replanting moving mechanism.
The end-effector grasps the plug seedlings as follows: First, the end-effector moves to a position above the target cavity compartment of the cavity tray, as shown in Figure 3a. Second, according to the optimal gripping angle information from the controller, the stepper motor in the end-effector drives the cylinder and the hand claw to rotate and reach the optimal gripping point position, as shown in Figure 3b. Again, the end-effector moves downward as a whole until the hand claw is inserted into the plug seedling substrate at a certain depth, as shown in Figure 3c. Then, the end-effector is contracted with the control cylinder, which drives the hand claw to clamp the seedling, as shown in Figure 3d. Finally, the end-effector and the plug seedling move together upward to the specified height, as shown in Figure 3e, and this completes the plug seedling grasping action.
Combined with the characteristics of the end-effector mechanism in this study, the optimal location of the gripping point should be as follows. One of the three gripping points of the end-effector should be on the angular bisector of the cotyledon leaves of the cotyledon seedling, located on the side where the angle of the cotyledon leaves is less than 180 degrees. This will avoid damage to the cotyledon seedlings caused by the end-effector gripping point to the maximum extent possible, as shown in Figure 4, where the yellow dots are the three gripping points of the end-effector gripping points.

2.2. Image Pre-Processing

The images of seedling trays with pepper seedlings were uniformly divided according to seedling tray size (50-hole, 72-hole, 105-hole, etc.) by the number of cavities to obtain a uniform size image of the seedling tray containing plug seedlings. An example of cavity trays containing different forms of plug seedlings is shown in Figure 5.
From the sample analysis of the cavity grid image, it can be seen that the image mainly consists of three parts: the edge of the cavity tray, the culture substrate, and the plug seedlings.
To achieve plug seedling segmentation, this study first converts the cavity grid RGB image into a Lab image, obtains the a and b component values for each pixel point in the image, and finally uses a K-means clustering algorithm to perform 3-part clustering segmentation.
(1)
Transformation of cavity grid RGB images into Lab space
Converting cavity grid images from RGB into Lab space requires XYZ as an intermediate mode, where RGB and XYZ space conversions are shown in Equation (1).
[ X , Y , Z ] = M * [ R , G , B ]
where:
M = 0.4125 0.3576 0.1805 0.2126 0.7152 0.0722 0.0193 0.1192 0.9505
The transformation of XYZ space into Lab space is shown in Equation (2).
L = 116 f ( Y / Y n ) 16 a = 500 f ( X / X n ) f ( Y / Y n ) b = 200 f ( Y / Y n ) f ( Z / Z n )
where:
f ( t ) = t 1 / 3 i f t > ( 6 29 ) 3 1 3 ( 29 6 ) 2 t + 4 29 o t h e r w i s e
X n = 0.95045 , Y n = 1.0 , Z n = 1.08892
(2)
Image segmentation using the K-means clustering algorithm
The K-means clustering algorithm was used to segment the four cavity grid images in Figure 5, and the obtained image processing results are shown in Figure 6. The clustering results using the K-means algorithm are shown in the first column from the left, as shown in Figure 6a. The seedling tray edge segmentation image is shown in the second column from the left, as shown in Figure 6b. The culture substrate segmentation image is shown in the third column from the left, as shown in Figure 6c. The plug seedlings segmentation image is shown in the last column from the left, as shown in Figure 6d.
The effect of segmentation using the K-means clustering algorithm for the first seedling cavity grid image on the left in Figure 5 is shown in Figure 7. In this figure, three different shapes of graphs are used to represent the three parts of clustering after image segmentation. The three parts of clustering are good, and there is almost no crossover of data points, which can realize image segmentation of cavity tray plastic edge, substrate, and plug seedlings. The horizontal and vertical coordinates represent the a and b component values of each pixel point in the image in Lab space, respectively.
(3)
Binarization of the segmented plug seedlings images
This study uses the maximum interclass variance method to find a suitable threshold TH of the image. The segmented plug seedlings image is binarized by this threshold, and the calculation formula is shown in Equation (5). The binarized image of the processed plug seedlings is shown in Figure 8.
I ( x , y ) = 255     B ( x , y ) > T H I ( x , y ) = 0     B ( x , y ) < T H
(4)
Image noise removal using median filtering
A tiny amount of noise is present in the images, and the interference is caused by a few impurities on the seedling substrate and the leaves of the plug seedlings. Median filtering is used to remove the noise.
(5)
Morphological segmentation of cotyledon leaves of plug seedlings
By analyzing the growth morphology of the plug seedlings, it was found that the cotyledons and true leaves occupied a large image area. The connecting rods of the cotyledons and true leaves were relatively thin, so a morphological method is used to segment them and thus obtain a segmented image of the cotyledon leaves and seedling cores. And the fine weed area in the corm seedlings is eliminated using this method.
The open operation in the morphological method is to erode and then expand the image. The effect of the open operation is to make the contours in the image smooth and break narrow connections and eliminate fine burrs. The open operation is performed on A using the structural element S and is denoted as A S , which is expressed as:
A S = ( A Θ S ) S
The choice of structure elements in the morphological method open operation affects the results of image processing. When the structure element is too large, it will cut the effective area contour in the image, and when the structure element is too small, it will not be able to segment the connections effectively. Since the connecting rod does not have a fixed orientation feature, it is appropriate to use a square matrix as the structure element. Therefore, this study uses the all-one matrices of (6,6), (7,7), and (8,8) as structure elements to perform the open operation on the image, and the running results are shown in Figure 9.
From the results, it can be seen that the open operation with the structure of (6,6) sometimes cannot split the joints, as shown in Figure 9a, and the open operation with the structure of (8,8) can weaken the contour of the seedling core, as shown in Figure 9c. The open operation with the structure of (7,7) ensures that the cotyledon leaf outline is not weakened, and it also divides the cotyledon and the seedling core and has the effect of eliminating the tiny weeds in the plug seedlings, as shown in Figure 9b.

2.3. Feature Point Extraction and Localization Calculation in the Region of Interest

In this study, the angle between the angular bisector of the cotyledon leaf blade of plug seedlings and the horizontal positive direction is solved by extracting the feature points in the region of interest and the localization calculation. In this paper, two methods are designed to calculate the coordinates of feature points: one is the geometric method and the other is the center-of-mass method.
Method 1: Geometric method
The three characteristic points determined with the geometric method are the center points A and B of the minimum external rectangle of the cotyledon leaf blade and the intersection point C of the midline of the two rectangles.
First, according to the statistical analysis of the plug seedlings image, the two largest connected areas in the image were identified as the cotyledon leaf area, and its outer minimum rectangle was made, as shown in Figure 10. Second, after determining the direction of the long and short sides of the outer minimum rectangle of the cotyledons, the specific orientation of the leaves is determined. According to the minimum external rectangle, the endpoints calculate the rectangle center point A and B coordinates. Finally, according to the equation of the center line of the smallest external rectangle, the coordinates of its intersection point C is determined.
(1) The first large connected area outside the smallest rectangle outside the four endpoints is numbered clockwise. The highest point is marked K1, followed by the markers K2, K3, and K4. Similarly, the second largest connected region outside the four endpoints of the outer rectangle are numbered as K5, K6, K7, and K8, as shown in Figure 11.
(2) The next step is to detect the two side lengths L(K1,K2) and L(K1,K4) of the smallest rectangle outside the first large connected region to determine the direction of the cotyledon leaf blades.
Suppose M1 and M2 are the two midpoints of the short side of the outer rectangle of the cotyledon blade, and M3 and M4 are the two midpoints of the short side of the outer rectangle of the other cotyledon blade.
If L(K1,K2) > L(K1,K4), then the M1 and M2 coordinates are calculated as shown in Equations (9) and (10).
X M 1 = X K 1 + X K 4 2 , Y M 1 = Y K 1 + Y K 4 2
X M 2 = X K 2 + X K 3 2 , Y M 2 = Y K 2 + Y K 3 2
If L(K1,K2) < L(K1,K4), then the M1 and M2 coordinates are calculated as shown in Equations (11) and (12).
X M 1 = X K 1 + X K 2 2 , Y M 1 = Y K 1 + Y K 2 2
X M 2 = X K 3 + X K 4 2 , Y M 2 = Y K 3 + Y K 4 2
The coordinates of M3 and M4 are calculated in the same way as above, and thus the coordinates of M1, M2, M3, and M4 are calculated.
(3) Next, based on the coordinates of the four points M1, M2, M3, and M4, find the coordinates of the midpoints A and B of the two rectangles and the coordinates of the intersection C of the bisector of the two rectangles.
The coordinates of A (XA, YA) are calculated as shown in Equation (13).
X A = X M 1 + X M 2 2 , Y A = Y M 1 + Y M 2 2
The coordinates of B (XB, YB) are calculated as shown in Equation (14).
X B = X M 3 + X M 4 2 , Y B = Y M 3 + Y M 4 2
The coordinates of C are calculated by combining the equations of the line established by M1 and M2 and the equations of the line established by M3 and M4 to find the coordinates of the intersection C (XC, YC) as shown in Equations (15) and (16).
y Y M 1 x X M 1 = Y M 2 Y M 1 X M 2 X M 1
y Y M 3 x X M 3 = Y M 4 Y M 3 X M 4 X M 3
Method 2: Mass center method
Based on the growth characteristics of the plug seedlings, the three largest connected areas in the image were found and identified as the two cotyledon leaves and the plug seedling’s leaf core. The coordinates of the three connected areas are determined by finding the coordinates of the center-of-mass of the three points A, B, and C, as shown in Figure 12.
The center-of-mass coordinates are calculated as follows:
C e n t e r o f m a s s   c o o r d i n a t e s = T o t a l   c o o r d i n a t e s   o f   t h e   c o n n e c t e d   a r e a   a n d T o t a l   c o o r d i n a t e   p o i n t s

2.4. Calculation of the Optimal Gripping Angle for the Plug Seedlings

The initial gripping point position of the end-effector hand claws is designed so that one of the hand claws is horizontally oriented, where the yellow dots are the three gripping points of the end-effector gripping points, as shown in Figure 13a. To avoid damaging the plug seedlings with the hand claw, it is rotated according to the calculated optimal gripping angle to avoid the plug seedlings’ blades. The gripping point in the horizontal positive direction of the end-effector is adjusted so that it is rotated diagonally between the central axes of the two blades, as shown in Figure 13b, which is the optimal gripping angle of the end-effector.
From the previous analysis, it is clear that the angle between the angular bisector of the cotyledon leaves and the horizontal positive angle of the cotyledon is the optimal gripping angle for plug seedlings.
Assume that the included angles between vectors C A and C B and the positive horizontal direction are α 1 and α 2 , respectively. The included angle between the angular bisector C D formed by vectors C A and C B and the horizontal positive direction is β .
The distribution of the three feature points A, B, and C and α 1 , α 2 , and β in the plane coordinate system is shown in Figure 14.
The vector C A coordinates are (XA − XC, YA − YC), and the joint cube equation is as follows:
cos α 1 = x A x c ( x A x C ) 2 + ( y A y C ) 2
sin α 1 = y A y c ( x A x C ) 2 + ( y A y C ) 2
Next, find α 1 according to the joint cube equation. Similarly, calculate the included angle α 2 between C B and the horizontal positive direction.
Let the angle between the angle bisector C D and the horizontal positive direction be β , and discuss it in two cases:
Case 1, when α 2 α 1 < 180
β = α 1 + α 2 2
Case 2, when α 2 α 1 > 180
β = α 1 + α 2 2 + 180
Thus, the calculation for the optimal grasping angle β of the plug seedlings is completed.
The three gripping points in the end-effector are spaced at 120 degrees. To achieve fast grasping of plug seedlings, it is considered that the grasping angle sometimes exceeds 120 degrees. However, in practice, if the rotation angle exceeds 120 degrees, the orientation after rotation is the same as the residual result of dividing the rotation angle by 120 degrees. Therefore, the following end-effector rotation control strategy is defined.
Assuming that the optimal grasping angle of the plug seedlings is β and the rotation angle of the end actuator is γ , then:
γ = M O D ( β 120 )

3. Results and Analysis

Manual measurement method: The position of the seedling core in the image of the plug seedlings was manually marked as the corner point, and the midline of the two cotyledon leaves of the plug seedlings was manually marked, as shown in Figure 15a. The angle between the two midlines and the horizontal line was measured manually using the software Picpick, and the angle between the angular bisector of the cotyledons and the horizontal line was calculated. Angle A in the figure is the optimal gripping angle obtained using manual measurement.
Angle B was measured using the geometric method, and Angle C was measured using the center-of-mass method based on the optimal grasping angle algorithm for plug seedlings designed in this paper, as shown in Figure 15b,c.
The test samples were tested for the optimal gripping angle of plug seedlings using manual measurement, the geometric method, and the center-of-mass method. The test data are shown in Table 1.
Based on the test data obtained with the optimal grasping angle algorithm, Table 1 shows that the average error calculated using the geometric method is 3.12 degrees, and the average running time is 0.512 s. The average error calculated using the center-of-mass method is 6.03 degrees, and the average running time is 0.601 s. The comparison shows that the geometric method is more accurate and has a faster running time compared with the center-of-mass method, so the geometric method is used for angle calculation for the optimal grasping angle algorithm for plug seedlings designed in this paper.
Considering the failed calculations for samples 12 and 16, it can be seen that the optimal grasping angle algorithm designed in this paper may fail when the cotyledon leaves of the plug seedlings are not fully visible or when there are special samples invaded by the adjacent plug seedlings. Schematic diagrams showing the calculation of the two algorithms for samples 12 and 16 are shown in Figure 16. In Figure 16a, both the geometric method and the center-of-mass method fail, and in Figure 16b, the geometric method is valid, but the center-of-mass method fails.
Further, the algorithm validation for the special case sample revealed that for the special case sample where the plug seedlings invasion is small or the plug seedling leaves are incomplete but the main body is intact, as shown in Figure 17a, the results of the geometric method calculation are valid, and the results of the center-of-mass method calculation may fail. The geometric method can determine the cotyledon leaf blade based on the two largest connected areas and thus calculate the optimal gripping angle. The center-of-mass method is subject to computational errors due to interference from intruding leaves when determining the center-of-mass of the leaf core region. For the special case samples where the invasion of the plug seedlings is large or the plug seedlings have incomplete leaves and the main body is not fully displayed, as shown in Figure 17b, both the geometric and center-of-mass methods failed to calculate the results. The geometric and center-of-mass methods failed due to their inability to obtain the exact position of the leaves of the plug seedlings.

4. Conclusions

This paper presents a study of an optimal grasping angle algorithm for plug seedlings. First, a damage analysis is performed on the end-effector to grasp the plug seedlings. Second, we propose an optimal grasping angle algorithm for plug seedlings by segmenting the region of interest using image pre-processing, calculating the localization coordinates of the feature points in the region of interest, and then calculating the angle between the angular bisector of the cotyledons and the horizontal direction of the plug seedlings. Finally, the optimal gripping angle algorithm for plug seedlings was tested and validated. The experimental results show that the average calculation error is 3.12 degrees, and the average calculation time is 0.512 s per sheet, which meets the actual replanting requirements. Our next research direction is to find an optimal detection method based on the image analysis of the overall image of the seedling tray for all the plug seedlings to avoid the loss of plug seedlings information in some special cases, due to the image analysis of individual cavity frames, and thus reduce the angle calculation failure rate.

Author Contributions

Conceptualization, J.L. and Z.X.; methodology, Z.X. and Y.T.; validation, J.L. and Z.X.; formal analysis, J.L. and Z.X.; investigation, J.L. and Z.X.; resources, Z.X. and Y.T.; data curation, J.L.; writing—original draft preparation, J.L. and Z.X.; writing—review and editing, J.L., Z.X. and Y.T.; visualization, Z.X.; supervision, E.S., B.H. and G.M.; project administration, B.H. and G.M.; funding acquisition, Z.X. and Y.T. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Natural Science Foundation of Hunan Province, China, grant number 2023JJ50125, and the National Key Research and Development Program of China, grant number 2016YFD0700302.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Ma, R.; Cao, W.; Ren, L.; Ma, X. Design and parameter optimization of end-effector on automatic plug seedling transplanter. Mech. Des. Manuf. 2019, 185–189. [Google Scholar] [CrossRef]
  2. Zhang, K.; Wu, H.; Wang, W.; Song, C.; Liu, X. Design and experiment of clamping picking seedling mechanism for tomato transplanter. Agric. Mech. Res. 2020, 42, 64–68. [Google Scholar] [CrossRef]
  3. Li, H.; Ma, X.; Cao, W.; Li, S.; Zhou, W. Design and experiment of seedling picking mechanism by stem clipping for tomato plug seedling. Trans. Chin. Soc. Agric. Eng. 2020, 36, 39–48. [Google Scholar]
  4. Zhang, M.; Feng, J.; Gong, C.; Han, B. Analysis on ejector seedlings mechanism of automatic dry farmland transplanting machine. J. Agric. Mech. Res. 2014, 36, 85–89. [Google Scholar] [CrossRef]
  5. Chen, K.; Yang, X.; Yan, H.; Guo, Y.; Wu, J.; Liu, J. Design and parameter optimization of seedling pick-up mechanism based on Matlab. Trans. Chin. Soc. Agric. Mach. 2013, 44, 24–26, 32. [Google Scholar]
  6. Chen, J.; Wang, B.; Zhang, X.; Ren, G.; Zhao, X. Kinematics modeling and characteristic analysis of multi-linkage transplanting mechanism of pot seeding transplanter with zero speed. Trans. Chin. Soc. Agric. Eng. 2011, 27, 7–12. [Google Scholar]
  7. Han, C.; Guo, H.; Zhang, X.; Yang, W. Design of automatic hard-plug-seedlings pick device. Agric. Eng. 2013, 3, 99–102. [Google Scholar]
  8. Guo, J.; Huang, Y.; Dai, Y.; Luo, X.; Gou, H. Performance experimental study of orderly rows seedlings on a type of seedling-falling device with air blast. J. Chin. Agric. Mech. 2014, 35, 136–138. [Google Scholar] [CrossRef]
  9. Lv, Y.; Li, X.; Chen, Y.; Zheng, J. The development of adjustable transplanting mechanism for plug seedlings. J. Agric. Mach. 2003, 12, 11–24. [Google Scholar] [CrossRef]
  10. Zhang, L.; Qiu, L.; Tian, S.; Xiang, Q. Design of a Needle Clamping Claw for Plug Seedling Transplanting. J. Shenyang Agric. Univ. 2010, 41, 235–237. [Google Scholar]
  11. Wang, X.; Wang, C. Transplanting Device for Plug Seedlings and Transplanting Manipulator Therein. Patent CN200810124203.6, 3 July 2008. [Google Scholar]
  12. Tmg, K.C.; Giacomelli, G.A.; Shen, S.J. Robot workcell for transplanting of seedlings. Part I: Layout and materials flow. Trans. ASAE 1990, 33, 1005–1010. [Google Scholar] [CrossRef]
  13. Ting, K.C.; Giacomelli, G.A.; Shen, S.J.; Kabala, W.P. Robot workcell for transplanting of seedlings. Part II: End-effector development. Trans. ASAE 1990, 33, 1013–1017. [Google Scholar] [CrossRef]
  14. Yang, Y.; Ting, K.C.; Giacomelli, G.A. Factors Affecting Performance of Sliding-Needles Gripper During Robotic Transplanting of Seedlings. Appl. Eng. Agric. 1991, 7, 493–498. [Google Scholar] [CrossRef]
  15. Choi, W.C.; Kim, D.C.; Ryu, I.H.; Kim, K.U. Development of a seedling pick-up device for vegetable transplanters. Trans. ASABE 2002, 45, 13. [Google Scholar]
  16. Hyeon, K.D.; Eok, K.D.; In, L.G.; Ho, K.Y.; Jin, L.H.; Bong, M.Y. Development of a Vegetable Transplanting Robot. J. Biosyst. Eng. 2012, 37, 201–208. [Google Scholar]
  17. Zhou, T. Design and Experimental Research on Transplanter for Potted Tray Seedlings in Greenhouse. Master’s Thesis, Nanjing Agricultural University, Nanjing, China, 2009. [Google Scholar]
  18. Han, L.; Mao, H.; Hu, J.; Xu, J.; Zhao, Z.; Ma, G. Design and Test of Automatic Transplanter for Greenhouse Plug Seedlings. Trans. Chin. Soc. Agric. Mach. 2016, 47, 59–67. [Google Scholar]
  19. Han, C.; Guo, H.; Yang, W.; Zhang, J. The Driving and Optimization for Double-Cylinders Three-Position Pick Seedlings Manipulator. J. Agric. Mech. Res. 2017, 39, 17–21. [Google Scholar] [CrossRef]
  20. Jiang, Z.; Jiang, H.; Tong, J. Optimal design of end-effector on automatic plug seedling transplanter. J. Zhejiang Univ. (Eng. Sci.) 2017, 51, 1119–1125. [Google Scholar]
  21. Kang, H.; Zhou, H.; Wang, X.; Chen, C. Real-time fruit recognition and grasping estimation for robotic apple harvesting. Sensors 2020, 20, 5670. [Google Scholar] [CrossRef]
  22. Wang, X.; Kang, H.; Zhou, H.; Au, W.; Chen, C. Geometry-aware fruit grasping estimation for robotic harvesting in apple orchards. Comput. Electron. Agric. 2022, 193, 106716. [Google Scholar] [CrossRef]
  23. Hu, F.; Yin, W.; Chen, C.; Xu, B. Recognition and localization of plug seedling based on machine vision. J. Northwest A&.F Univ. (Nat. Sci. Ed.) 2013, 41, 183–188. [Google Scholar] [CrossRef]
  24. Zhang, Z.; Lv, Q.; Chen, Q.; Xu, H.; Li, H.; Zhang, N.; Bai, Z. Status analysis of picking seedling transplanting mechanism automatic mechanism for potted flower. J. Jiangsu Univ. (Nat. Sci. Ed.) 2016, 37, 409–417. [Google Scholar]
  25. Liu, W.; Liu, J. Review of End-Effectors in Tray Seedlings Transplanting Robot. J. Agric. Mech. Res. 2013, 35, 6–10. [Google Scholar] [CrossRef]
  26. Tong, J.; Jiang, H.; Jiang, Z.; Cui, D. Experiment on parameter optimization of gripper needles clamping seedling plug for automatic transplanter. Trans. Chin. Soc. Agric. Eng. 2014, 30, 8–16. [Google Scholar]
  27. Gao, G.; Feng, T.; Li, F. Working parameters optimization and experimental verification of inclined-inserting transplanting manipulator for plug seedling. Trans. Chin. Soc. Agric. Eng. 2015, 31, 16–22. [Google Scholar]
  28. Kumi, F. Study on Substrate-Root Multiple Properties of Tomato Seedlings and Damage of Transplanting Pick-Up. Ph.D. Thesis, Jiangsu University, Zhenjiang, China, 2016. [Google Scholar]
  29. Ding, Y. Design and Experimental Study on Key Components of Automatic Transplanting Machine for Greenhouse Seedlings. Master’s Thesis, Zhejiang Sci-Tech University, Hangzhou, China, 2019. [Google Scholar]
  30. Han, L.; Mao, H.; Yan, L.; Hu, J.; Huang, W.; Dong, L. Pincette-Type End-Effector Using Two Fingers and Four Pins for Picking Up Seedlings. Trans. Chin. Soc. Agric. Mach. 2015, 46, 23–30. [Google Scholar]
  31. Liu, J.; Li, M.; Li, N.; Li, P.; Zhao, M.; Yue, W. Design and Test of End-effector for Automatic Transplanting of Strawberry Plug Seedlings. Trans. Chin. Soc. Agric. Mach. 2016, 47, 49–58. [Google Scholar]
  32. Han, L.; Mao, H.; Miao, X.; Hu, J.; Yang, X. Design of Automatic Picking Up Seedling End-Effector Based on Mechanical Properties of Plug Seedlings. Trans. Chin. Soc. Agric. Mach. 2013, 44, 260–265. [Google Scholar]
  33. Wang, Y.; Yu, H. Experiment and analysis of impact factors for soil matrix intact rate of manipulator for picking-up plug seedlings. Trans. Chin. Soc. Agric. Eng. 2015, 31, 65–71. [Google Scholar]
  34. Tong, J. End-Effector Design, Seedling Information Inspection and Path. Planning for Transplanting between Vegetable Seedling Trays. Ph.D. Thesis, Zhejiang University, Hangzhou, China, 2014. [Google Scholar]
  35. Han, L. Mechanical Analysis of the Root Lumps and Development of a Robotic Transplanter for Vegetable Plug Seedlings. Ph.D. Thesis, Jiangsu University, Zhenjiang, China, 2014. [Google Scholar]
Figure 1. Three-dimensional structure of the rotatable three-jaw end-effector. 1. Hand claw. 2. T-type connecting plate. 3. Cylinder telescopic movable block. 4. Connecting plate. 5. Support rod. 6. Fixed rod. 7. Motor. 8. Fixed plate. 9. Bearing. 10. Air inlet. 11. Air outlet. 12. Cylinder.
Figure 1. Three-dimensional structure of the rotatable three-jaw end-effector. 1. Hand claw. 2. T-type connecting plate. 3. Cylinder telescopic movable block. 4. Connecting plate. 5. Support rod. 6. Fixed rod. 7. Motor. 8. Fixed plate. 9. Bearing. 10. Air inlet. 11. Air outlet. 12. Cylinder.
Agronomy 13 02253 g001
Figure 2. Localized enlarged view of rotatable three-jaw end-effector. 1. Cylinder. 2. Cylinder telescopic movable block. 3. T-type connecting plate. 4. Screw. 5. Hand claw.
Figure 2. Localized enlarged view of rotatable three-jaw end-effector. 1. Cylinder. 2. Cylinder telescopic movable block. 3. T-type connecting plate. 4. Screw. 5. Hand claw.
Agronomy 13 02253 g002
Figure 3. Schematic diagram showing the steps that grasp seedlings using a rotatable three-jaw end-effector.
Figure 3. Schematic diagram showing the steps that grasp seedlings using a rotatable three-jaw end-effector.
Agronomy 13 02253 g003
Figure 4. Schematic diagram showing the optimal gripping points.
Figure 4. Schematic diagram showing the optimal gripping points.
Agronomy 13 02253 g004
Figure 5. Example showing a cavity grid containing seedlings with different morphologies in cavity trays.
Figure 5. Example showing a cavity grid containing seedlings with different morphologies in cavity trays.
Agronomy 13 02253 g005
Figure 6. The K-means clustering algorithm was used to segment cave grid images. (a) Clustering result of the K-means algorithm. (b) Segmented image of a cavity tray edge. (c) Segmented image of the culture substrate. (d) Segmented image of a plug seedling.
Figure 6. The K-means clustering algorithm was used to segment cave grid images. (a) Clustering result of the K-means algorithm. (b) Segmented image of a cavity tray edge. (c) Segmented image of the culture substrate. (d) Segmented image of a plug seedling.
Agronomy 13 02253 g006
Figure 7. K-means clustering segmentation cave grid image effect.
Figure 7. K-means clustering segmentation cave grid image effect.
Agronomy 13 02253 g007
Figure 8. Binarized images of plug seedlings.
Figure 8. Binarized images of plug seedlings.
Agronomy 13 02253 g008
Figure 9. Morphological segmentation of the image after (a) using the structure element (6,6) to open the result of the operation, (b) using the structure element (7,7) to open the result of the operation, and (c) using the structure element (8,8) to open the result of the operation.
Figure 9. Morphological segmentation of the image after (a) using the structure element (6,6) to open the result of the operation, (b) using the structure element (7,7) to open the result of the operation, and (c) using the structure element (8,8) to open the result of the operation.
Agronomy 13 02253 g009
Figure 10. Minimum rectangle outside the leaf of the plug seedlings.
Figure 10. Minimum rectangle outside the leaf of the plug seedlings.
Agronomy 13 02253 g010
Figure 11. Geometric method to find the midline of the outer rectangle of the cotyledon leaf blade.
Figure 11. Geometric method to find the midline of the outer rectangle of the cotyledon leaf blade.
Agronomy 13 02253 g011
Figure 12. Marking and positioning of the connected region mass center.
Figure 12. Marking and positioning of the connected region mass center.
Agronomy 13 02253 g012
Figure 13. The optimal angle of rotation of the end-effector. (a) Initial gripping point location. (b) Adjusted gripping point position.
Figure 13. The optimal angle of rotation of the end-effector. (a) Initial gripping point location. (b) Adjusted gripping point position.
Agronomy 13 02253 g013
Figure 14. The distribution of plane coordinates of points A, B, and C. (a) Distribution of plane coordinates I. (b) Distribution of plane coordinates II.
Figure 14. The distribution of plane coordinates of points A, B, and C. (a) Distribution of plane coordinates I. (b) Distribution of plane coordinates II.
Agronomy 13 02253 g014
Figure 15. Schematic diagram showing the optimal gripping angle measurement for the end-effector. (a) Manual measurement of Angle A. (b) The measurement of Angle B is based on the geometric method. (c) The measurement of Angle C is based on the center-of-mass method.
Figure 15. Schematic diagram showing the optimal gripping angle measurement for the end-effector. (a) Manual measurement of Angle A. (b) The measurement of Angle B is based on the geometric method. (c) The measurement of Angle C is based on the center-of-mass method.
Agronomy 13 02253 g015
Figure 16. Example showing samples with calculation failures. (a) Schematic diagram showing the calculation for sample No. 12 using the geometric and center-of-mass methods. (b) Schematic diagram showing the calculation of sample No. 16 using the geometric and center-of-mass methods.
Figure 16. Example showing samples with calculation failures. (a) Schematic diagram showing the calculation for sample No. 12 using the geometric and center-of-mass methods. (b) Schematic diagram showing the calculation of sample No. 16 using the geometric and center-of-mass methods.
Agronomy 13 02253 g016
Figure 17. Sample images showing special cases. (a) Special case I. (b) Special case II.
Figure 17. Sample images showing special cases. (a) Special case I. (b) Special case II.
Agronomy 13 02253 g017
Table 1. Test results for the optimal grasping angle algorithm for plug seedlings.
Table 1. Test results for the optimal grasping angle algorithm for plug seedlings.
Test
Serial Number
Manual Measurement Angle A (Degrees)Geometric Calculation of Angle B (Degrees) Angle of Mass Method C (Degrees)Angle Absolute
Difference (Degrees)
|a − b|
Absolute Difference of Angle (Degrees)
|a − c|
Geometric Calculation Time (Seconds)Mass Center Method Calculation Time (Sec)
189.3787.5783.491.805.880.4510.657
2137.95140.78133.622.834.080.5020.632
3207.32204.15203.813.173.510.5160.603
4214.33210.68205.013.659.320.5780.559
5108.84106.20104.772.644.070.5230.556
636.9134.3232.292.594.620.5720.611
794.8398.1887.313.357.520.4900.594
8107.35109.70102.622.354.730.5280.635
9220.39223.56214.293.176.100.5410.571
10142.85145.97134.143.128.710.4790.550
11180.25184.39187.924.147.670.5020.574
1296.48233.02359.92F (136.54)F (263.44)0.4810.590
1377.6175.1282.502.494.890.4710.583
1493.2390.4588.042.785.190.4990.604
1552.3055.7259.683.427.380.5280.612
16333.49331.93312.181.56F (21.31)0.5150.581
1734.6631.5728.493.096.170.4840.599
18205.13210.27213.755.148.620.5470.642
19172.79176.36177.023.574.230.5030.659
2088.3792.9094.264.535.890.5370.613
AverageN/AN/AN/A3.126.030.5120.601
Note: It is assumed that a calculation failure occurred when the difference between the calculated angle and the manually measured angle was greater than 15 degrees, which is recorded as F.
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Liu, J.; Xiao, Z.; Tan, Y.; Sun, E.; He, B.; Ma, G. A Study on the Optimal Grasping Angle Algorithm for Plug Seedlings Based on Machine Vision. Agronomy 2023, 13, 2253. https://0-doi-org.brum.beds.ac.uk/10.3390/agronomy13092253

AMA Style

Liu J, Xiao Z, Tan Y, Sun E, He B, Ma G. A Study on the Optimal Grasping Angle Algorithm for Plug Seedlings Based on Machine Vision. Agronomy. 2023; 13(9):2253. https://0-doi-org.brum.beds.ac.uk/10.3390/agronomy13092253

Chicago/Turabian Style

Liu, Junjie, Zhang Xiao, Yu Tan, Erjie Sun, Bin He, and Guoning Ma. 2023. "A Study on the Optimal Grasping Angle Algorithm for Plug Seedlings Based on Machine Vision" Agronomy 13, no. 9: 2253. https://0-doi-org.brum.beds.ac.uk/10.3390/agronomy13092253

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop