# js2007

Member

6

122 Neutral

• Rank
Newbie
1. ## Determine camera pose from known object location and model view matrix

Vorpy, you were right about the model view matrix being V*M instead of M*V. Like you suggested, it is working by computing M*A^{-1}. Thanks!
2. ## How to compute camera pose from a model view matrix and known location of an object

I agree. I forgot to mention that I also know the size of the object.
3. ## OpenGL How to compute camera pose from a model view matrix and known location of an object

Hi everybody, Short question: How do you compute the pose of the camera in real world coordinates (x,y,z and rotation) given a 4x4 model view matrix of a particular object and the known location and rotation of that object in the real world? Question explained in more detail: I have a question related to a somewhat special 3D/real world problem: I am using an augmented reality (AR) library that detects specific markers (2D patterns) in pictures taken of the real world (imagine a picture of an office with a poster hanging on one of the walls, where that poster shows a very distinct 2D marker pattern). The idea behind AR is that you display such real world pictures on a screen and overlay rendered 3D objects; for example you could render a shelf next to the wall where the marker was detected. For this purpose the AR library I am using returns an OpenGL style model view matrix for each marker it detected. If AR in OpenGL is all you want to do then that is all you need to correctly render objects onto markers. However, I am not trying to do AR but rather estimate the camera's real world pose. To me it seems that by having knowledge of the true, real world location of a marker and the model view matrix returned by the AR library for that particular marker, it should be possible to determine the real world pose of the camera (where we assume a pinhole camera for simplicity). I am interested in getting the (x,y,z) coordinates and the rotation of the camera in the real world. How would you compute that? Thanks a lot! -Jonas
4. ## Determine camera pose from known object location and model view matrix

Vorpy, you are right about the matrix representation. I implemented the computation of A^{-1}*M where A is the model view matrix I am given by the AR library and M is the marker specific matrix. For testing purposes I set it to 1 0 0 0 0 1 0 0 0 0 1 1000 0 0 0 1 Which (I think) means that the marker is simply translated by 1000mm on the Z axis from the origin, without any rotation. Unfortunately, the matrix resulting from A^{-1}*M does not make much sense (I only examined the translation vector so far). I double-checked my matrix multiplications and the inversion of A but could not find a bug. Therefore I wonder whether this is actually the right way to compute the camera pose. Does anyone have any comments on this?
5. ## Determine camera pose from known object location and model view matrix

So you are saying the model view matrix A that I get from the library is essentially A=M*V of which I know M and I want to compute V^{-1}. Because A^{-1}=V^{-1}*M^{-1} the inverse view matrix would then be given by V^{-1}=A^{-1}*M. Is that correct? Can anyone confirm that? If this is correct, what do these matrices actually look like? I never worked with OpenGL before but read a short introduction on its 4x4 transformation matrix format. From that introduction it seems unreasonable to carry out the above mentioned math on the 4x4 model view matrix.
6. ## Determine camera pose from known object location and model view matrix

Hi everybody, I have a math question related to a somewhat special OpenGL/real world problem: I am using an augmented reality (AR) library that detects specific markers (2D patterns) in pictures taken of the real world (imagine a picture of an office with a poster hanging on one of the walls, where that poster shows a very distinct 2D marker pattern). The idea behind AR is that you display such real world pictures on a screen and overlay rendered 3D objects; for example you could render a shelf next to the wall where the marker was detected. For this purpose the AR library I am using returns an OpenGL style model view matrix for each marker it detected. If AR in OpenGL is all you want to do then that is all you need to correctly render objects onto markers. However, I am not trying to do AR but rather estimate the camera's real world pose. To me it seems that by having knowledge of the true, real world location of a marker and the model view matrix returned by the AR library for that particular marker, it should be possible to determine the real world pose of the camera (where we assume a pinhole camera for simplicity). Unfortunately, I am not exactly sure how I would compute the camera's pose. I think I could interpret the three translation components in the MV matrix as relative translation values between the marker and the camera. But just based on this information the camera could be anywhere on the surface of a sphere centered at the marker. How would you compute the precise pose? Thanks a lot! -Jonas