Oxford-PTAM / PTAM-GPL

PTAM (Parallel Tracking and Mapping) re-released under GPLv3.
GNU General Public License v3.0
790 stars 360 forks source link

[Question] From v3Pixel{Down, Right}_NC to v3Pixel{Down, Right}_W #3

Open ghost opened 10 years ago

ghost commented 10 years ago

The transform is performed in MapPoint::RefreshPixelVector() https://github.com/Oxford-PTAM/PTAM-GPL/blob/master/Src/MapPoint.cc

  double dPixelRate = fabs(v3Center_NC * v3Normal_NC);
  double dOneRightRate = fabs(v3OneRightFromCenter_NC * v3Normal_NC);
  double dOneDownRate = fabs(v3OneDownFromCenter_NC * v3Normal_NC);

I checked the code in MapMaker. The v3Normal_NC is always initialized with(0, 0, -1). My question is why v3OneRightFromCenter_NC, v3Normal_NC, v3OneDownFromCenter_NC are not orthogonal to each other? Then the dot product calculated above are zeros.

  Vector<3> v3CenterOnPlane_C = v3Center_NC * dCamHeight / dPixelRate;
  Vector<3> v3OneRightOnPlane_C = v3OneRightFromCenter_NC * dCamHeight / dOneRightRate;
  Vector<3> v3OneDownOnPlane_C = v3OneDownFromCenter_NC * dCamHeight / dOneDownRate;

Is there an picture to explain how this transform is done?

Best regards, Tyler

ghost commented 10 years ago

[Solved] I think I understand now. illustration

v3OneRightFromCenter_NC
v3Center_NC

are the blue unit vectors.

v3CenterOnPlane_C
v3OneRightOnPlane_C

are the long black and red vectors.

Is that correct?

Best regards, Tyler