License: This is an open access protocol distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited
Protocol status: Working
We use this protocol and it's working
Created: November 17, 2023
Last Modified: December 05, 2024
Protocol Integer ID: 91092
Keywords: photography, photogrammetry, 3D model
Disclaimer
Any use of trade, firm, or product names is for descriptive purposes only and does not imply endorsement by the U.S. Government.
This step-by-step protocol describes the photogrammetry process used by the U.S. Geological Survey Spokane Imaging Lab (SPIMG) lab to create 3D models of geologic samples. Steps related to photographing small objects are applicable to photogrammetry in general, however, SPIMG-specific steps involving lab hardware and software may not be.
Materials
SPIMG uses the following equipment and software for photogrammetry. Equipment is classified as either laboratory ware that does not collect or process data and instrumentation that does.
Laboratory Ware
Tripod: Manfrotto 055 with Manfrotto double articulated arm
Light box
LED lights
Pamco-Imaging MCT-220-24 Photogrammetry Turntable (referred to as "the turntable")
Clampmaster Xtreme or similar vertical orienting apparatus
"Photogrammetry Turntable" app installed on an Android device with Bluetooth capability. Appears as "TT Remote" when installed.
Sample Preparation and Instrument Operation
Sample Preparation and Instrument Operation
Sample Preparation
Ensure the sample to be imaged does not exceed the maximum rated capacity of the turntable (i.e., 100 kg or ~220 lbs.) or the size of the visible area in the light box. Also, ensure the sample will not scrape the sides of the light box as it rotates.
Sample Analysis
Hand samples typically do not require much preparation. Inspect the sample to make sure it isn’t crumbling or cracked in a way that could result in disaggregation during imaging. Extremely fragile samples may be unsuitable for imaging.
All samples imaged should have a scale attached to them. A 2-cm scale is adequate. Yellow paper with printed scales is available at the photogrammetry station. Carefully cut out a scale and affix it to the sample using Fun-Tak. Do not obstruct any features of interest with the scale. Try to keep the adhesive dot small so that it does not appear in the images. A very thin strip of Fun-Tak can be rolled and pressed to the back of the scale so that it does not protrude. It also has the benefit of being reusable.
Place the light box, LED lights, and MCT-220-24 turntable as shown in Figure 1.
Figure 1. Turntable and light box configuration. Photograph by Lucas Evart, U.S. Geological Survey, 2024
Verify that the turntable and LED lights have power. Turn on the LED lights and set them to maximum brightness by turning the brightness adjustment roller switches as shown in Figure 2.
Figure 2. Light settings. Photograph by Lucas Evart, U.S. Geological Survey, 2024
Always place a piece of white paper or some other featureless protective material over the turntable to protect the surface. It is useful to measure and mark a dot at the exact center of the paper to aid with centering the sample.
Typical samples
Place the sample in the center of the turntable. Whenever possible, elevate the sample on an appropriate stand or support to keep it above the surface of the turntable. This allows light entering the box obliquely to illuminate the white turntable surface and (mostly) eliminate shadows. It also means that when 3DF Zephyr inevitably models the turntable surface as part of the world space, it will be separated from the sample and can be more easily deleted.
Slab and core samples
For slabs and flat samples, place the sample in the Clampmaster Xtreme or similar vertical orienting apparatus. Ensure that most of the flat side is visible (not obscured by the support) as shown in Figure 3.
Figure 3. Image of a thin, flat (slab) sample held vertically in the Clampmaster Xtreme. Photograph by Lucas Evart, U.S. Geological Survey, 2024
Once the sample is in the light box and centered on the turntable, place the camera and tripod as shown in Figure 4.
Figure 4. Camera, tripod, and sample positioning example. Figure by Lucas Evart, U.S. Geological Survey, 2024
Figure 4 is not rendered precisely to scale. Depending on the sample’s size and shape, and the lens being used, exact positioning may vary. The dashed lines in Figure 3 indicate the field of view of the camera.
In addition to the tripod, we use a 3-segmented adjustable arm which allows for both angle and distance adjustment.
Note that the camera is positioned so that it is looking slightly down toward the sample. This is important as we need to capture data from the upper surfaces. The ideal angle is typically somewhere between 25-45 degrees.
Warning: Be aware of the center of gravity of the tripod/arm/camera assembly. Overextending the arm can result in the tripod tipping over. Also, failure to secure each pivot joint when adjusting arm position will allow the camera to swing down and impact a hard surface. Damage to equipment may result.
Open the TT Remote application on a device with Bluetooth capability. TT Remote settings are shown in Figure 5.
Figure 5. TT Remote settings.
Settings
For most situations, 24 shots per rotation will suffice, however, there is no consequence for increasing the number of shots except for longer processing time later on. In some cases where a 3DF Zephyr has trouble orienting images due to lack of surface detail or homogeneity of detail, increasing the number of shots may result in higher success rate of image orientation.
When using long exposures it may be necessary to set a longer delay before or after move. For most situations, a half second delay on both is enough.
Manual rotation of the turntable is accomplished by the turntable movement control arrows labeled PUSH.
To take a single image manually, press FULL PRESS Trigger.
Start Sequence begins the rotation and imaging process.
Camera and EOS Utility setup
Camera setup
Make sure the camera has a lens attached. The 50-mm lens (SPIMG50) is the default lens. All models are assumed to have been created with this lens unless otherwise documented in your scientific notebook.
Ensure that the camera is connected to:
the computer by a USB cable.
the turntable by a remote trigger cable.
Turn on the camera and set it to manual mode as shown in Figure 6. Note: On the Canon EOS 6D MK II you must press and hold down the button in the center of the selection wheel when changing modes.
Figure 6. Selecting manual mode on the Canon EOS 6D MK II. Photograph by Lucas Evart, U.S. Geological Survey, 2024
Once in manual mode, select the settings for shutter speed, aperture (f-stop), and ISO as shown below. The EOS 6D MK II features a touch screen. Any of these settings can be adjusted from the screen depicted in Figure 7. They can also be adjusted on the PC via the EOS Utility software.
Figure 7. Canon EOS 6D MK II settings displayed on touchscreen. Photograph by Lucas Evart, U.S. Geological Survey, 2024
Shutter speed: 1/30th of one second
f-stop: 22
ISO: 400
Shutter speed and f-stop can be adjusted depending on the sample being imaged, the ambient lighting, the proximity to the sample, etc. These settings are a good starting point and will work for most samples.
Please note, a variety of settings can produce images that will produce effectively the same 3D model. As long as the depth of field is adequate to capture the entire sample and the exposure is appropriate, the images will suffice.
EOS Utility setup
Open the EOS Utility. This should happen automatically when the camera is turned on while it is connected by USB cable.
In the EOS Utility window select Remote Shooting.
The EOS Utility main window will appear as shown in Figure 8.
Figure 8. EOS Utility main window.
As long as the EOS Utility is open and the camera is connected to the computer by the USB cable, any images taken by the camera will be saved directly to the computer. Use the folder button on the EOS Utility main window to select where the images will be saved.
Be sure to change the folder location between samples.
The default path for all sample images is X:\<collection name>\<sample ID>\Images where X: is the drive currently in use for photogrammetry data storage. For example, X:\Moon Rocks\Apollo 11-1\Images.
Note: If the target folder specified in the EOS Utility does not exist, the software will create it. This is useful when imaging a collection of samples with incrementing sample ID numbers as you only need to change a few digits in the save path and the software will create the folder structure for you. A quirk of the EOS software is that if you type spaces in the path, the cursor will sometimes move to the far left of the input field. For this reason, avoid typing spaces in folder names.
Framing the images and focusing
Position the camera at the correct angle and move it close enough that the sample fills as much of the Live Preview window in the EOS Utility as possible, as shown in Figure 9. If the sample has one axis that is significantly longer than the others, start by positioning it so that the longest axis runs left to right. Small samples (a few centimeters on their longest axis) may work best with the 100-mm lens while larger ones may work best with the 50-mm lens. The longer the lens, the narrower the field of view and the smaller the depth of field. For the vast majority of samples, use the 50-mm lens.
Figure 9. Example of sample filling most of the frame. Photograph by Lucas Evart, U.S. Geological Survey, 2024
The LCD screen does not provide enough detail to see whether the image is correctly focused. Use the Live Preview function in the EOS Utility to see if the sample is all in focus. You will need to disable depth-of-field preview in order to adjust camera focus.
Live Preview supports depth-of-field preview which can be helpful when determining that the sample remains in focus throughout rotation. A word of warning, however:remote triggering of the shutter does not work when depth-of-field preview is turned on! It must be turned off in order to take pictures.
For samples that have one axis significantly longer than the others, align the sample 10-15 degrees off of parallel from the camera’s viewing direction. Use the << PUSH >> manual turntable controls to rotate the sample. By orienting the sample so the camera is looking down its length, one end is close to the camera and the other is far away. When you adjust focus in this position, you can see whether the extreme ends of the sample will be fully captured.
On the turntable application, manually move the sample at least one full rotation while watching the Live Preview window to make sure the sample does not touch or extend beyond the edges of the frame. While some of the stand or clamp used to elevate the sample may enter the frame as it does in Figure 9, it is crucial that the point where the support comes in contact with the sample does not enter the frame at any time during the rotation. If the point of contact is imaged, the software will model the support as part of the sample, and it is not possible to separate the two in post processing. This restriction does not apply to slab and core samples for the "orientation images." In that case, the support can be fully visible.
It is important to set the camera’s focus to capture the most detail. Achieving best focus may require adjusting the camera’s distance from the sample (filling less of the frame). Having any area of the subject out of focus at any point during its rotation will almost certainly result in a sub-par model. You must strike a balance between resolution (filling the maximum amount of the frame) and focus (everything from the nearest to the farthest parts of the sample) to get the best overall model.
Side note:This issue becomes particularly challenging when working with small samples <15 cm on their longest axis. With such samples, getting them to fill most of the frame might require using the 100-mm macro lens, however, this comes with the problem of decreased depth of field. That means a large part of the sample tends to be out of focus at any given time. Backing away the camera causes a decrease in resolution, but the depth of field becomes larger, capturing more of the sample. It is beyond the scope of this protocol to define every case. When in doubt, err on the side of sacrificing resolution and keep the entire sample in focus. Whenever a lens other than the standard 50-mm lens is used, document it in your scientific notebook.
Capturing Images
Capturing Images
Capturing images
Capture process for most samples
If all camera settings are correct, the focus is set, the sample does not touch the sides of the frame, and the turntable is set to capture the desired number of images, make sure depth of field preview is off and press the Start Sequence button in the turntable app to start the image capture process. The turntable will move through the desired number of steps and will signal the camera to capture an image at each one.
After the rotation is complete, turn the sample over, keeping it as close to the center of the turntable as possible. In most cases it will not be necessary to move the camera or recheck framing between sets of images. You can repeat the framing and focusing process as needed. Try to turn the sample so that the side that was facing down and at least one side that was showing in the first set are both clearly visible for the second set.
When ready, press the Start Sequence button in the turntable application again. Wait for the capture cycle to complete.
Two sets of images are the bare minimum to model a sample under ideal circumstances. Most samples are not ideal. Typically, you will want to flip and image the sample again. The goal is to acquire overlapping coverage of all sides of the sample from multiple angles. There is nothing wrong with adding more images to the dataset. It will take longer to process, but it will not harm anything.
Note: For the modeling process to work, each point on the surface of the sample must be captured in multiple images. Whenever possible, try to take at least three sets of images with the sample positioned differently in each.
Special process for slab samples and core samples
The purpose of this section is to explain the process of creating a set of "orientation" images. These images are not used directly in the construction of the model, however, they are used as an aid for orienting other sets of images with one another.
For the purposes of this protocol, a slab or core refers to samples with two roughly parallel sides whether cut this way with a rock saw or formed naturally. Core samples are usually cylindrical and elongated along one axis. Oftentimes, cores are also cut lengthwise one or more times. Any other sample with a geometry where one axis is considerably narrower than the others is treated as a core in this protocol.
A sample that cannot be balanced on three different sides for imaging because it is too narrow to balance upright on an edge or end will pose a challenge for modelling. For example, sets of images taken while the sample is horizontal may orient with other images in the same set, but orienting a set from one side with a set from the opposite side is problematic because none of those images overlap. It is necessary to provide the software with a set of images that bridges between the other image sets. This will be the "orientation" set.
As shown in Figure 4, begin by securing the sample in the Clampmaster Xtreme or similar clamping apparatus. To ensure that the software can orient the images in this set, do one or both of two things:
Include the Clampmaster Xtreme in the images so that its geometry aids 3DF Zephyr in orienting the images.
Increase the number of images taken for this set. This increases the similarity between subsequent images and reduces the chances the software will fail to orient them.
Capturing images to construct the model
For slabs, lay them flat on top of a broad ring stand to keep them just above the turntable surface and position the camera to frame the shots as you normally would. Capture a set of images, flip the sample over, and take another set. You now have one set of "orientation" images and two sets without the Clampmaster Xtreme. When you build your sparse point cloud (in a later section) you will start out with only the "orientation" images at first. See the notes in that section for details.
Core samples are challenging because they are often round and can roll off the turntable if not secured. If the camera is high enough above the sample, tiny dots of Fun-Tak may be used to secure the sample to the surface to prevent rolling. The process is similar to that for slabs. Lay them down however you can, take at least two complete sets showing opposite sides (additional sets can be added at your discretion) and proceed to build your sparse point cloud using the "orientation" images.
Constructing the Model
Constructing the Model
Reconstruct a model in 3DF Zephyr
Sparse point cloud
Open 3DF Zephyr and select Workflow -> New Project. Alternatively, you may press Ctrl+N.
You will see the New Project Wizard (Figure 10).
Figure 10. New Project Wizard.
Sparse is already selected, so click Next. On the Photos Selection screen, add either a selection of images or an entire folder by choosing the appropriate option. It is possible to drag a selection of images from Windows Explorer into the Photos Selection screen.
When working with slab/core samples, add only the orientation images at this step.
Once the list is populated with desired images, click Next.
Camera calibration is derived from image metadata, so if the Camera Calibration window does not show the right camera and lens for the images, notify the Laboratory Manager.
On the Camera orientation screen (Figure 11), choose category Human body and set preset to Default and click Next.
Figure 11. Camera orientation presets.
On the Start Reconstruction screen, click Run. The process will take several minutes. If you would like to watch a colorful moving graph while you wait, click System info.
If reconstruction is successful, you will be presented with a screen telling you that “x” out of “x” cameras were oriented (cameras being synonymous with images in this software). Ideally, we want all images to be oriented. Any missing or improperly oriented images can create areas of low-fidelity or incorrect geometry and texture. Even if Zephyr reports that all cameras were successfully oriented, you will verify in a later step.
If a significant number of cameras failed to orient, there are several possible remedies. They are listed in order of ascending difficulty.
Try rerunning the New Project Wizard and changing the orientation preset to “Urban”.
If that also fails, you may try switching from using a preset to using the advanced settings. Most of these other methods take much longer to process but sometimes can orient cameras more accurately for tricky samples.
Take additional images, or take all new images. Sometimes the distances and angles of the images simply will not work with the software's orientation calculations. Testing has shown that retaking the images from a different distance and slightly different angles can result in success.
If you still cannot get all or most cameras to orient, consult your Laboratory Manager.
If enough cameras are oriented, click Finish to complete the sparse point cloud. Enough in this context is the vast majority, for example 70 out of 75 images. At times there will be some images that simply cannot be oriented, and when that happens the best choice is to ignore them and move forward.
For slab/core samples, return to the Worklflow -> Add Photos menu to add each set of images one set at a time. Choose one of the sets of photos without the Clampmaster Xtreme. Similar to what is shown in Figure 13, you will be given the option to manually select photos from those that have already oriented that are closest to the ones you are adding. It is often possible to skip selecting nearby images for this step.
Later in the process there will be steps where you will be prompted to choose which cameras you want to use. To simplify selection of the correct cameras, tag the images that should not be used for the model as “Orientation” and ones that are for use in the model as “Model.” Tags can be added through the Camera section of the Project pane. Right-click on a group of selected cameras to add tags.
When reconstruction is complete, you will have a sparse point cloud (Figure 12).
Figure 12. Sparse point cloud made from one set of images.
Verify camera orientation
The sparse point cloud in Figure 12 was created from a single set of 24 images as a demonstration of how a properly oriented set looks. You may notice the circle of blue ‘cameras’ (blue wireframe pyramids) around the top of the cloud. These represent the position from where each photograph was taken relative to the sample. These form a ring since the sample rotated on the turntable. If you are combining multiple sets of images, you will see multiple rings of cameras.
Sometimes there is something obviously wrong with the sparse cloud (it looks deformed or appears to be two or more ‘ghosts’ of surfaces that intersect incorrectly). Other times it will appear correct because all but a small number of images oriented correctly. The only way to know that all are correct is to click on them, one at a time, in the camera navigator that runs along the bottom of the screen. If you do not see the camera navigator, you can enable it from the View menu. As you click each image, your viewpoint is taken to the location of the camera and a translucent image is overlain on the sparse point cloud.
If the image is not correctly oriented, right-click on it in the camera navigator and select Reset. This removes it from the calculations used to construct the sparse point cloud. Once all incorrectly calibrated images have been reset, assess the number of images and their locations to determine whether or not to try to orient them again. If the number of bad orientations was low relative to the total number of images and if leaving them out will not create a region with no image coverage, it may not be necessary to reattempt orientation. If a reattempt is warranted, go to the Project tab on the left pane, select Cameras, then find the image(s) with (N/O) next to their names. Right-click on one and choose Orient selected. It is not advisable to attempt orienting more than one image at a time at this stage.
Although in many cases the same preset used initially (e.g. Urban or Human Body) will be able to orient the image(s), if you have to try this process several times it may be best to use Advanced settings and turn all accuracy options to maximum. After choosing a preset and confirming camera calibration, you will have the option to either allow the software to do its best to orient the cameras without your guidance, or you can choose images that are close to the one you are trying to add as shown in Figure 13. You will need to expand the advanced options and check the box to manually select images. Select 2-3 images to either side of the one you are trying to orient. Because they are sequentially numbered from the camera, it should be easy to find the correct images. For example, in Figure 13, the analyst selected IMG_0033 - IMG_0034 and IMG_0036 – IMG_0037 in order to properly orient IMG_0035. When you have the right images selected, click Run.
Figure 13. Choose images near the camera you want to orient.
Once Zephyr says it oriented the camera correctly, check it to make sure by clicking on the image in the camera navigator. If a few cameras fail to orient, it may still be possible to create an adequate model without them. Consult your Laboratory Manager if you are unable to complete this step.
Dense point cloud
Click Workflow -> Advanced -> Dense Point Cloud Generation. On the Dense point cloud generation wizard’s Multiple View Stereo Processing window, the “All Cameras” option should be selected by default. If you are working with a slab or core sample, choose only the cameras that do not contain targets and clamps for this step. If they were tagged earlier, this is as simple as selecting cameras by tag. Click Next. On the Dense Point Cloud creation screen, the category can be left as whatever it defaults to. Set the preset to High details. Click Next, then click Run.
This generates a higher density cloud of data points in the shape of the sample. The process may take up to an hour for models with large numbers of images and very detailed geometry, but typically it only takes a few minutes.
It should be possible to see any large clusters of points outside the sample, such as background and shadows, that will need to be removed. It is necessary to rotate the cloud and view it from all angles to make sure that there are no unwanted points. If there are, use the tools on the Editing tab on the right side of the screen to select and delete them. Be aware that this is a 2D projection of a 3D point cloud and the selection tools go all the way through the cloud if the “ignore backface” option is not checked! Be careful not to delete any points that are part of the sample. See the 3DF Zephyr user manual for more information on the tools available and how they work.
The dense point cloud in Figure 14 shows the two planes of junk data points caused by the turntable surface being modeled. Each set of photos taken may cause a single plane of points (in this case, two sets made two planes).
One common type of unwanted data points is white fringing. This usually appears along sharp edges. The software is reasonably good at ignoring these fringe points in later steps, but it is best practice to manually delete any large concentrations of unwanted data points that you see.
Figure 14. Example showing planes of junk data points from the turntable surface.
3D mesh generation
Once the unwanted data points are deleted, right-click on the dense point cloud on the Project pane and select Compute Mesh. On the Mesh Generation wizard screen, select the appropriate cameras (the cameras used for the last step should already be selected) and then click Next. On the surface reconstruction screen select options as shown in Figure 15.
Figure 15. Surface reconstruction window.
On the last screen, click Run. Wait patiently. When the process completes, click Finish.
Inspect the mesh for any discolored protuberances or detached polygons. These indicate that dense point cloud cleanup failed to catch some points. There are two ways to address this issue:
Delete the mesh, return to the dense point cloud, and clean up the problem areas. Recreate the mesh.
Delete the bad polygon faces or detached polygons by using the selection tools (same as when deleting data points from the dense mesh). This will leave holes in the mesh which must be plugged via Tools -> Mesh Filters -> Fill Holes -> Selective. Make sure to check the Avoid Self-Intersection option.
The first option is preferable as it tends to create a better final model, but the second option will work if there are very few and minor issues with the mesh. A helpful trick is to orient the view in 3DF Zephyr so that you are looking at the problem area of the mesh, then switch to the dense point cloud via the Project pane. Your view will already be looking at the area that needs additional cleanup, reducing the time spent rotating the model searching for the problem.
If there are still oddities around the edges of the model such as sharp points sticking out, these can usually be fixed by running a mesh filter under Tools -> Mesh filters -> Retopology. This function attempts to rebuild the mesh surface by normalizing the sizes of all triangles. Alternatively, the photoconsistency-based optimization filter may resolve some of these issues.
Textured Mesh Generation
Generate the textured mesh
1. Click Workflow -> Textured Mesh Generation.
2. Choose the correct mesh from the list (if you have created more than one).
3. Select the appropriate cameras by tag if necessary (Model, not Orientation)
4. Select:
a. Category: General
b. Presets: High details
5. Click Next
6. Click Run
When the textured mesh is complete, inspect it for problems. If it meets all quality standards (the model is an accurate visual representation of the sample), save the project file to the appropriate folder.
Scaling the model
3DF Zephyr arbitrarily defines the scale of the model during the creation process. For our purposes, we are using a 2-cm paper scale affixed to each sample. We want that scale to be equal to two units of measurement. To do that, open the Quick Measurements tool as shown in Figure 16.
Figure 16. Quick Measurements window with button circled in red.
Zoom in and rotate the model until the scale bar occupies a large portion of the screen. Click once at one corner of the scale bar and again at the other end. Keep both clicks along one side of the bar as shown in Figure 17.
Figure 17. Quick Measurements window and scale bar on model with measurement line placed along one side.
From the distance value provided, you can derive a scale factor. The formula is simply
2/Distance = Scale Factor
In the example in Figure 17, the scale factor is 2/0.9086 = 2.2012. Due to the imprecision of the measurement tool overall, you can round to the nearest 1/10th of a unit, making this model’s scale factor 2.2.
To rescale the model, click Tools > Workspace > Scale/Rotate/Translate Objects. As shown in Figure 18, enter the calculated scale factor and then click OK.
Figure 18. Scale/Rotate/Translate objects window with scale factor entered.
Now, if you return to the Quick Measurements tool and take a new measurement along the scale bar, the distance should read close to two units as shown in Figure 19.
Figure 19. Quick Measurements window showing a distance for the scale bar of approximately two units.
Note: Units in Zephyr are not defined. The viewing software that displays the model will assign a value of meters, centimeters, etc., to the units.