CV QR Decode At Points
Decodes the QR code(s) inside quads that were located by ANY other means - a contour quadrilateral, a homography, hand-annotated points, a DNN detector - using cv2's decodeMulti/decodeCurved. This keeps detection and decoding composable: when OpenCV's own detector misses a code but you can outline it (e.g. 'CV Find Quadrilateral' on a thresholded region, or 'CV Annotate Points'), the payload is still readable. Points are consumed 4 at a time in corner order (any winding); trailing points that do not complete a quad are ignored. Give it the corners of the SYMBOL, not of the white quiet zone around it - cv2 rectifies exactly the quad it is handed, so a quad that includes the margin decodes to nothing. Undecodable quads come out as empty strings, never an error.
- image
- points
- found
- decoded_count
- text
- texts
- straight_codes
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | NPARRAY,IMAGE | Image containing the code(s). An IMAGE batch uses its first frame. Accepts a ComfyUI IMAGE/MASK directly (frame 0 of a batch) or an NPARRAY. Arithmetic ops (add, multiply, etc.) process the full IMAGE batch when both inputs have the same batch size. | |
| points | NPARRAY | Corner points, (N*4, 2) or (N, 4, 2), in per-code corner order - e.g. the 'corners' output of 'OpenCV QR Detect' / 'CV Find Quadrilateral', or annotated points. cv2 expects the corners of the SYMBOL ITSELF (the outer finder-pattern corners), not of the white quiet zone around it - a quad that includes the margin decodes to an empty string. | |
| detector | COMBO | Which cv2 decoder implementation reads the rectified patch. Both accept externally supplied corners; the ArUco-based one can be more tolerant of small/warped symbols. | |
| mode | COMBO | straight: decodeMulti - perspective-rectify the quad and read it. curved: decodeCurved per quad, for codes wrapped around a curved surface (classic detector only). |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| found | BOOLEAN | True when at least one quad decoded to a non-empty string. |
| decoded_count | INT | How many of the supplied quads decoded. |
| text | STRING | Decoded strings, one per line - wire into 'Preview as Text'. |
| texts | NPARRAY | (N,) string array aligned with the supplied quads; an empty entry marks a quad that did not decode. |
| straight_codes | IMAGE | IMAGE batch of the rectified binarized symbols, one per decoded quad (white-padded to a common size). |