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

Some tips to improve your algorithm #2

Open
somepablo opened this issue Dec 16, 2017 · 2 comments
Open

Some tips to improve your algorithm #2

somepablo opened this issue Dec 16, 2017 · 2 comments

Comments

@somepablo
Copy link

Hi,

I've just found this repo and wanted to give some tips to improve your algorithm.

  1. Don't do feature detection and matching on every frame. This is really slow, once you've found the target image you can just track the keypoints using sparse optical flow (calcOpticalFlowPyrLK) and compute camera pose (solvePnp) but only do feature detection again when you loose tracking on most of your keypoints.
  2. If you use this approach you could separate detection and tracking in 2 threads, making the tracking able to recover fast if it starts loosing keypoints.

Here it is a sample repo I made for MarkerlessAR for iOS, it doesn't include separate threads but you can figure out how tracking works:

https://github.com/pawlusmall/MarkerlessAR

Your documentation and code is very clean and understandable for those wanting to learn how AR works, congratulations.

@ahmetozlu
Copy link
Owner

Hey there,

Thank you soooo much these helpful and useful tips! I agree with you that if I could separate detection and tracking in 2 threads, I could make it run faster! Moreover, "calcOpticalFlowPyrLK" is great idea and performing feature detection and matching on every frame are very costly! I will try to develop it, if I will find a suitable time.

Thank you for your feedback again! Moreover, I will check your repo deeply to understand your recommendatitions fully.

@gcscreations
Copy link

gcscreations commented Nov 20, 2018

Could u pls guide me to how can i split tracking and detection..I wanna take this as my university project...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants