Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > opencv-comfyui > OpenCV add_0

ComfyUI Node: OpenCV add_0

Class Name

add_0

Category
image/OpenCV
Author
geroldmeisinger (Account age: 1432days)
Extension
opencv-comfyui
Latest Updated
2026-07-22
Github Stars
0.04K

How to Install opencv-comfyui

Install this extension via the ComfyUI Manager by searching for opencv-comfyui
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter opencv-comfyui in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

OpenCV add_0 Description

Performs pixel-wise addition of two images using OpenCV, with optional mask and destination.

OpenCV add_0:

The add_0 node is designed to perform pixel-wise addition of two images using OpenCV's add function. This node is particularly useful in image processing tasks where you need to combine two images by adding their corresponding pixel values. The addition operation is performed element-wise, meaning each pixel in the first image is added to the corresponding pixel in the second image. This can be beneficial for tasks such as blending images or enhancing image brightness. The node supports optional parameters for specifying a destination array and a mask, allowing for more controlled and selective addition operations. By leveraging OpenCV's efficient computation, this node ensures fast and reliable image processing, making it a valuable tool for AI artists working with image manipulation and enhancement.

OpenCV add_0 Input Parameters:

src1

src1 is the first source image represented as an NPARRAY. This parameter is crucial as it provides the initial set of pixel values that will be added to the corresponding values in src2. The quality and content of src1 directly affect the outcome of the addition operation.

src2

src2 is the second source image, also represented as an NPARRAY. It contains the pixel values that will be added to those in src1. The alignment and size of src2 should match src1 to ensure a proper element-wise addition.

dtype

dtype specifies the data type of the output image. It is an INT that determines how the resulting pixel values are stored. This parameter is important for managing the precision and range of the output image, especially when dealing with high dynamic range images.

dst

dst is an optional parameter that allows you to specify an NPARRAY where the result of the addition will be stored. If provided, this array should have the same size and type as the input images. Using dst can be beneficial for memory management and efficiency, as it avoids creating a new array for the result.

mask

mask is another optional parameter represented as an NPARRAY. It acts as a binary mask that determines which pixels in the source images are added. Only the pixels corresponding to non-zero mask values are processed, allowing for selective addition and more control over the operation.

OpenCV add_0 Output Parameters:

nparray

The output parameter nparray is an NPARRAY that contains the result of the pixel-wise addition of src1 and src2. This array represents the combined image, where each pixel value is the sum of the corresponding pixels in the input images. The output is influenced by the dtype parameter, which dictates the data type of the resulting pixel values. This output is essential for further image processing tasks or for visual inspection of the combined image.

OpenCV add_0 Usage Tips:

  • Ensure that src1 and src2 are of the same size and type to avoid errors during the addition process.
  • Utilize the mask parameter to perform selective addition, which can be useful for blending specific regions of images.
  • Consider specifying the dtype to control the precision and range of the output image, especially when working with images that have a high dynamic range.

OpenCV add_0 Common Errors and Solutions:

Mismatched Image Sizes

  • Explanation: The input images src1 and src2 have different sizes, which prevents element-wise addition.
  • Solution: Ensure that both input images are resized to the same dimensions before using the add_0 node.

Invalid Data Type

  • Explanation: The dtype specified is not compatible with the input images or the operation.
  • Solution: Verify that the dtype is appropriate for the input images and the desired output format. Adjust the dtype to match the data type of the input images if necessary.

Mask Dimension Mismatch

  • Explanation: The mask provided does not match the dimensions of the input images.
  • Solution: Ensure that the mask array has the same dimensions as the input images to apply it correctly during the addition process.

OpenCV add_0 Related Nodes

Go back to the extension to check out more related nodes.
opencv-comfyui
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.