Photogrammetry for Historic Preservation – Agisoft Lens and PhotoScan

3D: Photo Imaging for Condition Detection, Monitoring, and Documentation

Photogrammetry with Agisoft’s PhotoScan and Lens Software http://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.

Resources:

How to guides and more: http://okeeffeimagingproject.wordpress.com/ Photoscan: http://agisoft.ru/products/photoscan/
Lens: http://agisoft.ru/products/lens/
Mesh Lab: http://meshlab.sourceforge.net/

Camera specifications:

  1. 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: http://okeeffeimagingproject.wordpress.com/ workflow/equipment-and-software/
  2. 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.
  3. Global Camera Settings: Manual, RAW capture, standard shooting mode. Use the lowest ISO possible (100 or 200 are preferable).
  4. 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)

Lighting:

  1. 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.
  2. 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).
  3. A tripod or monopod may be needed if slower shutter speed is required.

What to avoid:

  1. 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.
  2. 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.

PROCESSING FILES:

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.

AGISOFT LENS SOFTWARE:
1. Download the software: http://agisoft.ru/products/lens/

  1. When Agisoft Lens is open, pull up the checkerboard board icon on the top of screen
  2. 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.
  3. Put those images in a folder. Navigate to the “add photos” icon and then select files:
  4. Next, navigate to the calibrate button:
  5. 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).
  6. After the calibration is finished you should save your calibration file as .xml. 8. We back up our files as a .lnz as well.

Photographing OBJECTS

  1. Select an object (make sure it’s not transparent, reflective or shiny-(no glass or mirror).
  2. 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.
  3. 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.

5. Photoscan uses a lot of computational resources. See the chart below for specifics on how many images can be used for each processed “chunk”. See the blog for more details on this step: http:// okeeffeimagingproject.wordpress.com/daily-documenting/video/

1. Next, be sure to frame your images as tightly as possible, keeping the subject in the frame. Go around your entire image keeping the same distance from the subject. Be careful that reflective, shiny, or transparent surfaces are not in the

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: http://okeeffeimagingproject.wordpress.com/2012/08/26/photoscan- processing/

  1. Open Photoscan/check preferences
  2. Build a “chunk” + add files (jpegs).
  3. If you’re using Agisoft Lens, then go to Tools>Camera Calibration.

E. Click on Initial then select all the images in the cue below. Go to import and select your Agisoft Lens .xml file.

F. Then press apply, click calibration and then close.
G. Now, back to Photoscan in order to prepare your mesh.

PHOTOSCAN PROCESSING:

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

  1. Target: Medium
  2. Geometry: Smooth
  3. Face count: 200,000
  4. Filter: 0.1
  5. Hole Threshold: 0.5

D. Workflow>Build Texture (fastest step). Then View>textured.

  1. Mapping Mode: Generic
  2. Texture from: all photos
  3. Blending Mode: Average
  4. Atlas Width: 4096
  5. Atlas Height: 8192

E. File>save then File>export mesh (make sure to save all files in same location-HD)

Photographing STRUCTURES:

  1. Identify your subject and then position your camera accordingly.
  2. 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.
  3. 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.
  4. 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.
  5. 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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s