Invert the rotation (either directly the quaternion or convert it to a rotation matrix R). Then compute the camera center as -R^t * T (here R^t is the inverse rotation of R which is defined by the quaternion).
> On Jan 18, 2018, at 9:18 PM, Deepak R <
iam...@gmail.com> wrote:
>
>
> Sorry I did not understand your reply. I am looking to visualize the camera position and orientation in world coordinates. If C is the camera center, where do I get the R matrix? and what is T?
> The information I read from the binary file is as below picture. My understanding is qw,qx,qy,qz is a orientation quaternion and tx,ty,tz is the position vector of the camera that took the image. Is this right? How do I use the image information to get the camera position and orientation?
>
>
>
> On Friday, January 19, 2018 at 2:42:06 PM UTC+11, Johannes Schönberger wrote:
> You are probably visualizing R and T directly, which defines the projection matrix from world to camera system. Instead you need to compute C = -R^t * T (where ^t is the transpose and C the camera center).
>
> > On Jan 18, 2018, at 7:03 PM, Deepak R <
iam...@gmail.com> wrote:
> >
> >
> >
> > I am trying to take the camera position and pose output (as seen in the screenshot) from the images.bin file and overlay it on the dense reconstructed mesh file. I imported the mesh file using VTK library and plotted the camera positions (white spheres in the image with green background) in the visualizer window.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Why are the cameras and the model not aligned like the output of the sparse reconstruction? The camera positions seems to be way off from what is expected. Am I doing the right thing in using the images.bin file for getting the camera position and orientation?
> >
> >
> >
> >
> >
> >
> >
> > --
> > You received this message because you are subscribed to the Google Groups "COLMAP" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to
colmap+un...@googlegroups.com.
> > To post to this group, send email to
col...@googlegroups.com.
> > To view this discussion on the web visit
https://groups.google.com/d/msgid/colmap/b08bdb69-388c-4c9d-b261-23376cf6cddc%40googlegroups.com.
> > For more options, visit
https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups "COLMAP" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
colmap+un...@googlegroups.com.
> To post to this group, send email to
col...@googlegroups.com.