package LibReconstructMe;
// Collection of settings that define the behaviour of the reconstruction.
message reconstruction_settings {
// Device number to carry out computations.
// Use -1 to signal auto-choose.
optional int32 device_id = 1 [default = -1];
// -------------------------------------------------------------------------
// Reconstruction volume settings type
message volume_settings {
// Minimum corner point type
message min_3f {
required float x = 1 [default = -500];
required float y = 2 [default = -500];
required float z = 3 [default = -500];
}
// Maximum corner point type
message max_3f {
required float x = 1 [default = 500];
required float y = 2 [default = 500];
required float z = 3 [default = 500];
}
// Volume resolution type
message res_3i {
required int32 x = 1 [default = 256];
required int32 y = 2 [default = 256];
required int32 z = 3 [default = 256];
}
// Minimum extension point of the volume in world space.
// A re-compilation the OpenCL code is required for changes to take effect.
optional min_3f minimum_corner = 1;
// Maximum extension point of the volume in world space.
// A re-compilation the OpenCL code is required for changes to take effect.
optional max_3f maximum_corner = 2;
// The volume is divided into small cuboids called voxels.
// The number of voxels per dimension can differ, but must be divisable by
// 128. 128 is the minimum resolution per dimension.
// A re-compilation the OpenCL code is required for changes to take effect.
optional res_3i resolution = 3;
// This option enables the volume to move when a boundary was crossed
// The boundary is defined by a factor from 1 .. 0.
//
// 1: 0.5: 1:
// +-------------------+ +-------------------+ +-------------------+
// | | | | | |
// | | | +--------+ | | |
// | | | | | | | |
// | | | | | | | |
// | + | | | | | | |
// | | | | | | | |
// | | | +--------+ | | |
// | | | | | |
// +-------------------+ +-------------------+ +-------------------+
optional float trigger_boundary_scaling = 4 [default = 0.5];
}
// Volume setup
optional volume_settings volume = 2;
// -------------------------------------------------------------------------
// Point normals settings type
message normal_settings {
// Instead of calculation point normals through pixel neighbors,
// fit a parametric plane through the neighborhood.
// A re-compilation the OpenCL code is required for changes to take effect.
optional bool pca_normals = 1 [default = false];
// When pca_normals is enabled, this defines the neighborhood size.
// A re-compilation the OpenCL code is required for changes to take effect.
optional int32 half_kernel_size = 2 [default = 3];
};
// Point normals setup
optional normal_settings point_normals = 3;
// -------------------------------------------------------------------------
// Depthmap upsampling filter.
// Closes holes in depthmaps using a color image.
message depth_upsampling_settings {
// Enables or disables eroding of depthmaps.
optional bool enabled = 1 [default = false];
// The half size of depth contour erosion kernel size in pixel.
optional int32 half_kernel_size = 2 [default = 2];
// The half size of the Gaussian bilateral filter window in pixel space
optional float sigma_pixel = 3 [default = 5.0];
// The half size of the Gaussian bilateral filter window in color space
optional float sigma_color = 4 [default = 15.0];
};
// Depthmap upsampling settings.
optional depth_upsampling_settings depthmap_upsampling = 4;
// Depthmap erode settings type.
// Inaccuracies of depthmaps can occur at sharp depth steps. Through erosion
// sharp edges are eliminated.
message depth_erode_settings {
// Enables or disables eroding of depthmaps.
optional bool enabled = 1 [default = false];
// The half size of depth contour erosion kernel size in pixel.
optional int32 half_kernel_size = 2 [default = 2];
// The threshold for detecting sharp edges in the depth map.
optional int32 minimum_depth_step = 3 [default = 30];
};
// Depthmap erosion setup
optional depth_erode_settings depthmap_erosion = 5;
// Color-map erosion settings type.
// Inaccuracies of colorization can occur at sharp depth steps. Through colors are
// invalidated at such sharp edges.
message color_erode_settings {
// Enables or disables eroding of color-maps.
optional bool enabled = 1 [default = false];
// The half size of color contour erosion kernel size in pixel.
optional int32 half_kernel_size = 4 [default = 2];
// The threshold for detecting sharp edges in the depth map.
optional int32 minimum_depth_step = 3 [default = 30];
};
// Color-map erosion setup
optional color_erode_settings colormap_erosion = 6;
// -------------------------------------------------------------------------
// Depthmap bilateral filter settings type.
// Smoothes the depthmap while preserving sharp depthmap edges.
message bilateral_filter_settings {
// Enables or disables smoothing of depthmaps
optional bool enabled = 1 [default = true];
// The half size of bilateral filter kernel size in pixel.
optional int32 half_kernel_size = 2 [default = 3];
// The half size of the Gaussian bilateral filter window in pixel space
optional float sigma_pixel = 3 [default = 9.0];
// The half size of the Gaussian bilateral filter window in depth space
optional float sigma_depth = 4 [default = 30.0];
};
// Depthmap smoothing setup
optional bilateral_filter_settings depthmap_smoothing = 7;
// -------------------------------------------------------------------------
// Data integration settings type.
// Defines how adding data to the volume is carried out
message integration_settings {
// Defines the minimum thickness of objects in the volume.
// Lower values allow you to scan thinner objects. Settings this value
// too low results in reconstruction holes and incorrect tracking.
// A re-compilation the OpenCL code is required for changes to take effect.
optional float truncation = 1 [default = 20];
// Each volume voxel smoothes data from the last integrations.
// The maximum weight can be thought of as an moving average threshold.
// Once reached the voxel starts to forget older values.
// A re-compilation the OpenCL code is required for changes to take effect.
optional int32 maximum_weight = 2 [default = 32];
/// Maximum depth of points to integrate into the volume
optional float maximum_depth = 3 [default = 1500];
// Only points facing the camera in an angle no more than the given one
// will be considered in integration. Value is in degrees.
optional float maximum_angle = 4 [default = 70];
// Enable support for colors in volume.
optional bool use_colors = 5 [default = false];
// Depth values beyond maximum_depth won't be integrated, but can be used for
// object change detection. If the distance difference at a specific pixel between
// the measured sensor depth and the old object depth is greater than minimum_deletion_distance,
// the object will be erased from the global model.
optional float minimum_deletion_distance = 6 [default = 40.0, deprecated=true];
}
// Integration setup
optional integration_settings data_integration = 8;
// -------------------------------------------------------------------------
// Data extraction settings type.
// Defines how the volume is raytraced to generate synthetic sensor data,
// which is used to align the current raw sensor data with the last camera
// position.
message extraction_settings {
// Step factor of the ray marching algorithm. Specified in terms of
// percent of data_integration.truncation
// A re-compilation the OpenCL code is required for changes to take effect.
optional float step_factor = 1 [default = 0.7];
// Numerical step length of gradient calculation
// Estimating point normals in the volume is carried out using
// numerical differentation. This value value defines the
// the +/- distance of samples around the value to be differentiated.
// Higher values will lead to smoother but maybe inaccurate normals.
// A re-compilation the OpenCL code is required for changes to take effect.
optional float gradient_step_length = 2 [default = 0.1];
// Minimum refinement steps of raytracing in the vicinity of the surface.
// The higher the better is the approximation of the real surface intersection.
optional int32 surface_vicinity_steps = 3 [default = 4];
}
// Raytracing setup
optional extraction_settings data_extraction = 9;
// -------------------------------------------------------------------------
// Camera tracking alignment settings type.
// Defines how tracking the camera position between frames behaves.
message alignment_settings {
// Local search parameters. Local search is fast and succeeds when
// the camera movement between two subsequent frames is small.
message local_search_settings {
// Maximum number of iterations to perform
// A re-compilation the OpenCL code is required for changes to take effect.
optional int32 maximum_iterations = 1 [default = 30];
// Number of data pyramid levels to generate
// A re-compilation the OpenCL code is required for changes to take effect.
optional int32 pyramid_levels = 2 [default = 3];
// Maximum point distance between two points to establish correspondences
// A re-compilation the OpenCL code is required for changes to take effect.
optional float maximum_point_distance = 3 [default = 20];
// Maximum normal angle deviation two points to establish correspondences
// A re-compilation the OpenCL code is required for changes to take effect.
optional float maximum_normal_angle = 4 [default = 30];
// How much weight to apply to the color tracking term. Setting this value to zero will
// disable color tracking. Higher values will give increasingly more weight to the color tracking
// term. Try 0.5 for a start.
optional float color_weight = 5 [default = 0];
// Wether or not to skip the finest pyramid level in matching. This is an performance
// optimization.
optional bool skip_finest_pyramid_level = 6 [default = false];
}
// Global search parameters. Global search is slower than local search but
// succeeds in cases where the camera movement between two subsequent frames large.
message global_search_settings {
// Maximum number of seconds to search for tracking
// A re-compilation the OpenCL code is required for changes to take effect.
optional float maximum_seconds = 1 [default = 0.7];
// Minimum inlier percentage to become a valid hypothesis.
// A re-compilation the OpenCL code is required for changes to take effect.
optional float minimum_inlier_percentage = 3 [default = 0.4];
// When using color tracking this value declares the minimum number of
// feature matches between two images
optional int32 minimum_feature_matches = 4 [default = 25];
}
// Verification of transform estimation.
message verification_settings {
// Maximum allowed average SDF change of voxels when tracking is established
optional float maximum_sdf_change_on_track = 1 [default = 0.08];
// Maximum allowed average SDF change of voxels when no tracking is present
optional float maximum_sdf_change_no_track = 2 [default = 0.08];
};
// Local search parameters
optional local_search_settings local_search = 1;
// Global search parameters
optional global_search_settings global_search = 2;
// Verification settings
optional verification_settings verification = 3;
// Pad missing volume data with sensor data to increase tracking robustness when only portions
// of the volume are visible. Enabling this feature assumes a moving camera and a static scene.
optional bool use_sensor_data_padding = 4 [default = false];
// Anticipates the next position by trying to forecast. Useful to reduce the number of
// local search iterations. Enabling this feature assumes that the camera movement is kinda
// smooth.
optional bool use_position_forecast = 5 [default = true];
}
// Alignment setup
optional alignment_settings camera_tracking = 10;
}