ababilinski / realsense-apriltags-calibration-unity

This is an example project showing how to align multiple RealSense D400+ cameras using an April Tag inside of Unity.
https://ababilinski.github.io/
MIT License
18 stars 2 forks source link

Displaying the April Tag on a smartphone #4

Open nirmalsnair opened 9 months ago

nirmalsnair commented 9 months ago

Thanks again for providing the code! ⭐

I've successfully connected two depth cameras in Unity, and the calibration process is underway, detecting the April Tag. However, the calibration accuracy is low as the point clouds aren't aligning properly. I suspect this could be due to using my smartphone to display the April Tag instead of printing it on an A4 paper.

I have a couple of questions:

  1. Is it feasible to perform calibration by displaying the April Tag on a smartphone, or is a printed version necessary?
  2. If calibration using a smartphone is possible, what adjustments should be made in the code to accommodate the altered marker size?
ababilinski commented 9 months ago

Hi @nirmalsnair Thank you! I haven't updated in a while so I'm glad it's still working properly and helping developers.

Regarding your questions:

  1. It is possible to use a smartphone, but it might result in bad pose estimation since the image isn't clear.
  2. You can change the expected marker size in RsCameraPoseEstimation.cs
nirmalsnair commented 9 months ago

Sorry for the delayed response. Yes, the code is working without any issues.

I printed the April Tag on an A4 paper, and now the alignment is very good. However, there's a slight translational difference along the x and z axes, though the orientation is perfect. I think tweaking the marker size should fix that. Thanks for the help!

nirmalsnair commented 8 months ago

Hello again!

I experimented with values for Tag Size under Assets > RealSenseAprilTags > Examples > CameraCalibration > Prefabs > Cameras > Camera Pose Estimation. However, the point clouds still exhibit a slight misalignment.

Tag Size = 0.110 ![Screenshot 2024-01-10 172508](https://github.com/ababilinski/realsense-apriltags-calibration-unity/assets/22956340/a44c0e88-1451-4a08-ada8-7aa0c2961355)
Tag Size = 0.114 ![Screenshot 2024-01-10 171611](https://github.com/ababilinski/realsense-apriltags-calibration-unity/assets/22956340/457b3efb-c9c9-4011-9393-8578bfac30d8)
Tag Size = 0.115 (Default) ![Screenshot 2024-01-10 171721](https://github.com/ababilinski/realsense-apriltags-calibration-unity/assets/22956340/a97fece2-485b-4572-857c-b37e538303be)
Tag Size = 0.116 ![Screenshot 2024-01-10 171952](https://github.com/ababilinski/realsense-apriltags-calibration-unity/assets/22956340/85e5a4c1-b05a-434d-9f04-44284f37faf7)
Tag Size = 0.120 ![Screenshot 2024-01-10 172126](https://github.com/ababilinski/realsense-apriltags-calibration-unity/assets/22956340/89a2c796-c12f-41a9-bda8-0ec7743c6f23)

Do you have any insights into what might be causing this issue? I am using an A4-size April Tag. Appreciate your assistance!

nirmalsnair commented 8 months ago

Hi @ababilinski, any ideas to rectify this slight misalignment issue?