colour-checker-detection icon indicating copy to clipboard operation
colour-checker-detection copied to clipboard

Warped perspective feature, splitting the segmentation into segmenter and extractor (Issue #60)

Open TimWalter opened this issue 1 year ago • 3 comments

Summary

This pull request implements the issue #60 . This adds functionality for colour to detect checkers photographed at various distances and even if they are not facing the camera straight. To this end further clustering techniques are employed. Moreover, central to the approach is the definition of Templates that encode the inherent swatch structure of the checker, which is utilized to derive promising correspondences of swatches that would yield a correct transformation. Among these correspondences the best transformation is determined by brute force. However, a greedy heuristic is deployed to stop the search early, if a suitable transformation has been found.

Preflight

Code Style and Quality

  • [x] Unit tests have been implemented and passed.
  • [x] Pyright static checking has been run and passed.
  • [x] Pre-commit hooks have been run and passed.

Documentation

  • [x] New features are documented along with examples if relevant.
  • [x] The documentation is Sphinx and numpydoc compliant.

TimWalter avatar Mar 09 '24 13:03 TimWalter

No idea whats wrong with the checks

TimWalter avatar Mar 10 '24 08:03 TimWalter

Thanks a lot @TimWalter!

I will take a serious look after GDC.

At first glance, I think we will need to modify the inference method to also use an extractor for consistency.

correct_flipped might have issues with the ColourChecker SG, I think it would be better to compare the R/MSE of the current swatch colours to that of the reference one and we flip until we get the lowest value. We do that here: https://github.com/colour-science/colour-checker-detection/blob/develop/colour_checker_detection/detection/common.py#L1149

KelSolaar avatar Mar 11 '24 08:03 KelSolaar

Hey @TimWalter,

This is still very much on my radar, I just have a ton of stuff to wrangle with more priority than this, it will be merged!

Thanks for your patience.

KelSolaar avatar Jul 25 '24 20:07 KelSolaar