You are on page 1of 36

A Guide to Processing Photos into 3D Models Using

Agisoft PhotoScan
Samantha T. Porter
University of Minnesota, Twin Cities
Fall 2015

Index

1) Automatically masking a black background / Importing Images …. page 2

2) Separating images into chunks and aligning photos ……………………… page 14

3) Editing sparse clouds and building dense clouds …………………………… page 18

4) Editing dense clouds, building / editing meshes …………………………… page 19

5) Applying mesh-based masking ……………………………………………………….. page 21

6) Aligning, editing, and merging chunks …………………………………………… page 22

7) Building a complete mesh and building texture ……………..……………… page 26

8) Scaling your mesh (using markers in Photoscan Pro) ……………………. page 29

8) Exporting your model …………………………………………………………………….. page 36

The following versions of the software listed below were utilized in creating these tutorials:

Adobe Photoshop CS6 Version 13.0.1 x64


Agisoft PhotoScan Standard Edition Version 1.1.5 build 2034 (64 bit)
Agisoft PhotoScan Professional Edition Version 1.1.5 build 2034 (64 bit)

1
Step 1a – Option 1 Creating a black ‘background’ image in Adobe Photoshop

1. Open Adobe Photoshop. Click File  Open.

2. Navigate to the set of images you want to process. Select one of the images and click Open.

2
3. Click Select  All.

4. Click Edit  Fill.

3
5. Set the contents to use Black. Click OK.

6. Now that the image is filled in, you can save it. Click File  Save As.

4
7. Choose a place to save this background image. Navigate to this folder. Set the file name as
something easy to remember like “background.” Save the file as a JPEG.

8. If prompted, at this step you may accept the default settings that Photoshop provides.

5
Step 1a – Option 2 Creating a black ‘background’ image in Microsoft Paint

1. Open Microsoft Paint. Click File  Open.

2. Navigate to the set of images you want to process. Select one of the images and click Open.

6
3. The image may open at full size, and so only a portion of the image may be visible. Click
View  Zoom Out until the entire image is visible. Alternatively, you may use the slider bar
in the lower right hand corner.

4. Return to the Home tab. Make sure that both Color 1 and Color 2 are set to black.

7
5. Click on the rectangular shape icon. Click Fill and set it to Solid Color.

6. Drag a rectangle across the image. This should turn the entire image black. Reposition /
resize the rectangle, or repeat the previous stage if necessary.

8
7. Click File  Save As  JPEG picture.

8. Choose a place to save this background image. Navigate to this folder. Set the file name as
something easy to remember like “background.” Save the file as a JPEG. Navigate to this
folder. Set the file name as something easy to remember like “background.” Save the file as
a JPEG.

9
Step 1b - Importing photos and masks into Agisoft PhotoScan

1. Open Agisoft PhotoScan. Click Workflow  Add Folder.

2. Navigate to the folder with the set of images you would like to process. Click Select Folder.

10
3. If prompted, select Create camera from each file. Click OK.

4. Once the images are imported, click Tools  Import  Masks.

11
5. For the masking method, select From Background. In this case, we are using a single file to
mask all of the images. Set the file name to be one you created in Step 1. You can also
change the level of tolerance1 the masks will be processed with. In this case, we want this to
apply to all images / cameras. Click OK.

6. Navigate to the folder where you saved the background image, then click OK.

1
Tolerance refers to how different in tone and color a pixel may be from the background image to be
included as part of the image mask. A level of 50 usually works well, but you can adjust this if need be. If
not enough of the background is being masked, you can try raising the tolerance. If too much of the
image is being masked, try lowering the tolerance.

12
7. PhotoScan will now begin creating the image masks.

8. Once processing has completed you can preview the masks by toggling the icon circled in
red below. You can view masks in greater detail in the center window by double clicking on
the thumbnails in the Photos pane (displayed here on the right). You can also edit individual
masks once they are imported into PhotoScan by using the tools circled below in blue. Once
you are happy with your masks, you can proceed with processing your 2D images into 3D
models.

13
Step 2 – Separating images into chunks and aligning photos

1. Scroll down through your photos until you find the point at which the object was flipped. This
is sometimes marked with a photo of the scale alone, of a hand in front of the camera, etc.

2. Select all the photos below this point. Right-click on one of the selected images. Click Move
Cameras  New Chunk. When it asks you to move cameras, say yes.

14
3. In your first chunk, if you have a marker image (e.g. an image with only the scale in it) you
will want to disable it. Right-click on the image and click Disable Cameras.

4. Now, you want to align your photos for both Chunk 1 and Chunk 2. This is easiest to do with
a batch process. To do this, click Workflow  Batch Process.

15
5. Click the Add… button in the pop-up window.

6. Set the Job Type to Align Photos. Apply the process to all chunks. Adjust the settings
to your preferences, making sure that the value for Constrain feature by mask is set
to yes.

16
7. In the pop-up window, click OK to run the photo alignment. It’s a good idea to also
check the box next to Save project after each step.

You can view your sparse point cloud by clicking the Model tab.

17
Step 3 – Editing sparse clouds and building dense clouds

1. Use to Resize Region and Rotate Region tools to make sure that all the points associated
with your target object fall within the bounding box. If you are using Agisoft PhotoScan
Standard Edition, you will also want to make sure your scale is including in the bounding box
(you will need to use it later to scale your mesh in an outside program). To rotate your view
while setting your bounding box, you will need to click on the arrow icon. Do this for
both chunks. If the blue boxes indicating camera positions are in your way, you can hide
them by pressing the button shaped like a camera .

2. Now you want to build a dense cloud for each chunk using another batch process. Click
Workflow  Batch Process. If it appears, you will want to remove the existing step of Align
Photos, since that has already been accomplished. Click Add. Set the Job Type to Build
Dense Cloud and input your desired settings. Click OK on both pop-up windows to start the
process.

18
Step 4 – Editing dense clouds, building / editing meshes

1. The next step is to delete unnecessary parts of the dense points cloud, including all the
putty used to support the object and most or all of the scale (depending on if you will be
scaling the model in PhotoScan or an outside program. Do this by selecting points using
the following buttons:

Note that as before, to rotate the scene you will need to click on the arrow button. To
subtract from your selection, hold the Shift key. To add to your selection, hold the Ctrl key.

In the end, your dense cloud should look as it does below. Do this for both chunks. You
can switch chunks my double clicking on the name of a chunk in the workspace pane on
the left. The active chunk will display in bold.

19
2. Now you want to build a mesh for each chunk using a new batch process. Click Workflow 
Batch Process. If it appears, remove any existing steps. Click Add. Set the Job Type to Build
Mesh and input your desired settings. Click OK on both boxes to start the process.

Your result should look like this:

20
Step 5 – Applying model-based masking

1. Click Tools  Import  Import Masks. Set the method to From Model. Click OK. Do
this for both chunks.

21
Step 6 – Aligning chunks

1. Click Workflow  Align Chunks.

Make sure both chunks are selected. For the Method, select Point Based. Make sure that the box next to
Constrain features by mask is selected. Press OK. The two chunks should align.

22
Step 6 – Editing / merging chunks and building a complete mesh

1. You now want to edit each of the dense clouds to remove any areas with bad data.
Usually, bad data is associated with parts of the target object near the base / near
any supporting material, or areas of the target object that were facing downward in
the source photos.

You can show or hide the second chunk by clicking the following icon:

23
Make sure you don’t leave any holes in the dense cloud.

2. Once you’re happy with how your dense cloud looks, it’s time to merge your chunks.
Click Workflow  Merge Chunks.

24
Select the chunks you would like to merge. Make sure that the box next to Merge Dense
Clouds is checked. Click OK.

25
Step 7 – Building a complete mesh and building texture

1. Double click on the merged chunk to select it. You now want to build a mesh based
on the merged dense cloud. Do this by clicking Workflow  Build Mesh.

Choose the settings you want. Click OK to proceed.

26
2. Since you only need one scale, at this point you can delete one. Select the
appropriate polygons using one of the selections tools then press Delete.

Note: if you will be scaling


your model in PhotoScan
Professional Edition you
can get rid of both scales if
you haven't already.

3. To build texture click Workflow  Build Texture.

Enter your desired settings, and click OK. You can view your model with texture by
pressing the icon.

27
4. Check your model’s texture for any remnants of the putty / support material. If you
find some, check the photos for any places where the putty is not masked. Mask
these areas, then re-run the texture building process.

28
Step 8 – Scaling your mesh (using markers in PhotoScan Pro)

1. There are two ways to scale your mesh in PhotoScan Pro using markers. If you
have retained part of your scale, you can add markers to the model itself. Do this
by zooming in to where you want to place your reference point. Using the
navigation tool (arrow icon ) right-click on the mesh at your reference point
location and click Create Marker. Repeat this for your second reference point.
Reference points should be as far away from each other as possible.

29
Alternatively, you can add markers on photos. Find a photo where at least one of your
reference points is in clear view.

Zoom in to the place you would like to put the reference point using the scroll wheel.
Right-click and select Create Marker.

30
Navigate to an adjacent photo by double clicking on it in the Photos pane. The
reference point should lie somewhere on the red line overlaid on the photo. Once again,
zoom in on the reference point.

Right-click in the appropriate position. This time click Place marker and select the
appropriate marker name.

31
Repeat this process for a second reference point.

To view your reference points in 3D space, click the Model tab.

32
2. Now, the instructions are the same for either method. Navigate to the Reference
pane.

Select two reference points. You can do this by clicking on the name of one point in the
Reference pane, holding Shift, and then clicking on the name of your second reference
point. Right-click on the name of one of the selected points and click Create Scale Bar.

33
3. A scale bar will now appear in the pane below. To add a reference distance, double
click on the empty space unter the field Distance (m). Type in the correct reference
distance and press Enter.

To apply the scaling, you will need to press the Update icon .

34
If possible, to mitigate error it is best to add in multiple scale bars that are ideally
orthogonal to one another. You can do this by repeating the process outlined above for
additional reference points.

35
Step 9 – Exporting your model

1. To export your model (whether or not it is finished, or if you need to scale it in


another program) click File  Export  Export Model.

2. Navigate to your chosen file destination. Choose your file type (obj, stl, etc). Name
your file and press Save.

36

You might also like