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 #
- Make sure that you have Aligned Photos and produced a good sparse cloud before beginning this step.
- 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.
- 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.
- 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.
- 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.
- 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”.
- 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.
- 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.
- Check that the coordinate system is EPSG: 32635; if it is not, set it to EPSG: 32635.
- Set Camera accuracy (deg) to 2
- Set Marker accuracy (pix) to 0.1
- Click OK.
- Go to Tools> Markers> Detect Markers, and set the following parameters:
|Marker Type||Circular 12 bit|
|Inverted (white on black)||Not checked|
|Disable parity||Not checked|
- 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.
- 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.
- 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.
- 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).
- Finally, press OK, and the targets should load to the Reference pane with their correct coordinates and elevation.
- 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).
- 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.
- 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:
- 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.
- 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.
- 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.
- Once the error is sufficiently low, you are ready to move to the next step.
If you have trouble detecting all the CTs… #
- 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.
- If this does not solve the problem, you may have to add the markers by hand.
- Double click on a photo to open it in the main window.
- If you can see a target that was not detected, right click in the approximate center of the target and select Add Marker.
- A blank entry will be added to the Marker window; change the name to the number of the CT you added.
- If the number on the CT is not visible in the photo, you have a few options:
- 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.
- Identify the nearest CTs, and ask the excavator to check the number of the missing one for you.
- 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.
- If the number on the CT is not visible in the photo, you have a few options:
- 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.
- Right click on the approximate center of the CT and select Place Marker. Then, select the correct target number from the list.
- 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)… #
- 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.
- 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:
- Make sure that Reference preselection was unchecked during the Align Photos stage.
- Remove location and accuracy data from the photos.
- In the Reference pane under Cameras, select the drone photos, right click, and select “Clear.”
- This will open a “Clear Reference” dialog box. Make sure that all four options are checked, and hit OK.