2

I have two sets of corresponding image points and the projection matrices. I use OpenCVs triangulatePoints() function (API | src code) and the results for the homogeneous 3D points are:

  points4D =
    [-0.25643614, -0.28791642, 0.55905539, 0.73403114;
     -0.1565057, -0.31044999, -0.93213254, 0.10127056;
     -0.059627295, -0.031433985, -0.93772811, 0.34076744;
     -0.29897481, -0.35055584, -0.88075489, 0.10952386;
      0.34366035, 0.22131357, -0.66281128, -0.62737477;
     -0.3073515, 0.079058781, -0.87456447, 0.36663577;
      0.18399428, -0.46038184, -0.85980427, -0.12219366;
      0.059319936, -0.27747059, -0.95542425, 0.081582561;
     -0.096490026, -0.21752475, 0.38856983, 0.89016074;
     -0.22918785, -0.27198601, 0.54019034, 0.76268667] 

Since the triangulation uses a SVD composition to compute the solution, the points (each row in the above matrix represents a 4D point) are normalized to unit vectors. Since a homogeneous point is defined as

P_homogeneous = [X Y Z 1]

do I have to normalize all the calculated points separately s.t. their last entry is unit to get a metric reconstruction of the points?

takahashi
  • 2,081
  • 3
  • 14
  • 24
  • I haven't done this before, but from what I know of homogeneous coordinates I assume so. Does it help your model reconstruction? I think it's significantly less work for you to try with your own code than ask someone else to do so. When you do find your answer, post what you've found back on this question. – Mark Miller Jul 10 '15 at 17:26
  • I was hoping for a scientifc answer/ derivation rather than just trying and not understanding the material in-depth. However, using my code, normalizing each point independently such that their last entry is unit turned out fine. The reconstruction of the scene is correct (consistently up-to-scale). – takahashi Jul 13 '15 at 09:23

1 Answers1

2

If you are using OpenCV like you say, you can use convertPointsFromHomogeneous.

AndroC
  • 4,758
  • 2
  • 46
  • 69