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.
Add logic to measure and report the different kinds of collision that occur when generating a database.
Allow a different 'max_error' value to be used at solve time. This will allow a "precise" database to be used with "imprecise" solve-time images, e.g. when accurate FOV and/or distortion information is not yet available.
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.