simonfuhrmann / mve

Multi-View Environment
http://www.gcc.tu-darmstadt.de/home/proj/mve/
Other
977 stars 419 forks source link

possible bug #570

Closed 2226415223 closed 8 months ago

2226415223 commented 8 months ago

I found in depthmap.cc, pixel_3dpos's normalize cause the original plane became curved surface image I use game render result for reconstruct test, I replace camera parameters and depthmap with groundtruth result from game engine. this is original code's result: reconstruct

this is the one I remove the normalize operation reconstruct2 as the camera celibration formula: camCoordPos.z (inv_k_Matrix pixelPos) = camCoordPos, the normalize seems not necessary

simonfuhrmann commented 8 months ago

Hi there. There are two depth conventions. One is using the distance from the camera to the 3D point, whereas the other is using the range along the z-axis only. MVE implements the former method. You are expecting the latter.

In general, the latter approach is not always applicable, for example with fisheye camera models with >=180 degrees field of view, around the singularity.

In any case, there is a function that converts between these conventions here: https://github.com/simonfuhrmann/mve/blob/master/libs/mve/depthmap.h#L54-L64

I hope this helps!

2226415223 commented 8 months ago

yes you are right,thanks