UFDC Home  myUFDC Home  Help 
Material Information
Thesis/Dissertation Information
Subjects
Notes
Record Information

Material Information
Thesis/Dissertation Information
Subjects
Notes
Record Information

Full Text  
PAGE 1 1 A METHODOLOGY TO DETERMINE AND MAP THE VARIABILITY OF CITRUS TREE CANOPY CHARACTERISTICS By AKSHATHA RAMESH SHENOY A THESIS PRESENTED TO THE GRADUATE SCHOOL OF THE UNIVERSITY OF FLORIDA IN PARTIAL FULFILLMENT OF THE REQUI REMENTS FOR THE DEGREE OF MASTER OF SCIENCE UNIVERSITY OF FLORIDA 2013 PAGE 2 2 2013 Akshatha Ramesh Shenoy PAGE 3 3 To Aanu and Amma PAGE 4 4 ACKNOWLEDGMENTS I have been fortunate to have had the privilege of meeting some of the most wonderful people during the course of my thesis work. First of all, I extend my most sincere thanks to Dr. Reza Ehsani, my mentor and guide, for giving me a platform to utilize my computer skills in the area of precision agriculture. He was very approachable and patient throughout my research work and directed me to do my work right. I whole heartedly thank my supervisory committee, Dr. Masoud Salyani, Dr. Fritz Roka and Dr. Won Suk Lee, for letting me know what modifications could be done to impro vise my work and guiding me to understand the subject matter better. I would love to thank Ms. Sherrie Buchanon, who helped me in analyzing all my results, from the beginning of my research un til the very end. I would like to thank Dr. Joe Mari Maja, Dr. L av Khot, Dr. Sin dhuja Sankaran, Ms. Christy Ngu, and Ms. Jessie Lee for helping me with the data collection. I would like to thank Dr. Gene Albrigo and his team for the manual data collection in the fields. My sincere thanks to Ms. Jennifer Dawson, who he lped arrange and schedule all the meetings. I extend my heartfelt gratitude to my sisters Dr. Anitha Shenoy, Dr. Savitha Shenoy and my brother in law Dr. Vinayak Shenoy, who were the motivation for pursuing my masters. I would love to thank Ms. Farangis A njom and Ms. Ujwala Jadhav for being wonderful friends and guides. My thanks would not be complete without thanking Mr. Prateek Kulshreshtha, who has been a source of immense support and inspiration throughout. Last, but not the least, I extend my preciou s thanks to my wonderful parents who were always there for me as a pillar of support and who have been guiding me in every phase of my life. PAGE 5 5 TABLE OF CONTENTS page ACKNOWLEDGMENTS ................................ ................................ ................................ .. 4 LIST OF TABLES ................................ ................................ ................................ ............ 7 LIST OF FIGURES ................................ ................................ ................................ .......... 8 LIST OF ABBREVIATIONS ................................ ................................ ........................... 10 ABSTRACT ................................ ................................ ................................ ................... 11 CHAPTER 1 INTRODUCTION ................................ ................................ ................................ .... 12 Citrus Characteristics ................................ ................................ .............................. 12 Global Positioning System ................................ ................................ ...................... 12 Canopy Characteristics ................................ ................................ ........................... 13 Significance of the Study on Canopy Characteristics ................................ ............. 13 Research Objectives ................................ ................................ ............................... 14 2 HISTORY AND LITERATURE REVIEW ................................ ................................ 1 6 Canopy Characteristics with Laser Sensor Data ................................ ..................... 17 Canopy Characteristics with Ultrasonic Sensors ................................ .................... 21 Yield Estimation ................................ ................................ ................................ ...... 23 Summary ................................ ................................ ................................ ................ 25 3 MATERIALS AND METHODS ................................ ................................ ................ 29 Materials ................................ ................................ ................................ ................. 29 Citrus Groves and Sensor ................................ ................................ ................ 29 Global Positioning System Receiver ................................ ................................ 29 Example of a GGA St ring ................................ ................................ ................. 30 Example of a RMC String ................................ ................................ ................. 31 Methods ................................ ................................ ................................ .................. 32 Data Collection ................................ ................................ ................................ 32 Processing the Input File ................................ ................................ .................. 33 Area, Height and Volume Calculation ................................ ............................... 35 Experimental Setup to Test the Efficacy of the Designed Algorithm ................. 36 Density Calculations ................................ ................................ ......................... 36 Yield Estimation ................................ ................................ ................................ ...... 38 4 RESULTS AND DISCUSSION ................................ ................................ ............... 52 PAGE 6 6 Experimental Data Results ................................ ................................ ..................... 52 Results on the Grove Data ................................ ................................ ...................... 52 Discussion ................................ ................................ ................................ .............. 53 Conclusion ................................ ................................ ................................ .............. 55 Future Work ................................ ................................ ................................ ............ 56 APPENDICES A MATLAB CODE FOR HEIGHT, VOLUME, AND DENSITY CALCULATION .......... 61 B JAVA CODE FOR HEIGHT, VOLUME, AND DENSITY CALCULATION ............... 77 LIST OF REFERENCES ................................ ................................ ............................. 101 BIOGRAPHICAL SKETCH ................................ ................................ .......................... 103 PAGE 7 7 LIST OF TABLES Table page 3 1 Sensor specifications ................................ ................................ .......................... 51 3 2 Density data at high and low speeds ................................ ................................ .. 51 4 1 Density output file ................................ ................................ ............................... 59 4 2 Volume and height output file ................................ ................................ ............. 59 4 3 PLS statistics ................................ ................................ ................................ ...... 59 4 4 PCR statistics ................................ ................................ ................................ ..... 60 4 5 SVM statistics ................................ ................................ ................................ ..... 60 4 6 MLR statistics ................................ ................................ ................................ ..... 60 4 7 CLS statistics ................................ ................................ ................................ ...... 60 PAGE 8 8 LIST OF FIGURES Figure page 1 1 Citrus grove variability ................................ ................................ ........................ 15 2 1 Laser scanning ................................ ................................ ................................ ... 26 2 2 Surface area an d volume calculations by the manual method. ........................... 26 2 3 Tractor mounted with the laser scanner and GPS receiver ................................ 27 2 4 Intersection o f solids ................................ ................................ ........................... 28 3 1 Ft. Basinger citrus grove in Florida ................................ ................................ ..... 40 3 2 LMS 200 30106 SICK laser scanne ................................ ................................ ... 40 3 3 Types of GPS ................................ ................................ ................................ ..... 41 3 4 Veris EC equipment for measuring soil conductivity ................................ ........... 41 3 5 Experimental setup ................................ ................................ ............................. 42 3 6 Laser data collection ................................ ................................ ........................... 43 3 7 Snapshot of the CVMS software ................................ ................................ ......... 43 3 8 Snapshot of the file converter software ................................ .............................. 44 3 9 Example resultant .csv file ................................ ................................ .................. 44 3 10 Schematic representation of the left and right tree rows with the variables. ....... 45 3 11 Experimental setup ................................ ................................ ............................. 45 3 12 White pole used to measure 100% hit region. ................................ .................... 46 3 13 Measuring the distance between the tree rows and center of the tractor lane. ... 46 3 14 Removing the tree leaves manually ................................ ................................ .... 47 3 15 Weighed tree leaves after removal ................................ ................................ ..... 48 3 16 Density reading zones ................................ ................................ ........................ 48 3 17 S ection of the tree s howing the measurements ................................ .................. 49 3 18 Flowchart of the algorithm ................................ ................................ .................. 49 PAGE 9 9 3 19 Density Calculation Flow Chart ................................ ................................ ........... 50 4 1 Density readings for a single tree ................................ ................................ ....... 57 4 2 Relationship between the EC and yield ................................ .............................. 57 4 3 Relationship between the elevation and yield ................................ ..................... 58 4 4 Measured volume overlaid on the aerial image using Arc GIS software ............. 58 PAGE 10 10 LIST OF ABBREVIATIONS CLS C lassical least squares CREC Citrus research and e ducation c enter CVMS Canopy v olume m easurement s ystem DGPS Differential g lobal positioning s ystem GGA Global p ositioning s ystem f ix d ata GPS G lobal positioning system LAD Leaf a rea d ensity LAI Leaf a rea i ndex LASER L ight a mplification by s timulated e mission of r adiation LIDAR Light d etection a nd r anging MLR Multiple l inear r egression NDVI Normalized d ifference vegetation i ndex PCR Principal c omponent r egression PLS Partial l east s quares PVC Polyvinyl c hloride RMC Reco mmended m inimum s pecific G PS t ransit d ata SVM Support v ector m achine TRLV Tree r ow LIDAR v olume UTC Coordinated u niversal t ime PAGE 11 11 Abstract of Thesis Presented to the Graduate School of the University of Florida in Partial Fulfillment of the R equirements for the Degree of Master of Science A METHODOLOGY TO DETERM I NE AND MAP THE VARIABILITY OF CITRUS TREE CANOPY CHARACTERISTICS By Akshatha Ramesh Shenoy August 2013 Chair: Reza Ehsani Major: Agricultural and Biological Engineering The estima tion of the geometric characteristics of a citrus tree c anopy can provide great insight into the tree growth variations and productivity prediction s A canopy variability map can be used for a variable rate shaking system on a mechanical harvesting machine or a variable rate spraying system. It can also be used for estimating yield. An algorithm was designed to gaug e the tree canopy characteristics from the laser sensor data collected which in turn was used to estimate the yield of the citrus groves. The e stimated volume and h eight gave a perce nt error of 8.2 % and 2.5% respectively The experimental analysis with density calculations produced a coefficient of variation of 0.94. The estimated yield and predicted yield produced a percentage error between 13. 8 1 5.5 % for all the supervised learning models. The algorithm had a lower runtime in the Java environment when compared to the Matlab environment. PAGE 12 12 CHAPTER 1 INTRODUCTION Citrus Characteristics Citrus groves in Fl orida have always been fairly non uniform T he groves are prone to various diseases resulting in a lot of variability across the state. This variability has affected a lot of factors concerning with the grove maintenance and yield productivity. Figure 1 1 shows a citrus grove in Florida with a lot of variability. Some of the diseases that are pre valent in citrus trees are A lternaria, Anthracnose Brown Rot, citrus blight, citrus c anker, Mal Secco disease, powdery mildew, S atsuma Dwarf, citr us yellow mosaic, c itrus greening HLB These disease s result in a lot of variability across the groves as the health of the tree s depreciate along with its canopy size in some cases. This study aims at developing an algorithm to calculate the major tree canopy characteristics of height, volume and density using laser scanned data. The knowledge of tree canopy characteristics at a given location can be used to control the pesticide or chemical application s based on the size of the tree, which would be ver y cost effective. Global Positioning System This study makes use of the Global Positioning System (GPS) receivers in order to locate the point on the ground at which the canopy characteristics are being estimated. The output files generated from the algori thm, containing the volume, height, and density data, correspond to a geo referenced location that helps the growers to relate the output data to their groves. GPS is a collective term used t o refer to a constellation of 31 satellites along with the ground stations which form a worldwide radio navigation system. It makes use of PAGE 13 13 these satellites to determine the location. GPS was first developed to aid the defense services. It gives every square meter on earth a specific address making it unique. GPS is bein g widely used on a commercial basis in cars, boats, farm machinery, laptop, computers, etc. Canopy Characteristics The term canopy is used to define the orientation of leaves in a tree which absorb sunlight to carry out the process of photosynthesis. The arrangement of leaves in the canopy varies enormously, which in turn decides the exposure of the leaves to the sun and the amount of the sunlight absorbed. This plays a vital role in the growth of the tree and the yield it produces. Yield prediction, biom ass estimation, growth rate, water consumption, site specific management and long term productivity of a citrus tree can be directly associated with canopy characteristics. The importance of estimating canopy characteristics is that : It can be used for est imating yield. A canopy variability map can be used for a variable rate shaking system on a mechanical harvesting machine or a variable rate spraying system. It can also provide information on tree inventory such as size of trees which is needed for crop i nsurance both by growers and crop insurance companies. Significance of the Study on Canopy C haracteristics There has been a need to calculate the canopy characteristics in the groves for a long time now. As the groves span over acres of land, it becomes practically impossible to manually have the canopy characteristics measured and documented. Thus, there is a requirement to design a system which can help the growers make an estimate of the tree growth at all the locations and to captu re areas that have s parse tree growth. The PAGE 14 14 methodology proposed aims at gauging the tree canopy characteristics from the laser sensor data collected. It helps to determine the non uniformity of the canopy size in the groves. Research Objective s Specifically, t he aim is to dev elop an algorithm that can efficiently estimate the major tree canopy characteristics of height, volume and density of the trees based on the data collected from the citrus groves using a commercially available laser scanner The algorithm wa s tested for accuracy by comparing it with the manually collected data. This study also aims at developing a model to estimate the yield based on the calculated canopy factors from the algorithm and manually collected data o n soil conductivity and elevation. The outp ut of the algorithm w ould create tree variability maps that can be used by citrus growers to estimate the yield and tree growth rate and would locate the areas where the tree growth is sparse or nil Autonomous tractors are being developed which have comp uter controlled system along wit h an inbuilt laser scanner. They would give the information on tree canopy, which can be used to determine the tree height, volume and density in a cost effective manner. PAGE 15 15 Figure 1 1. Citrus g rove variability PAGE 16 16 CHAPTER 2 HISTORY AND LITERATURE REVIEW Precision agriculture deals with managing farms such that the resources are efficiently utilized and preserved to have maximum returns with the given inputs. Informatio n technology, satellite imagery, and satellite positioning systems are some of the aspects of precision agriculture The estimation of tree canopy characteristics has always been a key area of research as the results would give an in depth knowledge about the quantity of fertilizers and chemicals to be used and t he variability present in the groves. As mentioned in C hapter 1, the absorption of sunlight i s a key factor contributing to plant growth and the increase in the size of the canopy. It was in the early twentieth century that the first measurements of CO 2 ex change were carried out (Boysen Jensen, 1918; Henrici, 1921; Lundegardh, 1922; Baldocchi 2001). In citrus groves, it was noted that for the photosynthetic activity to be at its peak, the optimum conditions requir ed were somewhere between full shade and fu ll sunlight. It was also noted that interception of approximately 30% of the annual radiation is a necessity for efficient yield production. Overall, sections of the canopy unexposed to direct sunlight tend to have low foliage density and comparatively dec reased fruit production than sections of canopy exposed to direct sunlight. The a bove phenomenon is more apparent at the lower sections of the tree which receive negligible sunlight ( Tucker et al., 1994). Leaf Area Index (LAI) is used to determine the numb er of leaf surfaces a crop has per acre of land ( Tucker et al., 1994). Tucker et al. ( 1994) measured the LAI by the following approaches: measuring the tree area covering the ground, measuring the tree canopy surface area, measuring the total volume of th e tree and measuring the outer PAGE 17 17 three feet of the tree canopy which r epresented the bearing volume. The bearing volume refers to the part of the canopy which produces or bears the maximum fruits. It was noted that the production potential of a citrus tree is directly proportional to the canopy volume and that the first t hree outer feet (from the outside to inside) of the canopy receives 90% of the solar radiations. Canopy Characteristics with La ser Sensor D ata Wei and Salyani ( 2004) designed algorithms to measure the canopy characteristics using data collected from a laser scanner. Fixed length p olyvinyl chloride ( PVC ) pipes were used to test the correctness of the algorithm For the height calculati ons, the pipes were placed within the tree canopy at fixed distances. Figure 2 1 shows the analysed image obtained after processing the data. The distance of these pipes and their length were measured manually which represented the ground truth. The laser scanner scanned through the canopy, and the PVC pipes were distinctly identifiable from the resulting pseudo images. For volume calculation, a rectangular parallelepiped box with certain dimensions was used to represent the ground truth for establishing the accuracy of laser data measurements. The results showed that the accuracy of the length measurement obtained from the designed algorithms were above 97%. The volume measurements using the algorithms in comparison to the ground truth resulted in c oefficients of variation ( CV = standard deviation/mean) of 5.4% an d a relative error ( Relative error= (measured data actual data)/actual data) of 4.4%. Polo et al. ( 2008) developed a structured algorithm to determine the tree volume and total crop surface area using the data collected by a light detection and r anging (L IDAR) system mounted on a tractor scanning through the rows of trees on both sides PAGE 18 18 M anual measurements of a few selected representative trees were carried out to establish the ground truth. The leaf area was measured by two methods. In the first method, a relationship was deduced between the results obtained from LIDAR data and the manual measurements of the combined foliar area. This helped in the determination that th e transmitted light attenuates exponentially when it passes through a plant. I ( r ) = I o e r where I o is the initial beam intensity and I ( r ) is the final beam intensity passing through the tree canopy and is an extinction coefficient related to the leaf area density. The experiments were carried out in apple orchards, pear orchards and vineyards. This study showed that the LIDAR based system could be used to estimate the tree volume and leaf area in a non destructive manner ; and also the results obtained from the LIDAR data measurements and manual measurements had a good correlation wit h each other. Lee and Ehsani (2009 ) developed laser scanner based measurement system to determine the tree canopy geometric characteris tics of height and surface area. The study used a laser scanner, a GPS receiver and an inertial sensor mounted on a trac tor to scan the tree rows to both left and right. Figure 2 2 shows the manual surface area estimation approach. Three different techniques were used to estimate the geometric characteristics of the tree: a) Convex Hull method b) Savitzky Golay filter meth od and c) the original laser data. The tractor had a constant speed of 0.63 m/s ; and the angular resolution of the laser was maintained at 0.25. It was observed that the results obtained from Convex Hull method were close to the results obtained from the original laser dataset. The Savitzky PAGE 19 19 Golay filter method was not in the same range as that of the original dataset results. Figure 2 3 shows the data collection using a laser scanner in a citrus grove. Rosell et al. (2009) continued with experiments to mea sure the structural characteristics of trees. In this study, the three dimensional images of trees using a 2D LIDAR system were obtained. Computer Aided Design (CAD) software was used t o visualize the cloud of three dimensional points collected by the LIDA R scanner. The 3D digitalized images of the trees were used to determine the height, total volume, width, leaf surface area and LAI. The 3D model helped in producing images which were highly comparable to real crops which made the system very efficien t. T he results obtained were comparable to the manually measured volume, height and other characteristics. Fernndez Sarra et al. (20 13 ) used the Terrestrial Laser Scanner (TLS) to estimate the crown volumes of the urban Platanus hispanica trees. This study manually calculated the dendrometric parameters such as the tree width, height, crown diameter, and distance from the base of the tree crown to the soil. Con ical paraboloid, and hemisphere geometric models were used to estimate the volume of the tree crow n. The manual measurements were taken for 30 specimens. The TLS scanned these trees which resulted in a point cloud of laser data for every tree, which were then used to calculate the volumes of the respective crowns. There were four methodologies employe d to obtain the crown volum e (Fernndez Sarra et al., 2013 ). The first was to calculate the convex hull of the point cloud obtained and apply it to the entire crown. The second method was again a convex hull, but the difference being that the crown was di vided into slices 10 cm in height from bottom to top of the tree crown and the convex hull for each slice was obtained. PAGE 20 20 The third was to determine the XY trian gulation in horizontal sections. This method made use of the Delaunay triangulation. The crown data was divided every 10 cm in height from top to bottom similar to the second method. The surface area was calculated for each slice based on the Delaunay triangulation. The total volume was calculated by summing up the surface area of each slice and m ultiplying the result with height (10 cm). The fourth was by the method of voxel discretization. This method used a grid in the 3D space to divide the point cloud in small units each having a volume of its own. The total volume was calculated by multiplyin g points inside each voxel with the number of voxels by the voxel volume. Total Volume= points in voxel number of voxels/voxel volume; The results showed that the convex hull calculated on the sections (second method) and the XY triangulation methods (t hird method) were more appropriate than the global convex hull method (first method) as it reduces the over estimation of crown volume. The voxel method generated goo d r esults. However, one of the drawbacks with this method was the hidden points in the cen tral part of the canopy that cannot be ignored during the volume estimations Sanz et al. (2013) used the LIDAR 3D dynamic meas urement system along with the 2D Terrestrial Laser LIDAR (TLS) for the geometric characterization of tree crops. The study includ ed calculating the tree row LIDAR volume (TRLV) from the laser data and establishing a non linear relationship with the leaf area density (LAD). The TRLV was calculated from the principal of intersection of two solids. The solids were obtained from the lef t and right scanned 3D data. The intersection of these solids gave the TRLV of the tree. PAGE 21 21 LAD = The above equation gave the relationship between the TRLV and LAD. The coefficient of determination (R 2 ) was 0. 87 and it showed that there was a good logarithmic fit obtained. Figure 2 4 shows the solids generated from the left and right scans. Canopy Characteristics with Ultrasonic S ensors Zama n and Salyani (2004 ) used ultrasonic sensors to find a relation ship bet ween the foliage density and the vehicle ground speed with the tree volume. For the study, 15 densely foliated trees and another 15 partially defoliated citrus trees were considered. The ultrasonic system u sed 10 ultrasonic sensors. The d ivergence angle of each sen sor was maintained at 6 degrees and they pulsed at a rate of 40 kHz. The sensors were at a distance of 0.46 m. The sensors were sequentially fired to avoid interference between neighboring sensors. The sensors were divided into groups: (1, 5, 9), (3, 7) and (2, 6, 10). The distance from the sensor to the foliage was captured by every individual sensor. The whole system was mounted on a tractor which moved between rows for collecting the data. The canopy volume was calculated by the given equation ( Tumbo et al., 2002): w here, U = Calculated ultraso nic volume S = g round speed of the tractor D d = d istance from the tree row line to the periphery of the canopy in meter D s = v ertical spacing between adjacent sensors PAGE 22 22 S r = Sampling rate of the ultrasonic sensor N= number of scans/tree The results obtained from the ultrasonic sensor system data were at a 95% confidence level compar ed to the manually calculated results. It was reported that the volume variability increased proportionally with the ground sp eed in partially defoliated trees. The results corresponding to the two halves of the tree were found to be asymmetric; hence the tree had to be scanned from both sides for accurate measurements. Schumann and Zaman (200 5 ) used ultrasonic sensors system to map the tree canopy size in real time. The main aim of the study was to a) develop a software system to calculate the real tree canopy size b) develop a graphical diagnostic interface, and c) evaluate the accuracy of the developed software in commercial g roves. The tree canopy volume and height were measured accurately by the software at a rate of 13.6 trees per minute which was far more efficient than the manual measurements, which would have taken approximately a minute for every tree. Rosell and San z ( 2 01 2 ) reviewed widely used sensor technologies and methodologies to estimate the geometric characterization of the tree crops. The most important technologies which have been greatly successful in estimation of the geometric characteristics of trees are the LIDAR laser scanners and the stereo vision systems. The study also discusses many of the positive aspects and drawbacks of the LIDAR laser sc anners and the stereo vision sys tems. The most important ones being that the LIDAR laser scanner was found to lack in terms of the post processing of data, as the collected data had to be processed in a software to determine the canopy characteristics, whereas, PAGE 23 23 for the stereo vision systems, the drawback was the cost of the equipment used and its large scale deploymen t. Llorens et al. (2011) combined the ultrasonic sensor application and the LIDAR application to carry out estimate the canopy characteristics. Canopy characterization is an important factor in estimating the fertilizer and pesticide application in crops. This study compared the benefits of using ultrasonic and LIDAR sensors over the conventional manual measurements. It was reported that the ultrasonic sensors were beneficial in calculating the average canopy characteristics, whereas, LIDAR sensors provide d more details and were more applicable for canopy measurements. Field tests were carried out for three years using the system which constituted of a laser scanner and three ultrasonic sensors. Ultrasonic sensors helped in estimating the canopy volume and LAI with high accurac y. The LIDAR sensors gave detailed results ; and it was observed that the post processing of the data posed some difficulty as the software had to be developed to calculate the canopy characteristics. Yield Estimation Ye et al. (2008 ) u sed airborne hyperspectral imagery to estimate the yield in citrus crops. Pixel based average spectral reflectance values were used to identify the features of the canopy at different wavelengths from the acquired images. These were then used to design a y ield estimation model. Five methodologies were used to estimate yield: a) a combination of several vegetation indices, b) a simple correlation analysis to determine key wavelengths, c) principal components from principal component regression, d) Partial Le ast Squares (PLS) factors, and e)important wavelengths established by a B matrix obtained from PLS regression. PAGE 24 24 The yield data was collected during the 2007 harvest season. An airborne imaging spectrometer for a pplications (AISA) Eagle Systems, was used t o acquire the hyperspectral images. The data was then processed by using calibration coefficients, which we re determined in the laboratory. Before estimating the yield model, the data had to be filtered, as the data faced a multicollinearity problem ( high correlation existing between wavel e ngths). The results showed that wavelengths in the range of 407 to 898 nm had a high correlation with the citrus yield. The five methodologies used to estimate yield proved to be highly comparable to the yield data coll ected manually. Zaman et al. (200 6 ) devised a study to estimate the yield by relating it to the tree size which was measured using ultrasonic sensors. An automated ultrasonic system was groves and a sensor based automatic yield monitoring system was used to map the data. Collected spatial data was divided into 40 equal sized plots using ArcView GIS software. The r esulting data was used to establish a relation ship between the tree canopy s ize and fruit yield. The fruits were manually harvested and placed in tubs ; these were passed on to the yield monitoring system which stored the position of every full tub. ArcView GIS software was used to map the ultrasonically obtained tree size informat ion with the fruit yield. For each of the 40 plots the correlation was mapped using linear regression. The results showed that the ultrasonically sensed tree sizes were strongly correlate d t o the fruit yield such that if the tree size was small, the yield was small and vice versa. PAGE 25 25 Summary The most important studies carried out to estimate the canopy characteristics de al with ultrasonic sensors and l aser scanners. Both of these methodologies have their pros and cons. Laser scanner based studies require a l ot of post processing of the data for the results to be shown, but are very efficient i n the estimation of the canopy, w hereas, the ultrasonic sensors do not require any post processing but they capture a lot of noise along with the actual data, making it not very efficient in the canopy approximation. Most of the techniques used until now are not commercially used as they are either very expensive or are not practical. This study aims at calculating the canopy characteristics on a commercial level and buil ding a cost effective grower tool. PAGE 26 26 A B Figure 2 1. Laser scanning A ) Hypothetical distant image B ) S canning illustration for a single slice (Source: Development of a laser scanner for measuring tree canopy characteristics: Phase 1. Prototype develop ment Wei and Salyani, 2004) Figure 2 2. Surface area and volume calculations by the manual method. (Source: A Laser scanner based measurement system for quantification of citrus tree geometric characteristics Lee and Ehsani, 2009) PAGE 27 27 Figure 2 3. Tr actor mounted with the laser scanner and GPS receiver (Source: A Laser scanner based measurement system for quantification of citrus tree geometric Characteristics Lee and Ehsani, 2009) PAGE 28 28 A B C Figure 2 4. Intersection of solids A ) Solids gene rat ed with the right scan data B ) Solids gen erated from the left scan data C ) intersection of two solids generated from a and b (Source: Relationship between tree row LIDAR volume and leaf area density for fruit orchards and vineyards obtained with a LIDAR 3D Dynamic Measurement System Sanz et al., 2013) PAGE 29 29 CHAPTER 3 MATERIALS AND METHODS This chapter provides an in depth understanding of the experiments conducted and the materials used for th is study. The hei ght, a rea and v olume calculation approach has been a dopted from Lee and Ehsani, 2009. The new approaches exhibited in this study are the area calculation, density calculation and the yield estimation. The algorithms were written in both Java and Matlab environments. Materials Citrus Groves and Sensor All th e experiments were conducted on Valencia orange groves located in Fort Basinger, owned by Lykes Brothers and CREC groves, Lake Alfred, Florida. Figure 3 1 shows a typical Florida citrus grove. The SICK laser sensor provides the distance between the laser and the target in millimeter. The sensor moves vertically or horizontally, dependin g on the way it is positioned and collects data at different angular resolutions. For the experiment, we maintained the scan angle to 1 degree ; and the laser scanner was mo unted such that it provided the data from 0 to 180 degree s perpendicular to the ground The maximum distance the SICK laser scanner can scan is 8191 mm. The SICK scanner generated 12 scans per second and each scan consisted of 0 180 degrees. Figure 3 2 s hows the SICK sensor along with its internal working mechanism. G lobal P ositioning S ystem R ec ei ver A GPS ( GPS18 5 Hz, Garmin International Inc. ) was mounted on top of the tractor to collect the location of the scanned rows and also to determine the speed o f the tractor. Figure 3 3 shows the types of GPS receivers used in this study. PAGE 30 30 The latitude longitude co ordinate system was used in the experiments. The latitude at a point is defined as an angle that is formed at the juncture of the equatorial plane and an imaginary line that runs through that point and is normal to the surface of the reference ellipsoid which is a depiction of the shape of the earth. The l ongitude at a point is defined as the angle formed between a reference meridian to the east or to th e west to another meridian that runs through that point. The G lobal P ositioning S ystem (GPS) receiver can be set to collect data in different formats. The experiments conducted collected GPS readings in global positioning s ystem fix d ata ( GGA ) or recommend ed minimum specific GPS transit data ( RMC ) formats These provide a string of data with many attributes which are explained below. The GGA string gives the elevation at every location which is not provided in a RMC string ; w hereas, RMC provides the speed d etails of the GPS carrier which is not provided in a GGA string. Example of a GGA S tring Global Positioning System Fix Data (Source: http://aprs.gids.nl/nmea/#latlong) $GP GGA,hhmmss .ss, lati.at ns long.at ew q ns d.p a.sl um g.s ug a.d drsi Attribute expla nation: hhmmss.ss = UTC of position lati.at = latitude at that position ns = N orth or S outh long.at = Longitude at that position ew = E ast or W est q = GPS Quality indic ator (0=no fix, 1=GPS fix, 2=D GPS fix) PAGE 31 31 ns = number of satellites in use d.p = horizon tal dilution of precision a.sl = Antenna altitude above mean sea level um = units of antenna altitude in meters g.s = Geoidal separation ug = units of geoidal separation in meters a.d = Age of Differential GPS data in seconds Example of a RMC S tring R ecommended minimum specific GPS/Transit data (Source: http://aprs.gids.nl/nmea/#latlong) $GPRMC,hhmmss.ss,DS,lati.at,ns,long.at,ew, sk ,x.x,ddmmyy, m.d ew *hh hhmmss.ss = UTC of position fix DS = Data status (V=navigation receiver warning) lati.at = La titude of fix ns = North or South long.at = Longitude of fix ew = East or West sk = Speed over ground in knots x.x = Track made good in degrees True ddmmyy = UT date m.d = Magnetic variation degrees ew = East or W est *hh = Checksum PAGE 32 32 Arc GIS software was used to map all the results of the volume, height and density onto the aerial image to view the accuracy of the data. Soil c onductivity was measured using Veris EC equipment (Figure 3 4) The yield analysis was carried out using sup ervised learning models contained in Matlab 2010 ( Natick, MA) which work on the principle of pattern recognition and prediction. The models used were s upport vector machine ( SVM), partial least squares (PLS), principal components regression (PCR ) classic al least squares (CLS), and multipl e linear regression ( MLR) data prediction models. All these models divided the input dataset into a training set and a testing set. The training set would recognize the pattern and develop a prediction based on that and test the predicted outcome with the test dataset. Methods The laser scanner systems include the need for post processing of the data b efore it can show results and be analyzed. The experimental da ta was used as an input to the algorithms to calculate the h eight, volume, density, and estimate yield of the canopy under consideration. Figure 3 5 shows a schematic representation of the data collection and processing. Data Collection The data collection was performed using CVMS software (Figure 3 6) The CVMS so ftware collected the data of the right laser scanner, the left laser scann er and the GPE reading along with a tag file that synchronizes the GPS point with the corresponding left and right laser scanner reading (Figure 3 7) Once the data of the right las er scanner, left laser scann er, GPS reading and tag files we re collected, they were combi ned into one single comma sepa rated ( csv) file for it PAGE 33 33 to be taken as input for the algorithm.This task was done by a file converter software (Figure 3 8) The output file of the file converter software result ed in a .csv file which act ed as the input for the canopy measurement software (Figure 3 9) These .csv files were then used in the algorithm designed to calculate the hei ght, area, volume and density (number of h i ts) of the tree canopy. Processing the I nput F ile Figure 3 9 shows a sample input .csv file. One line of GPS string is followed by twelve left and twelve which is followed by 181 readin gs in mm, corresponding to a single scan. Twelve rows of symbolizes the start of the each right scan. This pattern follows throughout the file. While collecting the data, the tractor was assumed to be at the center of two tree rows. The horizontal distance between the two tree rows was measured and found to be approximately 76 00 mm. TD = the horizontal di stance between two tree rows/ 2 = 76 00/2= 380 0 mm ; TD was calculated to be half the horizontal distance between two consecutive tree rows as the laser was assumed to be mounted right at the center of the tractor, which in turn was running at the center of the tree row. The tree was considered to be symmetric on both sides. It was assumed to be a n irregular polygon for calculation purposes. Hence, only one side of the tree was scanned for data. The a rea and vo lume calculations that followed we re multiplied by two to get the complete picture. Any data in the .csv file which wa s greater than the TD value was set to 0 as any data that was greater than TD would PAGE 34 34 be showing false hits. The height of the laser above the ground was measured and termed LD The laser scanner collects 12 scans for every second. The r e fore, in the .csv fi le, every GPS string is followed by 12 lines of left data and 12 lines of right data. Each data line corresponds to a scan from 0 to 180 degrees. The laser scanner scanned from the ground up to the sky. To remove the data that scans the ground and sky, the first 20 degrees and last 20 degrees of the each scan was set to 0. The time between each scan was termed as dt. dt = 1 / 12 = 0.08 second (1 second generates 12 scans) Figure 3 10 shows a schematic representation of the va r iables used and the distances b etween the tree rows and the tractor positioning. The data in the csv files ga ve the points in the polar coordinate system. To make the calculations easier it had to be converted into Cartesian coordinates to get a 2 dimensional picture of the points. Th e following formu la was used for determining the x and y co ordinates of every point in the Cartesian plane. X ij = TD d ij .sin ( ij ) Y ij =LD d ij .cos ( ij ) (Lee, Ehsani, 2009) Where, X ij is the x coordinate of the Cartesian plane and Y ij is the y coordinate of the Cartesian plane. LD= h eight of the laser above the ground TD= d istance between the tractor and the tree row. PAGE 35 35 As mention ed earlier, for every GPS string in the input file, there were 12 left scans and 12 right scans. The output file was planned in a way that, every scan would give the GPS reading of the location. Area, Height and Volume Calculation The area was calculated by taking one scan at a time. This approach divide d the tree into slices. Each slice was considered to be a n irregular polygon The area was calculated by first doing a convex hull on the data and then getting the area of the irregular polygon formed by th e connecting data points in one scan. Area ij = Area of the polygon (X ij Y ij ) The height calculation for every slice of the tree was achieved by finding the maximum value for y coordinate in a given scan ranging from 0 180 degrees. Height ij = max ( Y ij ) The he ight was further fil tered to discard any data that was not a tree. Such data would usually be grass or other weeds which might have grown in the groves. If (Height SH) > L D ) Height = (Height +SH)/1000 w here, SH = height of the tree trunk, which was assume d as 500 mm. LD = Height of the laser above the ground. It was taken to be 1923.5 mm. The value was divided by 1000 to convert it into meter. Volume calculation: Volume= 2 Area ij veldata dt; w here, Veldata = the velocity data that can be obtained from the GPS string PAGE 36 36 dt= time interval between two scans Experimental Setup to Test the Efficacy of the Designed A lgorithm An experimental setup consisting of wooden boxes, piled one on top of the other and equally spaced, was designed as an imitation of the ci trus groves. The tractor was mounted with the lasers and GPS to collect the data using the CVMS software. Figure 3 1 1 s hows the experimental set up, the dimensions of the boxes, and the track where the tractor was run to collect the data. The speed informa tion was collected at each GPS point, which was used for the volume calculations. De ns ity Calculation s The density was calculated based on the number of hits on the top, mid dle, and low sections of the tree canopy. To get a clear picture of the efficiency of the density calculation algorithm the data was co llected on one citrus tree. Figure 3 1 2 s hows the tree on which the density measurement experiments were conducted. For the d ensity estimation, A Valencia tree with a heavily leaved canopy was chosen. T o get an estimate of how dense the tree was, first the data was collected from the given tree and this was called th e 100% dense condition. T he tree was deleaved manually for about 25% and the tree was said to be in 75% dense condition. This was followed b y removing another 25% of the tree leaves manually and this condition was called the 50% dense condition. And finally, another 25% of the tree leaves were manually removed to get a 25% dense tree condition. After each set of leaf removal, the removed leav es were weighed and the tree was scanned for data at high and l ow speeds. Three rep eti tions were made at every speed. Figure 3 13 show s the manual meas u rement of the distance between the tree row and tractor, and Figure 3 14 shows the deleaving proc edure o f the tree. PAGE 37 37 Table 3 1 s hows the amount of leaves collected for 100%, 75%, 50% and 25% of the tree density conditions along with the weight in kg of the leaves collected. The table also shows the time taken for every repetition of the data collection. In th e speed column, Figure 3 15 shows the leaves after removal. The manually measured readings : Height of the tree: 104 cm Width of the tree: 113 cm Distance from laser (rope) to tree trunk: 104 cm Pole height: 208 cm Distance from rope to pole: 109 cm Distance travelled: 161 cm The density calculation was carried out by the di s tance of the hits from the laser to the tree canopy. The smaller the distance calculated, the greater the density. The tree canopy was divided into sections. Each section represented 9 degrees in height and 4 scans in width as shown in Figure 3 1 7 . The me an of the data points was calculated vertically f or every scan for every section. After finding the me an vertic ally, for every scan, a me an of the four scans for every section was calculated as shown in the Figure 3 1 9 Once the mean for every section was calculated, each tree row was divided into top, middle and low density regions. This was done to get a better u nderstanding of how the density is divided at the top, mid and lower sections of the trees. The top six vertical sections spanning a row were taken as the top density region (sections 1 6). The next six vertical sections spanning the row (sections 7 12) w ere considered to be the mid density region and the last eight vertical sections(sections 12 20) were considered as the low density regions. PAGE 38 38 The density readings were further classified into four zones for every region. Density reading lesser than 1000 mm and greater than 0 was zone 1. Density reading lesser than 2000 mm and greater than 1000 was zone 2. Density reading lesser than 3000 mm and greater than 2000 was zone 3. The rest of the readings which showed 0 reading was given a zone of zero, symbolizi ng no tree region. Figure 3 16 shows the schematic representation of the density distances on which the zones are based. Figure 3 18 shows the flowchart of volume, height and density calculation algorithm. Yield Estimation The major aim of this study was t o determine if there was a significant relationship between the canopy characteristics and the yield produced. For this, the data for yield, as in the we ight of oranges per row in kg was dete rmined manually by weighing The electrical conductivity (EC) of the soil and the e levation/row was also calculated. The ability of transmitting electrical current through soil is referred to as its electrical conductivity. The EC of the soil was measured for the groves where the data was collected. It is measured in Siemen s The elevation was measured in meter and it indicates the height of the surface above the sea level. The next goal was to find the relationship between the algorithm calcul ated attributes to the manually calcu lated yield. T he attributes considered were: v olume, h eight, top density, mid density, low d ensity, EC of the soil (deep and shallow) and e levation. Y= f( X1, X2, X3, X4, X5, X6, X7, X8 ) X1= Mean Volume in m 3 X2= M ean height in m PAGE 39 39 X3= Sum of top Density in m/scan X4= Sum of mid Density in m/scan X5= Sum of low Density in m/scan X6= Elevation in m X7= Deep EC in mS X8 = Shallow EC in mS Yield estimation model ing was carried out in Matlab using the S VM, PLS, PCR CLS and MLR data prediction models. 38 rows of data were t aken for developing the mode ls. Nine trees from every row were taken as a data point to collect the v olume, height, density, EC and e levation data. In total there were 342 data points. The data was averaged by volume to get a smaller number of data points to make it easier for the graphical representation. The data was averaged based on the volume data. Yield per tree was calculated on a weighted average. Yield per section = (volume per section total yield per row)/t otal Volume per row. This data was fed into the supervised model s (PLS, PCR, SVM, CLS, MLR) in M atlab. The data was analyzed using 75% of the data as the training set and the remaining 25% of the data as the testing dataset for all the models. The factors determining the model were the sum of top density/row, sum of mi d density/ tree sum of low density/ tree average EC of soil /tree(shallow and deep) average elevation, mean of the measured volume /tree and m ean h eight /tree PAGE 40 40 Fi gure 3 1. Ft. Basinger c itrus grove in Florida Figure 3 2. LMS 200 30106 SICK laser scanner (Source: Innovative LIDAR 3D dynamic measurement s ystem to estimate fruit tree leaf a rea Sanz et al., 2011 ) PAGE 41 41 A B Figure 3 3 Types of GPS A ) Garmin GPS1 8 5H z B ) Trimble RTK 442 Figure 3 4 Veris EC equipment for measuring soil conductivity (Source: http://www.veristech.com/products/soilec.aspx ) PAGE 42 42 Figure 3 5 Experimental setup C SV FILE Java Code /Matlab Code O utput File with t he Canopy Volume Height and Density C Program PAGE 43 43 Figure 3 6 Laser data collection Figure 3 7 Snapshot of the CVMS software PAGE 44 44 Figure 3 8 Snapshot of the f ile c onverter s oftware Figure 3 9 E xample resultant .csv file PAGE 45 45 Figure 3 1 0 Schematic represen tation of the left and right tree rows with the variables. A B Figure 3 11 Experimental setup A ) the later al view of the boxes (top) and B ) the tractor track and top view of the boxes (bottom) (the figure is not to scale) PAGE 46 46 Figure 3 12 W hite pole use d to measure 100% hit region. Fig ure 3 13 Measuring the distance between the tree rows and center of the tractor lane. PAGE 47 47 Figure 3 14 Removing the tree leaves manually PAGE 48 48 Figure 3 1 5 Weighed tree leaves after removal 11 ft. tall tree Estimated error 8". L aser Figure 3 16 Density reading zones PAGE 49 49 Figure 3 17 S ection of the tree showing the measurements Figure 3 18. Flowchart of the algor ithm 9 length PAGE 50 50 Figure 3 19 Density Calculation Flow Chart PAGE 51 51 Table 3 1. Sensor s pecifications Model n ame LMS 200 30106 Field of v iew 180 Angular r esolution 1 Scanning r ange 8 m Dimensions (L X W X H) 156 X 155 X 210 mm T able 3 2. Density data at high and l ow speeds Canopy volume Weight of shredded leaves (kg) Speed Replication Time (s) ~100% L 1 19.91 2 12.56 3 12.52 H 1 5.51 2 5.04 3 4.98 ~75% 0.8 L 1 10.25 2 8.80 3 9.61 H 1 8.12 2 6.39 3 4.86 ~50% 1 .3 L 1 12.59 2 12.51 3 12.49 H 1 4.64 2 4.69 3 5.21 ~25% 2.1 L 1 10.96 2 11.25 3 12.26 H 1 5.81 2 5.79 3 5.02 PAGE 52 52 CHAPTER 4 RESULTS AND DISCUSSION This chapter provides the graphs and resultant tables. Experimental Data Results It was seen that the measured height ranged from 2.2 to 2.7m for the experimental setup with the boxes or minibulks The actual height of the minibulks w ere 2. 3 m and 2. 2 m. The minibulks of 1.16 m were not considered as they we re taken as short trees by the algorithm. The experimental results for the density calculation considering a single tree gave satisfactory results with coefficient of determination of 0.94 with various density scenarios. Figure 4 1 shows that that the density decreases as t he percentage of the leaves removed increases. Results on the Grove D ata Table 4 1 shows the output of dens ity at a given GPS locati on with top, mid dle and low densities a The density decreased from zone 1 to zone 3, and zone 0 rep resented no tree detected. Table 4 2 s hows the output file for the volume and height data along with their respective GPS locations. It was seen that as the height of the tree increases, there is a considerable growth in the volume of the tree, owing to th e foliage increase. There were also specific cases in the output data which showed a low estimated volume despite a good height. This could be a result of a unhealthy tree in the grove. Fig ure 4 2 shows the variation of yield based on the EC data. Though there was no relationship as such when the EC data was mapped to the manually collected yield, it was seen that on removing the EC data from the yiled estimation model there was a PAGE 53 53 considereable increase in the percentage error This shows that EC data does play a role in the yield estimation in citrus groves. In Figure 4 3 the rel a tionship between the elevation and the citrus yield is mapped. Similar to EC data, the correlation between the yield and the elevation data did not show good result s; yet in the yield estimation modelling, on removing the elevation data f r om the analysis, the percentage error increased considerably D iscussion In the experimental data analysis, we could see that the vo l ume estimation gave a percent error of 8.2 %. This error could be related to the fact that, the objects used for the experiments were rectangular minibulks and not trees as such. The geometric differences between the rectangular minibulk and the tree has to be taken into consideration as the volume calculation was ca rried out with the same algorithm, keeping the geometric characteristic of a tree in mind. That is, the distance between the tree row and the laser is exactly TD when it comes to the rectangular boxes, but in the real scenario, the foliage of the tree over laps this distance. The height estimation on the other hand produced a percent error o f 2.5%. This is because the algorithm calculates the height of every section by taking the me an of maximum point it records which is similar in both cases of the recta ngular minibulks and citrus trees. The measured volume, height and density were overlaid on the aerial image using the Arc GIS software (Figure 4 4 ) and the regions where there were missing trees were precisely indicated by the algorithm. The estimated hei ght in the groves was at par with the actual tree sizes. PAGE 54 54 The volume and height data were very much in sync with the actual trees in the groves under consideration. The algorithm was able to pred ict the sparse regions and the d ense re gions in the groves ac curately. The output file gave a clear picture of the density distribution. In areas with no trees, the volume, height and density gave a result of 0, signifying the absence of the tree. The yield estimation was carried out with five different regression m odels in a MATLAB 2010b environme nt. The factors used in developi ng this model were the top density mid density, low density, volume, height, EC (shallow and deep) and e levation Table 4 3 Table 4 4 Table 4 5, Table 4 6, and Table 4 7 give the analysis statistics for the PLS, PCR, SVM, MLR and CLS regression models, respectively. The five models produced approximately the same results with slight variations. The SVM and CLS model gave a percent err or of 1 3.8 % and 1 5.5 %, respectively, when compared to the 15 % error in the remaining three models. It was seen that the electrical conductivity of the soil ( EC), was one of the contributors to the fruit yield. This was proven when the EC factor was removed from the analysis ; the percentage error incre a sed for a ll the prediction models. With EC data, the results showed a percent age error between 13 1 6 %. The models gave a very low coefficient of determination for all the model s, yet the percentage error was comparatively better. This was because of the varying yie ld produced in the different rows in the grove. If there is an automated method for the fruit counting, the yield estimati on could provide better results (Zaman et al., 2006). Yield prediction mainly depends on the health of the tree along with the site s pecific management. If the health of the grove is PAGE 55 55 incorporated in this model of yield prediction, the percentage error in the yield prediction can be comparatively lowered. The algorithm was run on Java and Matlab environments. Though the results were the same, the time complexity showed a vast variation. The java code took an average of 1.5 seconds to execute for files of size 8.5 MB and the same file took about 1200 seconds in Matlab. This clearly showed that Java performed better than Matlab environment in terms of the processing time. Conclusion The volume, height and d ensity data calculated from the algorithm produced satisfactory results. The algorithm gave a percent error of 2.5 % for height when compared to the actual minibulk height. The volume d ata measu red 3.5 m 3 for individual mini bulks which had an actual measurement of 3. 23 m 3 and gave a percent error of 8.2%. The d ensity measurements calculated by the algorithm showed that the density decreas ed as the tr ee was defoliated. Figure 4 1 s hows t he graph for the d ens ity measurements. The supervised models provided percentage error between 13 16% for PLS, PCR, SVM, MLR, CLS between the manually collecte d yield and the predicted yield. This study concentrated on analyzing the yield with just the ph ysical characteristics of the tree and the soil condition. Yield is dependent on many other factors such as climate, location, health and age of the tree. The yield in citrus groves is largely dependent upon the health conditions of the trees and this fa ctor was not taken into consideration in this study. PAGE 56 56 Future Work The health aspect of the groves has to be taken into consideration for the estimation of fruit yield. An approach to consider the health estimate of the groves using the Normalized Diffe rence Vegetation Index (NDVI) data is in progress which could be used in the yield estimation to provide a better insight. PAGE 57 57 Figure 4 1. Density r eadings for a single tree Figure 4 2. Relationship b etween the EC and y ield PAGE 58 58 Figure 4 3 Relationshi p between the e levation and y ield Figure 4 4 Measured v olume overlaid on the aerial image using Arc GIS software PAGE 59 59 Table 4 1. Density output file Lat Long TD (mm/scan) Zone MD (mm/scan) Zone LD (mm/scan) Zone 27.385192 81.143769 1221 2 551 1 1657 2 27.385190 81.143768 1221 2 551 1 1657 2 27.385188 81.143768 1749 2 582 1 1914 2 27.385186 81.143767 1749 2 582 1 1914 2 27.385184 81.143767 1749 2 582 1 1914 2 27.385183 81.143766 1749 2 582 1 1914 2 27.385181 81.143765 1770 2 623 1 2090 3 27.385179 81.143765 1770 2 623 1 2090 3 Table 4 2 Volume and height output file Lat Long Volume(m 3 ) Height(m) 27.385192 81.143769 0.204 3.93 27.385190 81.143768 0.198 3.98 27.385188 81.143768 0.154 3.23 27.385186 81.143767 0.156 3 .37 27.385184 81.143767 0.214 4.09 27.385183 81.143766 0.179 3.39 27.385181 81.143765 0.151 3.16 27.385179 81.143765 0.150 3.18 Table 4 3 PLS statistics M easured yield ( kg/ha ) P redicted yield ( kg/ha ) % error Mean % error 16.37 14.07 14.03 15.0 12.59 13.35 6.04 12.21 14.62 19.77 12.38 14.99 21.08 11.96 13.09 9.47 15.92 12.81 19.53 PAGE 60 60 T able 4 4 PCR statistics Measured yield (kg/ha ) P redicted yield (kg/ha ) % error Mean % error 16.37 14.07 14.03 15.0 12.59 13.35 6.04 12.21 14.62 19.77 12.38 14.99 21.08 11.96 13.09 9.47 15.92 12.81 19.53 Tabl e 4 5 SVM statistics Measured yield (kg/ha ) P redicted yield (kg/ha ) % error Mean % error 16.37 14.26 12.88 13.8 12.59 14.18 12.58 12.21 14.13 15.73 12.38 14.23 14.92 11.96 13.86 15.86 15.92 14.16 11.08 Table 4 6 MLR statistics Measured yield (kg/ha ) P redicted yield (kg/ha ) % error Mean % error 16.37 14.07 14.03 15.0 12.59 13.35 6.04 12.21 14.62 19.77 12.38 14.99 21.08 11.96 1 3.09 9.47 15.92 12.81 19.53 Table 4 7 CLS statistics Measured yield (kg/ha ) P redicted yield (kg/ha ) % error Mean % error 16.37 12.37 24.42 15.5 12.59 11.74 6.80 12.21 11.46 6.12 12.38 12.07 2.49 11.96 9.24 22.76 15.92 11.10 30.29 PAGE 61 61 APPENDIX A MATLAB CODE FOR HEIGHT, VOLUME AND DENSITY CALCULATION clc; clear all ; numlines=0; format long e ; areavarleft=0; areavolleft=0; areahtleft=0; areavarright=0; areavolright=0; areahtright=0; %%Open the file inputfile = input( 'Enter File Name with extension: \ n' 's' ); fid=fopen(inputfile); fid=fopen(inputfile); %% get the number of lines in the file in numlines for i=1:50000 A=fgetl(fid); if A== 1 break ; else numlines=numlines+1; end end %% numberofscans = number of lines in file divided by 26(1 GPRMS line + 1 blank line + 24 laser scans) fclose(fid); numlines=numlines 9; numscans=numlines/26; %% Interpolatiing the GPS Points for both latitude and longitude eval( 'latdivide=xlsread(inputfile,1,''E10:E10'');' ); eval( 'longdivide=xlsread(inputfile,1,''G10:G10'');' ); eval( 'latdividegga=xlsread(inputfile, 1,''D10:D10'');' ); eval( 'longdividegga=xlsread(inputfile,1,''F10:F10'');' ); ld1= (floor(latdivide/100)*100); ld= floor(latdivide/100); gd1= (floor(longdivide/100)*100); gd= floor(longdivide/100); ld1gga= (floor(latdividegga/100)*1 00); ldgga= floor(latdividegga/100); PAGE 62 62 gd1gga= (floor(longdividegga/100)*100); gdgga= floor(longdividegga/100); eval([ 'data=xlsread(inputfile,1,''C10:GA' ,num2str(numlines+9), ''');' ]) %% get the left laser data, right laser data and ve locity of the tractor in variables leftdata, rightdata and veldata respectively (velocity in mm/s) leftdata=zeros(numscans,12,181); rightreading=zeros(numscans,12,181); %% rightreading to leftreading rightdata=zeros(numscans,12,181); Arealeft=zeros(numsca ns,12); Arearight=zeros(numscans,12); for i=1:numscans leftdata(i,:,:)=data((i 1)*26+3:(i 1)*26+14,:); %%leftdata to rightdata rightreading(i,:,:)=data((i 1)*26+15:(i 1)*26+26,:); %%changes made from rightreading to leftreading end %% Input d ata from rightreading variable to rightdata variable from 181:1 for i=1:numscans for j=1:12 m=181; for k=1:181 rightdata(i,j,m)=rightreading(i,j,k); %%changes made from rightdata to leftdata m=m 1; end end end cellarrayleft= cell(numscans*12,7); cellarrayright= cell(numscans*12,7); %% Distance between two rows of tree distance= 8000 ; %%changes made 3302 TD = distance/2; %% Height of the laser from the ground SH = 500; %% changed from 1400 to 500 to 1981.2 %%Scan interval between 2 scans in seconds dt= 0.0833; %% distance greater than 3151.78 mm is considered 0 PAGE 63 63 for i=1:numscans for j=1:12 for k=1:181 if ( leftdata(i,j,k)>TD) %%previously 3151.78 leftdata(i,j,k)=0; else leftdata(i,j,k)= leftdata(i,j,k); end end end end for i=1:numscans for j=1:12 for k=1:181 if ( rightdata(i,j,k)>TD) %%2248 for 2 rightdata(i,j,k)=0; else rightdata(i,j,k)= rightdata(i,j,k); end end end end ty=1; %% Anything below 20 degree is considered 0 as it covers the ground leftdata(:,:,1:20)=0; rightdata(:,:,1: 20)=0; leftdata(:,:,171:181)=0; rightdata(:,:,171:181)=0; %% Transforming polar coordinates into Cartesian coordinates for i=1:numscans for j=1:12 for k=1:181 tempyleft(ty)= leftdata(i,j,k); ty=ty+1; i f (leftdata(i,j,k) == 0) xleft(i,j,k)=0; yleft(i,j,k)=0; else xleft(i,j,k)= abs(leftdata(i,j,k)*cos(degtorad(k 1))); %% previously TD (leftdata(i,j,k)*cos(degtorad(k 1))); yleft(i ,j,k)= abs((leftdata(i,j,k)*sin(degtorad(k 1)))) ; %%changes made SH + before end if (rightdata(i,j,k)== 0) xright(i,j,k)=0; PAGE 64 64 yright(i,j,k)=0; else xright(i,j,k)=abs(rightdata (i,j,k)*cos(degtorad(k 1))); %%previously TD (rightdata(i,j,k)*cos(degtorad(k 1))) yright(i,j,k)= abs((rightdata(i,j,k)*sin(degtorad(k 1)))); %%changes made SH + before end end end end %%Total area calculation Tleft=0; Tright=0; %% Putting the GPRS string and the volume in an excel file % First 13 locations cover comma's until the last variable. outtopdenright=cell(1000); outzone topright=cell(1000); outmiddenright=cell(1000); outzonemidright=cell(1000); outbotdenright=cell(1000); outzonelowright=cell(1000); outtopdenleft=c ell(1000); outzonetopleft=cell(1000); outmiddenleft=cell(1000); outzonemidleft=cell(1000); outbotdenleft=cell(1000); outzonelowleft=cell(1000); sectionavgleft=cell(1000); sectionavgright=cell(1000); lineavgleft=cell(1000); lineavgright=cell(1000); topdenleft=cell(1000); mi ddenleft=cell(1000); botdenleft=cell(1000); topdenright=cell(1000); middenright=cell(1000); botdenright=cell(1000); zonetopleft=cell(1000); zonemidleft=cell(1000); zonelowleft=cell(1000); zonetopright=cell(1000); zonemidright=cell(1000); zonelowright=cell(1000); Vleft=0; PAGE 65 65 Vright=0; eval([ '[num text r aw]=xlsread(inputfile,1,''B10:B10' ,num2str(numlines), ''');' ]); fid=fopen(inputfile); A=fgetl(fid); fclose(fid); locs=findstr(A, ',' ); t=1; for i=1:numscans GPSstring= text((i 1)*26+1,1); GGA = strcmp(GPSstrin g, '$GPGGA' ) ; RMC = strcmp(GPSstring, '$GPRMC' ) ; GNRMC= strcmp(GPSstring, '$GNRMC' ); if (GGA) degreelat=data((i 1)*26+1,2); veldata(i)= 178458.720224065; if ( i< numscans) temp1= data((i)*26+1,2); end deg lat= str2double(num2str((((degreelat ld1gga)/60)+ ldgga),15)); deglat1= str2double(num2str((((temp1 ld1gga)/60)+ ldgga),15)); if (deglat<0) deglatdiv= abs(deglat1 deglat)/12; else deglatdiv=abs(deglat1 deglat)/12; end degreelong=data((i 1)*26+1,4); if ( i< numscans) temp2=data((i)*26+1,4); end deglong= str2double(num2str(0 (((degreelong gd1gga)/60)+gdgga),15)); deglong1= str2double(num2str(0 (((temp2 gd1gga)/60)+gdgga),15)); if (deglon g<0) deglongdiv= abs(deglong1 deglong)/12; else deglongdiv=abs(deglong1 deglong)/12; end elseif (RMC  GNRMC) degreelat=data((i 1)*26+1,3); veldataknots=data((i 1)*26+1,8); veldata(i)= veldata knots/0.00194384449; if ( i< numscans) temp1= data((i)*26+1,3); end deglat= str2double(num2str((((degreelat ld1)/60)+ ld),15)); PAGE 66 66 deglat1= str2double(num2str((((temp1 ld1)/60)+ ld),15)); if (deglat<0) deglatdiv= abs(deglat1 deglat)/12; else deglatdiv=abs(deglat1 deglat)/12; end degreelong=data((i 1)*26+1,5); if ( i< numscans) temp2=data((i)*26+1,5); end deglong= str2double(num2str(0 (((degreelong gd1)/60)+gd),15)); deglong1= str2double(num2str(0 (((t emp2 gd1)/60)+gd),15)); if (deglong<0) deglongdiv= abs(deglong1 deglong)/12; else deglongdiv=abs(deglong1 deglong)/12; end end tu=1; for j=1:12 %%tempxleft(i,j,21:170)= smo oth(TD xleft(i,j,21:170)); for ak=1:180 if (ak==180) if (xleft(i,j,180) PAGE 67 67 Arearight(i,j)= Arearight(i,j)+ ((abs((TD xright(i,j,gf)* yright(i,j,ak+1)) (TD xright(i,j,ak+1)* yright(i,j,gf))))/2); else Areari ght(i,j)= Arearight(i,j)+ ((abs((TD xright(i,j,ak)* yright(i,j,ak+1)) (TD xright(i,j,ak+1)* yright(i,j,ak))))/2); end end end end % Arealeft(i,j)= polyarea(tempxleft(i,j,21:170),yleft(1,j,21:170)); % % areavarleft=(areavarleft+Arealeft(i,j)); % tempxright(i,j,21:170)= smooth(TD xright(i,j,21:170)); % Arearight(i,j)= polyarea(tempxright(i,j,21:170),yright(1,j,21:170)); % hleft(j)=max(yleft(i,j,21:170)); hright(j)=max(yright(i,j,21:170)); areavarright=(areavarright+Arearight (i,j)); if ((hleft(j) SH) > 1923.5) %% 1400 for speed 1; 1379 for 2 ; 1365 for 4 ; 1347 for 8 cellarrayleft{t,6}= (hleft(j)+SH)/1000; areahtleft=areahtleft+cellarrayleft{t,6}; cellarrayleft{t,5}=2*Arealeft(i,j)*ve ldata(i)*dt/1000000000000; areavolleft=areavolleft+cellarrayleft{t,5}; else cellarrayleft{t,6}= 0; cellarrayleft{t,5}=0; end if ((hright(j) SH) > 1923.5) cellarrayright{t,6}= (hright(j)+SH)/1000; areahtrigh t=areahtright+cellarrayright{t,6}; cellarrayright{t,5}=2*Arearight(i,j)*veldata(i)*dt/1000000000000; areavolright=areavolright+cellarrayright{t,5}; else cellarrayright{t,6}= 0; cellarrayright{t,5}=0; end PAGE 68 68 if (j==1) cellarrayleft{t,1}=deglat; cellarrayleft{t,3}=deglong; cellarrayright{t,1}=deglat; cellarrayright{t,3}=deglong; else if (deglat < deglat1) if (deglatdiv<0) cellarrayleft{t,1}= ce llarrayleft{t 1,1} deglatdiv; cellarrayright{t,1}=cellarrayright{t 1,1} deglatdiv; else cellarrayleft{t,1}= cellarrayleft{t 1,1}+deglatdiv; cellarrayright{t,1}=cellarrayright{t 1,1}+deglatdiv; end else if (deglatdiv<0) cellarrayleft{t,1}= cellarrayleft{t 1,1}+deglatdiv; cellarrayright{t,1}=cellarrayright{t 1,1}+deglatdiv; else cellarrayleft{t,1}= cellarrayleft{t 1,1} deglatdiv; cellarrayright{t,1}=cellarrayright{t 1,1} deglatdiv; end end if (deglong < deglong1) if (deglongdiv<0) cellarrayleft{t,3}= cellarrayleft{t 1,3} deglongdiv; cellarrayright{t,3}=cellarrayr ight{t 1,3} deglongdiv; else cellarrayleft{t,3}= cellarrayleft{t 1,3}+deglongdiv; cellarrayright{t,3}=cellarrayright{t 1,3}+deglongdiv; end else if (deglongdiv<0) cel larrayleft{t,3}= cellarrayleft{t 1,3}+deglongdiv; cellarrayright{t,3}=cellarrayright{t 1,3}+deglongdiv; else cellarrayleft{t,3}= cellarrayleft{t 1,3} deglongdiv; cellarrayright{t,3}=cellarrayright{t 1,3} deglongdiv; end end end cellarrayleft{t,2}= 'N' ; cellarrayleft{t,4}= 'W' ; PAGE 69 69 if ((cellarrayleft{t,5}==0)(cellarrayleft{t,6}==0)) cellarrayleft{t,6}=0;cellarrayleft{t,5}=0; end cellarrayright{t,2}= 'N' ; cellarrayright{t,4}= 'W' ; if ((cellarrayright{t,5}==0)(cellarrayright{t,6}==0)) cellarrayright{t,6}=0;cellarrayright{t,5}=0; end t=t+1; end end g = (numscans*12); for i=1:g if ((cellarrayleft{i,6})< 0.5) cellarrayleft{i,7}=0; elseif ((cellarrayleft{i,6})< 1.2) cellarrayleft{i,7}=1; elseif (cellarrayleft{i,6}<2.13 ) cellarrayleft {i,7}=2; elseif (cellarrayleft{i,6}<2.74) cellarrayleft{i,7}=3; elseif (cellarrayleft{i,6}<3.35) cellarrayleft{i,7}=4; elseif (cellarrayleft{i,6}>3.35) cellarrayleft{i,7}=5; end cellarrayleft{i,5}= num2str(cellarrayleft{i,5}); cellarrayleft{i,6}= num2str(cellarrayleft{i,6}); cellarrayleft{i,7}= num2str(cellarrayleft{i,7}); if (cellarrayright{i,6}<0.5) PAGE 70 70 cellarrayright{i,7}=0; elseif (cellarrayright{i,6}<1.2) cellarrayright{i,7}=1; elseif (cellarrayright{i,6}<2.13) cellarrayright{i,7}=2; elseif (cellarrayright{i,6}<2.74 ) cellarrayright{i,7}=3; elseif (cellarrayright{i,6}<3.35) cellarrayright{i,7}=4; elseif (cellarrayright{i,6}>3.35) cellarrayright{i,7}=5; end cellarrayright{i,5}= num2str(cellarrayright{i,5}); cellarrayright{i,6}= num2str(cellarrayright{i,6}); cellarrayright{i,7}= num2str(cellarrayright{i,7}); end count=1; denvar=1; for itemp= 1:numscans for divscan =1:3 ktemp=1; if (divscan==1) jtemp=1; elseif (divscan==2) jtemp=5; elseif (divscan==3) jtemp=9; end for divdeg= 1:20 a1left=[xleft(itemp,jtemp,ktemp),xleft(itemp,jtemp,ktemp+1),xleft(itemp,jtemp,k temp+2),xleft(itemp,jtemp,ktemp+3),xleft(itemp,jtemp,ktemp+4),xleft(itemp,jtemp ,ktemp+5),xleft(itemp,jtemp,ktemp+6),xleft(itemp,jtemp,ktem p+7),xleft(itemp,jte mp,ktemp+8)]; a1right=[xright(itemp,jtemp,ktemp),xright(itemp,jtemp,ktemp+1),xright(itemp,jte mp,ktemp+2),xright(itemp,jtemp,ktemp+3),xright(itemp,jtemp,ktemp+4),xright(item p,jtemp,ktemp+5),xright(itemp,jtemp,ktemp+6) ,xright(itemp,jtemp,ktemp+7),xright (itemp,jtemp,ktemp+8)]; a1left= a1left(a1left~= 0); a1right= a1right(a1right~= 0); PAGE 71 71 lineavgleft{1}= nanmean(a1left); lineavgright{1}= nanmean(a 1right); jtemp=jtemp+1; a2left=[xleft(itemp,jtemp,ktemp),xleft(itemp,jtemp,ktemp+1),xleft(itemp,jtemp,k temp+2),xleft(itemp,jtemp,ktemp+3),xleft(itemp,jtemp,ktemp+4),xleft (itemp,jtemp ,ktemp+5),xleft(itemp,jtemp,ktemp+6),xleft(itemp,jtemp,ktemp+7),xleft(itemp,jte mp,ktemp+8)]; a2right= [xright(itemp,jtemp,ktemp),xright(itemp,jtemp,ktemp+1),xright(itemp,jtemp,ktemp +2),xright(itemp,jtemp,ktemp+3),xright(ite mp,jtemp,ktemp+4),xright(itemp,jtemp, ktemp+5),xright(itemp,jtemp,ktemp+6),xright(itemp,jtemp,ktemp+7),xright(itemp,j temp,ktemp+8)]; a2left= a2left(a2left~= 0); a2right= a2right(a2right~= 0); lineav gleft{2}= nanmean(a2left); lineavgright{2}= nanmean(a2right); jtemp=jtemp+1; a3left=[xleft(itemp,jtemp,ktemp),xleft(itemp,jtemp,ktemp+1),xleft(i temp,jtemp,k temp+2),xleft(itemp,jtemp,ktemp+3),xleft(itemp,jtemp,ktemp+4),xleft(itemp,jtemp ,ktemp+5),xleft(itemp,jtemp,ktemp+6),xleft(itemp,jtemp,ktemp+7),xleft(itemp,jte mp,ktemp+8)]; a3right= [xright(itemp,jtemp,ktemp),xright(itemp,jt emp,ktemp+1),xright(itemp,jtemp,ktemp +2),xright(itemp,jtemp,ktemp+3),xright(itemp,jtemp,ktemp+4),xright(itemp,jtemp, ktemp+5),xright(itemp,jtemp,ktemp+6),xright(itemp,jtemp,ktemp+7),xright(itemp,j temp,ktemp+8)]; a3left= a3left(a3left ~= 0); a3right= a3right(a3right ~= 0); lineavgleft{3}= nanmean(a3left); lineavgright{3}= nanmean(a3right); jtemp=jtemp+1; a4left=[xle ft(itemp,jtemp,ktemp),xleft(itemp,jtemp,ktemp+1),xleft(itemp,jtemp,k temp+2),xleft(itemp,jtemp,ktemp+3),xleft(itemp,jtemp,ktemp+4),xleft(itemp,jtemp ,ktemp+5),xleft(itemp,jtemp,ktemp+6),xleft(itemp,jtemp,ktemp+7),xleft(itemp,jte mp,ktemp+8)]; a4right= [xright(itemp,jtemp,ktemp),xright(itemp,jtemp,ktemp+1),xright(itemp,jtemp,ktemp +2),xright(itemp,jtemp,ktemp+3),xright(itemp,jtemp,ktemp+4),xright(itemp,jtemp, ktemp+5),xright(itemp,jtemp,ktemp+6),xright(itemp,jtemp,ktemp+7),xright(itemp,j temp, ktemp+8)]; a4left= a4left(a4left~= 0); a4right= a4right(a4right~= 0); lineavgleft{4}= nanmean(a4left); PAGE 72 72 lineavgright{4}= nanmean(a4right); jtemp=jtemp+1; if (divscan==1) jtemp=1; else if (divscan==2) jtemp=5; elseif (divscan==3) jtemp=9; end lineavgleft{1}=lineavgleft{1}(lineavgleft{1}~= '0' ); lineavgleft{2}=lineavgleft{2}(li neavgleft{2}~= '0' ); lineavgleft{3}=lineavgleft{3}(lineavgleft{3}~= '0' ); lineavgleft{4}=lineavgleft{4}(lineavgleft{4}~= '0' ); lineavgright{1}=lineavgright{1}(lineavgright{1}~= '0' ); lineavgright{2}=lineavgright{2}(lineavgright{2}~= '0' ); lineavgright{3}=lineavgright{3}(lineavgright{3}~= '0' ); lineavgright{4}=lineavgright{4}(lineavgright{4}~= '0' ); sectionavgleft{count}= nanmean([lineavgleft{1},lineavgleft{2},lineavgleft{3},lineavgleft{4}]); sectionavgright{count}= nanmean([lineavgright{1},lineavgright{2},lineavgright{3},lineavgright{4}]); count=count+1; denvar=denvar+1; ktemp=ktemp+9; end end jtemp=1; end end tintin=1 ; jh=1; tmp1=1; while ( tintin ~= count) DLT= [sectionavgleft{tintin},sectionavgleft{tintin+1},sectionavgleft{tintin+2},secti onavg left{tintin+3},sectionavgleft{tintin+4},sectionavgleft{tintin+5}]; DLT=DLT(DLT~=0); topdenleft{tmp1}= nanmean(DLT); PAGE 73 73 DLM= [sectionavgleft{tintin+6},sectionavgleft{tintin+7},sectionavgleft{tintin+ 8},sec tionavgleft{tintin+9},sectionavgleft{tintin+10},sectionavgleft{tintin+11}]; DLM=DLM(DLM~=0); middenleft{tmp1}= nanmean(DLM); DLB= [sectionavgleft{tintin+12},sectionavgleft{tintin+13},secti onavgleft{tintin+14}, sectionavgleft{tintin+15},sectionavgleft{tintin+16},sectionavgleft{tintin+17},s ectionavgleft{tintin+18},sectionavgleft{tintin+19}]; DLB=DLB(DLB~=0); botdenleft{tmp1}= nanmean(DLB); DRT= [sectionavgright{tintin},sectionavgright{tintin+1},sectionavgright{tintin+2},se ctionavgright{tintin+3},sectionavgright{tintin+4},sectionavgright{tintin+5}]; DRT=DRT(DRT~=0); topdenright{tmp1}= nanmean(DRT); DRM= [sectionavgright{tintin+6},sectionavgright{tintin+7},sectionavgright{tintin+8}, sectionavgright{tintin+9},sectionavgright{tintin+10},sectionavgright{tintin+11} ]; DRM=DRM(DRM~=0); middenright{tmp1}= nanmean(DRM); DRB= [sectionavgright{tintin+12},sectionavgright{tintin+13},sectionavgright{tintin+1 4},sectionavgright{tintin+15},sectionavgright{tintin+16},sectionavgright{tintin +17},sectionavgright{tintin+18},sectionavgright{tintin+19}]; D RB=DRB(DRB~=0); botdenright{tmp1}= nanmean(DRB); tmp1=tmp1+1; tintin=tintin+20; end N = 'NORTHING' ; NS= 'NS' ; EW= 'EW' ; E = 'EASTING' ; vol= 'VOLUME (in meter)' ; hei ght= 'HEIGHT (in meter)' ; cat= 'CATEGORY' ; ar= 'AREA' ; fileleft = sprintf( '%s_left.xls' inputfile); fileright = sprintf( '%s_right.xls' inputfile); denleft = sprintf( '%s_left_Density.xls' inputfile); denright = sprintf( '%s_right_Density.xls' inputfi le); fid = fopen(fileleft, 'w' ); fprintf(fid, '%s \ t%s \ t%s \ t%s \ t%s \ t%s \ t%s \ n' N, NS, E, EW,vol,height,cat); fclose(fid); PAGE 74 74 fid = fopen(fileright, 'w' ); fprintf(fid, '%s \ t%s \ t%s \ t%s \ t%s \ t%s \ t%s \ n' N, NS, E, EW,vol,height,cat); fclose(fid); fid = fopen(de nleft, 'w' ); fprintf(fid, '%s \ t%s \ t%s \ t%s \ t%s \ t%s \ t%s \ t%s \ t%s \ t%s \ n' N, NS, E, EW, 'TOP_DENSITY' 'ZONE' 'MID_DENSITY' 'ZONE' 'LOW_DENSITY' 'ZONE' ); fclose(fid); fid = fopen(denright, 'w' ); fprintf(fid, '%s \ t%s \ t%s \ t%s \ t%s \ t%s \ t%s \ t%s \ t%s \ t%s \ n' N, NS, E, EW, 'TOP_DENSITY' 'ZONE' 'MID_DENSITY' 'ZONE' 'LOW_DENSITY' 'ZONE' ); fclose(fid); myformat= '%1.10e \ t%s \ t%1.10e \ t%s \ t%s \ t%s \ t%s \ n' ; denformat= '%1.10e \ t%s \ t%1.10e \ t%s \ t%d \ t%d \ t%d \ t%d \ t%d \ t%d \ n' ; for i= 1:g fid = fo pen(fileleft, 'a' ); fprintf(fid, myformat, cellarrayleft{i,1},cellarrayleft{i,2},cellarrayleft{i,3},cellarrayleft{i,4},cel larrayleft{i,5},cellarrayleft{i,6},cellarrayleft{i,7}); fclose(fid); fid = fopen(fileright, 'a' ); fprintf(fid, myformat, cellarrayri ght{i,1},cellarrayright{i,2},cellarrayright{i,3},cellarrayright{i,4} ,cellarrayright{i,5},cellarrayright{i,6},cellarrayright{i,7}); fclose(fid); if (((topdenleft{jh})<1000)& ((topdenleft{jh})~=0)) zonetopleft{jh }=1; elseif (((topdenleft{jh})>1000) & ((topdenleft{jh})<2000)) zonetopleft{jh}=2; elseif (((topdenleft{jh})>2000) & ((topdenleft{jh})<3000)) zonetopleft{jh}=3; else zonetopleft{jh}=0; end if (((topdenright{jh})<1000)& ((topdenright{jh})~=0)) zonetopright{jh}=1; elseif (((topdenright{jh})>1000) & ((topdenright{jh})<2000)) zonetopright{jh}=2; elseif (((topdenright{jh})>2000) & ((topdenright{jh})<3000)) zonetopright{jh}=3; PAGE 75 75 else zonetopright{jh}=0; end if (((middenleft{jh})<1000)& ((middenleft{jh})~=0)) zonemidleft{jh}=1; elseif (((middenleft{jh})>1000) & (( midde nleft{jh})<2000)) zonemidleft{jh}=2; elseif (((middenleft{jh})>2000) & ((middenleft{jh})<3000)) zonemidleft{jh}=3; else zonemidleft{jh}=0; end if (((middenright{jh})<1000)& ((middenright{jh})~=0)) zonemidright{jh}=1; elseif (((middenright{jh})>1000) & ((middenright{jh})<2000)) zonemidright{jh}= 2; elseif (((middenright{jh})>2000) & ((middenright{jh})<3000)) zonemidright{jh}=3; else zonemidright{jh}=0; end if ((( botdenle ft{jh})<1000)& (( botdenleft{jh})~=0)) zonelowleft{jh}=1; elseif ((( botdenleft{jh})>1000) & (( botdenleft{jh})<2000)) zonelowleft{jh}=2; elseif (((botdenleft{jh})>2000) & (( bot denleft{jh})<3000)) zonelowleft{jh}=3; else zonelowleft{jh}=0; end if (((botdenright{jh})<1000)& ((botdenright{jh})~=0)) zonelowright{jh}=1; elseif (((botdenright{jh})>1000) & ((botdenright{jh})<2000)) zonelowright{jh}=2; elseif (((botdenright{jh})>2000) & ((botdenright{jh})<3000)) zonelowright{j h}=3; else zonelowright{jh}=0; end if (cellarrayleft{i,6}== '0' ) outtopdenleft{jh}=0; outzonetopleft{jh}=0; outmiddenleft{jh}=0; outzonemidleft{jh}=0; outbotdenleft{jh}=0; outzonelowleft{jh}=0; else outtopdenleft{jh}=topdenleft{jh}; outzonetopleft{jh}=zonetopleft{jh}; outmiddenleft{jh}=middenleft{jh}; outzonemidleft{jh}=zonemidleft{jh}; outbotdenleft{jh}=botdenleft{jh}; outzonelowleft{jh}=zonelo wleft{jh}; end PAGE 76 76 if (cellarrayright{i,6}== '0' ) outtopdenright{jh}=0; outzonetopright{jh}=0; outmiddenright{jh}=0; outzonemidright{jh}=0; outbotdenright{jh}=0; outzonelowright{jh}=0; else outtopdenright{jh}=topdenright{jh}; outzonetopright{jh}=zonetopright{jh}; outmiddenright{jh}=middenright{jh}; outzonemidright{jh}=zonemidright{jh}; outbotdenright{jh}=botdenright{jh}; outzonelowright{jh}=zonelowright{jh}; end if (isnan(outtopdenleft{jh})  outtopdenleft{jh}== '' ) outtopdenleft{jh}=0 ; end if (isnan(outmiddenleft{jh}) outmiddenleft{jh}== '' ) outmiddenleft{jh}=0 ; end if (isnan(outbotdenleft{jh}) outbotdenleft{jh}== '' ) outbotdenleft{jh}=0 ; end if (isnan(outtopdenright{jh}) outtopdenright{jh}== '' ) outtop denright{jh}=0 ; end if (isnan(outmiddenright{jh}) outmiddenright{jh}== '' ) outmiddenright{jh}=0 ; end if (isnan(outbotdenright{jh}) outbotdenright{jh}== '' ) outbotdenright{jh}=0 ; end fid = fopen(denleft, 'a' ); fprintf(fid, denformat, cellarrayleft{i,1},cellarrayleft{i,2},cellarrayleft{i,3},cellarrayleft{i,4},out topdenleft{j h}, outzonetopleft{jh},outmiddenleft{jh}, outzonemidleft{jh},outbotdenleft{jh}, outzonelowleft{jh}); fclose(fid); fid = fopen(denright, 'a' ); fprintf(fid, denformat, cellarrayright{i,1},cellarrayright{i ,2},cellarrayright{i,3},cellarrayright{i,4} ,outtopdenright{jh}, outzonetopright{jh},outmiddenright{jh}, outzonemidright{jh},outbotdenright{jh}, outzonelowright{jh}); fclose(fid); if (mod(i,6)==0) jh=jh+1; end end PAGE 77 77 APPENDIX B JAVA CODE FOR HEIGHT, VOLUME AND DENSITY CALCULATION package Canopychar; import java.io.*; import java.util.*; public class Canopychar { public static int numlines=0;// number of lines in the csv file public static int numscans;// number of scans public static String[][] completefiledata= new String[25000][190];// complete data of the file in an array publ ic static String[][] data= new String[25000][190];// complete data of the file without the headings in an array public static double latdivide, ld1,ld,gd1,gd,ld1gga, ldgga, gd1gga, gdgga; public static double longdivide; public static double latdividegga; public static double longdividegga; public static double[][][] leftdata = new double[4000][12][181]; public static double[][][] rightreading= new double[4000][12][181]; public static double[][][] leftreading= new double[4 000][12][181]; public static double[][][] rightdata= new double[4000][12][181]; public static double[][] cellarrayleft = new double[15000][8]; public static double[][] cellarrayright = new double[15000][8]; public static double[][] sdlo wleft = new double[15000][12]; public static double[][] sdlowright = new double[15000][12]; public static double[][] sdtopleft = new double[15000][12]; public static double[][] sdtopright = new double[15000][12]; public static double[][ ] sdmidleft = new double[15000][12]; public static double[][] sdmidright = new double[15000][12]; public static double distance=8000; public static double TD=distance/2; public static int SH = 500, gf;// laser height above the ground public static double dt= 0.0833; public static double[][][] xleft= new double[4000][12][181]; public static double[][][] yleft= new double[4000][12][181]; public static double[][][] xright= new double[4000][12][181]; public static do uble[][][] yright= new double[4000][12][181]; public static String GPSstring; public static double degreelat,temp1,deglat,temp2,deglong,deglat1,deglong1,deglatdiv,deglongdiv,degreelon g, mean; public static double[][] hleft= new double [4000] [12]; public static double[][] hright= new double [4000][12]; public static double[][] Arealeft= new double [4000][12]; PAGE 78 78 public static double[][] Arearight= new double [4000][12]; public static double[] khright= new double [12]; public static double[]khleft= new double [12]; public static ArrayList PAGE 79 79 public static ArrayList PAGE 80 80 public static void main(String[] args) throws FileNotFoundException, IOExce ption { Scanner in = new Scanner(System.in); System.out.print("Enter input filename filename with extension: "); String filename = in.nextLine(); File inputfile = new File(filename); InputStream is = new BufferedIn putStream(new FileInputStream(inputfile)); System.gc(); BufferedReader br = new BufferedReader(new FileReader(inputfile)); String line = null; int row = 0; int col = 182; int colcnt; whil e((line = br.readLine()) != null) { colcnt=0; StringTokenizer st = new StringTokenizer(line,","); while (st.hasMoreTokens()) { //get next token and store it in the array comple tefiledata[row][colcnt] = st.nextToken(); colcnt++; } row++; } numlines=row 9; numscans=numlines/26; //close the file br.close(); int m=0; int n=0; for (int i = 9; i PAGE 81 81 n=n+1; } m=m+1; } int ldataindex=1; int rdataindex=13; for(int i=0; i PAGE 82 82 { for(int j=0;j<12;j++) { m=180; for(int k=0; k <181; k++) { rightdata[i][j][k]= rightreading[i][j][m]; m=m 1; } } } } for (int i=0; i PAGE 83 83 } for (int i=0; i PAGE 84 84 else { xri ght[i][j][k]= Math.abs(rightdata[i][j][k]*Math.cos(Math.toRadians(k))); yright[i][j][k]= Math.abs(rightdata[i][j][k]*Math.sin(Math.toRadians(k))); } } Arrays.sort(yleft[i][j]); Arrays.sort(yright[i][j]); hleft[i][j]= yleft[i][j][180]; hright[i][j]=yright[i][j][180]; } } int f=9; int d=0; for (int i=0;i PAGE 85 85 gd1gga= (Math.floor(longdividegga/100)*100); gdgga= (Math.floor(longdividegga/100)); if(i PAGE 86 86 { temp1= Double.parseDouble(data[d+26][2]); } deglat= (((degreelat ld1)/60) +ld); deglat1= (((temp1 ld1)/60)+ ld); degreelong= Double.parseDouble(data[d][4]); if(i PAGE 87 87 { getit=0; } for(int ak=0;ak< 180;ak++) { if (ak==179) { if(xleft[i][j][179] PAGE 88 88 Arealeft[i][j]= Arealeft[i][j]+ (Math.abs( ((TD xleft[i][j][ak])*(yleft[i][j][ak+1])) ((TD xleft[i][j][ak+1])*(yleft[i][j][ak])))); } if((xright[i][j][ak] PAGE 89 89 } else { cellarrayright[t][5]= 0; cellarrayright[t][4]= 0; } if(j==0) { cellarrayleft[t][0]=Math.abs(deglat); cellarrayleft[t][2]=Math.abs(deglong); cellarrayright[t][0]=Math.abs(deglat); cellarrayright[t][2]=Math.abs(deglong); } else { cellarrayleft[t][0]= cellarrayleft[t 1][0]+deglatdiv; cellarrayright[t][0]= cellarrayright[t 1][0]+deglatdiv; cellarrayleft[t][2]= cellarrayleft[t 1][2]+deglongdiv; cellarrayright[t][2]= cellarrayright[t 1][2]+deglongdiv; } if((cellarrayleft[t][4]==0)(cellarrayleft[t][5]==0)) { cellarrayleft[t][5]=0;cellar rayleft[t][4]=0; } if((cellarrayright[t][4]==0)(cellarrayright[t][5]==0)) { cellarrayright[t][5]=0;cellarrayright[t][4]=0; } if(GPSstring.equals("$GPGGA")) { dlat= data[0][2]; dlong=data[0][4]; } else if(GPSstring.equals("$GPRMC")GPSstring.equals("$GNRMC")) { dlat= data[0][3]; dlong=data[0][5]; } PAGE 90 90 if(dlat.equals("N")) { cellarrayleft[t][0]= M ath.abs(cellarrayleft[t][0]); cellarrayright[t][0]= Math.abs(cellarrayright[t][0]); } else { cellarrayleft[t][0]= Math.abs(cella rrayleft[t][0]); cellarrayright[t][0]= Math.abs(cellarrayright[t][0]); } if(dlong.equals("W")) { cellarrayleft[t][2]= Math. abs(cellarrayleft[t][2]); cellarrayright[t][2]= Math.abs(cellarrayright[t][2]); } else { cellarrayleft[t][2]= Math.abs(cellar rayleft[t][2]); cellarrayright[t][2]= Math.abs(cellarrayright[t][2]); } t=t+1; } } // ===============================================Density Ca lculation=============================================== for (int itemp=0; itemp PAGE 91 91 a1left.add(xleft [itemp][jtemp][ktemp]);a1left.add(xleft[itemp][jtemp][ktemp+1]); a1left.add(xleft[itemp][jtemp][ktemp+2]);a1left.add(xleft[itemp][jtemp][ktemp+3]); a1left.add(xleft[itemp][jtemp][ktemp+4]);a1left.add(xleft[itemp][j temp][ktemp+5]); a1left.add(xleft[itemp][jtemp][ktemp+6]);a1left.add(xleft[itemp][jtemp][ktemp+7]); a1left.add(xleft[itemp][jtemp][ktemp+8]); a1right.add(xright[itemp][jtemp][ktemp]);a1right.a dd(xright[itemp][jtemp][ktemp+1]); a1right.add(xright[itemp][jtemp][ktemp+2]);a1right.add(xright[itemp][jtemp][ktemp+3]); a1right.add(xright[itemp][jtemp][ktemp+4]);a1right.add(xright[itemp][jtemp][ktemp+5]); a1right.add(xright[itemp][jtemp][ktemp+6]);a1right.add(xright[itemp][jtemp][ktemp+7]); a1right.add(xright[itemp][jtemp][ktemp+8]); jtemp=jtemp+1; lineavgleft[0]= mean(a1left); lineavgright[0]= mean(a1right); a2left.add(xleft[itemp][jtemp][ktemp]);a2left.add(xleft[itemp][jtemp][ktemp+1]); a2left.add(xleft[itemp][jtemp][ktemp+2]);a2left.add(xleft[itemp][jtemp][ktemp+ 3]); a2left.add(xleft[itemp][jtemp][ktemp+4]);a2left.add(xleft[itemp][jtemp][ktemp+5]); a2left.add(xleft[itemp][jtemp][ktemp+6]);a2left.add(xleft[itemp][jtemp][ktemp+7]); a2left.add(xleft[itemp ][jtemp][ktemp+8]); a2right.add(xright[itemp][jtemp][ktemp]);a2right.add(xright[itemp][jtemp][ktemp+1]); a2right.add(xright[itemp][jtemp][ktemp+2]);a2right.add(xright[itemp][jtemp][ktemp+3]); a2right.add(xright[itemp][jtemp][ktemp+4]);a2right.add(xright[itemp][jtemp][ktemp+5]); a2right.add(xright[itemp][jtemp][ktemp+6]);a2right.add(xright[itemp][jtemp][ktemp+7]); a2right.add(xright[itemp][jtemp][ktemp+8 ]); jtemp=jtemp+1; PAGE 92 92 lineavgleft[1]= mean(a2left); lineavgright[1]= mean(a2right); a3left.add(xleft[itemp][jtemp][ktemp]);a3left.add(xleft[itemp][jtemp][ktemp+1]); a3left.add(xleft[itemp][jtemp][ktemp+2]);a3left.add(xleft[itemp][jtemp][ktemp+3]); a3left.add(xleft[itemp][jtemp][ktemp+4]);a3left.add(xleft[itemp][jtemp][ktemp+5]); a3left.add(xleft[itemp][jtemp][kte mp+6]);a3left.add(xleft[itemp][jtemp][ktemp+7]); a3left.add(xleft[itemp][jtemp][ktemp+8]); a3right.add(xright[itemp][jtemp][ktemp]);a3right.add(xright[itemp][jtemp][ktemp+1]); a3right.add(xrig ht[itemp][jtemp][ktemp+2]);a3right.add(xright[itemp][jtemp][ktemp+3]); a3right.add(xright[itemp][jtemp][ktemp+4]);a3right.add(xright[itemp][jtemp][ktemp+5]); a3right.add(xright[itemp][jtemp][ktemp+6]);a3right.add(x right[itemp][jtemp][ktemp+7]); a3right.add(xright[itemp][jtemp][ktemp+8]); jtemp=jtemp+1; lineavgleft[2]= mean(a3left); lineavgright[2]= mean(a3right); a4left.add(xleft[itemp][jtemp][ktemp]);a4left.add(xleft[itemp][jtemp][ktemp+1]); a4left.add(xleft[itemp][jtemp][ktemp+2]);a4left.add(xleft[itemp][jtemp][ktemp+3]); a4left.add(xleft[itemp][jtemp][ktemp+4]);a4lef t.add(xleft[itemp][jtemp][ktemp+5]); a4left.add(xleft[itemp][jtemp][ktemp+6]);a4left.add(xleft[itemp][jtemp][ktemp+7]); a4left.add(xleft[itemp][jtemp][ktemp+8]); a4right.add(xright[itemp][jtem p][ktemp]);a4right.add(xright[itemp][jtemp][ktemp+1]); a4right.add(xright[itemp][jtemp][ktemp+2]);a4right.add(xright[itemp][jtemp][ktemp+3]); a4right.add(xright[itemp][jtemp][ktemp+4]);a4right.add(xright[itemp][jte mp][ktemp+5]); PAGE 93 93 a4right.add(xright[itemp][jtemp][ktemp+6]);a4right.add(xright[itemp][jtemp][ktemp+7]); a4right.add(xright[itemp][jtemp][ktemp+8]); jtemp=jtemp+1; lineavglef t[3]= mean(a4left); lineavgright[3]= mean(a4right); if(divscan==0) jtemp=0; else if(divscan==1) jtemp=4; else if(divscan==2) jtemp=8; Aleft.add( lineavgleft[0]);Aleft.add(lineavgleft[1]);Aleft.add(lineavgleft[2]);Aleft.add(lineavgle ft[3]); sectionavgleft[count]= mean(Aleft); Aright.add(lineavgright[0]);Aright.add(lineavgright[1]);Aright.add(lineavgright[2 ]);Aright.add (lineavgright[3]); sectionavgright[count]= mean(Aright); count=count+1; denvar=denvar+1; a1left.clear();a2left.clear();a3left.clear();a4left.clear();Alef t.clear(); a1right.clear();a2right.clear();a3right.clear();a4right.clear();Aright.clear(); ktemp=ktemp+9; } } jtemp=0; } int tintin=0 ; tmp=0; int tmp1=0; while( tintin != count) { Dleft.add(sectionavgleft[tintin]);Dleft.add(sectionavgleft[tintin+1]);Dleft.add(sectionavgleft[t intin+2]);Dleft.add(sectionavgleft[tintin+3]); Dleft.add(sectionavgleft[tintin+4]);Dleft.add(sectionavgleft[tintin+5]);Dleft.add(sectionavgle ft[tintin+6]);Dleft.add(sectionavgleft[tintin+7]); PAGE 94 94 Dleft.add(sectionavgleft[tintin+8]);Dleft.add(sectionavgleft[tintin+9]);Dleft.add(sectionav gle ft[tintin+10]);Dleft.add(sectionavgleft[tintin+11]); Dleft.add(sectionavgleft[tintin+12]);Dleft.add(sectionavgleft[tintin+13]);Dleft.add(sectionav gleft[tintin+14]);Dleft.add(sectionavgleft[tintin+15]); Dleft.add(sectionavgl eft[tintin+16]);Dleft.add(sectionavgleft[tintin+17]);Dleft.add(sectionav gleft[tintin+18]);Dleft.add(sectionavgleft[tintin+19]); DL.add(Dleft.get(0));DL.add(Dleft.get(1));DL.add(Dleft.get(2)); DL.add(Dleft.get(3));DL.add(Dleft .get(4));DL.add(Dleft.get(5)); topdenleft[tmp1]= mean(DL); DL.clear(); DL.add(Dleft.get(6));DL.add(Dleft.get(7));DL.add(Dleft.get(8)); DL.add(Dleft.get(9));DL.add(Dleft.get(10));DL.add(Dleft.get( 11)); middenleft[tmp1]= mean(DL); DL.clear(); DL.add(Dleft.get(12));DL.add(Dleft.get(13));DL.add(Dleft.get(14)); DL.add(Dleft.get(15));DL.add(Dleft.get(16));DL.add(Dleft.get(17)); DL.add(Dleft.get(18));DL.add(Dleft.get(19)); botdenleft[tmp1]= mean(DL); DL.clear(); denleft[tmp]= mean(Dleft); Dleft.clear(); Dright.add(sectionavgright[tintin]);Dright.add(sec tionavgright[tintin+1]);Dright.add(sectiona vgright[tintin+2]);Dright.add(sectionavgright[tintin+3]); Dright.add(sectionavgright[tintin+4]);Dright.add(sectionavgright[tintin+5]);Dright.add(sectio navgright[tintin+6]);Dright.add(sectionavgright [tintin+7]); Dright.add(sectionavgright[tintin+8]);Dright.add(sectionavgright[tintin+9]);Dright.add(sectio navgright[tintin+10]);Dright.add(sectionavgright[tintin+11]); Dright.add(sectionavgright[tintin+12]);Dright.add(sectiona vgright[tintin+13]);Dright.add(se ctionavgright[tintin+14]);Dright.add(sectionavgright[tintin+15]); Dright.add(sectionavgright[tintin+16]);Dright.add(sectionavgright[tintin+17]);Dright.add(se ctionavgright[tintin+18]);Dright.add(sectionavgrigh t[tintin+19]); DR.add(Dright.get(0));DR.add(Dright.get(1));DR.add(Dright.get(2)); DR.add(Dright.get(3));DR.add(Dright.get(4));DR.add(Dright.get(5)); PAGE 95 95 topdenright[tmp1]= mean(DR); DR.clear(); DR.add(Dright.get(6));DR.add(Dright.get(7));DR.add(Dright.get(8)); DR.add(Dright.get(9));DR.add(Dright.get(10));DR.add(Dright.get(11)); middenright[tmp1]= mean(DR); DR.clear(); DR.add( Dright.get(12));DR.add(Dright.get(13));DR.add(Dright.get(14)); DR.add(Dright.get(15));DR.add(Dright.get(16));DR.add(Dright.get(17)); DR.add(Dright.get(18));DR.add(Dright.get(19)); botdenright[tmp1]= mean(DR); DR.clear(); tmp1=tmp1+1; denright[tmp]= mean(Dright); Dright.clear(); tmp=tmp+1; tintin=tintin+20; } // Yield estimation manual calculation get the denleft and denright in top, mid bottom, 6 sections each for top mid bottom //=================================================================== ================================================= g= numscans*12; for(int i=0;i PAGE 96 96 else if (cellarrayleft[i][5]< 2.74) cellarrayleft[i][6]=3; else if (cellarrayleft[i][5]< 3.35) cellarrayleft[i][6]=4; else if (cellarrayleft[i][5]> 3.35) cellarrayleft[i][6]=5; if (cellarrayright[i][5]< 0.5) cellarrayright[i][6]=0; else if (cellarrayright[i][5]< 1.2) cellarrayright[i][6]=1; else if (cellarrayright[i][5]< 2.13) cellarrayright[i][6]=2; else if (cellarrayright[i][5]< 2.74) cellarrayright[i][6]=3; else if (cellarrayright[i][5]< 3.35) cellarrayright[i][6]=4; else if (cellarrayright[i][5]> 3.35) cellarrayright[i][6]=5; } outputfileleft = filename+"_left.txt"; outputfileright = filename+"_right.txt"; densityfileleft= filename+"_DENSITY_LEFT.txt"; densityfileright= filename+"_DENSITY_RIGHT.txt"; Fil e fileleft = new File(outputfileleft); File fileright = new File(outputfileright); File dencalcleft = new File(densityfileleft); File dencalcright = new File(densityfileright); PrintWriter outleft = n ew PrintWriter(new FileWriter(fileleft)); PrintWriter outright = new PrintWriter(new FileWriter(fileright)); PrintWriter outdensityleft = new PrintWriter(new FileWriter(dencalcleft)); PrintWriter outdensityright = new PrintWriter(new FileWriter(dencalcright)); outleft.print(N+" \ t"+ NS+ \ t" + E + \ t"+ EW + \ t" + vol + \ t" + height + \ t" + cat+ \ n \ n"); outright.print(N+" \ t"+ NS+ \ t" + E + \ t"+ EW + \ t" + vol + \ t" + height + \ t" + cat+ \ n \ n"); PAGE 97 97 for(int i=0;i PAGE 98 98 else if(((botdenright[jh])>1000) & ((botdenright[jh])<2000)) zonelowright[jh]=2; else if(((botdenright[jh])>2000) & ((botdenright[jh])<3000))zonelowright[jh]=3; if(cellarrayleft[i][4]==0) { outtopdenleft[jh]=0; outzonetopleft[jh]=0; outmiddenleft[jh]=0; outzonemidleft[jh]=0; outbotdenleft[jh]=0; outzonelowleft[jh]=0; } else { outtopdenleft[jh]=topdenleft[jh]; outzonetopl eft[jh]=zonetopleft[jh]; outmiddenleft[jh]=middenleft[jh]; outzonemidleft[jh]=zonemidleft[jh]; outbotdenleft[jh]=botdenleft[jh]; outzonelowleft[jh]=zonelowleft[jh]; } if(cella rrayright[i][4]==0) { outtopdenright[jh]=0; outzonetopright[jh]=0; outmiddenright[jh]=0; outzonemidright[jh]=0; outbotdenright[jh]=0; outzonelowright[jh]=0; } else { outtopdenright[jh]=topdenright[jh]; outzonetopright[jh]=zonetopright[jh]; outmiddenright[jh]=middenright[jh]; outzonemidright[jh]=zonemidright[jh]; outbotdenright[jh]=botdenright[jh]; outzonelowright[jh]=zonelowright[jh]; } outdensityleft.print(cellarrayleft[i][0]+" \ t"+dlat+" \ t"+cellarrayleft[i][2]+" \ t"+dlong+" \ t"+ outtopdenleft[jh]+" \ t"+ outzonetopleft[jh]+" \ t"+outmiddenleft[jh]+" \ t"+ outzonemidleft[jh]+" \ t"+outbotdenleft[jh]+" \ t"+ outzonelowleft[jh]+" \ n"); outdensityright.print(cellarrayright[i][0]+" \ t"+dlat+" \ t"+cellarrayright[i][2]+" \ t"+dlong+" \ t"+outt opdenright[jh]+ \ t"+ outzonetopright[jh]+" \ t"+outmiddenright[jh]+" \ t"+ outzonemidright[jh]+" \ t"+outbotdenright[jh]+" \ t"+ outzonelowright[jh]+" \ n"); if(i%4==0) { jh=jh+1; } } outdensityleft.close(); outdensityright.close(); PAGE 99 99 } public static double mean(ArrayList PAGE 100 100 sum=0;sumsd=0; for(int h=0;h PAGE 101 101 LIST OF REFERENCES Baldocch i, D. D., and J S. Amthor. 2001. Canopy p hotosynthesis: h istory, measurements, and m odels. In Terrestrial Global Productivity 9 25 Academic Press. Boysen Jensen, P. 1918. Studi es on the production of matter in light and shadow plants. Bot. Tidskr 36 : 219 262 Fernndez Sarra, A., L. Martnez, B. Velzquez Mart, M. Sajdak, J. Estornell, and J. A. Recio. 2013. Different methodologies fo r calculating crown volumes of p latanus his panica trees using terrestrial laser scanner and a comparison with classical dendrometric measurements Computers and Electronics in Agriculture 90: 176 185. Henrici, M. 1921 Verb. n aturforsch. Ges. Basel 32 : 107 168 Lee, K. H., and R. Ehsani. 2009. A l a ser s canner based m easurement s ystem for q u antification of citrus tree geometric c haracteristics Applied Engineering in Agriculture 25(5): 777 788. Llorens, J., E Gil, J Llop and A Esco l. 2011. Ultrasonic and LIDAR sensors for electronic c anopy chara cterization in v ineyards: Advances to improve p esticide application m ethods. Sensors 11(2) : 2177 2194. Lundegardh, H. 1922 Neuc a pparate zur analyse de kohlensauregehalts der l uft. Biochem Z. 131: 109 115. Polo, J. R. R., R Sana, J Llorens, J Arn, A Escol, M Ribes Dasi, J Masip, F Camp, F Grcia, F Solanelles, T Pallej, L Val, S Planas, E Gil, and J Palacn. 2008. A tractor mounted scanning LIDAR for the non destructive measurement of vegetative volume and surface area of tree row plantat ions: A comparison with conventional destructive measurements. Biosystems Engineering 102: 128 134. Rosel l J. R., and R. Sanz. 2012. A review of methods and applications of the geometric characterisation of tree crops in agricultural activities. Computers and Electronics in Agriculture 81: 124 141. Rose l l, J. R., J Llorens R Sanz, J Arn, M Ribes Dasi, J Masip, A Escol, F Camp, F Solanelles, F Grcia, E Gil, L Val, S Planas, and J Palacn. 2009. Obtaining the three dimensional structure of t ree orchards from remote 2D terrestrial LIDAR scanning. Agricultural and Forest Meteorology 149: 1505 1515. Sanz, R., J. R. Rosell, J. Llorens, E. Gil, and S. Planas. 2013. Relationship between tree row LIDAR volume a nd leaf area density for fruit o rchards and vine yards obtained with a LIDAR 3D d ynamic measurement system. Agricultural and Forest Meteorology 171 172: 153 162. PAGE 102 102 Schumann, A. W and Q. U. Zaman. 2005. Software development for real time ultrasonic mapping of tree canopy size. Computers and Elect ronics in Agriculture 47: 25 40. Tucker, D. P. H., T. A. Wheaton, and R. P. Muraro. 1994. Citrus tree pruning principles and p ractices. Fact Sheet HS 144. Tumbo, S. D., M. Salyani, J. D. Whitney, T. A. Wheaton, and W M. Miller. 2002. Investigation of l ase r and ultrasonic r anging sensors for measurements of citrus canopy volume. Applied Engineering in Agriculture 18(3): 367 372. Wei, J., and M. S alyani. 2004. Development of a laser s ca nner for measuring tree canopy c haracteri stics: phase 1. p rototype d evelo pment. Transactions of the ASAE 47(6): 2101 2107. Ye, X., K Sakai, A Sasao, and S Asada. 2008. Potential of airborne hyperspectral imagery to estimate fruit yield in citrus. Chemometrics and Intelligent Laboratory Systems 90: 132 144. Zaman, Q. U., A. W Schumann, and H K. Hostler. 2006. Estimation o f citrus f ruit y ield using ultrasonically sensed tree s ize. Applied Engineering in Agriculture 22(1): 39 44. Zaman, Q. U., and M. Salyani. 2004. Ultrasoni c measurement o f citrus tree v olume. Applied Engineer ing in Agriculture 20(2) : 173 178 PAGE 103 103 BIOGRAPHICAL SKETCH Akshatha R Shenoy was born to Mr. K. Ramesh Shenoy and Mrs. Asha R Shenoy in India. She studied at the Amrita Vishwavidyapeetham Univeristy, Amrita School Of Engineering Bangalore Campus from 2004 2 008. She was awarded the degree in Bachelor of Technolgy c omputer s ci e nce in April 2008. She worked with T ata Consultancy Services (TCS) as a Software Systems Engineer from 2008 to 2010 in Bangalore, India She quit the job at TCS in December 2010 to pursue her higher education at the University of Florida. She pursued a concurrent degree in agricultural and biological engineering and computer science and e ngineering at the U niversity of Florida from January 2011 August 2013. 