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 they 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 on our website https://www.capturingreality.com/SampleDatasets
Calculate 3D textured model
This scripts consist 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
Texture reprojection from high poly to low poly model including creating of normal and displacement maps
This scripts consist 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 displacement maps)s
- elect 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".
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)
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 [637MB] – 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
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
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.
The scripts consist of the 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
Divide reconstruction region into columns and rows
These scripts divide the reconstruction region into smaller regions, which are defined by the chosen amount of rows and columns. This means that the reconstruction region is divided into a matrix grid, and each separated region is exported as an individual file.
The scripts consist of following steps:
- manually setting the number of rows and columns in the Command Prompt
- choosing and defining overlap between divided regions in the Command Prompt
- start processing in RealityCapture by scaling the existing reconstruction region based on the chosen amount of columns and rows
- export the reconstruction region
- move reconstruction region to the next column or move to the next row if all columns in the row were processed
- repeat moving and exporting of reconstruction regions till the last column and row are finished
Repetitively check for new images in the image folder and align them with already imported images
After running this script, the folder chosen as a folder with images will constantly be checked to detect if the minimum required number of images was added to it. Once the minimum required amount is detected, images will be added to the RealityCapture instance and aligned with all previously added images.
The scripts consist of following steps:
- manually setting the name of the image folder in the Command Prompt
- starting the process of checking newly added images in the image folder
- if the amount hasn't changed, the process repeats
- if the minimum required amount was not met, the process repeats
- if the minimum required amount was met, images are added to RealityCapture and all images are aligned
- process is repeated
Automatically install RealityCapture and change the installation folder
Install RealityCapture without user interface interaction into a preferred folder.
The scripts consist of the following steps:
- set the path to the installation file
- set the path to the folder into which RealityCapture will be installed
- set the path to the folder in which the log file will be stored
Loop through subfolders to create components and merge them
Loop through subfolders with images to create a component for each subfolder separately, and later merge them together. Components are created from images of a chosen format.
The scripts consist of the following steps:
- manually set the extension of the image format
- loop through subfolders and create components
- import all components into a new scene
- align imported components
Comments
0 comments