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_0

ComfyUI Node: OpenCV HoughCircles_0

Class Name

HoughCircles_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 HoughCircles_0 Description

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

OpenCV HoughCircles_0:

The HoughCircles_0 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 occlusion, 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_0 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.

method

The method parameter specifies the detection method to be used. It is an integer value that typically corresponds to the specific algorithm variant within the Hough Circle Transform. The most common method is cv2.HOUGH_GRADIENT, which is efficient for detecting 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 helps prevent multiple detections of the same circle and ensures that detected circles are distinct.

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. Adjusting this value can affect the sensitivity of edge detection.

param2

The param2 parameter is a floating-point value that sets the accumulator threshold for the circle centers at the detection stage. A smaller value means more false circles may be detected, while a larger value results in fewer detections.

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 NumPy array (NPARRAY) that can be used to store the detected circles. If provided, it will be populated with the circle parameters (center coordinates and radius) of the detected circles.

OpenCV HoughCircles_0 Output Parameters:

nparray

The nparray output is a NumPy array that contains the detected circles' parameters. Each circle is represented by a set of values indicating the center coordinates (x, y) and the radius. This output allows you to further process or visualize the detected circles in your application.

OpenCV HoughCircles_0 Usage Tips:

  • Ensure that the input image is pre-processed, such as converting it to grayscale, to improve the accuracy of circle detection.
  • Experiment with the dp, param1, and param2 parameters to find the optimal balance between detection accuracy and computational efficiency for your specific image.
  • Use the minDist parameter to avoid detecting multiple overlapping circles, which can be common in images with closely packed circular objects.

OpenCV HoughCircles_0 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 modify the sensitivity of the detection process.

"Invalid image format"

  • Explanation: 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.

"Parameter out of range"

  • Explanation: One or more parameters are set to values outside their acceptable range.
  • Solution: Verify that all parameters are within their valid ranges and adjust them accordingly. For example, ensure minRadius and maxRadius are positive integers.

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

OpenCV HoughCircles_0