-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #78 from Smithsonian/dev-metashape
Merging photogrammetry branch
- Loading branch information
Showing
36 changed files
with
2,002 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
title: "Recipe: clean" | ||
summary: "Cleans a mesh of common issues" | ||
weight: 110 | ||
--- | ||
|
||
The `clean` recipe fixes some common issues with unnecessary geometry in a mesh by removing unreferenced vertices, zero area faces, duplicate vertices, and duplicate faces. | ||
|
||
It also has options for removing extraneous geometry components (often appearing as floating triangle clusters or unneeded reconstructions in photogrammetry results) by deleting everything but the largest component or, when doing turntable capture, deleting everything but the component central to the capture volume. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
title: "Recipe: photogrammetry" | ||
summary: "Creates a mesh and texture from capture image set folders" | ||
weight: 110 | ||
--- | ||
|
||
The `photogrammetry` recipe takes zip files of capture image sets (including alignment-only and masking images) and aligns the images, generates a mesh, cleans the mesh of unnecessary geometry, and finally generates a texture mapped to the cleaned mesh. This full photogrammetry pipeline currently works with Agisoft Metashape, with limited support for the RealityCapture and Meshroom applications. | ||
|
||
Resulting meshes may require some manual cleanup or fixing dependent on the input and masking data available. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
title: "Recipe: si-zip-photogrammetry" | ||
summary: "Creates a mesh and texture from zipped capture image sets" | ||
weight: 120 | ||
--- | ||
|
||
The `si-zip-photogrammetry` recipe is similar to the `photogrammetry` recipe but with some steps specific to the Smithsonian workflow. It takes folders of capture image sets (including alignment-only and masking images) as input and aligns the images, generates a mesh, cleans the mesh of unnecessary geometry, and finally generates a texture mapped to the cleaned mesh. This full photogrammetry pipeline currently works with Agisoft Metashape, with limited support for the RealityCapture and Meshroom applications. | ||
|
||
Resulting meshes may require some manual cleanup or fixing dependent on the input and masking data available. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
title: BatchConvertImage | ||
summary: Converts folders of image files between different formats. | ||
--- | ||
|
||
|
||
### Description | ||
|
||
Converts image files between different formats. | ||
|
||
Optionally clip the images to black or white. | ||
|
||
Tool: [ImageMagick](../../tools/imageMagick) | ||
|
||
### Options | ||
|
||
| Option | Type | Required | Default | Description | | ||
|-----------------|---------|----------|---------|---------------------------------------------------------------------------------------------------------------------| | ||
| inputImageFolder| string | yes | | Input image folder name. | | ||
| outputImageFolder | string | yes | | Output image folder name. | | ||
| quality | number | no | 70 | Compression quality for JPEG images (0 - 100). | | ||
| filetype | string | no | 'jpg' | File type to convert images to. | | ||
| level | number | no | none | If provided, clips image to black (value < 128) or white (value > 128) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
title: CombineMesh | ||
summary: Combines two meshes into a single self contained .fbx | ||
--- | ||
|
||
### Description | ||
|
||
Combines two meshes into a single self contained .fbx. | ||
|
||
Tool: [Blender](../../tools/blender) | ||
|
||
### Options | ||
|
||
| Option | Type | Required | Default | Description | | ||
|---------------|----------|----------|--------------------|---------------------------------------------------------------| | ||
| baseMeshFile | string | yes | | Base mesh file name. | | ||
| inputMeshFile | string | yes | | Input mesh file name to combine with base. | | ||
| inputMeshBasename | string | yes | | Name used for merged input mesh | | ||
| outputMeshFile | string | yes | | Output mesh file name. | | ||
| timeout | number | no | 0 | Maximum task execution time in seconds | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
title: MergeMesh | ||
summary: Merges a multi-mesh model file into one .obj and texture | ||
--- | ||
|
||
### Description | ||
|
||
Merges a multi-mesh model file into one .obj and texture. | ||
|
||
Tool: [Blender](../../tools/blender) | ||
|
||
### Options | ||
|
||
| Option | Type | Required | Default | Description | | ||
|---------------|----------|----------|--------------------|---------------------------------------------------------------| | ||
| inputMeshFile | string | yes | | Input mesh file name to merge. | | ||
| outputMeshFile | string | yes | | Output mesh file name. | | ||
| outputTextureFile | string | yes | | Output texture file name. | | ||
| timeout | number | no | 0 | Maximum task execution time in seconds | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
title: PhotogrammetryTex | ||
summary: Uses photogrammetry capture images to project a texture onto existing geometry. | ||
--- | ||
|
||
|
||
### Description | ||
|
||
Uses photogrammetry capture images to project a texture onto existing geometry using saved camera positions from a previous photogrammetry process. | ||
|
||
Tools: [Metashape](../../tools/metashape) (** Planned implementations for RealityCapture and Meshroom **) | ||
|
||
### Options | ||
|
||
| Option | Type | Required | Default | Description | | ||
|----------------------|---------|----------|-----------|----------------------------------------------------------------------------------------------| | ||
| inputImageFolder | string | yes | | Input image folder zip file. | | ||
| inputModelFile | string | yes | | Metashape only: Alignment image folder. | | ||
| outputFile | string | yes | | Base name used for output files. | | ||
| camerasFile | string | yes | | Name used for saved camera position file. | | ||
| scalebarFile | string | no | | CSV file with scalebar markers and distances. ([Example scalebar file](./scalebar-defs.csv)) | | ||
| timeout | number | no | 0 | Maximum task execution time in seconds (default: 0, uses timeout defined in tool setup). | | ||
| tool | string | no | "Metashape" | Tool to use for decimation: "Metashape", "RealityCapture", or "Meshroom". | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
title: Photogrammetry | ||
summary: Generates a mesh and texture from zipped image sets using photogrammetry techniques. | ||
--- | ||
|
||
|
||
### Description | ||
|
||
Generates a mesh and texture from zipped image sets using photogrammetry techniques. It includes options for masking image sets and alignment-only images. | ||
|
||
Tools: [Metashape](../../tools/metashape), | ||
With limited support by: [RealityCapture](../../tools/reality-capture), [Meshroom](../../tools/meshroom) | ||
|
||
### Options | ||
|
||
| Option | Type | Required | Default | Description | | ||
|----------------------|---------|----------|-----------|----------------------------------------------------------------------------------------------| | ||
| inputImageFolder | string | yes | | Input image folder zip file. | | ||
| alignImageFolder | string | yes | | Metashape only: Alignment image folder. | | ||
| maskImageFolder | string | no | | Metashape only: Mask image folder. | | ||
| outputFile | string | no | | Base name used for output files. | | ||
| camerasFile | string | no | | Metashape only: Name used for saved camera position file. | | ||
| scalebarFile | string | no | | CSV file with scalebar markers and distances. ([Example scalebar file](./scalebar-defs.csv)) | | ||
| optimizeMarkers | boolean | no | false | Metashape only: Flag to enable discarding high-error markers. | | ||
| alignmentLimit | number | no | 50 | Metashape only: Percent success required to pass alignment stage. | | ||
| tiepointLimit | integer | no | 25000 | Metashape only: Max number of tiepoints. | | ||
| keypointLimit | integer | no | 75000 | Metashape only: Max number of keypoints. | | ||
| turntableGroups | boolean | no | false | Metashape only: Flag to process images as SI-formatted turntable groups. | | ||
| depthMaxNeighbors | integer | no | 16 | Metashape only: Max neighbors value to use for depth map generation. | | ||
| genericPreselection | boolean | no | true | Metashape only: Flag = true to use generic preselection. | | ||
| meshQuality | string | no | "High" | Metashape only: Preset for mesh quality ("Low", "Medium", "High", "Highest", "Custom"). | | ||
| customFaceCount | integer | no | 3000000 | Metashape only: If meshQuality is custom, this defines the goal face count. | | ||
| depthMapQuality | string | no | "Highest" | Metashape only: Preset for depth map quality ("Low", "Medium", "High", "Highest"). | | ||
| maskMode | string | no | "File" | Metashape only: Desired masking operation. "File" assumes provided image is the mask, "Background" uses the background of the image as a basis for 'smart' masking. | | ||
| timeout | number | no | 0 | Maximum task execution time in seconds (default: 0, uses timeout defined in tool setup). | | ||
| tool | string | no | "Metashape" | Tool to use for decimation: "Metashape", "RealityCapture", or "Meshroom". | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
marker1,marker2,distance | ||
4,5,0.2498 | ||
5,6,0.24987 | ||
7,8,0.24985 | ||
9,10,0.49965 | ||
10,11,0.49963 | ||
12,13,0.24976 | ||
13,14,0.24987 | ||
33,34,0.50016 | ||
34,35,0.50034 | ||
36,37,0.24997 | ||
37,38,0.2501 | ||
41,42,0.49999 | ||
42,43,0.50019 | ||
44,45,0.25008 | ||
45,46,0.24996 | ||
49,50,0.50009 | ||
50,51,0.50007 | ||
52,53,0.25 | ||
53,54,0.25004 | ||
55,56,0.2501 | ||
57,58,0.50016 | ||
58,59,0.50013 | ||
63,64,0.25008 | ||
65,66,0.50021 | ||
66,67,0.50029 | ||
68,69,0.25008 | ||
69,70,0.25006 | ||
73,74,0.50026 | ||
74,75,0.50035 | ||
76,77,0.25014 | ||
77,78,0.25011 | ||
79,80,0.25007 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
title: Screenshot | ||
summary: Generates a screenshot of the provided geometry | ||
--- | ||
|
||
### Description | ||
|
||
Generates a screenshot of the provided geometry | ||
|
||
Tool: [Blender](../../tools/blender) | ||
|
||
### Options | ||
|
||
| Option | Type | Required | Default | Description | | ||
|---------------|----------|----------|--------------------|---------------------------------------------------------------| | ||
| inputMeshFile | string | yes | | Input mesh file name to combine with base. | | ||
| timeout | number | no | 0 | Maximum task execution time in seconds | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
title: Meshroom | ||
summary: Photogrammetry tool | ||
--- | ||
|
||
### Information | ||
|
||
- Developer: AliceVision | ||
- Website: https://alicevision.org/#meshroom | ||
- License: https://github.com/alicevision/meshroom?tab=License-1-ov-file | ||
|
||
### Installation | ||
|
||
- Windows installer: https://www.fosshub.com/Meshroom.html?dwl=Meshroom-2023.3.0-win64.zip | ||
|
||
### Configuration | ||
|
||
Example configuration for Meshroom in the `tools.json` configuration file: | ||
|
||
```json | ||
"RealityCapture": { | ||
"executable": "C:\\Program Files\\Meshroom\\Meshroom-2021.1.0\\meshroom_batch.exe", | ||
"version": "2021.1.0", | ||
"maxInstances": 1, | ||
"timeout": 0 // never | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
title: Agisoft Metashape | ||
summary: Photogrammetry tool | ||
--- | ||
|
||
### Information | ||
|
||
- Developer: Agisoft LLC | ||
- Website: https://www.agisoft.com/ | ||
- License: Commercial/Proprietary | ||
|
||
### Installation | ||
|
||
- Windows installer: https://www.agisoft.com/downloads/installer/ | ||
|
||
### Configuration | ||
|
||
Example configuration for Agisoft Metashape in the `tools.json` configuration file: | ||
|
||
```json | ||
"RealityCapture": { | ||
"executable": "C:\\Program Files\\Agisoft\\Metashape Pro\\metashape.exe", | ||
"version": "v1.8.3, build 14331", | ||
"maxInstances": 1, | ||
"timeout": 7200 | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.