qian256 / HoloLensARToolKit

Marker tracking using the front-facing camera of HoloLens (both 1 and 2) and Unity, with a wrapper of ARToolKit built for UWP (Windows Universal Platform)
GNU Lesser General Public License v3.0
348 stars 91 forks source link

The tracking error is relevant to the distance between marker and divice. #53

Open Bornblack opened 4 years ago

Bornblack commented 4 years ago

I have done the HoloLensCamCalib for better alignment . But actually the alignment error is not stationary , as the error gets bigger when I put marker away from the divice . Is there a optimal working distance for HoloLensARToolkit ? Or Do I miss somthing else?

qian256 commented 4 years ago

Which device are you using, HL1 or HL2? Did you print the marker to be exact size as specified in the scene?

Bornblack commented 4 years ago

Thanks for your reply ! My device is HL 2, and I try the HL2ARToolKitSingle sample , the size of the marker I print is 4cm (a 4x4 cm marker in A4 paper) . I guess the problem is not the size of the marker. In your code, The position of the virtual object = TransMatrix X LocatableCameraToWorld X CalibrationMatirx I think it is the inaccuracy camera parameters I calibrate cause this magnifying error , as the error gets larger when the distance is increasing between HL2 and marker . Maybe I need to calibrate my HL2 again for accuracy camera parameters. By the way , I am a little confused about the Boader Size . As for the cube sample , the size of the cube I make is 6 cm , same as the virtual cube . And the size of the marker at the center of each face is 4 cm , so I have to change the Border Size parameter to 2/6 , right ?