color-mesh
The color-mesh tool colors an input-mesh from a video (or list of images) and a list of camera files stored in a directory. A mesh colored with the average color or with a color for a particular camera is produced.
The default configuration of this tool depends on algorithm implementations in the VTK arrow which will only available if the KWIVER_ENABLE_VTK CMake flags are enabled.
kwiver color-mesh [options] input-mesh video-file cameras-dir output-mesh
Required arguments:
input-mesh- input mesh file.
video-file- input video file.
cameras-dir- input camera directory.
output-mesh- output mesh file.
Options are:
-h, --helpDisplay applet usage information.
-a, --all-framesCompute average color or save each frame color.
-c, --config argConfiguration file for tool
-f, --frame argFrame index to use for coloring. If -1 use an average color for all frames. (default: -1)
-g, --input-local-space-file argInput geographic local space file.
-m, --mask-file argAn input mask video or list of mask images to indicate which pixels to ignore.
-o, --output-config argOutput a configuration. This may be seeded with a configuration file from -c/–config.
-v, --active-attribute argChoose the active attribute between mean, median and count when saving a composite color (all-frames is false). For the VTP format, all attributes are saved, for PLY only the active attribute is saved.
-s, --frame-sampling argUse for coloring only frames that satisfy frame mod sampling == 0 (default: 1)
Default configuration
# Default configuration for the color-mesh applet
# Used to choose frames for coloring.
# A frame is chosen if frame mod `sampling' == 0
frame_sampling = 1
# Set color from frame. If frame = -1 it will use all frames with
# frame mode frame_sampling == 0.
frame = 1
# Compute the average color or colors for all frames
# The selected frames are chosen using frame_sampling
all_frames = false
# We compare the depth buffer value with the depth of the mesh point.
# We use threshold >= 0 to fix floating point inaccuracies
# Default value is 1, bigger values will remove more points.
occlusion_threshold = 1
# Color occluded points if parameter is true.
color_occluded = false
# Color masked points if parameter is true.
color_masked = false
# Remove points that are colored with fewer or equal this number of frames.
remove_color_count_less_equal = -1