# Intelligent Tea-Picking System Based on Active Computer Vision and Internet of Things

Authors: Jing Zhang; Zhaochun Li
Journal: Security and Communication Networks
 (2021)

---

## Abstract

Intelligent farming machines are becoming a new trend in modern agriculture. The intelligence and automation allow planting to become data-driven, leading to more timely and cost-effective production and management of farms and improving the quality and output of farm products. This paper presents a proposal for developing a type of intelligent tea picking machine based on active computer vision and Internet of Things (IoT) techniques. The intelligent tea picking machine possesses an active vision system for new tip positioning and can automatically implement tea picking operation in the natural environment. The active vision system provided with a cross-light path of projection and camera is designed according to the actual characteristics of picking surface, where new tips can be recognized by referring to the color factor and their height information is easily acquired by fringe projection profilometry. Furthermore, the machine attaches wireless communication equipment to transmit the real-time status of the tea picking process to an intermediary platform and eventually to the Internet for extensive data analysis. The data such as color factor and quantity of new tips collected through IoT can be used for different quality and production evaluations. The focus of this paper can promote the automation and intelligence of tea pickers and agricultural machinery.


---

## Body

## 1. Introduction

Tea is an aromatic material for the beverage that originated in China at the earliest [1]. Its history spreads across multiple cultures over thousands of years. So far, tea is the most widely consumed beverage in the world [2]. Every year, a large amount of readymade tea comes from several main producing areas to fit the global demand. However, picking tea is an arduous job because of the long working time and high-labor intensity during the harvest period. In China, the harvest of high-quality tips is commonly completed by hand. The traditional agricultural economy is facing the pressure of a shortage of labor resources and increased manufacturing costs. Even some tea manufacturers have to give up harvesting under challenging times. To enhance the tea quality and balance the industry economically, it is necessary to promote extensive use of tea picking machines.Actually, during the past years, the emergence of various agricultural machinery has largely replaced manual planting and harvesting, alleviating the challenges posed by a labor shortage and rising production costs for agricultural sustainability. More intelligent agricultural equipment is expected to play an essential role in improving farming activities. The latest trend is to enable these farming machines to operate over the Internet [3, 4]. The basis of this new approach is a complete set of IoT servers and wireless sensors. Agricultural producers can realize the interoperability of various production links by building regional Internet of Things (IoT) and wireless sensor networks (WSNs) [5]. In this framework, agricultural machinery, sensors for crop environmental factors, conveying equipment, farmers’ mobile terminals, and databases from higher-level agricultural departments are connected as a whole [6, 7]. By monitoring the planting of crops on the farm and uploading it to the server through the analysis of big data by higher-level departments and then accurately regulating planting, fertilization, irrigation, and picking, it can allocate land more scientifically and plant crops more reasonably, and ultimately achieve a large increase in production and significant improvement in quality [8]. In addition, IoT technology uses low-latency networks to drive farm machinery work. It liberates farmers and dramatically reduces production costs [9].Currently, the available tea harvesting machines are mostly used for cutting operations over a large area. Their high efficiency helps manufacture a huge quantity of low-grade goods. However, their harvesting style without any selection may result in the tea product composition of many stalks and old leaves, while only the new tips and one leaf below new tips are supposed to be high-grade tea. Hence, it is necessary to redesign the picking style and develop such an intelligent tea picking system that can automatically locate new tips and realize a kind of data-driven harvesting.The main contribution of this paper can be highlighted as follows:(i)
A new intelligent machine for high-grade tea picking has to be developed, which involves two critical designs: the construction of an active vision system for new tip positioning and the other application of IoT for collecting various harvest information.(ii)
The active vision system is designed as the fundamental unit for artificial intelligence like eyes for humans. The visual system is constructed with a cross-light path of projection and camera according to the actual characteristics of the picking surface. It can implement the recognition of new tips by referring to the color factor and applying the fringe projection profilometry to acquire the height information of the tips.(iii)
IoT is applied to collect real-time status about the tea picking process to the server, and extensive data analysis is used to assess the quality and yield of tea to improve integrated farm management.The remainder of this paper is organized as follows: Section2 gives the details of the system materials and methods, including the design of regional IoT and three-dimensional positioning systems. Section 3 presents the experiments to demonstrate the effectiveness of the new design. Finally in Section 4, concluding remarks are given.


## 2. Materials and Methods

### 2.1. Data Collection Based on IoT

IoT ensures data flow between sensors and other devices, making it possible to obtain data by automatic processing, analysis, and access, leading to more timely and cost-effective high-grade tea production and management effort on farms [10, 11]. Simultaneously, IoT eases the supervision of different activities as well as the traceability of products and control in farms by the appropriate authorities.The wireless communication module is applied to collect harvest information such as the color and height of new tips, picking time, and environmental conditions. The data such as color factor and humidity can be used to illustrate the tea quality. The quantity of new tips is taken into account in the overall data to evaluate production before frying. Figure1 presents that, with IoT, some necessary information about the tea production process, such as tea making, packaging, and transportation, are transmitted to the Internet for data analysis and product control. Even various operating parameters of the running machines can also be uploaded and displayed to the operator in real-time.Figure 1
Agricultural Internet of Things.


### 2.2. Three-Dimensional Positioning System

Fringe projection profilometry is one of the most widely used techniques of three-dimensional (3D) optical measurement, because of its qualities of noncontact, low-cost, and high-resolution [12]. Based on the classical principle of triangulation optics, fringe patterns that consist of a sinusoidal distribution of gray scale patterns are projected onto the object, and the distorted patterns are then captured by the imaging system. Further processing by phase unwrapping, exact 3D information can be obtained [13].Unlike other measurement methods of structured light, fringe patterns project a spatial field distributed by period. The parameter being measured is encoded in the form of a two-dimensional (2D) distorted fringe, from which the phase map retrieved can describe the whole and continuous plane. Therefore, the profilometry can perform the measurement of the planar objects in the field of imaging by one projection.In this work, an intelligent tea-positioning system is designed based on the profilometry fringe projection. As shown in Figure2, the system consists of a DLP projector, a digital camera with resolution 1028 × 964, a computer, and a reference plane. It is noted that, in the optical system, the line joining the optical center of the camera and the projective center should be parallel to the reference plane, the projective axis should be set perpendicular to the reference plane, and the projective axis and the optical axis of the camera should either intersect the reference plane. The distance l0 between the center of the camera and the projector is set as 45 cm, and the distance between the optical center of the camera and the reference plane is defined as 110 cm. Two steps should be performed for tea-positioning: identifying and ascertaining the new tips growing above the tea canopy and providing their horizontal coordinates; applying fringe projection profilometry to extract their actual height information relative to the reference plane.Figure 2
Tea tips positioning system.


### 2.3. Tips Identification under Natural Conditions

Identifying the tea tips from the natural background is the first step towards the intelligent tea picking machine. In the early spring, the color differences are distinct between the fresh tips and the background consisting of soil, old leaves, and the debris of plants. These differences make it possible for the image segmentation of distinguishing new tips from the gray background.The color analysis on the new tips and the image segmentation from their background had been discussed in Reference [14], and a tip identification method is developed as preliminary guidance for the positioning system. Several color indices, including the difference between cyan and magenta color in CMY color space, channels B, Q, i3, and Yb in LAB, YIQ, i1i2i3, and RGB color spaces [15], are studied and tested. In order to ensure a desirable result of image segmentation, the gray level image is transformed into a binary image by the Otsu method [16], and an area filter is used to sweep away the randomly spotted noise. Finally, a centroidal method is applied to identify the center pixels of the tips, and then their horizontal coordinates are obtained.Figure3 depicts the famous Longjing tea pictured by CCD in early spring in a tea farm located in Jintan, Jiangsu province of China. The figure can be processed by the aforementioned procedures to identify the new tips, whose results are shown in Figure 4. By comparing Figure 3 with Figure 4, we can see that most new tips are identified accurately and match the centroidal pixels well, where the centroidal pixels are marked by the green dots. The results illustrate that the automated identification of new tips is performed successfully.Figure 3
Tea in early spring.Figure 4
The central points of tea tips.


### 2.4. Height Measurement by Fringe Projection Profilometry

In the past three years, we have carried out many experiments on several prevalent technologies to measure the depth distribution of objects. Finally, the fringe projection profilometry is adopted as a reliable solution. As introduced above, the fringe projection profilometry is implemented by projecting a set of sinusoidal fringes to the measured object, grabbing the modulated fringe images by the measured object, and processing these images for the unwrapped phase and height information [17]. It is easy to implement with simple hardware and more applicable to the object lying over a plane.Let us focus on the cultivation pattern of the tea trees. In most farms, the tea trees are planted line by line with a path between the rectangular raised-fields. During each raised field, these trees are planted side by side. When the trees are mature, their branches and leaves will extend together as a shrub. Generally, the crown of the shrub will be pruned into a flat or arc plateau. So it is convenient to the large-scale plucking by machines. If the picking surface is considered as an object, the profilometry is exactly a rational solution to acquire the height information of each pixel.


#### 2.4.1. Obtaining the Phase Value

A typical fringe projection profilometry usually yields four phase-shifted images for the extraction of the phase information. The phase retrieval can be completed by two steps: wrapped phase retrieval and phase unwrapping [18]. First, the sinusoidal fringe patterns which have π/2 phase shifts relatively are projected onto the object as shown in Figure 2, and the distorted pattern captured by the CCD camera can be used to calculate the wrapped phase by Equation (1). Second, the obtained wrapped phase can be demodulated into an absolute phase map by the phase-unwrapping algorithm [13]:(1)ϕwx,y=arctanI3−I1I0−I2,where x,y is the image coordinates, ϕwx,y is the wrapping phase, Ii is the gray intensity distribution of the fringe image, and i means the ith phase-shifting fringe image i=0,1,2,3.According to the above inverse tangent function, the modulated phase is limited in the range of−π,π, which leads to the periodical distribution of the phase map. Phase unwrapping is carried out to restore the unknown multiple of 2π for each pixel [12]. But since noise, fringe under-sampling, and shadow problems exist in the acquired phase map, if the phase-unwrapping path traverses these regions, 2π-phase errors will occur. Unwrapping errors can easily be accumulated and propagated along the unwrapping path. Thus, many methods based on reliability ordering have been presented in this field aiming to alleviate the error propagation, such as water flood algorithms and modulation-based algorithms. However, error accumulation and propagation are still an obstacle, if only passing through invalid areas with global discontinuities is needed [13].In order to avoid stubborn error propagation, a more complex method of the temporal phase-unwrapping algorithm is implemented in this system. There are four kinds of fringes with different wavelengths designed and projected to the object by turns. The wavelength numbers of fringes are 1, 4, 16, and 64, respectively. Eachϕkw corresponding to a different kind of fringe can be disposed by Equation (1), but the unwrapping phase is given by the following equation:(2)ϕku=ϕkw,k=1,ϕkw+2π⋅Roundϕk−1u⋅mk/mk−1−ϕkw2πk>1,where a sequence of incremental phase maps can be assembled and integrated into the final phase-difference map. The basic meaning of the temporal is that the phase at each pixel can be calculated as a function of time. Unwrapping is carried out along the time axis for each pixel independently from the others, which is so-called path-independent. In this 3-D phase distribution, the local discontinuities keep unchanged along the time axis, provided that these discontinuities do not change with time, and therefore can be avoided completely during the process of unwrapping along the path parallel to the time axis [19]. Therefore, temporal phase unwrapping performs better in alleviating phase ambiguity and error in contrast to other implemented approaches [18].An example of the unwrapping phase process is shown in Figure5. Figures 5(a)–5(d) present the wrapped phases of each wavelength fringe, which can be demodulated by Equation (2) to the absolute phase maps. There are many abnormal peaks and abrupt points in these figures, and these points are all low-reliability pixels and should not be utilized. However, these bad points do not propagate and contaminate the rest of the unwrapping results and also testify the robust ability of the unwrapping phase algorithm.Figure 5
Temporal phase unwrapping.
(a)(b)(c)(d)(e)When the fringes are projected on the reference plane, the absolute phase of referenceϕr is available and the difference between the reference plane and the objects at the pixel x,y can be written as(3)Δφx,y=ϕux,y−ϕrx,y.in which the full height information is preserved.


#### 2.4.2. Phase-Height Mapping

In order to obtain the height information conveniently and accurately, establishing appropriate height mapping with the unwrapped phase is necessary. Traditional calibration technique based on ray tracing derives the following phase-height formula with the aid of the similarity of space triangles referring to the triangulation profilometry [20].(4)hx,y=l0Δφx,yΔφx,y+2πd/λ0,where λ0 denotes the equivalent wavelength of the 64 fringes (λ0 = 8.3 mm). However, in practice, the higher the measured object, the more severely defocused the camera lens will be. Even worse, both the optical projection system and the image formation parts can inevitably introduce optical aberrations. Due to these problems, the theoretical equation as Equation (4) cannot deduce the accurate height value. Therefore, how to improve the accuracy of height calculation is another thinking point. Fortunately, a triple-parabolic fitting described in Equation (5) is proposed to rebuild the phase-height mapping, and then their nonlinear relationship is corrected completely.(5)1hx,y=a+b1Δφx,y+c1Δφx,y3,where a, b, and c are the system adjustment parameters obtained by a series of calibrations. It should be noted that the real value of a set of parameters for one point is actually different from the other, but a, b, and c can be calculated, respectively, by the approximation of average.


## 2.1. Data Collection Based on IoT

IoT ensures data flow between sensors and other devices, making it possible to obtain data by automatic processing, analysis, and access, leading to more timely and cost-effective high-grade tea production and management effort on farms [10, 11]. Simultaneously, IoT eases the supervision of different activities as well as the traceability of products and control in farms by the appropriate authorities.The wireless communication module is applied to collect harvest information such as the color and height of new tips, picking time, and environmental conditions. The data such as color factor and humidity can be used to illustrate the tea quality. The quantity of new tips is taken into account in the overall data to evaluate production before frying. Figure1 presents that, with IoT, some necessary information about the tea production process, such as tea making, packaging, and transportation, are transmitted to the Internet for data analysis and product control. Even various operating parameters of the running machines can also be uploaded and displayed to the operator in real-time.Figure 1
Agricultural Internet of Things.


## 2.2. Three-Dimensional Positioning System

Fringe projection profilometry is one of the most widely used techniques of three-dimensional (3D) optical measurement, because of its qualities of noncontact, low-cost, and high-resolution [12]. Based on the classical principle of triangulation optics, fringe patterns that consist of a sinusoidal distribution of gray scale patterns are projected onto the object, and the distorted patterns are then captured by the imaging system. Further processing by phase unwrapping, exact 3D information can be obtained [13].Unlike other measurement methods of structured light, fringe patterns project a spatial field distributed by period. The parameter being measured is encoded in the form of a two-dimensional (2D) distorted fringe, from which the phase map retrieved can describe the whole and continuous plane. Therefore, the profilometry can perform the measurement of the planar objects in the field of imaging by one projection.In this work, an intelligent tea-positioning system is designed based on the profilometry fringe projection. As shown in Figure2, the system consists of a DLP projector, a digital camera with resolution 1028 × 964, a computer, and a reference plane. It is noted that, in the optical system, the line joining the optical center of the camera and the projective center should be parallel to the reference plane, the projective axis should be set perpendicular to the reference plane, and the projective axis and the optical axis of the camera should either intersect the reference plane. The distance l0 between the center of the camera and the projector is set as 45 cm, and the distance between the optical center of the camera and the reference plane is defined as 110 cm. Two steps should be performed for tea-positioning: identifying and ascertaining the new tips growing above the tea canopy and providing their horizontal coordinates; applying fringe projection profilometry to extract their actual height information relative to the reference plane.Figure 2
Tea tips positioning system.


## 2.3. Tips Identification under Natural Conditions

Identifying the tea tips from the natural background is the first step towards the intelligent tea picking machine. In the early spring, the color differences are distinct between the fresh tips and the background consisting of soil, old leaves, and the debris of plants. These differences make it possible for the image segmentation of distinguishing new tips from the gray background.The color analysis on the new tips and the image segmentation from their background had been discussed in Reference [14], and a tip identification method is developed as preliminary guidance for the positioning system. Several color indices, including the difference between cyan and magenta color in CMY color space, channels B, Q, i3, and Yb in LAB, YIQ, i1i2i3, and RGB color spaces [15], are studied and tested. In order to ensure a desirable result of image segmentation, the gray level image is transformed into a binary image by the Otsu method [16], and an area filter is used to sweep away the randomly spotted noise. Finally, a centroidal method is applied to identify the center pixels of the tips, and then their horizontal coordinates are obtained.Figure3 depicts the famous Longjing tea pictured by CCD in early spring in a tea farm located in Jintan, Jiangsu province of China. The figure can be processed by the aforementioned procedures to identify the new tips, whose results are shown in Figure 4. By comparing Figure 3 with Figure 4, we can see that most new tips are identified accurately and match the centroidal pixels well, where the centroidal pixels are marked by the green dots. The results illustrate that the automated identification of new tips is performed successfully.Figure 3
Tea in early spring.Figure 4
The central points of tea tips.


## 2.4. Height Measurement by Fringe Projection Profilometry

In the past three years, we have carried out many experiments on several prevalent technologies to measure the depth distribution of objects. Finally, the fringe projection profilometry is adopted as a reliable solution. As introduced above, the fringe projection profilometry is implemented by projecting a set of sinusoidal fringes to the measured object, grabbing the modulated fringe images by the measured object, and processing these images for the unwrapped phase and height information [17]. It is easy to implement with simple hardware and more applicable to the object lying over a plane.Let us focus on the cultivation pattern of the tea trees. In most farms, the tea trees are planted line by line with a path between the rectangular raised-fields. During each raised field, these trees are planted side by side. When the trees are mature, their branches and leaves will extend together as a shrub. Generally, the crown of the shrub will be pruned into a flat or arc plateau. So it is convenient to the large-scale plucking by machines. If the picking surface is considered as an object, the profilometry is exactly a rational solution to acquire the height information of each pixel.


### 2.4.1. Obtaining the Phase Value

A typical fringe projection profilometry usually yields four phase-shifted images for the extraction of the phase information. The phase retrieval can be completed by two steps: wrapped phase retrieval and phase unwrapping [18]. First, the sinusoidal fringe patterns which have π/2 phase shifts relatively are projected onto the object as shown in Figure 2, and the distorted pattern captured by the CCD camera can be used to calculate the wrapped phase by Equation (1). Second, the obtained wrapped phase can be demodulated into an absolute phase map by the phase-unwrapping algorithm [13]:(1)ϕwx,y=arctanI3−I1I0−I2,where x,y is the image coordinates, ϕwx,y is the wrapping phase, Ii is the gray intensity distribution of the fringe image, and i means the ith phase-shifting fringe image i=0,1,2,3.According to the above inverse tangent function, the modulated phase is limited in the range of−π,π, which leads to the periodical distribution of the phase map. Phase unwrapping is carried out to restore the unknown multiple of 2π for each pixel [12]. But since noise, fringe under-sampling, and shadow problems exist in the acquired phase map, if the phase-unwrapping path traverses these regions, 2π-phase errors will occur. Unwrapping errors can easily be accumulated and propagated along the unwrapping path. Thus, many methods based on reliability ordering have been presented in this field aiming to alleviate the error propagation, such as water flood algorithms and modulation-based algorithms. However, error accumulation and propagation are still an obstacle, if only passing through invalid areas with global discontinuities is needed [13].In order to avoid stubborn error propagation, a more complex method of the temporal phase-unwrapping algorithm is implemented in this system. There are four kinds of fringes with different wavelengths designed and projected to the object by turns. The wavelength numbers of fringes are 1, 4, 16, and 64, respectively. Eachϕkw corresponding to a different kind of fringe can be disposed by Equation (1), but the unwrapping phase is given by the following equation:(2)ϕku=ϕkw,k=1,ϕkw+2π⋅Roundϕk−1u⋅mk/mk−1−ϕkw2πk>1,where a sequence of incremental phase maps can be assembled and integrated into the final phase-difference map. The basic meaning of the temporal is that the phase at each pixel can be calculated as a function of time. Unwrapping is carried out along the time axis for each pixel independently from the others, which is so-called path-independent. In this 3-D phase distribution, the local discontinuities keep unchanged along the time axis, provided that these discontinuities do not change with time, and therefore can be avoided completely during the process of unwrapping along the path parallel to the time axis [19]. Therefore, temporal phase unwrapping performs better in alleviating phase ambiguity and error in contrast to other implemented approaches [18].An example of the unwrapping phase process is shown in Figure5. Figures 5(a)–5(d) present the wrapped phases of each wavelength fringe, which can be demodulated by Equation (2) to the absolute phase maps. There are many abnormal peaks and abrupt points in these figures, and these points are all low-reliability pixels and should not be utilized. However, these bad points do not propagate and contaminate the rest of the unwrapping results and also testify the robust ability of the unwrapping phase algorithm.Figure 5
Temporal phase unwrapping.
(a)(b)(c)(d)(e)When the fringes are projected on the reference plane, the absolute phase of referenceϕr is available and the difference between the reference plane and the objects at the pixel x,y can be written as(3)Δφx,y=ϕux,y−ϕrx,y.in which the full height information is preserved.


### 2.4.2. Phase-Height Mapping

In order to obtain the height information conveniently and accurately, establishing appropriate height mapping with the unwrapped phase is necessary. Traditional calibration technique based on ray tracing derives the following phase-height formula with the aid of the similarity of space triangles referring to the triangulation profilometry [20].(4)hx,y=l0Δφx,yΔφx,y+2πd/λ0,where λ0 denotes the equivalent wavelength of the 64 fringes (λ0 = 8.3 mm). However, in practice, the higher the measured object, the more severely defocused the camera lens will be. Even worse, both the optical projection system and the image formation parts can inevitably introduce optical aberrations. Due to these problems, the theoretical equation as Equation (4) cannot deduce the accurate height value. Therefore, how to improve the accuracy of height calculation is another thinking point. Fortunately, a triple-parabolic fitting described in Equation (5) is proposed to rebuild the phase-height mapping, and then their nonlinear relationship is corrected completely.(5)1hx,y=a+b1Δφx,y+c1Δφx,y3,where a, b, and c are the system adjustment parameters obtained by a series of calibrations. It should be noted that the real value of a set of parameters for one point is actually different from the other, but a, b, and c can be calculated, respectively, by the approximation of average.


## 2.4.1. Obtaining the Phase Value

A typical fringe projection profilometry usually yields four phase-shifted images for the extraction of the phase information. The phase retrieval can be completed by two steps: wrapped phase retrieval and phase unwrapping [18]. First, the sinusoidal fringe patterns which have π/2 phase shifts relatively are projected onto the object as shown in Figure 2, and the distorted pattern captured by the CCD camera can be used to calculate the wrapped phase by Equation (1). Second, the obtained wrapped phase can be demodulated into an absolute phase map by the phase-unwrapping algorithm [13]:(1)ϕwx,y=arctanI3−I1I0−I2,where x,y is the image coordinates, ϕwx,y is the wrapping phase, Ii is the gray intensity distribution of the fringe image, and i means the ith phase-shifting fringe image i=0,1,2,3.According to the above inverse tangent function, the modulated phase is limited in the range of−π,π, which leads to the periodical distribution of the phase map. Phase unwrapping is carried out to restore the unknown multiple of 2π for each pixel [12]. But since noise, fringe under-sampling, and shadow problems exist in the acquired phase map, if the phase-unwrapping path traverses these regions, 2π-phase errors will occur. Unwrapping errors can easily be accumulated and propagated along the unwrapping path. Thus, many methods based on reliability ordering have been presented in this field aiming to alleviate the error propagation, such as water flood algorithms and modulation-based algorithms. However, error accumulation and propagation are still an obstacle, if only passing through invalid areas with global discontinuities is needed [13].In order to avoid stubborn error propagation, a more complex method of the temporal phase-unwrapping algorithm is implemented in this system. There are four kinds of fringes with different wavelengths designed and projected to the object by turns. The wavelength numbers of fringes are 1, 4, 16, and 64, respectively. Eachϕkw corresponding to a different kind of fringe can be disposed by Equation (1), but the unwrapping phase is given by the following equation:(2)ϕku=ϕkw,k=1,ϕkw+2π⋅Roundϕk−1u⋅mk/mk−1−ϕkw2πk>1,where a sequence of incremental phase maps can be assembled and integrated into the final phase-difference map. The basic meaning of the temporal is that the phase at each pixel can be calculated as a function of time. Unwrapping is carried out along the time axis for each pixel independently from the others, which is so-called path-independent. In this 3-D phase distribution, the local discontinuities keep unchanged along the time axis, provided that these discontinuities do not change with time, and therefore can be avoided completely during the process of unwrapping along the path parallel to the time axis [19]. Therefore, temporal phase unwrapping performs better in alleviating phase ambiguity and error in contrast to other implemented approaches [18].An example of the unwrapping phase process is shown in Figure5. Figures 5(a)–5(d) present the wrapped phases of each wavelength fringe, which can be demodulated by Equation (2) to the absolute phase maps. There are many abnormal peaks and abrupt points in these figures, and these points are all low-reliability pixels and should not be utilized. However, these bad points do not propagate and contaminate the rest of the unwrapping results and also testify the robust ability of the unwrapping phase algorithm.Figure 5
Temporal phase unwrapping.
(a)(b)(c)(d)(e)When the fringes are projected on the reference plane, the absolute phase of referenceϕr is available and the difference between the reference plane and the objects at the pixel x,y can be written as(3)Δφx,y=ϕux,y−ϕrx,y.in which the full height information is preserved.


## 2.4.2. Phase-Height Mapping

In order to obtain the height information conveniently and accurately, establishing appropriate height mapping with the unwrapped phase is necessary. Traditional calibration technique based on ray tracing derives the following phase-height formula with the aid of the similarity of space triangles referring to the triangulation profilometry [20].(4)hx,y=l0Δφx,yΔφx,y+2πd/λ0,where λ0 denotes the equivalent wavelength of the 64 fringes (λ0 = 8.3 mm). However, in practice, the higher the measured object, the more severely defocused the camera lens will be. Even worse, both the optical projection system and the image formation parts can inevitably introduce optical aberrations. Due to these problems, the theoretical equation as Equation (4) cannot deduce the accurate height value. Therefore, how to improve the accuracy of height calculation is another thinking point. Fortunately, a triple-parabolic fitting described in Equation (5) is proposed to rebuild the phase-height mapping, and then their nonlinear relationship is corrected completely.(5)1hx,y=a+b1Δφx,y+c1Δφx,y3,where a, b, and c are the system adjustment parameters obtained by a series of calibrations. It should be noted that the real value of a set of parameters for one point is actually different from the other, but a, b, and c can be calculated, respectively, by the approximation of average.


## 3. Results and Discussion

For the visual positioning system, it is necessary to testify its functionality and reliability before application. Hence, some experiments listed below are performed.First of all, an artificial model of landscape grass is placed as the measured object, whose leaves are independent because of obvious height differences, but overlapped or covered by each other. The model is used to simulate the natural tea plant in a farm provided with the typically discontinuous and complex crown surface. Figure6 shows that the grating stripe is projected on the surface of the grass model. Grabbing the image by CCD, and calculating the height using Equation (5), a three-dimensional topography for the grass model is obtained eventually as shown in Figure 7. In this figure, we can see the presence of a large amount of irregular noise especially near the object edges, which has even completely concealed their real shapes and failed the measurement.Figure 6
The artificial grass and the fringe pattern.Figure 7
The three-dimensional contour of the artificial grass before filtering and processing.That result in itself is no surprise since the temporal phase unwrapping can reduce the propagation of the phase errors caused by any noise, shadow, or other reasons, but it cannot avoid the single error points and the discrete noise in view. Hence, a lot of large noises and serious phase errors emerge near the amplitude-variation boundary when an inconsistent surface is involved.In order to enhance the accuracy of the measurement, the necessary filtered methods are applied or proposed to restrain the discrete noise. In this system, besides some traditional noise elimination methods such as the phase relationship verdict between neighboring pixels and area filtering, some other effective methods are also introduced to ensure the better phase unwrapping result, which is listed below.(a)
The modulationM is defined as a reliability map. A threshold is set and the pixels with M higher than the threshold will be considered as the valid points. On the contrary, those pixels whose modulation is lower than the threshold can be deemed as invalid points and be reset directly to zero. The modulation M can be computed by the following equation:(6)M=12∑i=03Iisin2πi42+∑i=03Iicos2πi42,where Ii is the ith phase-shifted fringe pattern whose wavelength should be the highest one in the four fringe patterns. The higher the frequency of the fringe, the more serious is the noise disturbance. Our experiments indicate that when M is chosen high enough, the noise can be reduced effectively. However, high M may erode the contour of the surface, especially the edge around the object. After many tests, the threshold to identify the valid point is set as 2.(b)
Morphological filter is introduced to process the absolute phase map and to remove the stains. For the map that has been disposed by the modulation method described above, an open operation consisting of erosion operation in advance and swell operation afterwards presents enough superiority. The erosion operation can delete the islets and summits less than the structural element. The selection of erosion structural elements is a crucial step. The excessive little structural element has no obvious effect on the filtered result, but the sufficiently big one may damage the integrity of the object. By comparison, an element “Disk” whose radius is 3 is picked up finally.Figure8 depicts the final effect after the processing by these filtering methods related by (a) and (b). It can be seen that the noisy map becomes neat and all boundaries of the inside leaves are preserved well. The topographical map is exquisite and detailed enough to reflect the real shape of the artificial object. This satisfactory result verifies the functioning of the methods (a) and (b) against the stubbornly large noise.Figure 8
The three-dimensional contour of the artificial grass.Aimed to verify the precision of height measurement, some columns with known height values are implanted as fixed points, as shown in Figure9. Figure 10 presents their three-dimensional topography after projection and processing. If we fit the point data at the top of each column with a plane and calculate the average value on the top, we can obtain the measurement heights of these columns. The actual height of the objects, the measurement results, and the height errors are also listed in Table 1, which reveals that the maximum error is less than 2 mm for all points. It is an adaptable accuracy, referred to the tolerance of 3 mm for the tea picking machine executor. The results indicate that the new visual positioning system meets the practical requirement completely.Figure 9
The altitude target.Figure 10
The three-dimensional contour of the altitude target.Table 1
The target height measurement (mm).
ObjectsActual heightMeasurement resultHeight error189.090.91.9256.555.4−1.1357.056.1−0.9479.080.21.2547.045.4−1.6653.052.1−0.9788.089.41.4847.045.1−1.9978.078.50.51069.069.10.1At present, the vision system and IoT techniques have been applied in a project of “Tea Garden Robot,” and the picking experiments in tea farms were carried out, as shown in Figure11. The experimental results are satisfactory and the target of automatic picking-task for tea robot is achieved. Of course, the tea picking machine still has some deficiencies, such as low efficiency and repeated picking action in vain. The problem of low efficiency should be resolved by reforming hardware to promote the execution speed of the grating projection and manipulator. Repeated picking action is mainly caused by the multiple-recognition problem which creates some false points for an actual bud. Hence, further studies on the identification algorithm ought to be propelled in the future. But we are certain that the applications of active visual technology and IoT in tea picking equipment are successful and their prospective application in the agricultural field is expected.Figure 11
Harvesting experiments in farms.


## 4. Conclusions

Intelligence and automation are promoting more efficient and economical agricultural production. In order to assist the modern and precision tea planting, a type of intelligent tea picking equipment for high-grade tea production is developed. The machine is equipped with two critical techniques, new tip positioning, and an IoT system.For new tip positioning, a solution scheme based on active vision is proposed. In this scheme, an entire vision framework provided with a cross-light path of projection and camera is designed. Tip identification based on the color factor method is carried out to determine the horizontal position of tips. Especially, the application of fringe projection profilometry for the acquisition of height information is discussed in detail. During the process of height measurement, a cubic polynomial approximation approach is applied to correct the nonlinear error which is attributed to the principle model of fringe projection profilometry. A morphological filter is designed to reduce noise pollution in maps and to enhance the precision of phase unwrapping. Eventually, systematic error is controlled less than 2 mm in the entire measured region, which is acceptable measurement accuracy. Experimental results also reveal that this tip positioning system based on the fringe projection profilometry is stable and performs accurately.The machine provided with wireless communication equipment to transmit the real-time status of the tea picking process to an intermediary platform, and eventually to the Internet for big data analysis. The data such as color factor and quantity of new tips collected through IoT can be used for further quality and production evaluation. The development of the intelligent picking machine can further facilitate the tea planting and promote tea production.



---

*Source: 5302783-2021-11-08.xml*