cvtkit.filtering
A suite of common filtering utilities.
This module includes several functions for filtering depth maps.
conf_filter(depth_map, conf_map, device='cuda:0', min_conf=0.8)
Filters a map by confidence values above a minimum threshold.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
depth_map
|
Tensor
|
|
required |
conf_map
|
Tensor
|
|
required |
device
|
str
|
|
'cuda:0'
|
min_conf
|
float
|
|
0.8
|
Returns:
Name | Type | Description |
---|---|---|
filtered_map |
Tensor
|
|
mask |
Tensor
|
|
geometric_filter(src_depth, src_cam, tgt_depth, tgt_cam, pix_th=1.0, depth_th=0.01)
Computes a geometric filter based off of pixel and depth reprojection error.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
src_depth
|
NDArray[float32]
|
|
required |
src_cam
|
NDArray[float32]
|
|
required |
tgt_depth
|
NDArray[float32]
|
|
required |
tgt_depth
|
NDArray[float32]
|
|
required |
pix_th
|
float
|
|
1.0
|
depth_th
|
float
|
|
0.01
|
Returns:
Name | Type | Description |
---|---|---|
mask |
NDArray[float32]
|
|
depth_reprojected |
NDArray[float32]
|
|
coords_tgt |
NDArray[float32]
|
|
topk_filter(depth_map, conf_map, device='cuda:0', percent=0.3)
Filters a map by the top percentage of confidence values.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
depth_map
|
ndarray
|
|
required |
conf_map
|
ndarray
|
|
required |
device
|
str
|
|
'cuda:0'
|
percent
|
float
|
|
0.3
|
Returns:
Name | Type | Description |
---|---|---|
filtered_map |
ndarray
|
|
mask |
ndarray
|
|
topk_strict_filter(depth_map, filter_prob, device='cuda:0', percent=0.3)
Filters a map by the top percentage of confidence values.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
depth_map
|
ndarray
|
|
required |
filter_prob
|
ndarray
|
|
required |
device
|
str
|
|
'cuda:0'
|
percent
|
float
|
|
0.3
|
Returns:
Name | Type | Description |
---|---|---|
filtered_map |
ndarray
|
|
mask |
ndarray
|
|