Detection#

Inference#

colour_checker_detection

SETTINGS_INFERENCE_COLORCHECKER_CLASSIC

Settings for the inference of the X-Rite ColorChecker Classic.

SETTINGS_INFERENCE_COLORCHECKER_CLASSIC_MINI

Settings for the inference of the X-Rite ColorChecker Classic Mini.

inferencer_default(image[, cctf_encoding, ...])

Predict the colour checker rectangles in given image using Ultralytics YOLOv8.

detect_colour_checkers_inference(image[, ...])

Detect the colour checkers swatches in given image using inference.

Segmentation#

colour_checker_detection

SETTINGS_SEGMENTATION_COLORCHECKER_CLASSIC

Settings for the segmentation of the X-Rite ColorChecker Classic and X-Rite ColorChecker Passport.

SETTINGS_SEGMENTATION_COLORCHECKER_SG

Settings for the segmentation of the X-Rite ColorChecker SG*.

SETTINGS_SEGMENTATION_COLORCHECKER_NANO

Settings for the segmentation of the X-Rite ColorChecker Nano*.

segmenter_default(image[, cctf_encoding, ...])

Detect the colour checker rectangles in given image \(image\) using segmentation.

detect_colour_checkers_segmentation(image[, ...])

Detect the colour checkers swatches in given image using segmentation.

Common Utilities#

colour_checker_detection.detection

DTYPE_INT_DEFAULT

alias of int32

DTYPE_FLOAT_DEFAULT

alias of float32

SETTINGS_DETECTION_COLORCHECKER_CLASSIC

Settings for the detection of the X-Rite ColorChecker Classic and X-Rite ColorChecker Passport.

SETTINGS_DETECTION_COLORCHECKER_SG

Settings for the detection of the X-Rite ColorChecker SG*.

SETTINGS_CONTOUR_DETECTION_DEFAULT

Settings for contour detection.

as_int32_array(a)

Convert given variable \(a\) to numpy.ndarray using np.int32 numpy.dtype.

as_float32_array(a)

Convert given variable \(a\) to numpy.ndarray using np.float32 numpy.dtype.

swatch_masks(width, height, swatches_h, ...)

Return swatch masks for given image width and height and swatches count.

swatch_colours(image, masks)

Extract the swatch colours from given image using given masks.

reformat_image(image, target_width[, ...])

Reformat given image so that it is horizontal and resizes it to given target width.

transform_image(image[, translation, ...])

Transform given image using given translation, rotation and scale values.

detect_contours(image[, additional_data])

Detect the contours of given image using given settings.

is_square(contour[, tolerance])

Return if given contour is a square.

contour_centroid(contour)

Return the centroid of given contour.

scale_contour(contour, factor)

Scale given contour by given scale factor.

approximate_contour(contour[, points, ...])

Approximate given contour to have given number of points.

quadrilateralise_contours(contours)

Convert given to quadrilaterals.

remove_stacked_contours(contours[, ...])

Remove amd filter out the stacked contours from given contours keeping either the smallest or the largest ones.

DataDetectionColourChecker(swatch_colours, ...)

Colour checker swatches data used for plotting, debugging and further analysis.

sample_colour_checker(image, quadrilateral, ...)

Sample the colour checker using the given source quadrilateral, i.e. detected colour checker in the image, and the given target rectangle.