CV Detect Color Checker
The first step to a real color-correction matrix
- image
- color_patches
- found
CV Detect Color Checker finds a ColorChecker chart in an image and hands you the measured patch colours. It's the front half of a colour-calibration pipeline: detect the chart here, fit a matrix with CV Create CCM Model, apply it with CV Apply Color Correction.
You care about this in two situations. One, you're matching a camera to a reference - say you're shooting plates for a composite, or building a LoRA dataset from photos taken under mixed light and you want the frames to agree before you train. Two, you're matching generated output to a real photograph and you want the numbers rather than a vibe. The 24 patches are a known ground truth, so a fit against them is a genuine measurement.
Which is not the same as saying it's always the right tool. For "make this inpainted region agree with its neighbours", a statistics transfer - the kind of thing a Color Match Image node does in one pass - is faster, needs no chart in frame, and is usually good enough. Reach for a ColorChecker when the accuracy matters, not the look.
How it works
It wraps cv2.mcc, the Macbeth ColorChecker module from OpenCV's contrib set - which is another reason the contrib wheel matters here, because a plain opencv-python install has no cv2.mcc at all. The detector builds a CCheckerDetector, sets the chart type you ask for, and processes the frame. If it finds one, the checker object reports the detected patch colours; the node rescales them into the 0–1 RGB range and returns them.
Three chart types are offered: MCC24 (Macbeth), the classic 24-patch chart (the default), VINYL18, and SG140, the 140-patch DigitalSG. Pick the one physically in front of the camera - the detector searches for a specific layout, so a mismatch is a no-detect.
Inputs and outputs
image- the frame containing the chart. Only the first frame of a batch is used, so if you're processing a folder of calibration shots, don't expect one node to chew through all of them;CV Index BatchorCV Unstack Batchupstream is the move.chart_type- the combo above.
Outputs:
color_patches-[N, 1, 3]float64 RGB in[0, 1], the measured colours in the chart's canonical patch order. This is whatCV Create CCM Modelconsumes.found- whether a chart was detected at all.
Order matters more than it looks: because the detector returns patches in its own fixed order, the fit can use the published reference values for that chart directly. Nothing in between needs to know which patch is which.
Install
Part of comfyui_cv (bmad4ever/comfyui_cv). Search "ComfyUI CV" in ComfyUI Manager, or:
cd ComfyUI/custom_nodes
git clone https://github.com/bmad4ever/comfyui_cv
pip install "opencv-contrib-python-headless~=5.0.0.93"
Restart. Python ≥ 3.12, recent V3-API ComfyUI, and the contrib wheel is non-negotiable for this node specifically - cv2.mcc simply isn't in the non-contrib build. If the node loads but errors on cv2.mcc, your site-packages/cv2 got overwritten by another pack's opencv-python; python tools/repair_opencv_contrib.py --check will say so and --apply will fix it.
Common issues
found = falseon an obvious chart. The chart needs to be reasonably large, reasonably front-on, and not blown out. A ColorChecker in the corner of a 4K frame, or clipped to pure white in the highlights, is a chart the detector can't see. Crop to it withCV Crop by BBoxesfirst if you have to.- Wrong
chart_type. Sending it looking for a MACBETH 24 when you photographed a DigitalSG fails, and the failure looks identical to "no chart present". - A great fit on a badly exposed frame. This is the real trap. A colour matrix fitted on clipped highlights or crushed shadows will be a beautiful correction for that frame and a mess everywhere else. Expose the chart properly, shoot it under the light you actually care about, and remember that a matrix fitted under tungsten doesn't transfer to daylight.
- You wanted "closer colours", not "correct colours". Try the cheap route first. A per-channel gain/bias alignment or a reference-based statistics transfer will get you 80% of the way on most jobs - deterministically and instantly - and skips all of the chart handling. Save the CCM path for when you can articulate why it needs to be right.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | Input image containing a ColorChecker chart. | |
| chart_type | COMBO | MCC24 (Macbeth) | Type of color checker chart to detect. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| color_patches | NPARRAY | Detected patch colors as [N,1,3] float64 RGB in [0,1]. Feed into 'Create CCM Model'. |
| found | BOOLEAN | True if a chart was detected. |