Skip to main content
Skip table of contents

How-to Structure from Motion (SfM)

This How-to briefly explains how Qimera's Structure from Motion (SfM) Bathymetry tool works. 

On this page:

Introduction

The Structure from Motion (SfM) can be used to correct for refraction errors in submerged data acquired from airborne photogrammetry.

Because of the large density difference between air and water, light reflected off submerged objects and observed from the air will be significantly refracted. From an airborne camera's perspective the submerged objects will appear shoaler than they are in reality.

While the refraction correction is dependent on the angle of incidence with the water, with photogrammetry the exact angle of incidence of any given point is unknown because it is the combination of multiple camera positions.

There are two methods available to estimate a correction:

  1. The Dietrich Method - tries to find all the camera positions or images that may have contributed to a point and averages the correction.
  2. The Small Angle Method - does not remove all refraction errors, but removes a large error which is easy to model and correct for even with an unknown incidence angle.


The Small Angle Method only requires the Water Height & Refractive Index. It can be used if you do not have access to the original project with information on camera parameters and position/orientation.

Structure from Motion (SfM) Bathymetry Dialog

Structure from Motion (SfM) Dialog

How to Start

  • Make a selection of Sonar Files → Tools → Utilities → SfM Correction...

SfM Correction from Tools Menu


License

To run the Structure from Motion tool, Qimera requires a valid and activated SfM Bathymetry Add-on to the license.


License Manager - SfM Bathymetry Add-on

What it Does

The Structure from Motion (SfM) can be used to correct for refraction errors in submerged data acquired from airborne photogrammetry, commonly referred to as "Structure from Motion", or SfM. 

This can be applied to Processed Point Files.


This should not be used in conjunction with the Z-Shift Data filter (see Manage Filter Profiles), as it will remove any previously applied shifts.

General Description

The various settings for Structure from Motion (SfM) Tool are described below...

Method

MethodDescription

Dietrich

Camera properties are used to compute the field of view of each image.

A point is refraction corrected for the incidence angle of each image for which it falls within the field of view. The final correction to a point is the average of all corrections.


This is the preferred and default method.

Small Angle

This method makes the assumption that all incidence angles are at or near perpendicular with the water surface, or in other words that they are small angles of incidence.

For a downward facing camera with a horizontal field of view of 70 degrees the error due to refraction is between 25% and 32% of water depth. The default setting of 1.34 for the refractive index of water will account for between 100% of the refraction error at nadir (near the camera track) to 70% at the outer extents of the field of view (away from the camera track). This will account for the majority of the refraction error but will leave some of the data in the outer extents of the field of view shoal biased at a maximum of 10% of water depth.

For the same camera configuration a scale factor of 1.48 will over-correct with 140% of the refraction error at nadir to 100% at the outer extents of the field of view. This will deep bias the data near the camera track up to 10% of water depth, but in some cases may be preferable for matching data at the edge of the aerial survey with acoustic derived bathymetry in deeper waters.


This method should be used if you do not have access to camera positions and orientations.

Water Surface

This group of settings relates to describing the water surface and it's properties.

Water Height

This is the height of the water in your vertical datum used during data acquisition. 

Example: If your data is referenced to mean sea level (MSL) and the tide was 1.0 meters below MSL during data acquisition then the water height should be entered as -1.0 meters.

Refractive Index

This is the refractive index for water with respect to air.

This should generally not be modified unless you are using the Small Angle method and can accept some deep biasing of the data.

Camera

These settings are only applicable to the Dietrich method, and required.

Focal Length, Sensor Width, and Sensor Height should be provided by the camera manufacturer or accessible within your SfM processing software. All values should be in millimeters.

These are used to compute the field of view of the camera.

Image Position/Orientation

These settings are only applicable to the Dietrich method, and required.

File

This is the "Omega Phi Kappa" file export from you SfM software describing the image, or camera positions and orientations.


You will have to configure the ASCII parser for the 6 required fields: X, Y, Z, Omega, Phi, and Kappa:

  • X, Y,  and Z are Easting, Northing, and Height, or Longitude, Latitude, and Height respectively
  • Omega, Phi, and Kappa are the rotations about the X, Y, and Z axes respectively


This is a photogrammetry specific convention and is different from our standard rotation conventions.


More information from Pix4d on how Omega, Phi, Kappa are defined can be found here: https://support.pix4d.com/hc/en-us/articles/202558969-How-are-omega-phi-kappa-defined


Coordinate Reference System

This should be the coordinate reference system (CRS) of the positions in the file. This is required in order to relate the image positions with the project data.

The default is the project CRS, which assumes there is no transformation required.

Starting from AgiSoft

Camera Properties 

The camera properties can be found in Agisoft by:

  1. Tools Menu → Camera Calibration...



2. The focal length and the pixel size are shown below. 

3. To get the sensor width and height, multiply the resolution by the pixel size.


Example:

Sensor Width/Height

5472 x 0.00239981 mm = 13.132 mm

3648 x 0.00239981 mm = 8.755 mm



Camera Position & Orientation

The camera position & orientation can be found in Agisoft by:

  1. Tools → Export → Export Cameras...




2. For "Save as type:" select "Omega Phi Kappa (*.txt)"



The Omega Phi Kappa (.txt) File Format must be configured to the correct ASCII Format, shown below.

Use As: --, X, Y, Z, Omega, Phi, Kappa


After the first import, Qimera should remember the previously used ASCII Format. 


Starting from Pix4d

Camera Properties 

The camera properties can be found in the project params file here:

<project folder>\1_initial\params\<project name>_pix4d_calibrated_internal_camera_parameters.cam


OR

1. In the Pix4D application, the camera properties can be found by:

Project → Image Properties Editor..



2. Selected Camera Model → Edit...


3. The sensor width/height, and focal length are shown below. 


Camera Position & Orientation

The camera position & orientation can be found in the project params file here:

<project folder>\1_initial\params\<project name>_calibrated_external_camera_parameters.txt


The calibrated_external_camera_parameters (.txt) File Format must be configured to the correct ASCII Format, shown below.

Use As: --, X, Y, Z, Omega, Phi, Kappa


After the first import, Qimera should remember the previously used ASCII Format. 


Example: Small Angle Method

  1. Import Processed Point Files
  2. Create Dynamic Surface
  3. Optional: Create a Static Surface to be used for comparison after the correction


4. Select the Processed Point Files you want to run the Structure from Motion (SfM) Bathymetry Correction on

5. Tools Menu → Utilities → SfM Correction...

6. Enter in Water Height & Refractive Index 

7. Click OK



8. Processed Point Files & Dynamic Surface will update

9. Optional: Compare the differences by creating a profile on the updated Dynamic Surface & original Static Surface



In this example, the Blue line is the updated Dynamic Surface and the Green line is the original Static Surface. 


After running the Structure from Motion (SfM) tool, the surface is corrected and shifted, shown above in the Profile Dock.

Example: Dietrich Method 

  1. Import Processed Point Files
  2. Create Dynamic Surface
  3. Optional: Create a Static Surface to be used for comparison after the correction


4. Select the Processed Point Files you want to run the Structure from Motion (SfM) Bathymetry Correction on

5. Tools Menu → Utilities → SfM Correction...

6. Enter in Water Height, Refractive Index, Camera Parameters (Accessible in SfM processing software)

7. Import the Image Position/Orientation .txt file exported from the SfM processing software

8. Click Configure to check that the correct ASCII File Configuration is selected (–, X, Y, Z, Omega, Phi, Kappa)

9. Check to ensure the Geodetics are correct

10. Click OK




11. Processed Point Files & Dynamic Surface will update

12. Optional: Compare the differences by creating a profile on the updated Dynamic Surface & original Static Surface



In this example, the Blue line is the updated Dynamic Surface and the Green line is the original Static Surface. 


After running the Structure from Motion (SfM) tool, the surface is corrected and shifted, shown above in the Profile Dock.


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.