cvt.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
|
|
Source code in src/cvt/filtering.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
|
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
|
|
required |
src_cam
|
ndarray
|
|
required |
tgt_depth
|
ndarray
|
|
required |
tgt_depth
|
ndarray
|
|
required |
pix_th
|
float
|
|
1.0
|
depth_th
|
float
|
|
0.01
|
Returns:
Name | Type | Description |
---|---|---|
mask |
ndarray
|
|
depth_reprojected |
ndarray
|
|
coords_tgt |
ndarray
|
|
Source code in src/cvt/filtering.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
|
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
|
|
Source code in src/cvt/filtering.py
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
|
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
|
|
Source code in src/cvt/filtering.py
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
|