DROID-SLAM
DROID-SLAM copied to clipboard
Question about the thresholding in proj()
The projection function proj()
in droid_slam/geom/projective_ops.py (L44) has a threshold for Z. Similar thresholding for Z is also applied in projective_transform() to generate a valid map. I am confused about the the way of thresholding and its aim:
- In
projective_transform()
andproj()
, it seems the threshold is used to exclude points too close to camera. However, Z is the third coordinate in the 3D homogenous coordinates, which is not the actual depth. The actual depth should beZ/D
. Thus, why does it thresholdZ
instead ofZ/D
? -
projective_transform()
andproj()
have different thresholds for Z:MIN_DEPTH
and0.5*MIN_DEPTH
respectively. Is there any reason? - I am curious why we should exclude points too close to camera. Is it because if the points are too close, the division might be inaccurate and lead to large error? However, the threshold is not very small (
MIN_DEPTH=0.2
), which seems too loose for the division stability.
Hi, I encounter the same question why the third one of the homogenous coordinates instead of last. Any idea about it??
Btw the replacement for the clamped values are different in py and cuda. Its everywhere replaced with 0.0 e.g. in https://github.com/princeton-vl/DROID-SLAM/blob/92027b31c06f42e4471706bbb46e7eb3cb3a5dd0/src/droid_kernels.cu#L302 in cuda, whereas its clamped to 1.0 in python see https://github.com/princeton-vl/DROID-SLAM/blob/92027b31c06f42e4471706bbb46e7eb3cb3a5dd0/droid_slam/geom/projective_ops.py#L44 This is somehow inconsistent.
Thanks in advance for any input!