The following commands can be used to calculate camera poses and calibration, and to handle components and control points.
Command Name | Required Parameter | Optional Parameter | Description |
---|---|---|---|
align | Align images using the current settings. | ||
draft | Align images in the draft mode using the current settings. | ||
update | Update all components and models by a rigid transformation to fit actual constraints and control points. | ||
detectFeatures | Run feature detection according to the alignment settings. Detected features will be saved in the application cache. | ||
mergeComponents | Merge already created components. When using this command, no new images are added to existing components. | ||
exportXMP | params.xml |
Export camera metadata of components created in the last alignment in XMP format using the current settings or the settings from params.xml file (optional parameter).
You can export this file from the XMP metadata export dialog. The components must fulfil the condition defined by the command setMinComponentSize. NOTE: XMP files are stored in the same folder as the respective images. |
|
exportXMPForSelectedComponent |
Export camera metadata of a selected component in XMP format using the current settings. An example available in the paragraph 'Metadata (XMP) Export Settings' below. NOTE: XMP files are stored in the same folder as the respective images. |
||
importComponent | component.rcalign | Import a component from the component.rcalign file. | |
exportLatestComponents | folderName | Export components created in the last alignment as RealityCapture Alignment Components (.rcalign) into a specified folder. The components must fulfil the condition defined by the command setMinComponentSize. | |
setMinComponentSize | size | Specify the minimal component size for export when using the exportLatestComponents and exportXMP commands. The default value is 5. | |
exportSelectedComponentDir | folderName | Export the selected component into a folder (folderName including the path) as a RealityCapture Alignment Component (.rcalign). | |
exportSelectedComponentFile | fileName | Export the selected component into a RealityCapture Alignment Component file. | |
exportRegistration | fileName | params.xml | Export registration to a specified file using the current settings or the settings from the params.xml file (optional parameter). You can export these settings from the application in the Export Registration dialog. |
exportUndistoredImages | folderName | params.xml | Export undistorted images to a specified folder using the current settings or the settings from the params.xml file (optional parameter). You can export these settings from the application in the Export Registration dialog. |
exportSTMap | folderName params.xml | Export ST maps for the selected images. If folderName and params.xml are not specified, results are stored along with the original images using the current settings. You can export the settings file from the application in the Export Registration dialog. | |
exportSparsePointCloud | fileName | params.xml | Export 3D tie points (a sparse point cloud) into a specified file (fileName including the path and format extension) using the current settings or the settings from the params.xml file (optional parameter). You can export these settings from the application within the Export Point Cloud dialog. |
selectComponent | componentName | Select a component with the specified name (componentName) for further processing. | |
selectMaximalComponent | Select the largest component for further processing. | ||
selectComponentWithLeastReprojectionError | Select the component with the smallest reprojection error, based on the calculated Mean error [pixels], for further processing. | ||
renameSelectedComponent | newComponentName | Rename the currently selected component. | |
deleteSelectedComponent | Delete the currently selected component. | ||
deleteComponent | index | Delete a component based on the chosen index. Keep in mind that index numbers start at 0 (zero). | |
deleteAllComponents | Delete all components. | ||
importFlightLog | flFileName | params.xml | Import a flight log using the current settings or the settings from the params.xml file (optional parameter). You can export these settings from the application in the Import Flight Log dialog. |
importGroundControlPoints | gcpFileName | params.xml | Import ground control points using settings from the params.xml file. You can export these settings from the application in the Import Ground Control Points dialog. |
importControlPointsMeasurements | cpmFileName | params.xml | Import measurements of control points (CPs) using the current settings or the settings from the params.xml file (optional parameter). You can export these settings from the application in the Import Control Points Measurements dialog. |
editControlPointSelection | "key=value" | Edit the settings/parameters of the selected control points based on the value in the Selected control point(s) panel or its key. More information can be found here. | |
deleteControlPoint | index | Delete a selected control point. If an optional parameter index is used, a control point with a corresponding index will be removed. Index numbers start at 0 (zero) and follow the order of control points in the 1Ds view. | |
deleteControlPointMeasurement | Remove selected control points measurements (images assigned to a control point). Images have to be selected in the 1Ds view under the corresponding control point. | ||
exportGroundControlPoints | gcpFileName | params.xml | Export ground control points using the current settings or the settings from the params.xml file (optional parameter). You can export these settings from the application in the Export Ground Control dialog. |
exportControlPointsMeasurements | cpmFileName | params.xml | Export measurements of control points using the current settings or the settings from the params.xml file (optional parameter). You can export these settings from the application in the Export Control Points Measurements dialog. |
defineDistance | PointNameA PointNameB distance | constraintName | Define a distance constraint between two control points. If the constraintName is not defined, the distance name is created automatically. Alternatively, you can load a distance constraint from a file (see below). |
defineDistance | fileName | params.xml | Import a distance constraint from a file (filename including the path) using the current settings or the settings from the params.xml file (optional parameter). You can export these settings from the application in the Import Distance Definitions dialog. The list of supported formats distancedefinitions.xml can be found in the installation folder. |
editConstraintSelection | "key=value" | Edit the settings/parameters of the selected constraints based on the value in the Selected constraint(s) panel or its key. More information can be found here. | |
deleteConstraint | Remove selected distance constraints. Constraints have to be selected in the 1Ds view. | ||
detectMarkers | params.xml | Detect markers in images using the current settings or the settings from the params.xml file (optional parameter). You can export these settings using the Detect Markers tool in the application. | |
setCamerasGravityDirection | componentID | If the image's XMP file contains gravity information (xcr:Gravity), then the component will be rotated so the -z vector is in the direction of the gravity vector. This does not apply to the dense point cloud (mesh/model), only to the sparse point cloud (alignment). Will apply to the selected component, or to the component defined with the optional parameters (component ID). |
Follow these examples to learn how to align images with the command line.
Supposing you want to add images, make fast draft alignment, look at it and then continue to normal alignment and other calculations.
The first line does not end with quit, so the command will wait until the application is closed and continue just after that.
Now we will reuse the alignment. Imagine we have a properly aligned project Project1.rcproj that uses images from a folder Images1 and we want to create a project Project2.rcproj with images from Images2 and use the same alignment. We suppose that the corresponding images from Images1 and Images2 have the same names, but may differ in their extension.
The script exports .xmp files from Project1 next to the images (into Images1 folder), then copies them into Images2. The align command will now use the camera positions and calibration according to the setting stored in these .xmp files and application settings.
The next example takes the largest component and loads it into an empty scene.
The name of the component is not known beforehand, therefore it has to be searched for outside the application. Since the names of components are by default called Component 0, Component 1, etc., the largest component will be saved as a maxComponent 1.rcalign or likewise.
The last example exports all components containing more than 5 cameras and then imports them one by one into a new project.
You can import every component to its own project and process them separately, as well.
The following commands can be used for exporting camera metadata of components in the XMP format:
Setting Name | Key | Value | Default Value | Description |
---|---|---|---|---|
Camera export mode | xmpCamera | 0 | 1 | Do not export |
1 | Export as draft | |||
2 | Export as exact | |||
3 | Export as locked | |||
Merge with existing XMP files | xmpMerge | bool | true | |
Export rigging setup | xmpRig | bool | true | |
Export camera calibration groups | xmpCalibGroups | bool | true | |
Include editor options | xmpFlags | bool | true | |
Replace GPS EXIF with optimized values | xmpExGps | bool | true |
To learn more about the export of XMP metadata, visit this page.
Manage the current project, the application itself and add images via CLI
Using CLI with an .rccmd file
On delegating commands into an opened instance of RealityCapture
Model calculation via the command line
Further model processing via the command line
Application settings and behaviour
Commands for handling potential errors