colour_checker_detection.extract_colour_checkers_segmentation¶
-
colour_checker_detection.
extract_colour_checkers_segmentation
(image)[source]¶ Extracts the colour checkers sub-images in given image using segmentation.
- Parameters
image (array_like) – Image to extract the colours checkers sub-images from.
- Returns
List of colour checkers sub-images.
- Return type
Examples
>>> import os >>> from colour import read_image >>> from colour_checker_detection import TESTS_RESOURCES_DIRECTORY >>> path = os.path.join(TESTS_RESOURCES_DIRECTORY, ... 'colour_checker_detection', 'detection', ... 'IMG_1967.png') >>> image = read_image(path) >>> extract_colour_checkers_segmentation(image) ... [array([[[ 86, 104, 113], [ 89, 102, 118], [ 88, 101, 117], ..., [ 79, 101, 114], [ 76, 101, 114], [ 79, 98, 110]], [[ 84, 104, 112], [ 85, 102, 115], [ 84, 101, 115], ..., [ 80, 101, 110], [ 79, 101, 112], [ 78, 98, 112]], [[ 84, 102, 112], [ 82, 102, 112], [ 82, 101, 113], ..., [ 81, 100, 109], [ 80, 100, 110], [ 79, 100, 113]], ..., [[ 89, 105, 117], [ 90, 106, 120], [ 86, 106, 117], ..., [ 84, 100, 109], [ 83, 100, 111], [ 80, 100, 114]], [[ 89, 106, 116], [ 91, 107, 121], [ 89, 106, 119], ..., [ 81, 99, 113], [ 79, 100, 115], [ 75, 100, 114]], [[ 84, 108, 117], [ 89, 108, 117], [ 91, 107, 117], ..., [ 79, 98, 117], [ 77, 100, 117], [ 73, 101, 116]]], dtype=uint8)]