colour_checker_detection.detection.swatch_masks#
- colour_checker_detection.detection.swatch_masks(width: int, height: int, swatches_h: int, swatches_v: int, samples: int) NDArrayInt [source]#
Return swatch masks for given image width and height and swatches count.
- Parameters:
- Returns:
Tuple of swatch masks.
- Return type:
Examples
>>> from pprint import pprint >>> pprint(swatch_masks(16, 8, 4, 2, 1)) array([[ 1, 3, 1, 3], [ 1, 3, 5, 7], [ 1, 3, 9, 11], [ 1, 3, 13, 15], [ 5, 7, 1, 3], [ 5, 7, 5, 7], [ 5, 7, 9, 11], [ 5, 7, 13, 15]]...)