Skip to main content

Webcam Capture CV2

KJNodes/experimental
WebcamCaptureCV2

Captures a frame from a webcam using CV2. Can be used for realtime diffusion with autoqueue.

Example

JSON Example
{
  "class_type": "WebcamCaptureCV2",
  "inputs": {
    "x": 0,
    "y": 0,
    "width": 512,
    "height": 512,
    "cam_index": 0,
    "release": false
  }
}

This example shows required inputs only. Connection values like ["node_id", 0] should reference actual node IDs from your workflow.

Inputs

NameTypeStatusConstraintsDefault
xINTrequiredmin: 0, max: 4096, step: 10
yINTrequiredmin: 0, max: 4096, step: 10
widthINTrequiredmin: 0, max: 4096, step: 1512
heightINTrequiredmin: 0, max: 4096, step: 1512
cam_indexINTrequiredmin: 0, max: 255, step: 10
releaseBOOLEANrequired-false

Outputs

IndexNameTypeIs ListConnection Reference
0imageIMAGENo["{node_id}", 0]
How to connect to these outputs

To connect another node's input to an output from this node, use the connection reference format:

["node_id", output_index]

Where node_id is the ID of this WebcamCaptureCV2 node in your workflow, and output_index is the index from the table above.

Example

If this node has ID "5" in your workflow:

  • image (IMAGE): ["5", 0]
Was this page helpful?