MarkerBasedARExample icon indicating copy to clipboard operation
MarkerBasedARExample copied to clipboard

Distance to the marker seems to be wrong

Open dzak83 opened this issue 7 years ago • 1 comments

Hi, I am trying your example and everything works fine with the exception to the marker distance. I scan it from 30-40cm distance but it shows in the Unity around 5 meters away. It's rendered correctly but I would like to use distance value and it seems to be incorrect.

I looked at the estimatePosition method and solvePnP method but I don't have so much experience yet to debug the issue.

I tried the example on webcam and on my android phone (Pixel 2 XL).

Thanks, Jacek

dzak83 avatar Dec 24 '17 07:12 dzak83

https://github.com/EnoxSoftware/MarkerBasedARExample/blob/master/Assets/MarkerBasedARExample/MarkerBasedAR/MarkerDetector.cs#L101-L104 I think you probably need to change these parameters.(unity scale 1.0 = 1m)

MarkerBasedARExample is based on https://github.com/MasteringOpenCV/code/tree/master/Chapter2_iPhoneAR. Please refer to MasteringOpenCV for a detailed algorithm.

EnoxSoftware avatar Dec 24 '17 15:12 EnoxSoftware