ComfyUI Node: Roi Node 🕒🅡🅣🅝

Class Name

ROINode

Category
real-time/control/motion
Author
RyanOnTheInside (Account age: 3947days)
Extension
Nodes for use with real-time applications of ComfyUI
Latest Updated
2025-03-04
Github Stars
0.02K

How to Install Nodes for use with real-time applications of ComfyUI

Install this extension via the ComfyUI Manager by searching for Nodes for use with real-time applications of ComfyUI
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter Nodes for use with real-time applications of 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

Roi Node 🕒🅡🅣🅝 Description

Define and manage specific areas within a frame for real-time motion control applications, enhancing efficiency and accuracy.

Roi Node 🕒🅡🅣🅝:

The ROINode, or Region of Interest Node, is designed to define and manage specific areas within a frame for real-time motion control applications. Its primary purpose is to identify and process regions of interest (ROIs) within a video stream, allowing for targeted actions based on detected motion. By focusing on specific areas, the ROINode enhances the efficiency and accuracy of motion detection, enabling precise control over how different regions are handled. This node is particularly beneficial in scenarios where only certain parts of a frame require attention, such as monitoring specific zones for activity or applying effects selectively. The ROINode operates by defining ROIs through masks, calculating bounding boxes, and processing motion within these areas, making it a powerful tool for real-time video analysis and control.

Roi Node 🕒🅡🅣🅝 Input Parameters:

mask

The mask parameter defines the region of interest within a frame. It is a binary mask where non-zero values indicate the area of interest. This parameter is crucial as it determines which part of the frame will be processed for motion detection and subsequent actions. The mask should be carefully crafted to accurately represent the desired ROI, ensuring that only relevant areas are included.

action

The action parameter specifies the operation to be performed when motion is detected within the ROI. It is a list of predefined actions that can be applied to the detected region. This parameter allows for flexibility in response to motion, enabling different actions based on the specific requirements of the application. The available actions are determined by the ROIAction enumeration.

value

The value parameter is a floating-point number used for mathematical operations within the node. It has a default value of 0.1 and can be adjusted in increments of 0.01. This parameter influences the processing of the ROI, such as scaling or thresholding operations, and should be set according to the desired sensitivity and behavior of the node.

next_roi

The next_roi parameter is optional and allows for chaining multiple ROIs together. This parameter enables the creation of a sequence of ROIs, where each ROI can lead to another, facilitating complex motion detection scenarios that require multiple regions to be monitored in succession.

Roi Node 🕒🅡🅣🅝 Output Parameters:

ROI

The ROI output parameter represents the defined region of interest along with its associated properties, such as the mask, bounds, action, and value. This output is essential for further processing and integration with other nodes, as it encapsulates all the necessary information about the ROI for subsequent operations.

Roi Node 🕒🅡🅣🅝 Usage Tips:

  • Ensure that the mask accurately represents the area of interest to avoid unnecessary processing and improve motion detection accuracy.
  • Adjust the value parameter to fine-tune the sensitivity of motion detection, especially in environments with varying lighting conditions or background noise.
  • Utilize the next_roi parameter to create complex monitoring setups that require multiple regions to be observed in a specific order.

Roi Node 🕒🅡🅣🅝 Common Errors and Solutions:

Mask is empty

  • Explanation: This error occurs when the provided mask does not contain any non-zero values, indicating that no region of interest has been defined.
  • Solution: Verify that the mask correctly highlights the desired area of interest and contains non-zero values where motion detection is required.

Invalid action specified

  • Explanation: This error arises when an action not included in the ROIAction list is specified for the ROI.
  • Solution: Ensure that the action parameter is set to one of the predefined actions available in the ROIAction enumeration.

ROI chain is incomplete

  • Explanation: This error indicates that the next_roi parameter is set, but the subsequent ROI is not properly defined or linked.
  • Solution: Check the configuration of the ROI chain to ensure that each ROI is correctly linked to the next, forming a complete sequence.

Roi Node 🕒🅡🅣🅝 Related Nodes

Go back to the extension to check out more related nodes.
Nodes for use with real-time applications of 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 Playground, enabling artists to harness the latest AI tools to create incredible art.