Augmented Reality in the Integrative Internet of Things (AR-IoT): Application for Precision Farming

: Benefitted by the Internet of Things (IoT), visualization capabilities facilitate the improvement of precision farming, especially in dynamic indoor planting. However, conventional IoT data visualization is usually carried out in offsite and textual environments, i.e., text and number, which do not promote a user’s sensorial perception and interaction. This paper introduces the use of augmented reality (AR) as a support to IoT data visualization, called AR-IoT. The AR-IoT system superimposes IoT data directly onto real-world objects and enhances object interaction. As a case study, this system is applied to crop monitoring. Multi-camera, a non-destructive and low-cost imaging platform of the IoT, is connected to the internet and integrated into the system to measure the three-dimensional (3D) coordinates of objects. The relationships among accuracy, object coordinates, augmented information (e.g., virtual objects), and object interaction are investigated. The proposed system shows a great potential to integrate IoT data with AR resolution, which will e ﬀ ectively contribute to updating precision agricultural techniques in an environmentally sustainable manner.


Introduction
Crops planted by farmers grow in nature, which is dynamic and is affected by unpredictable factors, such as weather and soil conditions, pest and disease challenges, and changing crop conditions. These factors affect not only planting natures, but also potential outcomes. Precision farming is an important term related to a combination of information technology and sustainable devices to increase efficiency, decrease managerial costs, and provide expert knowledge needed for farmers in agricultural management.
IoT (Internet of Things) technologies have been adopted in today's precision farming due to their scalable and environmentally friendly capabilities [1]. The use of IoT in crop positioning is critical to identify crop locations and improve invisibility problems. Furthermore, updated and visualized IoT information allows farmers to cope with and even to benefit from these changes. However, traditional methods for visualizing IoT data in agriculture have relegated these processes, from data collection to result displaying, to a totally textural and offsite environment. This textual environment deprives human senses of physical characteristics, such as shape, size, or color. Moreover, the surrounding physical context is usually not presented. It is not intuitive or efficient to examine or interpret IoT data without senses of shape and necessary context [2]. Moreover, the relevant IoT parameters are normally recorded via paper entry, which increases paper waste and explanation time. These demands motivate the development of interactive IoT data visualization. 2 of 17 Augmented reality (AR) technology provides an excellent option to enrich such sensorial perception and interaction demands [3]. AR supplements reality, which cannot be sufficiently embodied in an object label by superimposing virtual (computer-generated) objects, such as graphics, texts, and sound, over a user's real-world environment. It could be imagined how crop positioning facilitated by IoT devices and AR contents could benefit from data visualization and interpretation with which a farmer could interact with the target crop and study daily records through virtual contents.
With the goal of utilizing AR technologies to support IoT data visualization, in this paper, we propose a novel framework that integrates IoT into an AR-based environment, called AR-IoT. The IoT part is based on a multi-camera identification approach. It must be able to identify the coordinates of the crop precisely, while IoT data can be superimposed onto a physical crop or space in real-time, simulating virtual contents with AR (virtual cube or virtual infographic). Accordingly, it is designed in such a way that a farmer can visualize the crops from different angles, thus solving visibility problems. The farmer also be able to interact with IoT data directly from the real-world environment. Therefore, AR-IoT would enhance monitoring tasks and help farmers to more precisely ensure crop quality and reduce planting operation costs.
The rest of the paper is organized as follows. Section 2 contains a review of related works. Section 3 elaborates the architecture of the integrated AR-IoT system, as well as the relevant methodologies. In Section 4, the proposed system is implemented in a case study, followed by a discussion in Section 5. Finally, conclusions are drawn in Section 6.

Related Work
The IoT is the inter-networking paradigm enabled by various devices (things) to provide intelligent services, including identifying, sensing, networking, processing, and visualization capabilities [4]. IoT technology has been an essential element in agricultural processes due to its ability to provide quantitative information. Such information will improve farming management strategies; for example, long-term historical data collected by IoT systems can be used to conduct integrated pest management applications to prevent the damage caused by pets [5]. Yang et al. [6] adopted the cloud framework along with IoT devices to improve farm management systems. Kamilaris et al. [7] proposed agri-IoT framework for decision making and event detection, which can be used in medium-to-large farms. Liao et al. [8] developed an IoT-based system for monitoring the growth status of orchids by developing an IoT-based wireless imaging platform and image-processing algorithm to estimate orchid's leaf area. The analysis of long-term monitoring data has an influence on farmer's cultivation decisions. In other cases, the IoT can be used to create applications in precision agriculture that will control crop conditions and actuators' management [9]. Cameras in combination with the IoT and sensors are developed to improve the care of bees and facilitate the job of beekeepers [10]. The presented work reveals the potential of IoT technologies in the sphere of agriculture. However, other requirements might be integrated in order to make progress in agriculture areas, such as optimizing IoT data representation in a realistic and intuitive way, in which virtual objects integrate IoT technologies [4,11].
AR superimposes physical objects with virtual objects [3]. The merging of virtual objects with the real-world environment gives AR the potential to be one of the main visual spaces for supporting immersive data applications [3]. For example, Tatić et al. [12] presented an AR system for occupational safety. The instruction and checklist are shown as virtual objects on the screen showing the list of tasks and instructions for each worker based on their qualifications and responsibilities. Moreover, structural analysis of the integration with AR system was presented in [2]. Measurement visualization uses a three-dimensional (3D) mesh model and lucid illustrations that change their colors according to stress weight. Velázquez et al. [13] conducted a learning unit, "Energy and its transformation", in which students can analyze or get the perspective of wind turbines with small turns or movements of devices. ElSayed et al. [14] proposed the use of AR to allow consumers to visually interact with information. Moreover, consumers are able to compare information associated with multiple physical objects. Evaluation of this prototype was done by shopping analytics tasks, which showed that consumers preferred the prototype to the manual method. In addition, when using the AR approach, tasks were performed more quickly and accurately.
Under these considerations, an exponential growth of AR in combination with the IoT can be predicted due to the rise of smart farming. AR in combination with the IoT is rarely used in agriculture, whereas in other fields, there is some literature about this type of integration technology. For example, Rashid et al. [15] present a system that allows wheelchair users to locate and consult physical items presented on the shelf by using AR technology. In order to identify the items, the authors employed the phenomena of IoT-based on radio frequency identification (RFID). The authors of [16] applied both AR and visual reality (VR) as immersive analytical tools for maintenance tasks. Using this proposed system, a user can monitor and decide what to do based on displayed safety information. This approach will ensure the safety of workers, as they can make quick decisions with more information. Similarly, a driver assistance system has been explored in order to enhance on-road safety for vehicles [17]. Additionally, more integration of the IoT with AR technologies can be found in the literature [18].
Undoubtedly, tracking modules can be considered to be a fundamental part of an IoT and AR system because of its measurement possibilities, such as object position, user position, and orientation. Computer vision with suitable functions and algorithms might be a good solution, because it could provide a non-destructive and low-cost approach to inspect the growth of plants. Obviously, a camera has major tracking sensors and methods [19]. However, a markerless vision-based camera provides an advantage over a marker-based one, because it can identify and track objects, even the hidden objects [20], without applying fiducial markers in all locations [3,21]. Moreover, objects with little or no difference in their looks can also be identified and tracked by a markerless vision-based camera; for example, different crops can be identified in spite of the fact that they are the same color [22]. In other domains, Lima et al. [23] presented a system that allows users to track a vehicle and identify its parts by using markerless techniques. Bauer et al. [24] used a markerless vision-based camera for anatomy visualization. For some AR and IoT applications, the unique usage of a vision-based tracking technique cannot provide a robust tracking solution due to the difference of viewing angle observations [3]. For this reason, Hirschmueller [25] and Hirschmueller et al. [26] introduced multiple windowing aggregation strategies. Moreover, an example of a system for natural feature tracking over wide areas, based on two-and three-view relations can be found in [27].
AR is an existing approach that provides immersive object and supportive data visualization. However, as far as we are concerned, no previous study have integrated the visualization of IoT agricultural data with AR solutions to allow a farm manager to interact with and visualize such information in a realistic and interactive way. Hence, our study is advancing progress toward the achievement of this goal. Multi-cameras are considered to be one of the utility factors used to provide different-angled visualization, identify the coordinates of physical objects, and superimpose the virtual objects on physical crops' coordinates. A simple visual object is used to represent physical crops, while its interaction with the environment allows farmers to identify and explore to gather more information.

AR-IoT Concept
Main objective of AR-IoT is to implement monitorial tasks using different-angle visualization. A farmer can interact with physical objects, as well as the IoT information virtually attached to them. The proposed AR-IoT system includes two integrated modules: IoT and AR. The first module is based on sensor technologies, which are capable of identifying physical objects and collecting data sources. Meanwhile, an AR module is deployed to provide a 3D visual representing in physical world.
The overall conceptual diagram of the proposed AR-IoT is shown in Figure 1. To begin with, the left side of the diagram illustrates the connected devices, "things", which live at the edge of the network, whereas, the middle of the diagram represents the storage where data from things are aggregated in real time. Besides the storage, the system contains three stages, called the offline preparation stage, online measuring stage, and graphic processing stage. First, the offline preparation stage is used to estimate the camera parameters and to ensure that the relativity among the cameras is respected for all of them. For example, the position and orientation of camera 2 are relative to camera 1, the position and orientation of camera 3 are relative to camera 2, and so on. Next, the online measuring stage provides data relating to the objects (e.g., coordinates). Then, the graphic processing stage elaborates IoT information and imposes them on 3D virtual objects (e.g., 3D virtual cube, virtual text). Lastly, the right side of the diagram depicts AR development associated with IoT information. Here, a farmer enters the information associated with physical objects and tries to gain IoT virtual contents through device display based on AR-IoT interaction. In this case, a farmer may execute on the storage or on the thing itself. Each of the parts of the diagram will be discussed below.
Sustainability 2019, 11, x FOR PEER REVIEW 4 of 17 aggregated in real time. Besides the storage, the system contains three stages, called the offline preparation stage, online measuring stage, and graphic processing stage. First, the offline preparation stage is used to estimate the camera parameters and to ensure that the relativity among the cameras is respected for all of them. For example, the position and orientation of camera 2 are relative to camera 1, the position and orientation of camera 3 are relative to camera 2, and so on. Next, the online measuring stage provides data relating to the objects (e.g., coordinates). Then, the graphic processing stage elaborates IoT information and imposes them on 3D virtual objects (e.g., 3D virtual cube, virtual text). Lastly, the right side of the diagram depicts AR development associated with IoT information.
Here, a farmer enters the information associated with physical objects and tries to gain IoT virtual contents through device display based on AR-IoT interaction. In this case, a farmer may execute on the storage or on the thing itself. Each of the parts of the diagram will be discussed below.

Things and Communication
In order to use IoT paradigms to communicate and create information structures, connected devices, or things such as sensors/actuators, control devices should be defined. Furthermore, agricultural subsystems (crop, soil, climate, water, nutrients, and energy) should be associated with them to determine development requirements [6]. Meanwhile, sensors enable acquisition of various sensor data, such as coordinates of crops, soil moisture content, temperature, water level, nutrients, and luminance. For example, in Figure 2, various devices, such as multi-cameras, are positioned around the farm, which a farmer manager can use to visualize the same object from different angles. Thus, the coordinates of crops will be identified to provide virtual visualization. In our case study, an IoT-based multi-camera was deployed to measure coordinates due to their stability and accuracy. Accordingly, a WSN (Wireless Sensor Network) was established to visualize the virtual contents.

Things and Communication
In order to use IoT paradigms to communicate and create information structures, connected devices, or things such as sensors/actuators, control devices should be defined. Furthermore, agricultural subsystems (crop, soil, climate, water, nutrients, and energy) should be associated with them to determine development requirements [6]. Meanwhile, sensors enable acquisition of various sensor data, such as coordinates of crops, soil moisture content, temperature, water level, nutrients, and luminance. For example, in Figure 2, various devices, such as multi-cameras, are positioned around the farm, which a farmer manager can use to visualize the same object from different angles. Thus, the coordinates of crops will be identified to provide virtual visualization. In our case study, an IoT-based multi-camera was deployed to measure coordinates due to their stability and accuracy. Accordingly, a WSN (Wireless Sensor Network) was established to visualize the virtual contents. In our AR-IoT system, a hierarchy of crop production is composed of regions of the farm (FARM_REGION_VO), the farmer manager (FARMER), sensor devices (SENSOR), and crops (PLANT). The farm is divided into several lots (FARM_LOT_VO). The farm manager is assigned names that can be used to access several lots (FARMER_LOT_VO). Things (SENSOR) are composed of control and sensor devices. Each crop (PLANT) is listed by crop type (e.g., PLANT1), as shown in Figure 3. An example of interactive and sensor data is shown in Figure 4. First, rules for the farm, plant, and farmer are developed. This level attempts to guarantee that a message is received, stored, and retransmitted periodically. In this situation, all sensors and actuators are required. Changes in control processes and new message creation are performed. A farmer is able to locate a position of a crop and also set the region of the crop. For example, PLANT1 is located in single arrangement, and PLANT2 is located in a group. In our AR-IoT system, a hierarchy of crop production is composed of regions of the farm (FARM_REGION_VO), the farmer manager (FARMER), sensor devices (SENSOR), and crops (PLANT). The farm is divided into several lots (FARM_LOT_VO). The farm manager is assigned names that can be used to access several lots (FARMER_LOT_VO). Things (SENSOR) are composed of control and sensor devices. Each crop (PLANT) is listed by crop type (e.g., PLANT1), as shown in Figure 3. In our AR-IoT system, a hierarchy of crop production is composed of regions of the farm (FARM_REGION_VO), the farmer manager (FARMER), sensor devices (SENSOR), and crops (PLANT). The farm is divided into several lots (FARM_LOT_VO). The farm manager is assigned names that can be used to access several lots (FARMER_LOT_VO). Things (SENSOR) are composed of control and sensor devices. Each crop (PLANT) is listed by crop type (e.g., PLANT1), as shown in Figure 3. An example of interactive and sensor data is shown in Figure 4. First, rules for the farm, plant, and farmer are developed. This level attempts to guarantee that a message is received, stored, and retransmitted periodically. In this situation, all sensors and actuators are required. Changes in control processes and new message creation are performed. A farmer is able to locate a position of a crop and also set the region of the crop. For example, PLANT1 is located in single arrangement, and PLANT2 is located in a group. An example of interactive and sensor data is shown in Figure 4. First, rules for the farm, plant, and farmer are developed. This level attempts to guarantee that a message is received, stored, and retransmitted periodically. In this situation, all sensors and actuators are required. Changes in control processes and new message creation are performed. A farmer is able to locate a position of a crop and also set the region of the crop. For example, PLANT1 is located in single arrangement, and PLANT2 is located in a group.

IoT based Multi-Camera
The IoT system evaluated in this study is principally based on a camera. Thus, we start with the camera model and its parameters. Figure 5 illustrates the pinhole camera. It is used to describe the camera model in this study. The line from the center of the lens, which is perpendicular to the image plane, is called the optical axis. In addition, the point where the optical axis meets the image plane is called the principal point. A distance between the center of the lens o and the principal point is called the focal length f. If o is an origin, then we can develop the camera coordination frame, where the zaxis represents the optical axis, the x-axis is parallel to the screen, and the y-axis is parallel to the longitudinal direction of the screen. IoT Based Multi-Camera The IoT system evaluated in this study is principally based on a camera. Thus, we start with the camera model and its parameters. Figure 5 illustrates the pinhole camera. It is used to describe the camera model in this study. The line from the center of the lens, which is perpendicular to the image plane, is called the optical axis. In addition, the point where the optical axis meets the image plane is called the principal point. A distance between the center of the lens o and the principal point is called the focal length f. If o is an origin, then we can develop the camera coordination frame, where the z-axis represents the optical axis, the x-axis is parallel to the screen, and the y-axis is parallel to the longitudinal direction of the screen. The pinhole camera parameters are represented in a 4 × 3 matrix called camera matrix C. Camera matrix C is modeled as: where a rotation R and a translation t, called the extrinsic parameters, are rigid transformations from 3D world coordinates to 3D camera coordinates. K is the intrinsic parameter representing a projective transformation from 3D camera coordinates into two-dimensional (2D) image coordinates. The camera intrinsic matrix is defined as: where cx and cy are principal points, fx and fy are the focal length of the camera in terms of pixel dimension in the x and y directions, respectively. The added parameter s is the skew parameter. These camera parameters and additional lens distortion are estimated below.

Offline Preparation Stage
The major issue we try to deal with is how to superimpose IoT information associated with each physical object (e.g., plant, space) on the views of cameras. In this regard, the offline preparation stage is conducted to estimate the parameters of camera (i.e., extrinsic and intrinsic) to calculate the relative position and orientation between cameras, as well as to rectify the distorted images caused by lens distortion. However, to estimate these parameters, camera calibration is presented. The essential procedure of camera calibration is shown in Figure 6. The authors implemented a camera calibration by concentrating on the procedures of (A), (B), and (C), where (A) is the procedures of preparation: preparing the chessboard pattern, setting up the camera, and capturing the chessboard pattern images. Then, the captured image is added to (B). After the calibration, (C) is therefore adopted to evaluate the accuracy of calibration. The procedure of (D) is needed if the evaluation gives a pessimistically high value of the overall mean reprojection error. The software used for performing the calibration procedure is the toolbox of MATLAB [28], and we assumed that the cameras are calibrated (see Figures 7 and 8) and that their images are rectified, as shown in Figure 9.  The pinhole camera parameters are represented in a 4 × 3 matrix called camera matrix C. Camera matrix C is modeled as: where a rotation R and a translation t, called the extrinsic parameters, are rigid transformations from 3D world coordinates to 3D camera coordinates. K is the intrinsic parameter representing a projective transformation from 3D camera coordinates into two-dimensional (2D) image coordinates. The camera intrinsic matrix is defined as: where c x and c y are principal points, f x and f y are the focal length of the camera in terms of pixel dimension in the x and y directions, respectively. The added parameter s is the skew parameter. These camera parameters and additional lens distortion are estimated below.

Offline Preparation Stage
The major issue we try to deal with is how to superimpose IoT information associated with each physical object (e.g., plant, space) on the views of cameras. In this regard, the offline preparation stage is conducted to estimate the parameters of camera (i.e., extrinsic and intrinsic) to calculate the relative position and orientation between cameras, as well as to rectify the distorted images caused by lens distortion. However, to estimate these parameters, camera calibration is presented. The essential procedure of camera calibration is shown in Figure 6. The authors implemented a camera calibration by concentrating on the procedures of (A), (B), and (C), where (A) is the procedures of preparation: preparing the chessboard pattern, setting up the camera, and capturing the chessboard pattern images. Then, the captured image is added to (B). After the calibration, (C) is therefore adopted to evaluate the accuracy of calibration. The procedure of (D) is needed if the evaluation gives a pessimistically high value of the overall mean reprojection error. The software used for performing the calibration procedure is the toolbox of MATLAB [28], and we assumed that the cameras are calibrated (see Figures 7 and 8) and that their images are rectified, as shown in Figure 9. The pinhole camera parameters are represented in a 4 × 3 matrix called camera matrix C. Camera matrix C is modeled as: where a rotation R and a translation t, called the extrinsic parameters, are rigid transformations from 3D world coordinates to 3D camera coordinates. K is the intrinsic parameter representing a projective transformation from 3D camera coordinates into two-dimensional (2D) image coordinates. The camera intrinsic matrix is defined as: where cx and cy are principal points, fx and fy are the focal length of the camera in terms of pixel dimension in the x and y directions, respectively. The added parameter s is the skew parameter. These camera parameters and additional lens distortion are estimated below.

Offline Preparation Stage
The major issue we try to deal with is how to superimpose IoT information associated with each physical object (e.g., plant, space) on the views of cameras. In this regard, the offline preparation stage is conducted to estimate the parameters of camera (i.e., extrinsic and intrinsic) to calculate the relative position and orientation between cameras, as well as to rectify the distorted images caused by lens distortion. However, to estimate these parameters, camera calibration is presented. The essential procedure of camera calibration is shown in Figure 6. The authors implemented a camera calibration by concentrating on the procedures of (A), (B), and (C), where (A) is the procedures of preparation: preparing the chessboard pattern, setting up the camera, and capturing the chessboard pattern images. Then, the captured image is added to (B). After the calibration, (C) is therefore adopted to evaluate the accuracy of calibration. The procedure of (D) is needed if the evaluation gives a pessimistically high value of the overall mean reprojection error. The software used for performing the calibration procedure is the toolbox of MATLAB [28], and we assumed that the cameras are calibrated (see Figures 7 and 8) and that their images are rectified, as shown in Figure 9.

Online Measuring Stage
The technique of Section 3.3 is adopted to rectify an uncertainty in the image, and then, the coordinates of the object can be estimated. A conceptual block diagram of coordinate estimation for a single or a group of objects is shown in Figure 10. Moreover, the original RGB (red, green, blue) frame is converted into a grayscale frame to minimize the effect of lights and shadows. In practice, there are some challenges due to the fact that a camera is attached to the objects to measure the coordinates of objects from a depression angle. Therefore, only the tops of the objects would be extracted to measure their positions [30]. To solve this problem, a sequence of region of interest (ROI) selections is used in the study to narrow down the object regions and eventually help to estimate their coordinates.
The ROI is defined by using rectangular masks (green line) where a rectangular ROI begins at (x, y), and extends to width w and height h. The geometric center of ROI (POI) can be found by In Equation (4), we consider POI to be the center point of the ROI. Then, we replaced POI with point x in the first camera C1 and point x' in the other camera C2. Consequently, we use the triangulation method [31] to determine the coordinate of object P at the intersection of two backprojected rays from these two points, as illustrated in Figure 11.

Online Measuring Stage
The technique of Section 3.3 is adopted to rectify an uncertainty in the image, and then, the coordinates of the object can be estimated. A conceptual block diagram of coordinate estimation for a single or a group of objects is shown in Figure 10. Moreover, the original RGB (red, green, blue) frame is converted into a grayscale frame to minimize the effect of lights and shadows. In practice, there are some challenges due to the fact that a camera is attached to the objects to measure the coordinates of objects from a depression angle. Therefore, only the tops of the objects would be extracted to measure their positions [30]. To solve this problem, a sequence of region of interest (ROI) selections is used in the study to narrow down the object regions and eventually help to estimate their coordinates.

Online Measuring Stage
The technique of Section 3.3 is adopted to rectify an uncertainty in the image, and then, the coordinates of the object can be estimated. A conceptual block diagram of coordinate estimation for a single or a group of objects is shown in Figure 10. Moreover, the original RGB (red, green, blue) frame is converted into a grayscale frame to minimize the effect of lights and shadows. In practice, there are some challenges due to the fact that a camera is attached to the objects to measure the coordinates of objects from a depression angle. Therefore, only the tops of the objects would be extracted to measure their positions [30]. To solve this problem, a sequence of region of interest (ROI) selections is used in the study to narrow down the object regions and eventually help to estimate their coordinates.
The ROI is defined by using rectangular masks (green line) where a rectangular ROI begins at (x, y), and extends to width w and height h. The geometric center of ROI (POI) can be found by In Equation (4), we consider POI to be the center point of the ROI. Then, we replaced POI with point x in the first camera C1 and point x' in the other camera C2. Consequently, we use the triangulation method [31] to determine the coordinate of object P at the intersection of two backprojected rays from these two points, as illustrated in Figure 11. The ROI is defined by using rectangular masks (green line) where a rectangular ROI begins at (x, y), and extends to width w and height h. The geometric center of ROI (POI) can be found by ROI = x y w h .
In Equation (4), we consider POI to be the center point of the ROI. Then, we replaced POI with point x in the first camera C1 and point x' in the other camera C2. Consequently, we use the triangulation method [31] to determine the coordinate of object P at the intersection of two back-projected rays from these two points, as illustrated in Figure 11.

Graphic Processing Stage
A graphic processing stage elaborates the frame captured from a camera and imposes them onto virtual objects using the coordinate P. A simple virtual cube is applied to visualize virtual objects in the AR environment. Moreover, it is defined by polygons, also referred to as "faces", and each face is defined by a list of vertices that specifies its position (X, Y, Z). For example, consider Figure 12: There is a virtual cube with 6 faces and 8 vertices; the bottom face (gray color) is formed by vertex v1, v2, v3, and v4. Accordingly, we can complete a virtual cube by finding the vertices of cube around coordinate P: where h = w/2 and w is the full-width of each face.

Display and Interaction
A conceptual block diagram of the display and interaction of an object is shown in Figure 13. By using calibration results, we can solve for projective 3D camera coordinates into 2D pixel coordinates p = (x, y, 1). In this case, (x, y) are an ordered pair of real numbers, and 1 is an extra coordinate to this pair that we declare to represent the same point. The coordinates of this mapping are written by Figure 11. Triangulation method determining the coordinate P at the intersection of the two rays back projected from point correspondences x and x' (matched points) proposed in [31].

Graphic Processing Stage
A graphic processing stage elaborates the frame captured from a camera and imposes them onto virtual objects using the coordinate P. A simple virtual cube is applied to visualize virtual objects in the AR environment. Moreover, it is defined by polygons, also referred to as "faces", and each face is defined by a list of vertices that specifies its position (X, Y, Z). For example, consider Figure 12: There is a virtual cube with 6 faces and 8 vertices; the bottom face (gray color) is formed by vertex v1, v2, v3, and v4.

Graphic Processing Stage
A graphic processing stage elaborates the frame captured from a camera and imposes them onto virtual objects using the coordinate P. A simple virtual cube is applied to visualize virtual objects in the AR environment. Moreover, it is defined by polygons, also referred to as "faces", and each face is defined by a list of vertices that specifies its position (X, Y, Z). For example, consider Figure 12: There is a virtual cube with 6 faces and 8 vertices; the bottom face (gray color) is formed by vertex v1, v2, v3, and v4. Accordingly, we can complete a virtual cube by finding the vertices of cube around coordinate P: where h = w/2 and w is the full-width of each face.

Display and Interaction
A conceptual block diagram of the display and interaction of an object is shown in Figure 13. By using calibration results, we can solve for projective 3D camera coordinates into 2D pixel coordinates p = (x, y, 1). In this case, (x, y) are an ordered pair of real numbers, and 1 is an extra coordinate to this pair that we declare to represent the same point. The coordinates of this mapping are written by Accordingly, we can complete a virtual cube by finding the vertices of cube around coordinate P: where h = w/2 and w is the full-width of each face.

Display and Interaction
A conceptual block diagram of the display and interaction of an object is shown in Figure 13. By using calibration results, we can solve for projective 3D camera coordinates into 2D pixel coordinates p = (x, y, 1). In this case, (x, y) are an ordered pair of real numbers, and 1 is an extra coordinate to this pair that we declare to represent the same point. The coordinates of this mapping are written by where w is the scale factor. Then, it can be written compactly as Sustainability 2019, 11, x FOR PEER REVIEW 11 of 17 where w is the scale factor. Then, it can be written compactly as = . (7) After the virtual cube model and projective transformation are recognized, a visual cube must be superimposed onto the coordinate p (as a red circle) of each object. AR-IoT interaction is determined by the closest coordinate values when a farmer clicks on the nearest p where (x, y) is the coordinate p and (xp, yp) is the current point clicked. The white plus line is used to interact with the object to explore AR-IoT information. After the interaction, a visual cube that is associated with the physical object can be superimposed from the coordinate p. Meanwhile, a visual text can be located right next to the coordinate p. The coordinate p and the appearance of IoT information are changed based on the coordinates of physical objects and the IoT information associated with them. Figure 13. Conceptual block diagram of display and interaction. The red circles represent the coordinates of an object, while the black lines represents the interaction.

Extension to Multi-Cameras
Suppose we have camera 0, camera 1, …, camera n, and they are arranged in a way in which neighboring cameras can be calibrated (as shown in Figure 14). We use the center of the lens of camera 0 as the origin of the world's coordinate. Then, in order to obtain R and t for camera i with respect to camera 0, we assume that are R(i-1,i)' and t(i-1,i)' are the rotational and translational matrix from two neighboring cameras, from camera i to camera i-1. The rotational and translational matrix from camera i to camera 0 can be derived as  After the virtual cube model and projective transformation are recognized, a visual cube must be superimposed onto the coordinate p (as a red circle) of each object. AR-IoT interaction is determined by the closest coordinate values when a farmer clicks on the nearest p x − x p 2 + y − y p 2 (8) where (x, y) is the coordinate p and (x p , y p ) is the current point clicked. The white plus line is used to interact with the object to explore AR-IoT information. After the interaction, a visual cube that is associated with the physical object can be superimposed from the coordinate p. Meanwhile, a visual text can be located right next to the coordinate p. The coordinate p and the appearance of IoT information are changed based on the coordinates of physical objects and the IoT information associated with them.

Extension to Multi-Cameras
Suppose we have camera 0, camera 1, . . . , camera n, and they are arranged in a way in which neighboring cameras can be calibrated (as shown in Figure 14). We use the center of the lens of camera 0 as the origin of the world's coordinate. Then, in order to obtain R and t for camera i with respect to camera 0, we assume that are R (i−1,i) ' and t (i−1,i) ' are the rotational and translational matrix from two neighboring cameras, from camera i to camera i − 1. The rotational and translational matrix from camera i to camera 0 can be derived as Multi-camera calibration model. Each camera is separately calibrated to get the intrinsic parameters. Then, cameras 0 and 1 are calibrated as a pair to obtain R and t between cameras 0 and 1. Similarly, cameras 1 and 2 are calibrated as a pair to obtain R and t between cameras 1 and 2, …, camera n.

User Study
We conducted a user study to validate the proposed AR-IoT paradigm. The aim of the user study was to evaluate the benefit of an immersive AR in enhancing a farmer's understanding of IoT information. We measured an error and completion time for a monitoring task, comparing the AR-IoT approach and the manual approach. Farmers were asked to complete monitoring tasks with the AR-IoT and manual approach. The virtual representations of this study were based on designs determined from a planting process (see Table 1). Figure 13 depicts the interaction and visualization approaches employed in our study. The completion time was also recorded. Farmers did not have a time limit for the AR-IoT or manual tasks but were asked to finish the tasks as quickly and accurately as possible. Table 1. Planting process.

Day
Planting Processes 1 Sowing the seeds 1-45 Daily watering 7 Transplanting seedlings into the greenhouse and applying organic fertilizer 10,13,16,19,22 Spraying organic hormones 25 Applying chicken manure 45 Harvesting In the AR-IoT approach, the farmers were asked to go through the AR-IoT environment. They were not allowed to check any information regarding the crop manually. First, they used the AR-IoT interaction to select or deselect the crop and filter it. Next, they recorded the numbers of the crop that had been selected with a red frame. Then, they were asked to visualize the crop based on virtual content to complete their monitoring tasks.
In the manual approach, the farmers were asked to use the real-world environment. They were asked to use daily records (paper) to complete their monitoring tasks. They were also allowed to view the crop onsite. Multi-camera calibration model. Each camera is separately calibrated to get the intrinsic parameters. Then, cameras 0 and 1 are calibrated as a pair to obtain R and t between cameras 0 and 1. Similarly, cameras 1 and 2 are calibrated as a pair to obtain R and t between cameras 1 and 2, . . . , camera n.

User Study
We conducted a user study to validate the proposed AR-IoT paradigm. The aim of the user study was to evaluate the benefit of an immersive AR in enhancing a farmer's understanding of IoT information. We measured an error and completion time for a monitoring task, comparing the AR-IoT approach and the manual approach. Farmers were asked to complete monitoring tasks with the AR-IoT and manual approach. The virtual representations of this study were based on designs determined from a planting process (see Table 1). Figure 13 depicts the interaction and visualization approaches employed in our study. The completion time was also recorded. Farmers did not have a time limit for the AR-IoT or manual tasks but were asked to finish the tasks as quickly and accurately as possible. Transplanting seedlings into the greenhouse and applying organic fertilizer 10,13,16,19,22 Spraying organic hormones 25 Applying chicken manure 45 Harvesting In the AR-IoT approach, the farmers were asked to go through the AR-IoT environment. They were not allowed to check any information regarding the crop manually. First, they used the AR-IoT interaction to select or deselect the crop and filter it. Next, they recorded the numbers of the crop that had been selected with a red frame. Then, they were asked to visualize the crop based on virtual content to complete their monitoring tasks.
In the manual approach, the farmers were asked to use the real-world environment. They were asked to use daily records (paper) to complete their monitoring tasks. They were also allowed to view the crop onsite.

Completion Time
The study was performed by 10 farmers. Their ages ranged from 33 to 60 years. All of them reported lacking IoT or AR experience. We ran the completion time results of the studies through a paired t-Test with H a : µ Manual-ARIoT > 0, and the AR-IoT approach was shown to produce better results (lower times). In other words, the completion time of the monitoring task with the AR-IoT approach was faster than that of the manual approach. The results showed that, the AR-IoT approach was faster to a statistically significant effect (M = 0.3470, SD = 0.04270) compared with than the manual approach (M = 2.4900, SD = 0.26854): t (9) = 27.717, p <0.001 (see Table 2). Note that the result shown here was a planting process during days 19-25. It represents the assumption that the crop was processed based on the complex times (once in 3 days).

Accuracy
The aim of the case study was to evaluate the usefulness of immersive AR for enhancing a user's perception of and interaction with IoT information. Through the study, we measured the error. Incorrect error is when coordinate P and the visual objects (i.e., cube and text) were located in the wrong position. Each position of the physical crop and the distance between a camera and the physical crop was reconstructed and compared with a known value, which was measured with a laser distance meter. The results of these comparisons are presented in Figure 15. The incorrect error of coordinate P for each physical crop is as follows: physical crop A 0.003, B 0.00, and C 0.002. Based on coordinate P, an incorrect error of the visual cube (A-B) was 0.00. The results obtained for visual text (A-C) were analogous. The study was performed by 10 farmers. Their ages ranged from 33 to 60 years. All of them reported lacking IoT or AR experience. We ran the completion time results of the studies through a paired t-Test with Ha: μManual-ARIoT >0, and the AR-IoT approach was shown to produce better results (lower times). In other words, the completion time of the monitoring task with the AR-IoT approach was faster than that of the manual approach. The results showed that, the AR-IoT approach was faster to a statistically significant effect (M = 0.3470, SD = 0.04270) compared with than the manual approach (M = 2.4900, SD = 0.26854): t (9) = 27.717, p <0.001 (see Table 2). Note that the result shown here was a planting process during days 19-25. It represents the assumption that the crop was processed based on the complex times (once in 3 days).

Accuracy
The aim of the case study was to evaluate the usefulness of immersive AR for enhancing a user's perception of and interaction with IoT information. Through the study, we measured the error. Incorrect error is when coordinate P and the visual objects (i.e., cube and text) were located in the wrong position. Each position of the physical crop and the distance between a camera and the physical crop was reconstructed and compared with a known value, which was measured with a laser distance meter. The results of these comparisons are presented in Figure 15. The incorrect error of coordinate P for each physical crop is as follows: physical crop A 0.003, B 0.00, and C 0.002. Based on coordinate P, an incorrect error of the visual cube (A-B) was 0.00. The results obtained for visual text (A-C) were analogous.  Figure 16 demonstrates how the usage of the proposed AR-IoT approach can support a farmer in the manipulation of IoT data mapped to physical crops with virtual object representation. It also demonstrates how this technology can maximize the potential outcome. The simple virtual objects (e.g., virtual text and cube), which were located at crop's coordinates are used to represent IoT data. Figure 16a shows how using the virtual text method facilitated the visualization of IoT data. Moreover, virtual text at the bottom left of the plant's coordinate (red circle) was used for details on demand. Whenever there is a clicking/interacting within the physical crop area, the user can explore for more details regarding the IoT information, such as the date/growth of the crop and the fertilizers used. These attached virtual texts are highlighted with a semi-transparent layer (gray layer). The virtual cube in Figure 16b is used to convey IoT data, such as the meaning of the crop's growth. For  Figure 16 demonstrates how the usage of the proposed AR-IoT approach can support a farmer in the manipulation of IoT data mapped to physical crops with virtual object representation. It also demonstrates how this technology can maximize the potential outcome. The simple virtual objects (e.g., virtual text and cube), which were located at crop's coordinates are used to represent IoT data. Figure 16a shows how using the virtual text method facilitated the visualization of IoT data. Moreover, virtual text at the bottom left of the plant's coordinate (red circle) was used for details on demand. Whenever there is a clicking/interacting within the physical crop area, the user can explore for more details regarding the IoT information, such as the date/growth of the crop and the fertilizers used. These attached virtual texts are highlighted with a semi-transparent layer (gray layer). The virtual cube in Figure 16b is used to convey IoT data, such as the meaning of the crop's growth. For example, the color of the virtual cube changes as the crop grows. Meanwhile, the virtual cube in the yellow color means that the physical crop is almost ready for sale. Therefore, a farmer manager can prepare for the next action (i.e., for the market). This result provides more accurate precision farming techniques to assist with a crop's planting and growing. Thus, there are fewer recorded errors and wasted paper and time. example, the color of the virtual cube changes as the crop grows. Meanwhile, the virtual cube in the yellow color means that the physical crop is almost ready for sale. Therefore, a farmer manager can prepare for the next action (i.e., for the market). This result provides more accurate precision farming techniques to assist with a crop's planting and growing. Thus, there are fewer recorded errors and wasted paper and time.

Discussion
With pre-visualized IoT data, AR solutions are integrated by superimposing virtual object visualization and interaction. Thus, the absolute coordinates of a physical object are significant when visual objects are superimposed. Coordinate estimation with a low-cost image platform is first estimated by the camera parameters via a calibration. It is worth mentioning that the obtained coordinates had both positive and negative values for different distances, which means the reconstructed Z coordinate was always either slightly overestimated or underestimated by the cameras, respectively, as shown in Figure 17a,b. The coordinates can be roughly estimated, although the objects are complex (e.g., single, group, or co-located). In addition, coordinate estimation is not reliable for applications demanding large-scale accuracy. To improve this, a farm can utilize more cameras (as mentioned in Section 3.7). Accordingly, visual object superimposing can be performed synchronously to ensure that IoT information is updated in every coordinate. In this regard, we show that the IoT provides not only physical objects, but also virtual objects to facilitate the development of services and applications. Experienced farmers might have been able to understand the plant's condition without spending time reading historical logs, for example, days 1-7 (sowing and transplanting). However, the quantitative experimental results showed that there was a significant improvement in the completion time when using the AR-IoT approach on the complex time (days 19-25), as farmers misunderstood

Discussion
With pre-visualized IoT data, AR solutions are integrated by superimposing virtual object visualization and interaction. Thus, the absolute coordinates of a physical object are significant when visual objects are superimposed. Coordinate estimation with a low-cost image platform is first estimated by the camera parameters via a calibration. It is worth mentioning that the obtained coordinates had both positive and negative values for different distances, which means the reconstructed Z coordinate was always either slightly overestimated or underestimated by the cameras, respectively, as shown in Figure 17a,b. The coordinates can be roughly estimated, although the objects are complex (e.g., single, group, or co-located). In addition, coordinate estimation is not reliable for applications demanding large-scale accuracy. To improve this, a farm can utilize more cameras (as mentioned in Section 3.7). Accordingly, visual object superimposing can be performed synchronously to ensure that IoT information is updated in every coordinate. In this regard, we show that the IoT provides not only physical objects, but also virtual objects to facilitate the development of services and applications. complex planting process. Moreover, the results showed that the time required to complete a task did not affect the resulting accuracy.

Conclusions
AR-IoT is a promising solution for either reducing or enhancing the visualizing of IoT information. This study proposes a framework to integrate IoT data into an AR-based environment, called AR-IoT. Integrating IoT into an AR-based environment allows both the superimposing of IoT information onto physical objects and the facilitating of the interpretation of such information. The AR-IoT is able to acquire IoT information directly from the onsite environment.
A case study was carried out using a crop, which was growing in nature. The relationships among the camera calibration, object coordinates, and accuracy of the visual representation and interaction were investigated. The conducted study showed that using our AR-IoT technology was less error prone and much more promising than traditional visualize methods. Furthermore, this study highlights an implication that could help developing decision-makers, reducing waste or lost time and advancing precision farming into the future.
In this study, we evaluated not only the visual representation and interaction of the AR-IoT concept, but also employed it in a real environment setting (i.e., from simulated plantation to actual plantation). Moreover, the virtual object was represented in a comprehensive visualization, using color scale to represent the crop parameters (e.g., growth of crop or disease damage).
The energy consumption of the embedded devices (e.g., multi-camera or image processing) is another issue that can be addressed though AR-IoT services. Moreover, AR-IoT can be used for preliminary studies about the feasibility of such technologies (e.g., sensor or complex measurement devices), which are expensive and, in most cases, are not suitable for farmers. For this reason, it could be said that the use of AR-IoT systems in precision farming is a promising target for future research. Experienced farmers might have been able to understand the plant's condition without spending time reading historical logs, for example, days 1-7 (sowing and transplanting). However, the quantitative experimental results showed that there was a significant improvement in the completion time when using the AR-IoT approach on the complex time (days [19][20][21][22][23][24][25], as farmers misunderstood when exactly the fertilizing date occurred. This effect showed the benefits of using AR-IoT for a complex planting process. Moreover, the results showed that the time required to complete a task did not affect the resulting accuracy.

Conclusions
AR-IoT is a promising solution for either reducing or enhancing the visualizing of IoT information. This study proposes a framework to integrate IoT data into an AR-based environment, called AR-IoT. Integrating IoT into an AR-based environment allows both the superimposing of IoT information onto physical objects and the facilitating of the interpretation of such information. The AR-IoT is able to acquire IoT information directly from the onsite environment.
A case study was carried out using a crop, which was growing in nature. The relationships among the camera calibration, object coordinates, and accuracy of the visual representation and interaction were investigated. The conducted study showed that using our AR-IoT technology was less error prone and much more promising than traditional visualize methods. Furthermore, this study highlights an implication that could help developing decision-makers, reducing waste or lost time and advancing precision farming into the future.
In this study, we evaluated not only the visual representation and interaction of the AR-IoT concept, but also employed it in a real environment setting (i.e., from simulated plantation to actual plantation). Moreover, the virtual object was represented in a comprehensive visualization, using color scale to represent the crop parameters (e.g., growth of crop or disease damage).
The energy consumption of the embedded devices (e.g., multi-camera or image processing) is another issue that can be addressed though AR-IoT services. Moreover, AR-IoT can be used for preliminary studies about the feasibility of such technologies (e.g., sensor or complex measurement devices), which are expensive and, in most cases, are not suitable for farmers. For this reason, it could be said that the use of AR-IoT systems in precision farming is a promising target for future research.
Thus, this study proposed a novel method to integrate IoT into an AR-based environment, which has the potential to be applied to monitor agricultural crops in a simple and effective manner.