Airsim: Where can I find the camera parameters for the Left PIP Camera?

Created on 30 May 2017  路  7Comments  路  Source: microsoft/AirSim

Most helpful comment

I am also having trouble reproducing the results from the point_cloud.py. @lovettchris, could you let us know more about the conditions under which you got the projectionMatrix?
This matrix is supposed to change as resolution changes, right? What was the resolution in the disparity images?
Since we don't have access to the two camera images, we cannot reproduce the calibration step. Are there plans to allow us to have access to that?
What is the original baseline (distance between the cameras) in the depth sensor? I imagine this should be hardcoded somewhere...

Thanks!

All 7 comments

FOV is under BP_PIPCamera in UE4. Position & rotation (unless changed in code) is relative to the model in BP_FlyingPawn. The PIPCamera class holds some variables as well. The CameraDirector class regards setting views and rotation if you wish.

Hey @Dynode !

Thanks for your reply but I am not actually looking for position or orientation of the camera. Rather I need the intrinsic parameters of the camera which is being used so that I can create a point cloud from the images.

I should have specified this earlier. Sorry for the confusion.

Then what you want is info about the projection method used in UE4, the FOV and the viewport size, I think, as there is of course no actual lens or image chip. On the other hand, I have no experience with making point clouds from images. ;)

I guess you can estimate the focal length through the relation

Horizontal FoV = 2 * arctan( width / 2f ) (then assuming fx = fy = f)

I assumed the principal point to be the center of the image, which then completes the intrinsics matrix.

I am closing this issue as you can see that the projection matrix for the stereo pair from here

projectionMatrix = np.array([[-0.501202762, 0.000000000, 0.000000000, 0.000000000],
                              [0.000000000, -0.501202762, 0.000000000, 0.000000000],
                              [0.000000000, 0.000000000, 10.00000000, 100.00000000],
                              [0.000000000, 0.000000000, -10.0000000, 0.000000000]])

Thanks @lovettchris! Seems like a lot of new things are coming :)

Sorry to reopen this one @Mayankm96 . One thing I'm not quite clear is that in point_cloud.py, cv2.reprojectImageTo3D() takes the generated "depth" image as the input, while it is supposed to be "disparity" image according to the the opencv documentation here. So how do you actually use the "depth" image? I think the projectionMatrix keeps the same, however mimicing that python code (i.e. using the depth image as disparity image in the function) gives me very weird results. Thanks in advance!

I am also having trouble reproducing the results from the point_cloud.py. @lovettchris, could you let us know more about the conditions under which you got the projectionMatrix?
This matrix is supposed to change as resolution changes, right? What was the resolution in the disparity images?
Since we don't have access to the two camera images, we cannot reproduce the calibration step. Are there plans to allow us to have access to that?
What is the original baseline (distance between the cameras) in the depth sensor? I imagine this should be hardcoded somewhere...

Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zywOwO picture zywOwO  路  3Comments

p3jawors picture p3jawors  路  3Comments

zbenic picture zbenic  路  4Comments

M-Kasem picture M-Kasem  路  3Comments

JenaEmz picture JenaEmz  路  3Comments