Friday, April 29, 2016

Lab 4: Photogrammetry

Goal & Background:

The goal of this lab was to learn skills to perform photogrammetric tasks on aerial photographs and satellite images.  This lab work with the mathematics involved with the calculations used in photographic scales, area measurements, measuring the perimeters of features, and calculating relief displacement.  Work is also done in this lab with stereoscopy and carrying out orthorectification on satellite images.  This lab's main focus was to develop a wide array of photogrammetric skills.

Methods:
Part 1: Scales, measurements and relief displacement  
Section 1:  Calculating scale of nearly vertical aerial photographs
I started by opening up an aerial image with a portion of interstate 94 in Eau Claire County, WI.  The ground distance between points A and B on the image was measured to be 8822.47 feet.  I used a ruler and with the image opened in Windows photo viewer, I measured with a ruler the photo distance between points A and B.  I found the distance to be 2.7 inches.  I used the equation that the scale equals the photo distance divided by the ground distance to find the scale of the image.  The scale is 1:39,000 inches.  I calculated the scale for a second aerial image of Eau Claire County taken by a high altitude reconnaissance aircraft.  The data collected was that the photograph was taken at an altitude of 20,000 meters above sea level by a camera with a focal length lens of 152 millimeters. The given elevation of Eau Claire County is 796 feet.  I used the equation scale equals focal lens length divided by the difference of the altitude above sea level minus the elevation of terrain.  I found the scale to be 1:390,000 feet.

Section 2: Measurement of areas of features on aerial photographs
In this section I wanted to find the perimeter and area of a lagoon in the Eau Claire area.  I started by opening up an image of the Eau Claire area in an Erdas Imagine viewer.  I clicked the Measure icon in the main toolbar under the Manage Data header.  I clicked the Show Panel icon, which opened a View Measurements table at the bottom of the window.  On the Point drop down arrow various tools were displayed, I selected the Polygon measurement tool.  I zoomed into the proper lagoon in the image and started digitizing the lagoon by placing commenting points around the perimeter of the lagoon.  I double clicked my last point around the lagoon to finish the tool.  The perimeter and area measurements were then available in the View Measurements toolbar at the bottom of the window.  The area of the lagoon was measured to be 38.8728 hectares and the perimeter of the lagoon was measured to be 4,165.25 meters.  
   
Section 3: Calculating relief displacement from object height
In this section I calculated the relief displacement of a smokestack in an image.  I was given that the height of the aerial camera above datum was 3,980 feet and the scale of the photograph was 1:3,209.  I manually measured on the computer screen with a ruler the distance from the height of the smoke stack and calculated its height in real life by using the scale of the aerial photograph.  The photo height of the smokestack was 0.5 inches.  I then measured the radial distance between the principal point in the upper left hand of the image and the top of the smoke stack.  This distance was measured to be 10.5 inches.  I used the equation that relief displacement equals the height of the object in the real world multiplied by the radial distance of the top of the displaced object to the principal point, all divided by the height of the camera above local datum.  The relief displacement was found to be 0.352 inches.    

Part 2: Stereoscopy
For Part 2 I used polaroid glasses to analyze the output anaglyph images that I generated in this portion of the lab.

Section 1: Creation of anaglyph image with the sue of a digital elevation model
I started by opening an Erdas Imagine viewer.  I opened a 1 meter spatial resolution image of the city of Eau Claire.  I next added a second viewer and brought in a digital elevation model image of the city of Eau Claire at 1 meter spatial resolution.  On the Erdas Imagine main interface I selected the Terrain tab and selected the Anaglyph tool icon.  The Anaglyph Generation window opened up.  I set the first input to the digital elevation model image of Eau Claire and I set the second input to the 1 meter spatial resolution image of Eau Claire.  I set a name for my output file and set a destination for it to save to.  I checked to make sure the vertical exaggeration was set to 1 and I left all other default parameters in their default.  I clicked OK to run the model.  When the model was complete I clicked  dismiss and then the close buttons on the window.  I placed the new image in an Erdas Imagine viewer and put on the polaroid glasses to observe the 3D image.

Section 2: Creation of anaglyph image with the use of a LiDAR derived surface model
I started by opening an Erdas Imagine viewer.  I opened an image of the city of Eau Claire and the adjacent areas at a 1 meter spatial resolution.  I opened a second viewer and brought in a LiDAR-derived digital surface model of the City of Eau Claire at a 2 meter spatial resolution.  On the Erdas Imagine main interface I selected the Terrain tab and selected the Anaglyph tool icon.  The Anaglyph Generation window opened up.  I set the first input to the LiDAR-derived digital surface model image of Eau Claire and I set the second input to the 1 meter spatial resolution image of Eau Claire.  I set a name for my output file and set a destination for it to save to.  I checked to make sure the vertical exaggeration was set to 1 and I left all other default parameters in their default.  I clicked OK to run the model.  When the model was complete I clicked the dismiss and then the close buttons on the window.  I placed the new image in an Erdas Imagine viewer and put on the polaroid glasses to observe the 3D image.    

Part 3: Orthorectification
In Part 3 I was introduced to Lecia Photogrammetric Suite (LPS) in Erdas Imagine to orthorectify images and create a planimetrically true orthorectified image.  Orthorectified images were used as a source of ground control measurements.

Section 1: Create a new project
I started by opening up an Erdas Imagine viewer.  I selected the Toolbox tab on the main interface and selected IMAGINE Photogrammetry to open up the LPS Project Manager window.  I clicked the Create New Block File icon to open a new window where I set the name and location for the file.  After clicking OK the Model Setup window opened I changed the Geometric Model Category to Polynomial-based Pushbroom from the dropdown list.  In the Geometric model Category I selected SPOT Pushbroom.  I selected OK to close the Model Setup window and the Block Property Setup window opened.  I clicked the Set button in the Horizontal Reference Coordinate System section, which open up the Projection Chooser window.  In the Custom tab, I chose UTM from the Projection Type dropdown list.  I selected Clarke 1866 from the Spheroid Name dropdown list and I chose NAD27(CONUS) from the Datum Name dropdown list.  In the UTM Zone field I typed 11.  I set the North or South Field to North and clicked OK in the Projection Chooser window.  In the Block Property Setup window I made sure the Horizontal Units were set to Meters and clicked OK to close the Block Setup window.

Section 2: Add imagery to the Block and define sensor model
I started in the LPS Project Manager window still open from Section 1.  In the Block project Tree View on the left side of the window I clicked to highlight the Images folder and on the top main toolbar clicked the Add Frame icon to open the Image File Name window.  I added the image Spot_pan.img.  I clicked the Show and Edit Frame Properties icon to open the Spot Pushbroom Frame Editor window.  I checked to make sure all of the properties were correct and clicked OK to close the window.  When I returned to the IMAGINE Photogrammetry Project Manager window the Int. column, at the bottom of the window, that corresponded to the SPOT image had changed colors to green signifying that the sensor had been specified.

Section 3: Activate Point measurement tool and collect GCPs
I started in the LPS Project Manager window still open from Section 2.  I began by selecting the Start point measurement tool to activate the tool.  I was prompted to select a tool and I selected the Classic Point Measurement Tool and clicked OK to close the Select Point Measurement window.  The Point Measurement window opened in the display.  In the Point Measurement tool palette I clicked the icon to reset the horizontal reference source.  The GCP Reference Source window opened and I checked the Image Layer radio button.  I liked OK to close the GCP Reference Source window which opened the Reference Layer window.  I inputted the image xs_ortho.img, a SPOT orthorectified image to be used as a source for ground control measurements.  I clicked OK to close the window and return to the Point Measurement tool.  I clicked the checkbox next to the Use Viewer as Reference option.  The  xs_ortho.img image was displayed on the left side of the viewer and the spot_pan image, the original image, was displayed on the right.  I then placed GCPs by placing coordinates in the image on the left and then placing points in the image on the right that correspond to the same location.  Before I added each point I had to start by selecting the Add button in the Point Measurement toolbox.  I would then align the inquire boxes in both images to the same location.  I would click the Create Point icon and on the reference image place a point.  In the lab reference control point coordinates were given and could be used to correct point locations if need be by entering the points in the bottom of the viewer.  I made adjustments if needed.  Next I collected a corresponding point on the other image on the left side of the viewer.  I clicked the Create Point icon and placed a point on the spot_pan image.  Again in the lab reference control point coordinates were given and could be used to correct point locations if need be.  I followed these steps for the second ground control point.  Before the third ground control point I selected the Automatic (x,y) Drive icon from the toolbar.  I added ground control points 3 through 9 by following the steps above.  After point 9 I clicked the save button.  The last two control points required a different horizontal reference source, I clicked the Reset Horizontal Reference Source icon to change the reference source.  The GCP Reference Source window opened and I checked the Image Layer radio button and clicked OK on the windows the Reference Image Layer window opened.  I input the new reference image, NAPP_2m-ortho.img, and clicked OK.  I was then returned to the Point Measurement tool.  I skipped Point ID 10 and named the nest control point Point ID 11.  I entered in GCP 11 and 12.  In the Point Measurement tool I selected Save to save my work.  I deselected the Use Viewer as Reference checkbox.  I now wanted to set all of the horizontal reference GCPs with the use of a digital surface model.  In the Point Measurement tool palette I clicked the Reset Vertical Reference Source icon and the Vertical Reference Source window opened.  I clicked the DEM radio button and from the dropdown button I selected the palm_springs_dem.img.  I clicked OK on the window to close it.  I right clicked the Point # column in the row selection menu and chose Select All.  I selected the Update Z Values on the Selected Points icon which entered in Z values in the table.  I right clicked the Point # column and selected Select None.

Section 4: Set Type and Usage, add a 2nd image to the block & collect its GCPs
This section picked up right where Section 3 left off.  I left-clicked the title bar of the column titled Type to select the whole column of blank entries.  I right-clicked Type and selected Formula under the Column Options.  In the Formula window I typed Full and clicked Apply.  This changed every entry in the Type column to Full.  I repeated these steps for the Usage column and entered Control as the text instead of Full.  In the Point Measurement tool I selected the save button and clicked Close on the Point Measurement tool.  I was then returned to the LPS Project Manager window.  I selected the Add Frame icon on the main toolbar and added the second image to be orthorectified, spot_panb.img.  I clicked the second row in the log to highlight the newly imported image.  I then clicked the Frame Properties icon to open the SPOT Pushbroom Frame Editor window.  I clicked OK to accept the parameters.  I clicked the Point Measurement icon in the LPS Project Manager window and selected the Classic Point Measurement Tool and clicked OK.  In the opened Point Measurement Tool the newly imported spot_panb.img was displayed on the left and the initial image spot_pan.img was displayed on the right.  I next collected ground control points for the spot_panb.img based on the points I had already collected for the spot_pan.img.  I started by collecting Point ID 1.  To do this I clicked on Point #1 to highlight the row.  The spot_pan.img automatically positions to show that point.  On spot_panb.img I added a ground control point in the same location as in the spot_pan.img by clicking the Create Point icon from the Point Measurement tool palette and clicking the approximate location on the image.  In the lab reference control point coordinates were given and could be used to correct point locations if need be by entering the points in the bottom of the viewer.  I made adjustments if needed.  I followed these steps for the remaining points, Point IDs 2, 5, 6, 8, 9, and 12.  The points that were not referenced did to exist on the spot_panb.img.  I right-clicked the Point # column and choose Select None.  I clicked the Save button on the Point Measurement tool.      

Section 5: Automatic tie point collection, triangulation and oath resample
I started Section 5 where Section 4 left off.  This section worked on performing necessary processes to complete the orthorectification process of the two images.  I clicked the Automatic Tie Point Generation Properties icon in the Point Measurement tool palette.  The Automatic Tie Point Generation Properties window opened up and I set the Image Used radio button to All Available.  I set the Initial Type radio button to Exterior/Header/GCP and made sure the Image Layer Used for Computation was set to 1.  I selected the Distribution tab in the window and typed 40 into the Intended Number of Points/Image field.  I made sure the Keep All Points checkbox was unchecked and selected the Run button.  When it was done running I read the information in the Auto Tie Summary window and clicked close to close the window when I was done.  I checked the tie points for accuracy and made any changes if needed.  When I was done I clicked the Save button on the Point Measurement tool and then selected the Close button.  Next, I performed triangulation because all of my tie points were prepared.  In the IMAGINE Photogrammetry Project manager window I clicked Edit and selected Triangulation Properties... to open the Triangulation window.  I set the Iterations With Relaxation value to 3 and set the Image Coordinate Units for Report to Pixels.  In the Point tab under Ground Point Type and Standard Deviations I set the dropdown menu to Same Weighted Values.  I set each X,Y, and Z number field to the value 15.  In the Advanced Options tab I checked the Simple Gross Error Check Using checkbox and accepted the default value for Times of Unit Weight as 3.0.  I clicked Run which opened the Triangulation Summary Report window.  I clicked the Report button in the window which opened the report in a separate window.  I saved the report as an ASCII Text File (*.txt).  When I was finished viewing the report I closed the window and in the Triangulation Summary window I clicked Accept to accept the results.  In the Triangulation dialog window I clicked the OK button to close the window.  I saved the IMAGINE Photogrammetry Project Manager window.  I next created orthorectified images where relief displacements and other geometric errors have been corrected and the accuracy has been adjusted.  I clicked the Start Ortho Resampling Process icon from in the IMAGINE Photogrammetry Project Manager main toolbar to open the Ortho Resampling window opened.  In the General tab I selected DEM from the DTM Source dropdown list.  I set the DEM File Name dropdown list to Find DEM.  For both the X and Y Output Cell Sizes fields I set their values to 10.0.  I clicked on the Output File Name icon and set the location for my outputs to save to.  In the Advanced tab of the window I checked to make sure the Resampling Method was set to Bilinear Interpolation.  I clicked the Add button to open the Add Single Output dialog.  I set the Input File Name to the block file spot_panb.  I checked the box next to Use Current Cell Sizes.  I set the Output File Name to the location where I desired to save the image. I clicked OK in the Add Single Output window.  I confirmed that spot_panb.img and spot_pan.img had the same parameters and then I clicked OK in the window to run the process.  When the model finished its run I clicked Dismiss and Close in the Process list.  I saved my project in the IMAGINE Photogrammetry Project Manager Window.

Section 6: Viewing the orthorectified images   
In Section 6 I viewed the orthorectified images I created.  In the IMAGINE Photogrammetry Project Manager I clicked the plus (+) sign next to the Orthorectification folder and clicked on the list to highlight one of the orthorectified images in the Block Tree View.  I right clicked the highlighted image name and selected View from the Orthorectification quick view menu.  I brought in the second image the same way I did the first in the same viewer.  I fit both images to frame and examined my orthorectified images.

Results:
Part 1: Scales, measurements and relief displacement  
Section 1: Calculating scale of nearly vertical aerial photographs
Figure 1
Figure 1 is the aerial photograph that I calculated the scale for by using a given ground distance.  I used the size of an object in real world and the size on the image to calculate the scale.  To find the equivalent photo distance I measured the distance between the points A and B on this image.

Figure 2
Figure 2 is the equation and work I used to calculate the scale of the image.  I was given that the ground distance was 8822.47 ft and I measured the photo distance manually using a ruler and the image up on the monitor screen. The photo distance was measured to be 2.7''. 

Figure 3
Figure 3 is an aerial photograph that I calculated the scale for by using the camera lens focal length and the flying height above the terrain. 


Figure 4
Figure 3 is the equation and work I used to calculate the scale of the image in Figure 3.  The focal lens length (f) was given as 152 mm.  The Altitude above sea level of the terrain was given as 20,000 ft.  The elevation of the terrain of Eau Claire County was given as 796 ft.      



Section 2: Measurement of areas of features on aerial photographs

Figure 5
Figure 5 shows a screen shot of the Erdas Imagine window displaying the lagoon in the Eau Claire area that I digitized.  The bottom of the image displays that the area of the lagoon was measured to be 38.8728 hectares and the perimeter of the lagoon was measured to be 4,165.25 meters. 


Section 3: Calculating relief displacement from object height


Figure 6
Figure 6 is the image that was used to calculate the relief displacement of the of the smoke stack marked A.  The principal point is located in the upper left corner of the image.



Figure 7
Figure 7 is the equation and I used to calculate the relief displacement of the tower marked A in Figure 6.  I was given the principal point in the upper left hand corner.  The relief displacement was positive meaning that tower was above the relief displacement. The tower needs to be moved 0.352 inches toward the principal point because it is leaning outwards from the principal point.   


Part 2: Stereoscopy
Section 1: Creation of anaglyph image with the use of a digital elevation model
Figure 8
Figure 8 is a anaglyph image created by using a digital elevation model.  To properly view this image polaroid glasses must be worn to see the 3D effect of the image.  This image has some features that are different from reality.  Some places of know high elevation appear lower than places of known low elevation in Eau Claire.  The digital elevation model took into account the elevation as whole with features included, so areas with tall trees make the land appear at a higher elevation than it actually is.  

Section 2: Creation of anaglyph image with the use of a LiDAR derived surface model
Figure 9
Figure 9 is an anaglyph image created by using a LiDAR derived surface model.  To properly view this image polaroid glasses must be worn to see the 3D effect of the image.  This anaglyph has proper elevation proportions unlike Figure 8.  The use of a digital surface model took into account the surface of the land area without including the land features giving for proper results.  

Part 3: Orthorectification


Figure 10
Figure 10 is an a screenshot of what the IMAGINE Photogrammetry Project Manager window looked like when both spot_panb.img and spot_pan.img were displayed in it.  At the bottom you can see the two entries showing two images were inputted.

Figure 11
Figure 11 is a screenshot of the Point Measurement window.  Point Measurement tool palette can be seen on the upper right hand of the screen.  In this window the tie points were created between two images. 

Section 6: Viewing the orthorectified images  
Figure 12
Figure 12 shows the two images spot_panb.img and spot_pan.img overlaid in the same viewer in Erdas Imagine.  The accuracy of overlap between these two images is very high.

Sources:

National Agriculture Imagery Program (NAIP) images are from United States Department of
Agriculture, 2005.


Digital Elevation Model (DEM) for Eau Claire, WI is from United States Department of
Agriculture Natural Resources Conservation Service, 2010.



Lidar-derived surface model (DSM) for sections of Eau Claire and Chippewa are from Eau
Claire County and Chippewa County governments respectively.


Spot satellite images are from Erdas Imagine, 2009.


Digital elevation model (DEM) for Palm Spring, CA is from Erdas Imagine, 2009.

National Aerial Photography Program (NAPP) 2 meter images are from Erdas Imagine, 2009.