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

Distance to the marker seems to be wrong #1

Open
dzak83 opened this issue Dec 24, 2017 · 1 comment
Open

Distance to the marker seems to be wrong #1

dzak83 opened this issue Dec 24, 2017 · 1 comment

Comments

@dzak83
Copy link

dzak83 commented Dec 24, 2017

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

@EnoxSoftware
Copy link
Owner

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.

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

2 participants