Skip to content

Some tips to improve your algorithm #2

@somepablo

Description

@somepablo

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions