### Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

### Topics - lightrack

Pages: [1]
1
##### Support / Augmented Reality : how to set camera intrinsics parameters ?[AR]
« on: April 11, 2016, 06:16:54 pm »
Hi,

I'm planning to use JPCT-AE for an Android AR application.
So I need that the projection of my scene fit accurately with the camera intrinsics parameters (in the sense of https://ksimek.github.io/2013/08/13/intrinsic/).
Basically, I have a K matrix (obtained through an external camera calibration process) :
[ fx 0 x0
0  fy y0
0  0  1 ]

Where fx,fy are focal lengths, and [x0, y0] the principal point (which is near the center of frame, but still present a significant offset from that center so that I'm forced to take it into account to stay accurate for the projections and reverse projections).

This post http://www.jpct.net/forum2/index.php/topic,3366.msg24313.html#msg24313 discussed about that question but didn't resolve the issue of the principal point (ox, oy in the post).

For fx/fy, I can use them to set FOVx and FOVy (with setFOV() and setYFOV()), but how can I inject the offset of the principal point ?

I maybe miss something but I didn't see any direct way to do this. So I hesitate between 2 ways to achieve my goal to use a complete matrix of camera intrinsics :

1/ setFrustumOffset() ? but it only acts on Y axis and there is no method similar method for X axis ?

2/ set FOV values, then retrieve projection matrix with getProjectionMatrix(), inject x0 and y0 at the right place into it and dump the modified projection matrix into the former with setDump().

I understand "projection matrix" in the sense of http://www.codinglabs.net/article_world_view_projection_matrix.aspx so that it's only responsible to transform view space into frustum space and I assume it's the same for getProjectionMatrix().

I hope I'm clear enough.

Any hints are welcome,

Pages: [1]