thp / thp/psmoveapi

Tracker enhancement - More accurate position estimation

Open
#207 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
528
Forks
173
PR merge metrics
No merged PRs in 30d

Description

As mentioned in #206 , I'd like to see features from my fork brought upstream so I can get rid of my fork altogether. I don't have the time to do that so I'm outlining the features here in case someone else is feeling ambitious.

The second feature worth bringing up is a different tracker algorithm that is mathematically more accurate. It is based on the image in the diagram found here. The relevant code is here.

There are a couple benefits to this algorithm. First, the only presumed value is the camera's focal length and that can be overwritten by doing a camera calibration, therefore the positional estimation may be correct with any camera (not only PSEye) can the calibration is more standard than the psmoveapi distance calibration. Second, it does not assume the projection of the sphere on the sensor is a perfect circle; it is an ellipse, especially far from centre. Third, it uses simple geometry and trigonometric identities to get rid of any complicated math -> it's faster than the current version and has a real solution (no binary search).

The main drawbacks are that it can break with poor camera calibration and that it is pretty sensitive to partially occluded bulbs because it changes the ellipse fit.

Note that there are also a couple different positional smoothing filters that are configured with a new settings structure.

There is a better algorithm in the wild based on fitting a 3D cone to the data using the camera's focal point as the cone tip. You can see it in action here. I haven't attempted to work out how Oliver did it yet and he hasn't published his code yet. One of those two things will happen eventually.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/tracker/psmove_tracker.c lines 1686-1852 and the Tracker Algorithm diagram linked in the issue, then compare that implementation with the current tracker. Review the camera-calibration assumptions and the proposed settings structure for positional smoothing; done means the alternate algorithm and smoothing filters are integrated without relying on the existing distance calibration.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
computer-vision
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.