3D: Photo Imaging for Condition Detection, Monitoring, and Documentation
Photogrammetry with Agisoft’s PhotoScan and Lens Software https://okeeffeimagingproject.wordpress.com/
Definition: Photogrammetry can be used to create 3D models of buildings or objects. How? Overlapping images (at least 60% or more) are combined using photogrammetric software (Agisoft’s PhotoScan) to create point clouds which are then translated into a 3d mesh. The mesh is covered with a texture comprised of photographic images giving it color and detail. The mesh can be edited, patched and altered using another second party software such as Mesh Lab (allowing the user to make measurements and stitch the mesh) The method that we’re describing below is the working methodology for applications of photogrammetry that involve conservation. This approach use non- proprietary software and archival preservation formats.
- Camera: use the highest resolution DSLR you can get. We’re using a 5d Mark II paired with either a Canon 24 mm or Canon 50 mm prime lens. See more equipment specifications here: https://okeeffeimagingproject.wordpress.com/ workflow/equipment-and-software/
- Capture Setup: Whether you are trying to capture cracks, dents, minute changes in topology, or macroscopic changes in topology, the absolute smallest detail you need to capture can be no smaller than 25 pixels. Taking your camera’s resolution into consideration, calculate if the details you are trying to study are at least 25 pixels.
- Global Camera Settings: Manual, RAW capture, standard shooting mode. Use the lowest ISO possible (100 or 200 are preferable).
- Local Camera Settings:
- ⁃ F. 8 or greater depth of field aka: F. 11 on up.
- ⁃ 1/60 or faster (to ensure that it can be hand held)
- ⁃ Manual focus (use gaffer’s tape to tape the focus ring in place)Gear:
- ⁃ Dennison dots
- ⁃ 4′ ruler or smaller depending on the size of your subject
- ⁃ Measuring tape
- ⁃ Level/Laser level
- ⁃ Chalk Line
- ⁃ Gaffer’s tape
- ⁃ Notebook/pen (for documenting lens specifications)
- Even lighting is key. If you’re shooting outside pay attention to the time of day so you can avoid shadowing which is difficult for the software. If you shoot at night, you’ll need to provide lighting. Tungsten lights or strobes will work as well for objects.
- If you are working outside with lighting conditions that are changing (aka: the sun) you’ll need to adjust your exposure (ideally adjust your shutter speed, not dipping below 1/60).
- A tripod or monopod may be needed if slower shutter speed is required.
What to avoid:
- Select an subject/object (make sure it’s not transparent, reflective or shiny (no glass or mirror). Avoid subjects or objects with occlusion or that self-occlude, such as a chair. Avoid backgrounds that have this problematic subjects in them as well.
- If you’re photographing an exterior or interior the more texture the better. If you have a stark white interior space, we recommend using Dennison dots to help software locate points.
You can either use the Agisoft Lens software (an automatic lens calibration software, which uses LCD screen as a calibration target. It supports estimation of the full camera calibration matrix, including non-linear distortion coefficients). Your shooting approach differs based on your processing choices:
If you utilize Lens you’ll only need to take one image per angle.
If you don’t use Lens you’ll need to take a 90, 180, and 270 shot per angle.
- When Agisoft Lens is open, pull up the checkerboard board icon on the top of screen
- Your entire screen will be filled with a black and white checker pattern. Use your camera, TAPED to the appropriate FOCAL LENGTH (if you’re not using a prime lens) and FOCUS. Take at least 5 photos at different angles, while completely filling your view finder with the checker board in pattern.
- Put those images in a folder. Navigate to the “add photos” icon and then select files:
- Next, navigate to the calibrate button:
- In the next dialogue box, Agisoft recommends checking flags both for Center principle point and for Square pixels. The distortion model should be selected as k1, k2, k3 (or k1, k2, k3, p1, p2).
- After the calibration is finished you should save your calibration file as .xml. 8. We back up our files as a .lnz as well.
- Select an object (make sure it’s not transparent, reflective or shiny-(no glass or mirror).
- Place the object in an evenly lit environment on an empty table or pedestal if possible. Remember the object needs to remain stationary. The photographer moves, not the object.
- Visualize a circle around your object. It’s probably easiest to envision something like this, below. Taking an image every 10 degrees will give you robust results. The more images you take the better.
background of your photos.
2. Convert RAW files to .DNG’s to archive and then convert to .jpg for processing.
Place in a folder. Then begin the processing of your files in Agisoft. See here for details: https://okeeffeimagingproject.wordpress.com/2012/08/26/photoscan- processing/
- Open Photoscan/check preferences
- Build a “chunk” + add files (jpegs).
- If you’re using Agisoft Lens, then go to Tools>Camera Calibration.
F. Then press apply, click calibration and then close.
G. Now, back to Photoscan in order to prepare your mesh.
A. If needed, mask images, by making a selection then [command+shift+a] to add more to it. Select parts of photos to mask out with rect. marquee or intelligent scissors. Command z to undo.
B. Align photos (high, disabled) takes several hours depending on images Point Cloud.
C. Workflow>Build Geometries (longest step) Use medium setting.
i. Setting: Object Type: Arbitrary
- Target: Medium
- Geometry: Smooth
- Face count: 200,000
- Filter: 0.1
- Hole Threshold: 0.5
D. Workflow>Build Texture (fastest step). Then View>textured.
- Mapping Mode: Generic
- Texture from: all photos
- Blending Mode: Average
- Atlas Width: 4096
- Atlas Height: 8192
E. File>save then File>export mesh (make sure to save all files in same location-HD)
- Identify your subject and then position your camera accordingly.
- Once your distance from the subject and camera lens are chosen, a horizontalline of known length needs to be placed in the frame with your subject. This allows for accurate distance measuring and scaling in the 3D mesh.
- A great way to do this is to place Dennison Dots equidistant and level all the wayacross the subject. Not only do Dennison Dots placed onto the subject help in scaling and measuring along the mesh, but it also helps in the capture process by giving visual cues for the amount of distance to move along the subject. For this to be effective, the distance in between dots should be roughly one third of the total horizontal distance of your photo.
- The distance from the subject to the camera and the distance in between your Dennison Dots should now be established. Pick a line that will run the horizontal length of your subject and place the Dennison Dots along this line. Make sure that these dots are not only equidistant, but are also perfectly level.
- When going around angled surfaces-fan around your subject at 15 degree angles.
CLEAN the mesh :
1. Models can be finessed and edited Photoscan and then further finessed in Meshab. You’ll want to save your file as an .obj file for editing and repairing in Meshlab. Save your file as a .stl for 3d printing.
Real world applications?
You can use your generated mesh in several ways:
- ▪ Conservation usages: to monitor structures or historic objects and chart theirchanges over time.
- ▪ 3d file for viewing online
- ▪ 3d prints
- ▪ Use with animations or games