Thursday, December 22, 2016

Processing UAS Data Using Pix4D

Introduction

In this week's activity, the class was introduced to the Pix4D software program, which currently is the premiere software for creating point clouds. Using UAS imagery and association with Pix4D, the class would be constructing a georeferenced mosaic. Prior to using the software, students were to answer the following question, which can be found below along with the answers:

  • Look at Step 1 (before starting a project). What is the overlap needed for Pix4D to process imagery?
    • A high overlap between images is required in order to get high accuracy results automatically.
  • What if the user is flying over sand/snow, or uniform fields?
    • Use a high overlap with at least 85% frontal overlap and at least 70% side overlap
    • Set exposure settings accordingly to get as much contrast as possible in each image
  • What is Rapid Check?
    • Rapid check is used in the field to get a quick preview of the outputs
  • Can Pix4D process multiple flights? What does the pilot need to maintain if so?
    • Yes, Pix4d can process multiple flights, and to do so, the flight height should not vary much between the flights.
  • Can Pix4D process oblique images? What type of data do you need if so?
    • Yes, Pix4D can process oblique images, and to do so, it is strongly recommended to use GCPs or Manual Tie Points.
  • Are GCPs necessary for Pix4D? When are they highly recommended?
    • Adding GCPs are optional, but are highly recommended when processing images without image geolocation
  • What is the quality report?
    • The quality report displays how well the imagery was processed

Methods

To begin a new project, start Pix4D and on the menu bar, click Project > New Project

Step 1: The New Project wizard opens where the user must choose a project name and a directory to save it in (figure 1). Click next.

Figure 1: New Project wizard

Step 2: Import all of the image that are to be used by clicking the Add Images button and selecting the images to be used (figure 2). Multiple images can be selected at once. Click next.

Figure 2: Select Images setup

Step 3: Configure the image properties. This include the image geolocation, selecting the camera model, and images table (figure 3). All of these were automatically uploaded for this assignment.

Figure 3: Image Properties window

 Step 4: Select the output coordinate system (figure 4). In this case, it was auto detected where the coordinate system being used was the UTM zone 15N.



Step 5: Choose the desired template (figure 5). For this assignment, the Ag RGB template was used. Check the 'Start Processing Now' box and click Finish.

Figure 5: Choose template

The initial processing begins and takes several minutes to run. Once the initial processing is complete, and quality report is generated (figure 6). 68 out of 68 images were used and covered an area of 0.0416 km^2 (10.2754 acres). 


Figure 6: Quality report

Scrolling down through the quality report, the user eventually reaches the 'Overlap' section which shows how well images overlapped in which places (figure 7). Images overlapped very well in the center of the image, while some areas on the edges (particularly the left side), did not overlap as well. This may be because images on the outside of the UAS flight path do not have as many images to overlap with as do the images towards the center.

Figure 7: 'Overlap' section of quality report

Next, students were instructed to complete four tasks:
  1. Calculate the area of a surface within the Ray Cloud editor. Export the feature for use in a map.
  2. Measure the length of a linear feature in the Ray Cloud. Export the feature for use in a map.
  3. Calculate the volume of a 3D object. Export the feature for use in a map.
  4. Create an animation that 'flys' through the project. 
Using the Ray Cloud editor, the user plots a number of vertices on the image, then right-clicks on the mouse to close the area, and then the surface area is calculated (figure 8). The enclosed 3D area in figure 8 is 5020.53 square meters. This feature was then exported to be used in ArcMap.

Figure 8: Calculating surface area using Ray Cloud

Using the Ray Cloud, the user plots a number of vertices using the 'Polyline' option along a feature length, then right-clicks on the mouse to finish the measurement (figure 9). The terrain 3D length of the road (starting from the lower green dot and finishing at the upper green dot) came to be 189.77 meters. The feature was then exported to be used in ArcMap.

Figure 9: Length feature measurment

 Using the 'Volume' tool, a sand dune was traced along the edges until completely enclosed, and then a volume of 1252.27 + or - 17.83 meters cubed was calculated for the dune (figure 10). The feature was the exported to be used in ArcMap.

Figure 10: Calculating the volume of a sand dune

Finally, another feature of Pix4D is to create an animation of the image and render a flyby, where the user chooses camera angles and speed of the animation, among many other things (Video 1).


Video 1: Flyby video of image

After all of the tasks in Pix4D were complete, the next step was to create a geodatabase (PixProject.gdb) in the designated project folder (Pix4Dproject2) and import the features into it that were created in Pix4D. In ArcCatalog, the features that were exported from Pix4D (surface area, feature length, and feature volume) could then be imported into the geodatabase and allow the user to enter in metadata for each. Once completed, using ArcMap, a map could then be made from the data that was generated in Pix4D.


Results/Discussion

The map produced in ArcMap used the orthomosaic generated in Pix4D as a base image, and the features generated in Pix4D were also included on the map (figure 11). Referring to the legend, the large orange polygon represents the calculated surface area, the small green polygon represents the calculated volume of the sand dune, and the long pink line represents the calculated length of the road.

Figure 11: Sand Mine Analysis Map Using Pix4D


The features did not line up as well as they should have with the orthomosaic, where they appear to be shifted slightly to the south and east. All features and the orthomosaic were projected with the same coordinate system, so it seems as though perhaps an error occurred when transferring the data from Pix4D to ArcMap.

Conclusion


Pix4D is a fairly easy program to use for processing and analyzing UAS imagery. The program offers a thorough tutorial with screenshots and other information for assisting users in navigating the program itself. There were some bumps along the way such as not being able to complete some taks one minute (such as exporting features) and then suddenly being able to the next. This however, could possibly just have been caused by the computer system and not the program itself. The only other "problem" would be that the features do not line up the best with orthomosaic in ArcMap. It's not clear what may be the cause for this, but perhaps future projects or looking further into how to use Pix4D will provide an answer. Overall, Pix4D seems to be a good tool for processing and analyzing UAS imagery.

Tuesday, December 6, 2016

GPS Topographic Survey

Introduction

For this activity, as a class, students went outside on campus and conducted a topographic survey using a survey grade GPS unit. With the collected data, students were to then import the data into ArcMap and run interpolations and create continuous maps showing the elevation changes. 

The objectives included:

  • Surveying the study area using a survey grade GPS unit
  • Importing the collected data into ArcMap and displaying the X, Y, and Z data
  • Run interpolations using IDW, Natural Neighbor, Kriging, Spline, and TIN interpolation methods and creating continuous maps


Study Area/Methods

The study area was a grassy knoll that featured a small hill on the lower campus of UWEC located between Centennial Hall and Schofield Hall. Due to inclement weather, the survey was brief and only 20 points were collected. The sampling method used was a random stratified method where random points were selected on the grassy knoll and the elevation changes of the hill were attempted to be captured well enough for interpolations that would represent the hill adequately. This was unlike the method used for the sandbox survey conducted previously in the semester where a systematic point sampling method was used where measurements were taken on a grid that was set up with 5 cm increments. 

The first step was to conduct the survey on the grassy knoll using the survey grade GPS unit which can be accurate to sub-centimeter accuracy. To collect points, the GPS receiver was set onto the ground, the two legs were extended to provide stability, then the legs were adjusted until it was as level as possible, which would provide the best accuracy (by lining up the bubble in the level). Once the receiver was lined up properly, students used the handheld device to collect the point. These steps were then repeated until 20 points were collected.

The next step then was to upload the data into a text file format that students could then import into a geodatabase in ArcMap. First a folder was created (GrassyKnoll), then a file geodatabase which the data would be uploaded into and subsequent interpolations would saved in was made (GrassyKnoll.gdb), the text file was copied from the TEMP folder and pasted into the GrassyKnoll folder, and finally the text file was imported into the geodatabase by right clicking on the file in ArcMap and selecting 'Import' and 'Into Geodatabase'.


Results/Discussion

Looking at the results of the interpolations, it's clear to see that the grassy knoll was not represent very well. The grassy knoll featured one, elongated hill the sloped down on each side until it met the edges of the sidewalk (a picture of the knoll may be posted at a later time to show what it actually looks like). An attempt was made to find a basemap image in ArcMap that would show the extent of the knoll where the extent could have been traced and then used as an extent when running the interpolations. However, no basemap image was found to be up to date on what the knoll looks like present day (since it was just recently constructed) and therefore a default, rectangular extent was used when running the interpolations except for the Natural Neighbor interpolation which captures the extent of the knoll best by only extending the interpolation out to the edges of the most outside data points. 

The maps represent elevation where dark green is the lowest elevation and light pink is the highest elevation. The legends were placed in the lower left hand corner of each map so as to not cover up any data points (represented by the dark blue circular dots). The resulting interpolation maps are as follows:

1. IDW

The IDW map appears to be one of the least accurate interpolations where isolated, circular elevations are captured, and elevation is highest towards the left side and lowest towards the right side (figure 1). 


Figure 1: IDW interpolation map

2. Kriging

The Kriging map appears to be one of the most accurate maps where a circular, light pink shape which represents the highest elevation is towards the bottom left side and strands of lowering elevation form around it (figure 2).


Figure 2: Kriging interpolation map

3. Natural Neighbor

The Natural Neighbor map may be the most accurate of the maps elevation-wise and extent-wise where the knoll and its elevation changes are best captured. Elevation is highest towards the lower left hand corner where circular-like shapes of lowering elevation surround it (figure 3).


Figure 3: Natural Neighbor interpolation map

4. Spline

The Spline map appears to be one of the least accurate maps where the highest elevation juts upward from the lower left hand side and uneven, lowering elevation changes surround it (figure 4).

Figure 4: Spline interpolation map

The fact that the results do not very accurately represent the grassy knoll could be due to not enough data points being collected, the knoll not being sampled well enough, equipment error, or a combination of some or all of these reasons.


Conclusions

This activity goes to show how important it is to properly sample a chosen study area. The grassy knoll was not represented well enough as is shown in the interpolations made using the collected data. In future surveys, it will be important to more carefully sample a study area well enough for it to be represented more accurately.