Arcore-android-sdk: Difference between Camera.getPose() & Camera.getDisplayOrientedPose ()

Created on 29 Dec 2017  路  2Comments  路  Source: google-ar/arcore-android-sdk

I'm confused with the difference betweeen Camera.getPose() and Camera.getDisplayOrientedPose() even that I have pondered the relevant concept in javadoc. Could you illustrate the difference between the two interface mentioned up more explicitly and detailedly? 3Q very much! @jguomoto @inio @gordonbrander @eitanme @richlowenberg

question

Most helpful comment

getPose() returns the pose of the physical camera on the device, while getDisplayOrientedPose() returns the pose the virtual camera that would be used to render content on the screen.

Lets say you're holding your device in landscape orientation, and happen to be holding it so that getPose() and getDisplayOrientedPose match up. The origin of both coordinate spaces is located at the camera, and looking at the screen, the +X axis points to your right, the +Y axis points up, and the +Z axis points toward you.

Now, rotate the device upside down (still landscape) exactly 180掳. If display rotation is unlocked, the android display will rotate 180掳 as well. Now getDisplayOrientedPose() will return a pose with exactly the same orientation (the display rotation and device rotation cancel each other), but getPose() will return a pose rotated 180掳 about the Z axis, so the +X now points left and +Y points down.

For most simple applications, getDisplayOrientedPose() is all you will need (along with transformDisplayUvCoords()) . getPose() becomes useful for more complex things like projecting the camera image onto virtual geometry.

All 2 comments

getPose() returns the pose of the physical camera on the device, while getDisplayOrientedPose() returns the pose the virtual camera that would be used to render content on the screen.

Lets say you're holding your device in landscape orientation, and happen to be holding it so that getPose() and getDisplayOrientedPose match up. The origin of both coordinate spaces is located at the camera, and looking at the screen, the +X axis points to your right, the +Y axis points up, and the +Z axis points toward you.

Now, rotate the device upside down (still landscape) exactly 180掳. If display rotation is unlocked, the android display will rotate 180掳 as well. Now getDisplayOrientedPose() will return a pose with exactly the same orientation (the display rotation and device rotation cancel each other), but getPose() will return a pose rotated 180掳 about the Z axis, so the +X now points left and +Y points down.

For most simple applications, getDisplayOrientedPose() is all you will need (along with transformDisplayUvCoords()) . getPose() becomes useful for more complex things like projecting the camera image onto virtual geometry.

Closing for inactivity. If the response above is unclear please let me know.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

TheMachineHere picture TheMachineHere  路  4Comments

RegisAG picture RegisAG  路  4Comments

dev19872014 picture dev19872014  路  3Comments

ArigarasuthanRepo picture ArigarasuthanRepo  路  4Comments

RajkumarRepo picture RajkumarRepo  路  3Comments