How to perform Pose estimation for 3D object rendering in Android

asked 2013-04-15 02:00:03 -0500

utkarshmankad gravatar image

I am developing a simple AR application which renders a 3D image on top of camera view. I could successfully implement that in Windows 7.I used OpenCv's native POSE estimation functions which internally uses POSIT algorithm, so as to give Translation, Rotation matrix, which could be applied on the the 3D modal.

I want to implement the same functionality in an Android application. The problem I am facing is, one of the arguments to the POSE estimation function is the Camera intrinsic and distortion parameters. Which i am not able to find out. I tried studying various AR platforms - AandAR, ARToolKit etc. But after reverse engineering their Sources, i could get to any conclusion about usage of these in POSE estimation.

Please suggest me an appropriate method for POSE estimation (if it involves camera distortion parameters, then how would i determine it) and hence 3D object rendering over camera view in an Android application

edit retag flag offensive close merge delete

Comments

did you found any solution

Marwen Z gravatar imageMarwen Z ( 2013-05-14 11:18:17 -0500 )edit

I was able to solve my problem temporarily.

  1. For camera intrinsics and distortion parameters, I clicked photos of chessboard in different angles from the Android mobile, and used these snaps for calibration using a C++ executable (i had a release lined up, so for quick fix)

  2. For POSE estimation, the current C++ and Java API use the function -

Calib3d.solvePnP(MatRealCorners, MatImgCorners, camera_matrix, distortion_coeffs, rotation_vector, translation_vector,false,0);

for pose estimation. You can check OpenCv Wiki for explanation.

Now, i am stuck at obtaining Projection matrix for 3D rendering.

utkarshmankad gravatar imageutkarshmankad ( 2013-05-23 02:31:08 -0500 )edit