RealityCapture

CLI Sample Scripts



Many features of RealityCapture can be used directly via the command line or by running a script. They are passed to the application as parameters of RealityCapture.exe and executed in a sequence.
Below you can find some sample scripts that might help you to set up scripts for your own workflows.
For the full manual regarding command-line interface, please check in-app help, section Command-line Interface.
You can find many sample datasets on which you can test these scripts here

Calculate 3D textured model

Download [26 MB]

This script consists of following processing steps:

  • load images
  • align
  • set reconstruction region automatically
  • calculate normal detail model
  • select marginal triangles
  • remove marginal triangles
  • rename selected model
  • calculate texture (and unwrap)
  • save project
  • export model
  • quit

Processing of datasets from fixed camera rig (full-body scan) using texture layers

Download [97 KB] - only CLI scripts

Download [2.7 GB] - 4 sample datasets including CLI scripts

These scripts consist of following processing steps:

  • load images from calibration dataset
  • automatic detection of coded targets
  • import ground control points to preserve the coordinate system among all scans
  • alignment
  • export XMP files (to re-use them across scans)
  • save the project
  • loading geometry and texture layers for all other datasets (processed one by one)
  • enabling camera prior information from XMP files
  • setting the layer which is going to be used for texturing
  • alignment
  • loading the reconstruction region
  • reconstruction in normal detail
  • simplification to 1M triangles
  • texturing the simplified model using the texturing layer
  • exporting textured model
  • saving the project

Texture reprojection from high poly to low poly model including creating of normal and displacement maps

Download [27 MB]

This script consists of following processing steps:

  • load images
  • align
  • select a component with the most amount of cameras in it
  • automatically create a reconstruction region
  • reconstruction in normal detail
  • rename created model
  • texture created model (this will also create unwrap)
  • simplify created model to a specified number of triangles
  • rename simplified model
  • create unwrap for simplified model
  • reproject texture onto a simplified model (including creating normal and disaplacement maps)
  • select simplified model
  • export simplified model
  • save project

Delegation of commands into an open instance of RealityCapture

For more information on how to control the opened instances of RealityCapture via command line please check in-app help and search for "Delegation of commands".

Download [26 MB]

These scripts consist of following processing steps:

  • check the running instance of RealityCapture
  • load images into an open instance in batches
  • align individually-export components and XMP files
  • import components
  • calculate normal detail model, simplify, calculate texture
  • export model

Play custom sound after RealityCapture finishes the process

(just for fun)

Download [44 KB]

 

Creating orthographic projection from in a georeferenced scene

For more information on how to control the opened instances of RealityCapture via command line please check in-app help and search for "Delegation of commands".

Download [637 MB] – CLI scripts including images

These scripts consist of following processing steps:

  • load images
  • align
  • import measurements of ground control points in the images
  • import coordinates of ground control points
  • align images
  • set automatic reconstruction region
  • calculate model in normal detail
  • calculate texture
  • calculate ortho projections while loading parameters from a file
  • save the project
  • export orthographic projection
  • quit the application

Detect markers and place reconstruction region on control points

Download [4 KB]

The scripts consist of following steps:

  • open a new scene
  • add folder with images
  • detect markers with imported parameters
  • define distances
  • align
  • select a component with the most cameras
  • set reconstruction region on detected markers with a custom height
  • set ground plane to the reconstruction region
  • move reconstruction region up
  • scale reconstruction region to the absolute value from the center of the reconstruction region
  • save the project
  • quit the application

Examples of how to select images using regular expressions


Download [3 KB]

This sample will show you how to select images that meet the specific criteria defined by the regular expression. You can use this for example when selecting images from a specific folder, images that end with the number 5, etc.

In the files, you can find also an example of how to set up .rccmd file for image selection that can be used in GUI without a need to run a .bat file.

Iterative simplification in an open project


These scripts can be used to run a simplification in an already open project several times. The simplification command is delegated to an open instance of RealityCapture and executed several times. The number of iterations is defined within the script.

Download [3 KB]

The scripts consist of following steps:

  • Finding an open instance of RealityCapture (a project with a selected model is expected)
  • simplify the model by 50%
  • simplify previously created model by 50%
  • simplify previously created model by 50%

Reconstruction of the object captured from two sides using masks


In this sample you can find batch files used to mask 2 folders of images, then import all of the images with their masks and create a complete textured model.

Download [248 MB] - CLI scripts including images

The scripts consist of following steps:

  • adding the first set of images
  • detecting the markers and georeferencing the scene using ground control points
  • calculating preview mesh
  • filtering unwanted parts
  • generating masks
  • the same process repeated for the second set of images
  • importing images for both sides of the object with all the generated masks
  • aligning all images
  • calculating the mesh and creating the texture
  • exporting the model