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
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.
Most helpful comment
getPose()returns the pose of the physical camera on the device, whilegetDisplayOrientedPose()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()andgetDisplayOrientedPosematch 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), butgetPose()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 withtransformDisplayUvCoords()) .getPose()becomes useful for more complex things like projecting the camera image onto virtual geometry.