This tool helps to create, edit and manipulate car masks in the DriveWorks rig-files.
Python 3.6 is required.
Please run the following command to install required python packages:
Please install GIMP image editor before running this tool (http://www.gimp.org/
).
The car mask extraction tool can be configured using command line parameters.
The table below explains all supported optional command line parameters:
Parameter | Description |
---|---|
--image-editor | the name of the image-editor |
--camera-mask-tool | a path to the calibration-camera-mask-manual tool |
--target-mask-dimension | a target dimension of the image masks. Original images will be downscaled to be close to this target value in either x/y dimension, while exactlay preserving the original aspect ratio |
We assume the tool is executed after the extrinsic static camera calibration process. At this point the following directory structure is available:
We assume the file rig.json
contains all camera sensors for the car mask extraction. In addition we assume a sample image is available in the extrinsics
subfolder for each camera sensor in the rig.json
. These image are used for mask extraction. The name of the image file should correspond to the camera sensor name in the rig-file.
Please run the following command to start the tool:
A sample of the rig-file is available here:
Please follow the corresponding tool's menu options for the car mask extraction.
This section describes how to use GIMP for mask selection (tested with GIMP 2.10.6). The tool will automatically open an image to process in GIMP. Follow these steps to select a mask:
Free Select Tool
(menu Tools
-> Selection Tools
-> Free Select
)target-mask-dimension
parameter for details). The tool automatically adjusts the size of the input image before starting GIMP.antialiasing
mode is switched off, correct if needed.Invert
(menu Select
-> Invert
) to invert the selection maskBucket Fill Tool
(menu Tools
-> Paint Tools
-> Bucket Fill
)File
-> Overwrite <mask image name>
Discard changes