nmoehrle / mvs-texturing

Algorithm to texture 3D reconstructions from multi-view stereo images
Other
931 stars 328 forks source link

how to transform my pose~ #143

Open Shen001 opened 4 years ago

Shen001 commented 4 years ago

here is a problem,maybe not very about your perfect tools. my pose comes from a tool called "ContextCapture",but a photo's pose is a rotation data includes "omega/phi/kappa" and a center data includes"x/y/z".so maybe you know how to transform rotation angle to rotation matrix? i am confused about this, thanks.

pavan4 commented 4 years ago

The math seems straightforward but it is a bit complicated to get it right as debugging is quite hard.

Having said that, I will reiterate some points that the authors have mentioned:

You can use scipy or this to convert your angles to transformation matrix and extract rotation matrix out of it.

Hope this helps!

Shen001 commented 4 years ago

The math seems straightforward but it is a bit complicated to get it right as debugging is quite hard.

Having aid that, I will reiterate some points that the authors have mentioned:

  • The camera coordinate system used by the system is here
  • You need to construct the .cam files for each image from your known ContextCapture world.
  • .cam files are of the form :
tx ty tz R00 R01 R02 R10 R11 R12 R20 R21 R22
f d0 d1 paspect ppx ppy

If you run texrecon without arguments you will see what individual item means.

You can use scipy or this to convert your angles to transformation matrix and extract rotation matrix out of it.

Hope this helps!

thanks for your reply.And i jump this problem because i find maybe it need more professional knowledge. thanks again!

li-cheng12 commented 3 years ago

@pavan4 Could you give an example which converts tum dataset pose to the .cam file? I do not understand "The pixel aspect ratio is usually 1 or close to 1. If your SfM system doesn't output it, but outputs a different focal length in x and y direction, you have to encode this here" in command line. How to encode? thank you!