Processing a Photobatch: Georeferencing

It is during this step that you add coordinate data for the coded targets or photos, and the model is placed correctly in three-dimensional space. A major concern at this stage is accuracy and reducing error, and there are a number of steps you might take and tools you might use to produce an accurate model. Note that a model must meet an accuracy threshold to be considered “good,” so it is important that you check and seek to improve accuracy before building the dense cloud and telling the excavators they can continue working.

Georeferencing Workflow #

  1. Make sure that you have Aligned Photos and produced a good sparse cloud before beginning this step. 
  2. First, make sure that the coordinate points have been uploaded to the relevant project in Emlid Flow 360 by opening the project and then checking that the points have been named correctly, as described in the page on Taking a Photobatch, and that the total number of CTs associated with the photobatch matches the information shared by the excavators in Google Chats.
  3. Click on the Export button at the top of the Emlid Flow 360 window and export the points in both CSV and shapefile formats. Copy both files from the Downloads folder to E:\gygaia\gisgps\kap\[YEAR]\gnss\[EA] _gnss_exports.
  4. Rename both the shapefile and CSV file by adding an underscore and the photobatch number after the existing filename (e.g., “86_540_coded_targets_202307171247”). These files will be archived in this folder, serving as a record of all exports made up to that time on that particular day, available to help resolve problems should they arise.
  5. Copy the CSV file and Paste it to the local photobatch\sfm folder you are using, Rename it as [photobatch_number].csv, and Open the file in MS Excel for editing.
    1. The CSV file should include all coordinate points from the relevant excavation area from that day with different prefixes for different photobatches. Check the prefix from the Google Chat and Delete all points with anything but the relevant prefix. Prefixes start with “A” for the first context of the day and continue alphabetically. For example, if the relevant photobatch is the second of the day for a particular excavation area, the prefix will be “B”; delete all point information for rows in the Excel sheet that have prefix “A”.
    2. Highlight all rows in the Name column (Column A) with a prefix and CT number, and use Find & Select> Replace… (or CTRL+H) to replace the prefix (e.g., “B”) with “target ”, making sure to include a space after the word “target” so that there is a space between “target” and the CT number. For example, “B79” should become “target 79”. Save and Close the file.
  6. Back in Metashape, make sure that the Reference settings are correct by selecting the Reference pane at the bottom of the left-hand panel of the screen and then Settings at the top-right corner of the panel.
    1. Check that the coordinate system is EPSG: 32635; if it is not, set it to EPSG: 32635.
    2. Set Camera accuracy (deg) to 2
    3. Set Marker accuracy (pix) to 0.1
    4. Click OK.
  7. Go to Tools> Markers> Detect Markers, and set the following parameters:
Marker TypeCircular 12 bit
Tolerance50
Inverted (white on black)Not checked
Disable parityNot checked
  1. A list of the markers will then appear in the References window. Check that the number of markers detected matches the number of CTs provided by the excavator. If it appears that markers are missing, follow the steps here to troubleshoot.
  2. As soon as the list of markers is generated, a column called Error (pix) will be available in the marker window; this column will tell you the pixel error for each of the markers. The error should be low (<10 pixels); if the error is high, investigate this using the steps here.
  3. You are now ready to import the coordinate points. At the top of the Reference pane, select Import, and navigate to the <photobatch_number>.csv file in the photobatch\sfm folder. Select it and import. This will automatically populate the marker entries with the correct coordinate information.
    1. A dialogue menu may ask for the format of the file; the delimiter should be set to comma; make sure the Label, X, Y, and Z columns display the correct Name, Easting, Northing, and Elevation information; make sure row number in the “Start Import at Row:” field is set correctly (e.g., if the first target is located in the second row, then start import at row two).
    2. Finally, press OK, and the targets should load to the Reference pane with their correct coordinates and elevation.
  4. Once the coordinate points are imported, the program will generate a column called Error (m); this will tell you the error in real space alongside the error in image space (Error [pix], above).
    1. Note: if the data has been imported in the wrong order (e.g., if the easting and northing are reversed), the error will be extremely high. If this happens you will need to import the data again making sure to align X with Easting and Y with Northing coordinates.
  5. Reduce the error as much as possible. The meter error should preferably be below ca. 0.01 m, and the pixel error should preferably be below 0.5 pixels. In general, a larger error is more acceptable for very large contexts, whereas small contexts should have a very small error. Reducing the error is an iterative process; use the following methods:
    1. Clicking Optimize Cameras will optimize the alignment between all photos and therefore between the markers. This should be the first thing you do to reduce error.
    2. If the error is still too high, try removing markers that have a particularly high error by unchecking them on the left side of the Marker window. The remaining markers will still need to adequately surround the context so that the model is not distorted, so be careful will this method. Sometimes, optimizing after removing a marker can be helpful.
    3. It may sometimes help to adjust the position of the markers by hand (similar to the process of placing targets by hand), but this is a time-consuming process and should be a last resort.
  6. Once the error is sufficiently low, you are ready to move to the next step.

If you have trouble detecting all the CTs… #

  1. First, try detecting the targets again and increasing the tolerance. A higher setting may help detect targets that are hard for the program to see, but a setting that is too high might “see” targets that are not there. Note that if you detect targets multiple times, the program will produce multiple entries for the same marker; make sure replicas are deleted before moving on. 
  2. If this does not solve the problem, you may have to add the markers by hand
    1. Double click on a photo to open it in the main window. 
    2. If you can see a target that was not detected, right click in the approximate center of the target and select Add Marker. 
    3. A blank entry will be added to the Marker window; change the name to the number of the CT you added. 
      1. If the number on the CT is not visible in the photo, you have a few options: 
        1. If only one CT is missing from the list in the GNSS file and there were not multiple photobatches taken at the same time, you can be sure that this is the number of the CT. 
        2. Identify the nearest CTs, and ask the excavator to check the number of the missing one for you. 
        3. If necessary, you can import the GNSS file into ArcMap and generate a point shapefile that can be used to identify the relative position of the CTs. 
    4. The marker must be placed in at least two photos for the program to know where it is, so open a second photo that contains the CT you are marking. The program will have generated a red and white line estimating where the center of the CT should be, and you can use this line to identify the correct CT in the photo, if necessary. 
    5. Right click on the approximate center of the CT and select Place Marker. Then, select the correct target number from the list. 
    6. The CT should now be sufficiently marked, but you can click through some of the other photos to check the placement of the markers visually if you wish. 

If there is a high pixel error (>10 pixels)… #

  1. Investigate a high pixel error by clicking through the photos of that marker. In order to do this more quickly, you can right click on the entry for that marker and select Filter Photos by Markers. 
  2. Normally, a high error on a single marker is not too much to worry about and can be taken care of in later steps. If an error is extremely high (>99 pixels, for example), you may want to think about placing the markers manually so they are closer to the center of the targets, or removing the marker to reduce the error of the model (note: you can only do this if there are 3 other targets available, and if it will not cause distortion to have no data for the point in question). 

If you are using photos from the drone… #

Drone photos include .exif data with their own coordinates, which may clash with the coordinates of the CTs and therefore cause high errors. Here are the additional steps you should take when working with drone photos, if you have not done so previously:

  1. Make sure that Reference preselection was unchecked during the Align Photos stage. 
  2. Remove location and accuracy data from the photos.
    1. In the Reference pane under Cameras, select the drone photos, right click, and select “Clear.” 
    2. This will open a “Clear Reference” dialog box. Make sure that all four options are checked, and hit OK. 

Powered by BetterDocs