Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Updating camera pose from 2d point correspondence homography

a.t.a.t. Member Posts: 1
Hello good ppl of the board :)

I'm trying to track a set of points across frames. So, let's say I have a set of screen-projected coordinate points at time [italic]t[/italic] and another one at time [italic]t+1[/italic] of the same 3d points (3d coords are also known since I'm rendering them in OpenGL).

So, let's say I've got the homography of the two sets of 2d points (using OpenCV) and somehow managed to get the 3x3 rotation matrix and a translation vector.

My question is, how do I update my camera rotation & orientation from this information in OpenGL? I've tried just sticking it into the modelview matrix, but it does nothing.

I also have tried multiplying each of the points in second set by the homography (x'~Hx) and then using gluUnProject to obtain the new 3d coords for the X' points, but that just made them disappear from the view. Though, I suspect, I may need to do something else to the homography matrix before multiplying it with points.

Your kind help is greatly appreciated. :)

A.T.

Comments

  • IDKIDK Member Posts: 1,784
    : Hello good ppl of the board :)
    :
    : I'm trying to track a set of points across frames. So, let's say I
    : have a set of screen-projected coordinate points at time
    : [italic]t[/italic] and another one at time [italic]t+1[/italic] of
    : the same 3d points (3d coords are also known since I'm rendering
    : them in OpenGL).
    :
    : So, let's say I've got the homography of the two sets of 2d points
    : (using OpenCV) and somehow managed to get the 3x3 rotation matrix
    : and a translation vector.
    :
    : My question is, how do I update my camera rotation & orientation
    : from this information in OpenGL? I've tried just sticking it into
    : the modelview matrix, but it does nothing.
    :
    : I also have tried multiplying each of the points in second set by
    : the homography (x'~Hx) and then using gluUnProject to obtain the new
    : 3d coords for the X' points, but that just made them disappear from
    : the view. Though, I suspect, I may need to do something else to the
    : homography matrix before multiplying it with points.
    :
    : Your kind help is greatly appreciated. :)
    :
    : A.T.


    Isn't there some kind of view multiply func?
    I'm pretty sure it is...

    The points aren't stored anywhere so you'll need to redraw the screen.

    Also, when drawing, you could simply mutilply each point by your matrix,and it should work.

    This shouldn't be much slower than any other way...
Sign In or Register to comment.