I want to process multiple tasks sequentially using the CLI.
Right now, I’m doing something like:
for ... in ...:
RC.exe ... -quit
This works, but it seems that RealityCapture must fully restart and quit for each iteration, which makes the whole process very slow.
Is there any recommended way to keep RealityCapture running and process multiple tasks without restarting the application each time?
Any advice or workflow suggestions would be greatly appreciated.
Thanks!
It depends what exactly do you need to process.
To process the data from subfolders, you can use script (for RealityCapture, as you mentioned that) like:
:: root path to work folders where all the datasets are stored (%~dp0 means the folder in which this script is stored)
set RootFolder=%~dp0
:: path to RealityCapture application
set RealityCaptureExe=“C:\Program Files\Capturing Reality\RealityCapture\RealityCapture.exe”
::Create loop on which to run RC for all subfolders
:: for /R %%f in (%RootFolder%..) do >>runscriptrealitycapture
for /D %%f in (%RootFolder%*) do (
echo Processing folder: ‘%%f’^
:: run RealityCapture
%RealityCaptureExe% ^
-newScene ^
-addFolder "%%f\Images" ^
-align ^
-calculateNormalModel ^
-exportModel "Model 1" "%%f\Outputs\model.obj" ^
-save "%%f\Project\project.rcproj" ^
-quit
)
You can use -newScene command instead of -quit (not to close RealityScan).