mihaidusmanu / d2-net

D2-Net: A Trainable CNN for Joint Description and Detection of Local Features
Other
761 stars 163 forks source link

Are undistorted images more aligned with depth maps? #71

Closed zehongs closed 3 years ago

zehongs commented 3 years ago

Hi, I'm using your preprocessing code for megadepth. I'm wondering why you use undistorted images instead of the images provided by MegaDepth_v1_Dataset?

mihaidusmanu commented 3 years ago

Hello. In COLMAP, MVS is ran on top of undistorted images. This means that the depth maps are aligned with those images and not with the original raw ones. The distortion is not very significant in the internet collections, but for pixel-sensitive tasks such as local features, I recommend using the undistorted images.

zehongs commented 3 years ago

Hi thanks for you reply! I was thinking the released MegaDepth_v1_Dataset could have already used undistorted images. Because they were using it to train depth prediction task. So the input and output_gt should be aligned? Did you try those images before?

mihaidusmanu commented 3 years ago

I have tried using the released images but the quality of the pixel warping using the intrinsics, extrinsics and depth maps was much worse. Moreover, the camera parameters in the COLMAP reconstructions points to the fact that they released distorted images.

mihaidusmanu commented 3 years ago

A clarification regarding my earlier message. I have tried using the images + camera parameters from MegaDepth_SfM_v1.zip and the depth-maps from MegaDepth_v1_Dataset.zip were not aligned with these. They might be aligned with the images from MegaDepth_v1_Dataset.zip, but those images do not come with intrinsics. The undistortion step is anyway needed to recover these camera parameters.