Friday, December 8, 2017

Field Activity #11 Pix4D Processing UAS Data W/O GCPs

Introduction
Pix4Dmapper software is a package that helps process drone data with photogrammetry and computer vision algorithms. It creates 3D, 2D, Orthomosaic, DSM, Point Clouds, and other images. In this lab Pix4Dmapper was used to run processes on drone areal images to create an orthomosaic and DSM. The areal images were taken on 9/30/2016 with a DJI Phantom 3 drone at 80 meters elevation over the Litchfield mine in Eau Claire, WI. Field Activity #3 in this blog covers the details of the mission. Since this data was covered before Ground Points were established in the area of study shown in Figure 1. The main objective of this lab will be analyzing the datum issue in regards of lack of GCP's. 

Figure 1. Litchfield Mine; area of study

GCPs are not required for use in Pix4D; however, they are recommended to improve the accuracy and georeferenced of reconstructing the area of study in respect to the elevation. Other criteria's that had to be taken into consideration during the gathering the data onsite was the terrain, number of flights needed to cover the area, and imagery. For Pix4D the recommended overlap is at least 75% frontal overlap (with respect to the flight direction) and at least 60% side overlap (between flying tracks) and flying in a grid pattern, Figure 2. shows this. 


Figure 2. grid pattern

Since the terrain of the area of study was sand this enhanced the recommended overlap. Sand mines are large uniform terrains in this case, a frontal overlap of at least 85% and 70% of side overlap should be used. This exposes the area to as much detail as possible of the sand and size of the area. With the use of drones and processing of Pix4D consideration of how many flights to cover the area should be in the flight plan. Since drones only have so much flight time with their batteries they need to take multiple flights depending on the area of study and have enough areal images to overlap to create a full panorama image. Besides the the amount of flights the areal images of the area needed to be addressed. That is should they be done with oblique or nadir images. Pix4D can process both of these imagery's; however, in the actual drone flight the pilot needs to consider which method they will take to know the angle of the images.


Methods 
The first step taken was to Create a New Project in Pix4DMapper. From the next screen it prompts the used to create/browse for a file to extract the data from. Professor Hupy exported the data ahead of time from the drone and into a folder that was able to be connected to. The new folder location was then named appropriately for good data management of ever recollecting it i.e. date, drone, location, and elevation. Before uploading the areal images they were looked over to make sure there were only areal images seen from 80 meters of the mine rather than the takeoff or landing of the drone. From here all of the areal images were uploaded. Next, the image properties window popped up, from this window the CS (supposedly) used and geocoded images are shown in Figure 3. As mentioned by Professor Hupy, defaults can never be trusted when pertaining to equipment usage. Therefore the Selected Camera Model was edited. The Shutter Model was changed from Global Shutter to Linear Rolling Shutter. This means that instead of the shutter of the camera scanning the whole area of study simultaneously it scanned is sequentially from top to bottom, like a scanner or copy machine.

Figure 3. Image Properties

Next, the screen prompted for a selected output CS since most software's allow for reprojection i.e. ArcGIS, the data was left on Auto Detected. Form the final step was selecting a template to have the areal images process into. 3D Maps were chosen for the purpose of this lab displaying orthomosaic and DSM analysis. 



Figure 4. Processing outline


After finishing the perimeters for the modal, the data points/locations of areal images can be seen in Figure 4. Indicated by the red circles presented themselves. Looking at all the areal images and where the actual Litchfield mine was located it was decided to allow the mine and disregard the rest of the data points/areal images. This would help cut down in processing time and since the DJI Phantom 3 sensor lenses cannot differentiate movement the images would not come out clear anyways. Next, the following steps consisted of setting the Processing Options. Referring to Figure 5. The Raster DMS Geotiff method was changed to triangulation. This method was found to have slightly better details than any other method. It did however add onto the processing time a little.


Figure 5. Triangulation method


Then clicking on the Additional Outputs tab and going down to the Contour Lines header, the following were changed; Elevation Interval-2 Resolution -50 Minimum Line Size- 100, as shown Figure 6. This was done to help create a better geotiff image of the area of study.


Figure 6. Contour Lines


Finally, Processing was ready to be started. For the first time running only the Initial Processing was run to retrieve the report shown in Figure 7. Quality Report. Looking at Figure 7. The Quality Report didn't come back 100% checked out. Looking at Figure 1. On the bottom and Figure 7. A large section of areal images were not registered. Also, referring to Figure 8. The areas of red indicate error. Since these areas were not in the Litchfield mine and wouldn't disrupt the data the author of this blog decided to move on with the processes. Also, since GCPs were not used they also came up with an error but not The Point Cloud and Mesh and DSM, Orthomosiac and Index Processes were run. In total the 3 Processing stages took close to 3 hours to run. In this case Pix4D does have rapid check that could be used. This process option outweighs the time of processing to the accuracy of the detail of imagery. In this case the author of this blog felt that using this method would deter from the objective of the lab stated in the introduction. 


Figure 7. Quality Report


Figure 8. Ray Cloud 


Results/Discussion
The Figure 9. Shows a DSM of Litchfield Mine. The higher elevations in this DSM could indicate sand piles or equipment at the site. The areal images of the area were taken at 80 meters. The edges northwest side and southeast side of the DSM show up low elevation. However this isn't exactly the case especially when comparing it to Figure 10. There are actually trees on the southeast side and a body of water on the northeast side. Since the DJI Phantom 3 sensor lenses cannot differentiate the motion of water and reflection of sunlight the elevation data is inaccurate on the northwest side. Also, with the tree canopies on the southeast side the sensor lenses do not distinguish well with the movement of tree canopies. 
Figure 9. DSM of Litchfield Mine
Figure 10. Shows an Orthomosaic of Litchfield Mine. This map shows the shape and sizes of the sand piles. It also does a great job with distinguishing between what is vegetation and other inanimate objects, the color as well adds onto this. On the eastern half of the map the area is a little darker in gradient and appears to give a 3D effect to the image. This could be from cloud coverage during the drone's flight path.


Figure 10. Orthomosaic of Litchfield Mine

Conclusion
These maps created show a good general area of study with drone imagery; however with analysis of the Litchfield sand mine these maps and processes done cannot be used. That is because there were no GCPs in this analysis, meaning the z-elevation is off. This is a drastic issue considering that Sand mines are looking into the size and amount of their products of the piles. If modals do not have GCPs they have no datum to measure off the elevation factor and then companies do not have the ability to analysis their stock piles of product and revenue.

    
Reference
https://www.bhphotovideo.com/explora/video/tips-and-solutions/rolling-shutter-versus-global-shutter

https://pix4d.com/product/pix4dmapper-photogrammetry-software/#

https://support.pix4d.com/hc/en-us/articles/204272989-Offline-Getting-Started-and-Manual-pdf-#gsc.tab=0

Sunday, December 3, 2017

Field Activity #10 Sand Survey

Introduction
This field activity is of data processed from Field Activity #1. Field Activity #1 was creating a Digital Elevation Surface in a sandbox at the University of Wisconsin-Eau Claire. The basic overall idea was to create an elevation surface within a sandbox and create sample points based on elevation. The terrain had to include: ridge, hill, depression, valley, and a plain. The author of this blog and group members decided to replicate a continental shelf/ ocean floor landscape. In total 361 data points were gathered from an area of 114cm squared grid. This help create the data to be normalized. Normalization is the process of organizing data in a clear and non-redundant manner for use. Since the data points were already measured in x,y,z the data was already normalized by using negative and positive numbers displaying the z-elevation. Figure 1. Shows the sand data points normalized. For the grid sampling a systematic sampling method was used that created an easy way to gather data and allow for the use of interpolation on it. Using different interpolations on the data created 3D models that exhibited how each interpolation interpreted the data with varying rules implied. Using the interpolations of the data will help distinguish the best one to exhibit the sandbox data points. The required interpolations to use were:  IDW, Natural Neighbors, Kriging, Spline, and TIN.

Figure 1. Sand data points example
Methods 
The first step was to import the x,y,z data points in an excel file to ArcMap by going go File--> Add XY Data. Since the data was taken with a cadastral or unknown/none coordinate system it did not have to be projected in any way. Figure 2. Shows the sand data points in the grid format and color coded blue for the ocean in compliance with the elevation difference in a continental shelf/ocean floor. The data came in as shapefile and then was exported as a feature class in a file geodatabase to run tools on and analyze the data easier.

Figure 2. sand points in grid format

The Interpolation tools used were found under the 3D Analyst-Tools-->Raster Interpolation--> IDW, Kriging, Natural Neighbour, and Spline. TIN was found under 3D Analyst Tools-->Data Management--> TIN--> Create TIN.
A description of the tools used are listed as followed from Esri's GIS Dictionary and ArcGIS Pro Tool Reference.

"IDW (Inverse Distance Weighted) tool uses a method of interpolation that estimates cell values by averaging the values of sample data points in the neighborhood of each processing cell. The closer a point is to the center of the cell being estimated, the more influence, or weight, it has in the averaging process" (Esri 2017)

"Kriging is an advanced geostatistical procedure that generates an estimated surface from a scattered set of points with z-values. More so than other interpolation methods, a thorough investigation of the spatial behavior of the phenomenon represented by the z-values should be done before you select the best estimation method for generating the output surface" (Esri 2017).

"Natural Neighbor interpolation finds the closest subset of input samples to a query point and applies weights to them based on proportionate areas to interpolate a value (Sibson, 1981). It is also known as Sibson or "area-stealing" interpolation" (Esri 2017).

"Spline interpolation method estimates values using a mathematical function that minimizes overall surface curvature, resulting in a smooth surface that passes exactly through the input points" (Esri 2017).

"TIN (triangulated irregular network) A vector data structure that partitions geographic space into contiguous, non-overlapping triangles. The vertices of each triangle are sample data points with x-, y-, and z-values. These sample points are connected by lines to form Delaunay triangles. TINs are used to store and display surface models" (Esri).
Once all of the Interpolations were created in ArcMap they were then imported into ArcScene to create a 3D modal of the terrain. From there they were exported as a 2D image into Adobe Illustrator along with the interpolations feature classes in ArcMap. Adobe Illustrator was used for its flexibility with creating map components, color resolution, and easy rotation to show model orientation. The 2D images were imported into ArcMap as a reference modal but the colors of the bands showed up too poorly to analyze the terrain so Adobe Illustrator was used in place of.

Results/Discussion
When creating the surface terrain a continental shelf and the ocean floor was thought of two best portray in the sand so the color chosen for portraying the data was blue. Figure 3. Shows the first interpolation tool used, IDW. In this figure and all others that follow the raster file with the interpolation created in ArcMap is on top with a scale, legend, and arrow in orientation, while the 3D modal in ArcScene created and exported into Adobe Illustrator as a 2D is on the bottom with a legend and arrow in orientation. A scale was not assigned to the 2D image for the representation of it being 3D and not fitting correctly with a scale unless measured from one point to another. For the purpose of this examination the author of this blog will be relating to the 2D model on the bottom of each figure. The IDW Interpolation tool did a poor expressing the data points collected, it doesn't represent a continuous modal of the terrain and did a bad job with exhibiting the ridge and valley in the southeast section. It exhibited the depression and plain well given that it uses the average sampling method of that area and it would have minimal difference in elevation. 


Figure 3. IDW interpolation

Figure 4. Shows the Kriging Interpolation tool. Kriging gives a nice continuous terrain modal that creates a realistic terrain. It displays elevation quite well with the hill and ridges in the eastern sector but does not with the valley right next to the ridge that seems nonexistent.

Figure 4. Kriging Interpolation

Figure 5. Shows the Natural Neighbour Interpolation. This interpolation looks very similar to Kriging in Figure 4. The only difference seen is with more detail in the elevation compared to Figure 4. However this still does a poor job with the valley depression and gives off a shadowing effect from the ridge. 

Figure 5. Natural Neighbour Interpolation

Figure 6. Shows the Spline Interpolation tool. This tool compared to Figure 5. Gives a more refined look to the elevation and rounds off the rough edges compared to the Natural Neighborhood Interpolation. The Spline Interpolation provides the best presentation of the valley right of the ridge in the southeast sector. There is a somewhat clear depiction of elevation change with the terrain presenting a more 3D look than any of the other models.

Figure 6. Spline Interpolation

Figure 7. Shows the TIN method/Interpolation, although TIN is not exactly Interpolation it still provides the data to be exhibited in a terrain modal with x,y,z points. This method gives a choppy presentation of the elevation difference in comparison to the real world. It does provide great detail in elevation difference with the contour lines.

Figure 7. TIN Method
Conclusion
The best Interpolation method used to display the data accurately was the Spline Interpolation. The Spline Interpolation tool exhibited all forms of elevation the best compared to any other tool. Since the author of this blog and their group used the systematic sampling approach the Spline Interpolation represented it the best. The Spline Interpolation tool and other other Interpolation tools/methods can be used in trying to display x,y,z data gathered for the intent of 3D modelling. It is easy and quick tool compared to running other processes on data. 

Reference
http://pro.arcgis.com/en/pro-app/tool-reference/3d-analyst/comparing-interpolation-methods.htm

https://support.esri.com/en/other-resources/gis-dictionary/term/tin