colour_checker_detection.detect_colour_checkers_segmentation¶
-
colour_checker_detection.
detect_colour_checkers_segmentation
(image, samples=16, additional_data=False)[source]¶ Detects the colour checkers swatches in given image using segmentation.
- Parameters
- Returns
List of colour checkers swatches or
ColourCheckerSwatchesData
class instances.- 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) >>> detect_colour_checkers_segmentation(image) [array([[ 0.3594894..., 0.2225419..., 0.1176996...], [ 0.6250058..., 0.3931947..., 0.2417636...], [ 0.3304194..., 0.3142103..., 0.2874383...], [ 0.3034269..., 0.2721812..., 0.1053537...], [ 0.4153488..., 0.3183605..., 0.3067842...], [ 0.3458465..., 0.4393400..., 0.2912665...], [ 0.6782215..., 0.3519573..., 0.0752686...], [ 0.2715231..., 0.2515535..., 0.3295411...], [ 0.6171124..., 0.2687208..., 0.1852935...], [ 0.3049796..., 0.1792275..., 0.1908085...], [ 0.4844366..., 0.4576518..., 0.0392559...], [ 0.6494152..., 0.3991223..., 0.0329260...], [ 0.1922949..., 0.1842026..., 0.2731065...], [ 0.2780555..., 0.3836590..., 0.1233134...], [ 0.5515815..., 0.2126631..., 0.1250530...], [ 0.7178619..., 0.5132913..., 0.0804213...], [ 0.5753956..., 0.2563947..., 0.2672106...], [ 0.1799058..., 0.3160584..., 0.2945296...], [ 0.7402078..., 0.6088296..., 0.4374975...], [ 0.6272391..., 0.5156084..., 0.3713541...], [ 0.5120363..., 0.4196305..., 0.2976295...], [ 0.3690167..., 0.3019190..., 0.2083050...], [ 0.2624792..., 0.2143349..., 0.1428991...], [ 0.1625438..., 0.1333312..., 0.0807412...]])]