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 HoughCircles_1

ComfyUI Node: OpenCV HoughCircles_1

Class Name

HoughCircles_1

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 HoughCircles_1 Description

Detects circles in images using Hough Circle Transform, ideal for object detection and analysis.

OpenCV HoughCircles_1:

The HoughCircles_1 node is a powerful tool designed to detect circles in an image using the Hough Circle Transform method, a feature of the OpenCV library. This node is particularly useful for identifying circular shapes within an image, which can be beneficial in various applications such as object detection, image analysis, and computer vision tasks. By leveraging the Hough Circle Transform, the node can efficiently locate circles by transforming the image space into a parameter space, where potential circle centers and radii are identified. This method is robust against noise and partial occlusions, making it a reliable choice for detecting circles in complex images. The node's capabilities allow you to fine-tune the detection process through various parameters, ensuring that you can adapt the circle detection to suit specific needs and image conditions.

OpenCV HoughCircles_1 Input Parameters:

image

The image parameter is the input image in which you want to detect circles. It should be provided as a NumPy array (NPARRAY). The quality and resolution of the image can significantly impact the accuracy of circle detection, so using a clear and well-defined image is recommended.

method

The method parameter specifies the detection method to be used. It is an integer value, typically set to cv2.HOUGH_GRADIENT, which is the standard method for circle detection in OpenCV. This method uses the gradient information of the image to detect circles.

dp

The dp parameter is a floating-point value that represents the inverse ratio of the accumulator resolution to the image resolution. A higher dp value means a lower resolution of the accumulator, which can speed up the process but may reduce accuracy. A typical value is 1.0.

minDist

The minDist parameter is a floating-point value that defines the minimum distance between the centers of detected circles. This parameter helps prevent multiple detections of the same circle and ensures that detected circles are distinct from each other.

param1

The param1 parameter is a floating-point value that sets the higher threshold for the Canny edge detector, which is used internally by the Hough Circle Transform. A higher value can help reduce noise but may miss faint edges.

param2

The param2 parameter is a floating-point value that sets the accumulator threshold for the circle centers at the detection stage. A lower value will detect more circles, including false ones, while a higher value will ensure that only the most prominent circles are detected.

minRadius

The minRadius parameter is an integer that specifies the minimum circle radius to be detected. This allows you to filter out smaller circles that are not of interest.

maxRadius

The maxRadius parameter is an integer that specifies the maximum circle radius to be detected. This helps in focusing the detection on circles within a specific size range.

circles

The circles parameter is an optional input that can be provided as a NumPy array (NPARRAY). It is used to store the output of the detected circles, which can be useful for further processing or analysis.

OpenCV HoughCircles_1 Output Parameters:

nparray

The nparray output parameter is a NumPy array that contains the detected circles. Each circle is represented by a triplet of values: the x-coordinate of the center, the y-coordinate of the center, and the radius. This output allows you to visualize or further process the detected circles in your image.

OpenCV HoughCircles_1 Usage Tips:

  • Ensure that the input image is pre-processed to enhance contrast and reduce noise, as this can significantly improve the accuracy of circle detection.
  • Experiment with the dp, param1, and param2 parameters to find the optimal settings for your specific image and detection requirements.
  • Use the minDist parameter to avoid detecting multiple circles that are too close to each other, which can help in reducing false positives.

OpenCV HoughCircles_1 Common Errors and Solutions:

"No circles detected"

  • Explanation: This error occurs when the node fails to detect any circles in the input image.
  • Solution: Check the input image quality and ensure it is suitable for circle detection. Adjust the param1 and param2 values to fine-tune the sensitivity of the detection process.

"Invalid image format"

  • Explanation: This error indicates that the input image is not in the expected NumPy array format.
  • Solution: Ensure that the input image is correctly converted to a NumPy array before passing it to the node. Use OpenCV functions like cv2.imread() to read images as NumPy arrays.

"Parameter out of range"

  • Explanation: This error occurs when one or more input parameters are set to values outside their acceptable range.
  • Solution: Verify that all input parameters are within their valid ranges. For example, ensure that minRadius and maxRadius are positive integers and that dp is a positive floating-point number.

OpenCV HoughCircles_1 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.