olucurious / Awesome-ARKit

A curated list of awesome ARKit projects and resources. Feel free to contribute!
7.83k stars 918 forks source link

extract camera poses using ARKit #157

Open Shisthruna28 opened 3 years ago

Shisthruna28 commented 3 years ago

I wanted to take my Ipad pro2020 around the room and get images with camera poses. Can anyone suggest me how to use ARKIt to extract camera poses

philipturner commented 2 years ago

Derive the position and orientation from the camera's transform matrix. For more information, investigate my app's source code at AR MultiPendulum or ARHeadsetKit.

num-doc commented 1 year ago

@philipturner How did you export camera extrinsic parameters from arkit? Did you use camera.transform? Did you re-orient arkit rotation matrix? How was ARConfiguration.WorldAlignment set in arkit?
How does arkit output parameters (4*4) translate into camera rotation translation matrix.

Thank you for your time

philipturner commented 1 year ago

How did you export camera extrinsic parameters from arkit? Did you use camera.transform?

How does arkit output parameters (4*4) translate into camera rotation translation matrix.

https://github.com/philipturner/ARHeadsetKit/blob/174385004728e8c9d047904f0497d9d7793aa764/Sources/ARHeadsetKit/User%20Settings/Camera%20Measurements/CameraMeasurementsExtensions.swift#L14-L162

How was ARConfiguration.WorldAlignment set in arkit?

https://github.com/philipturner/ARHeadsetKit/blob/174385004728e8c9d047904f0497d9d7793aa764/Sources/ARHeadsetKit/App%20Setup/AppCoordinator.swift#L65-L84