Visit ComfyUI Online for ready-to-use ComfyUI environment
Define and manage specific areas within a frame for real-time motion control applications, enhancing efficiency and accuracy.
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.
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.
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.
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.
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.
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.
mask
accurately represents the area of interest to avoid unnecessary processing and improve motion detection accuracy.value
parameter to fine-tune the sensitivity of motion detection, especially in environments with varying lighting conditions or background noise.next_roi
parameter to create complex monitoring setups that require multiple regions to be observed in a specific order.ROIAction
list is specified for the ROI.ROIAction
enumeration.next_roi
parameter is set, but the subsequent ROI is not properly defined or linked.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.