colour_checker_detection.plot_detection_results#
- colour_checker_detection.plot_detection_results(colour_checkers_data: Tuple[DataDetectionColourChecker, ...], swatches_horizontal: int, swatches_vertical: int, segmentation_data: DataSegmentationColourCheckers | None = None, image: NDArrayReal | None = None) None[source]#
Visualize colour checker detection results.
This function provides consistent visualization across all detection methods (inference, segmentation, and templated).
- Parameters:
colour_checkers_data (Tuple[DataDetectionColourChecker, ...]) – Tuple of detected colour checker data objects.
swatches_horizontal (int) – Number of horizontal swatch columns.
swatches_vertical (int) – Number of vertical swatch rows.
segmentation_data (DataSegmentationColourCheckers | None) – Optional segmentation data containing swatches, clusters, and segmented image. Required for visualizing intermediate segmentation results.
image (NDArrayReal | None) – Optional original image for drawing contours overlay. Required if segmentation_data is provided.
- Return type:
None
Notes
Generates 2 plots per colour checker if segmentation_data is None (inference method).
Generates 4 additional plots if segmentation_data is provided (segmentation/templated methods).
Examples
>>> from colour_checker_detection import detect_colour_checkers_segmentation >>> import os >>> from colour import read_image >>> from colour_checker_detection import ROOT_RESOURCES_TESTS >>> path = os.path.join( ... ROOT_RESOURCES_TESTS, ... "colour_checker_detection", ... "detection", ... "IMG_1967.png", ... ) >>> image = read_image(path) >>> results = detect_colour_checkers_segmentation(image, additional_data=True) >>> plot_detection_results(results, 6, 4) ...