Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is there any script to export pose from the matedata? #63

Open
wutingfan opened this issue May 18, 2023 · 15 comments
Open

is there any script to export pose from the matedata? #63

wutingfan opened this issue May 18, 2023 · 15 comments

Comments

@wutingfan
Copy link

wutingfan commented May 18, 2023

is there any script to export pose from the matedata? And, is the pose Tcw or Twc?
what is the data format in *.exr file? I read it by opencv-python, it is 3 channels, I'm not sure how to use it, or trans it to png/jpg.
Thank you very much.

@marek-simonik
Copy link
Owner

There is no example script that would show how to read the poses from the metadata file; it is an ordinary JSON file. Please see #27 (comment) and #33 (comment) for a description of how the poses are stored in the JSON file. The poses can be considered as T_{wc}.

Regarding EXR: see #53 (comment). You might have more luck trying to read the EXR files via OpenEXR (OpenCV struggles with it).

@wutingfan
Copy link
Author

wutingfan commented May 22, 2023

that's a great help, thank you.
The poses in metadata exported from face(camera type 0) are all [0 0 0 1 0 0 0], I test it on iphone11 and iphone13 pro max, they have same result, Is that normal?
The depth map from lidar is 192*256(the poses look normal here), I want use these depth maps to reconstruct the scene, is this a good idea to up sample the depth map? or what operation do you recommend? Thank you again.

@JulienGaubil
Copy link

Same issue as above, the poses obtained with a sequence recorded using the front camera of an iPhone13 mini are all [0 0 0 1 0 0 0]

@marek-simonik
Copy link
Owner

Sorry for the late reply, I haven't noticed that you wrote a new comment until today.

Only LiDAR videos have valid camera pose data. The selfie FaceID camera videos do not come with pose estimates, so seeing [0 0 0 1 0 0 0] is the expected behavior.

@wutingfan
Copy link
Author

Sorry for the late reply, I haven't noticed that you wrote a new comment until today.

Only LiDAR videos have valid camera pose data. The selfie FaceID camera videos do not come with pose estimates, so seeing [0 0 0 1 0 0 0] is the expected behavior.

That's ok, I have sent you a serious app account problem by email for days, maybe you should check email acount(support@record3d.app ). By the way, I will try to up sample depth map for fusion, is this a good idea?

@marek-simonik
Copy link
Owner

That's ok, I have sent you a serious app account problem by email for days, maybe you should check email acount(support@record3d.app ).

I apologize for this, but after double-checking that email account, there are no unanswered emails. I have also checked the Spam folder, but I did not see your email. It seems like either your email did not reach my inbox or my reply did not reach yours.

Can you please re-send your email (and send it as a new email)? Most of the time, I reply to emails within 24 hours. Please resend your email and if I would not reply within 24 hours, send me a DM on Twitter @record3d. In case I would still not reply, please let me know here, in this Github issue and I will try to find another way how to connect with you. Thanks!

By the way, I will try to up sample depth map for fusion, is this a good idea?

I am not sure, I do not feel qualified enough to answer this question.

@marek-simonik
Copy link
Owner

@wutingfan I have just replied to your email.

@takeyamayuki
Copy link

takeyamayuki commented Aug 1, 2023

@marek-simonik
Hello.
Thanks for the great project.

Only LiDAR videos have valid camera pose data. The selfie FaceID camera videos do not come with pose estimates, so seeing [0 0 0 1 0 0 0] is the expected behavior.

Is it possible to calculate the camera_pose from the iPhone IMU?
I would also like to get the proper camera_pose from the FaceID camera.

@marek-simonik
Copy link
Owner

Hello @takeyamayuki,

Is it possible to calculate the camera_pose from the iPhone IMU?
I would also like to get the proper camera_pose from the FaceID camera.

It would be possible to estimate device pose using IMU dead reckoning, but due to noise in IMU measurements, the estimated device pose would be unusable as it would drift.

@takeyamayuki
Copy link

takeyamayuki commented Aug 4, 2023

@marek-simonik

It would be possible to estimate device pose using IMU dead reckoning, but due to noise in IMU measurements, the estimated device pose would be unusable as it would drift.

I see, but when acquiring a depth image, I really want to get the smartphone's orientation.
In my application, I need to tilt the smartphone, and the coordinate axis of the smartphone is tilted from the real world coordinate axis when the smartphone is tilted. This fact is not a problem if the angle can be known, but it is a problem if it cannot be known.

This is a problem not only for my application, but also for SLAM.
Therefore, I strongly request that record3D iOS apps have the ability to get the correct camera_pose even when using a FaceID camera.

If there is anything I can do to help, I would love to.

@marek-simonik
Copy link
Owner

@takeyamayuki I apologize for the delay in my reply.

Therefore, I strongly request that record3D iOS apps have the ability to get the correct camera_pose even when using a FaceID camera.

I will definitely add a better estimate of camera_pose in case Apple provides camera pose estimates for that camera type in the future. However, implementing camera_pose estimation for Record3D right now would take me quite a lot of time, which I am unfortunately unable to afford at this time.

@takeyamayuki
Copy link

@marek-simonik

CMMotionManager enables accurate acquisition of iphone posture in the form of euler angles, quaternions, and rotation matrices.
https://developer.apple.com/documentation/coremotion/cmmotionmanager

I would like to have a function to output the posture in the Record3D application using this.
If you don't have time, could you let me implement this function myself?

@takeyamayuki
Copy link

Currently, I've been able to acquire the smartphone's posture in the background using these two methods.

https://github.com/dachscafe/MotionSensorBackground
https://github.com/libimobiledevice/libimobiledevice/tree/master

@marek-simonik
Copy link
Owner

@takeyamayuki I apologize for the delay in my answer. Do I understand correctly that you would be interested in having stored the rough device's orientation estimate (provided by CMMotionManager) for each frame specifically for the FaceID camera?

@takeyamayuki
Copy link

@marek-simonik Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants