How to compute camera pose from a model view matrix and known location of an object

Started by
2 comments, last by Zakwayda 16 years, 11 months ago
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
Advertisement
I'm not sure you have enough information to do what you're asking. It seems to me that you would need to know the actual dimensions of the objects in the scene ahead of time in order to determine the position of the camera.

Consider the scenario of a person standing two meters away from a box with dimensions 1x1x1 ft., and then consider a person standing a mile away from a proportionately larger box which, from that distance, appears to be the same size as the smaller box. Looking at these scenes side-by-side, how would you be able to tell where the person (i.e. the camera) is at without knowledge of the actual sizes of the boxes?
I agree. I forgot to mention that I also know the size of the object.
Isn't this a cross-post?

@The OP: It looks like there are more responses in your other thread, so I'd recommend continuing the discussion there.

This topic is closed to new replies.

Advertisement