smroid / cedar-solve

A fast lost-in-space plate solver for star trackers.
https://tetra3.readthedocs.io/en/latest/
Apache License 2.0
1 stars 0 forks source link

reduce the number of pattern hash collisions in database construction #4

Closed smroid closed 5 months ago

smroid commented 5 months ago

The default value of 'pattern_max_error' passed to generate_database() results in a large number of pattern hash collisions. This is because the default value 0.005 results in a 'pattern_bins' value of 50; this in turn limits the space of possible pattern hashes and so patterns with similar edge ratios are assigned identical quantized pattern hash values. A smaller 'pattern_max_error' value (e.g. 0.002) would raise 'pattern_bins' to 125, increasing the space of possible pattern hashes and thus decrease the rate of pattern hash collisions.

https://github.com/esa/tetra3/pull/25 fixed a bug that caused databases built with smaller 'pattern_max_error' values to fail to solve.

Remaining work:

Note that https://github.com/esa/tetra3/compare/cc1ce4d77d81e4188d463c91958ae0d12ebd5dea...a91fa38e8d208b198a3dfde961671bd81db3ee16 corrects a bug that caused small 'pattern_max_error' values to be problematic at large FOVs.

smroid commented 5 months ago

Fixed by: https://github.com/smroid/cedar-solve/commit/55023e0871f8e2ea25fa344975f0be2ac8dd0441, https://github.com/smroid/cedar-solve/commit/27198e96d506bd68742d52301cac5f28339f7015, https://github.com/smroid/cedar-solve/commit/cde262563e35f4aad739a9061ff4c0b8af6bb317