CV Eye
The identity matrix, i.e. the do-nothing transform
- matrix
This one is exactly what it says: np.eye(n). An NxN identity matrix, float64, default 3. No cv2, no image, no model. It exists because a homography chain needs a starting point and a "reset to no-op" needs something to reset to.
What it's actually for
Two jobs, both plumbing:
Seed a transform chain. In the pack's stitching and registration workflows, matrices get composed - accumulate a homography here, chain an affine there - and every such chain needs an origin value that means "change nothing yet". That's the identity matrix. Without a node like this you'd be hand-typing 1 0 0 / 0 1 0 / 0 0 1 into a literal node, or worse, into the dsize-adjacent mess of a cv2 wrapper's fields.
Reset to a no-op. Feed the identity into a warp and you get your image back untouched, which is a useful baseline: run the graph with the transform enabled and with identity and see what the transform is actually doing. It's also the honest answer to "what does a failed homography estimation return" - the pack's own CV Find Homography (RANSAC) falls back to np.eye(3) and sets a found flag rather than letting a broken matrix reach a warp.
Inputs and outputs
n - the size, 1 to 10, default 3. Three is the homography size, which is why it's the default; 2 is the 2D rotation/scale block, 4 would be a homogeneous 3D transform if you're reaching for something like that.
One output: matrix, an NxN float64 identity. Wire it into any node that takes a transform or matrix input - cv2_warpAffine, cv2_warpPerspective, cv2_transform, the matrix slots of the geometry nodes - and nothing moves. Which is the point.
Is this a node or a missing feature?
Fair question. It's a one-liner, and in a pack this size - ~470 auto-generated cv2.* wrappers plus 300-odd curated nodes - a two-widget constant is the sort of thing you write once and then use fifty times, because the alternative in ComfyUI is dragging a literal node, naming its type, and typing a matrix with the right shape and dtype by hand. In the pack's own taxonomy this would be a "type bridge / IO" node: it moves a value between a literal and a socket, and it touches no image processing at all. Its existence tells you something about the pack's audience, actually - this is a toolkit for people building measurement graphs, where a constant transform isn't decoration, it's the base case of a fold.
If you landed here expecting an eye-detection node: no. The name is np.eye, and eye detection in this pack would live near the feature/keypoint nodes, not here.
Install
The pack installs as a unit:
# ComfyUI Manager → search "ComfyUI CV" → install → restart
# or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/bmad4ever/comfyui_cv
cd comfyui_cv && pip install -r requirements.txt
Needs Python ≥ 3.12 and a recent ComfyUI on the V3 node API. The dependency list is short - opencv-contrib-python-headless~=5.0.0.93, numpy, torch - and this node only touches numpy, so even if OpenCV's contrib submodules get clobbered by a stray opencv-python install, CV Eye keeps working while the contrib nodes vanish. (tools/repair_opencv_contrib.py --check / --apply fixes that properly.)
For the wider context on why packs like this one accumulate small value nodes: the whole utility layer of ComfyUI exists to stop you typing the same constant into five widgets, and to turn a value into something the graph can fan out from. CV Eye is that idea applied to a matrix.
The pack is bmad4ever's, a small-tools author whose other work includes a cartesian-product list node and an undo/redo extension, and it's a fork of geroldmeisinger's opencv-comfyui rewritten on the V3 API. The author describes it as LLM-assisted and not production-grade. For an identity matrix, that disclosure is more amusing than concerning.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| n | INT | 31–10 | Size N of the NxN identity matrix. Default 3 matches the homography format. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| matrix | NPARRAY | NxN float64 identity matrix. |