HoloLensARToolKit icon indicating copy to clipboard operation
HoloLensARToolKit copied to clipboard

Cube is far from marker (probably copy of #17)

Open rschurade opened this issue 5 years ago • 6 comments

I'm running the HoloLenARToolKitSingle demo. I'd say it works fine so far, marker is recognized and it exactly follows any rotation or tilt of the marker. However it is roughly 20-30cm away from the marker. When I hold the marker in my hand and extend the arm it's about halfway between hand and eye.

Is it possible to adjust for that offset and can you advice where and how to do it?

Edit: Hmm it's depending on the distance of the Hololens camera to the marker so there's probably no easy fix.

rschurade avatar Mar 18 '19 09:03 rschurade

Have you performed camera calibration of the HoloLens RGB camera that you're using for tracking?

If not, check out the code to calibrate the RGB camera here. You need to print off a checkerboard pattern, stick it on a planar board and take a bunch of pictures of it with the HoloLens camera (using the desired camera resolution which you will use for subsequent tracking). You can then use Long's code to estimate the intrinsic and distortion matrices, convert them into ARToolKit format and update them within the tracking code in this repo. Here is an example of camera calibration using OpenCV link.

doughtmw avatar Mar 18 '19 17:03 doughtmw

Thanks for the answer. I see this not really practicable as I need to put that into an app that is run on many hololenses for any number of users. So I guess we'd need access to the calibration settings the user creates when creating the account on the hololens and then adjusting for that.

rschurade avatar Mar 18 '19 17:03 rschurade

@rschurade If the offset is constant, then you can manually offset all tracking results. But from your description, it is dependent on the distance of marker, than probably means that your HoloLens camera intrinsics are quite different from the default I provided (calibrating using my HoloLens). You can calibrate the camera yourself as suggested by @doughtmw . In terms of updating camera matrix for each hololens. You can do something like this: http://longqian.me/2017/02/08/hololens-file-transfer/ The idea is to use Device Portal to upload files to hololens, and read from C# scripts. However the code may be obsolete due to API changes (I am not sure).

qian256 avatar Mar 19 '19 18:03 qian256

How can I take photos with a specific resolution of the camera?

GuiGermano avatar Sep 20 '19 20:09 GuiGermano

Hi @qian256, hi all, I still have this strange behaviour, that is the cube/virtual content stays far from the marker and tendentially moves towards the observer while he moves farther. I calibrated the HoloLens 2 by using your applications/scripts and generated the .dat file, but even using the new matrix the results are very similar. Can you suggest something to fix this issue?

actarus1975 avatar Dec 06 '21 19:12 actarus1975

I'm running the HoloLenARToolKitSingle demo. I'd say it works fine so far, marker is recognized and it exactly follows any rotation or tilt of the marker. However it is roughly 20-30cm away from the marker. When I hold the marker in my hand and extend the arm it's about halfway between hand and eye.

Is it possible to adjust for that offset and can you advice where and how to do it?

Edit: Hmm it's depending on the distance of the Hololens camera to the marker so there's probably no easy fix.

@rschurade I have the same identical issue. Did you find a way to fix it?

actarus1975 avatar Dec 07 '21 15:12 actarus1975