Currently thresholds are chosen by looping through possible thresholds and choosing the one producing the most grains. This causes a number of possible issues:
- The lower and upper bounds of thresholds to search through are entered manually in the config. If the ideal threshold for an image is outside the chosen bounds it will not be selected
- The step is also manually chosen in the config (step being the amount of change between each checked threshold) so if a small step is chosen the final threshold chosen will be more accurate but it can take a very long time to find. This is also partly due to grain finding being processed for every threshold tested.