Skip to content

zentrocdot/ComfyUI_Circle_Detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ComfyUI Circle Detection Node Copus - Post ComfyUI - Homepage

Important

🚧 This documentation is still under construction. Please note also that the node is not catching all errors e.g. on wrong settings. This is on my to-do list.

Introduction

Next to AI mathematical methods can be used for the detection of objects like a circle. This node is using Hough's transform for the detection of circles in an given image. The advantage of mathematical methods is that the recognised circles can be virtually predicted. I utilise this to create masks.

Usage

After installation the node can be find in the node menu

  • Add Node > 🧬 Circle Detection Nodes > 🔬 Circle Detection

For showing data one can use following node

  • Add Node > 🧬 Circle Detection Nodes > 🗃 Circle Detection

The first node is the node for the circle detection. The second node is for viewing data from the circle detection node.

What the Node Does

Node Input / Output

The input of the node is an image. The output of the node is

  • NODE INPUT
    • image
  • NODE OUTPUT
    • image_output
    • image_mask
    • mask
    • data
    • help

For showing the data one needs a text/string output node. The help output can be shown with an text/string ouptput node.

Note

help is a feature that should make it in the future easier to work with the node without visiting this documentation.

Settings

List of Settings

  • threshold_canny_edge
  • threshold_circle_center
  • minR
  • maxR
  • dp
  • minDist
  • color_tuple_cicles
  • color_tuple_bg
  • color_tuple_fg
  • thickness
  • exclude_circles

Preview of Settings

Bildschirmfoto vom 2025-02-04 18-37-44

Setting color_tuple_cicles

color_tiple_circle sets the color of the circle which marks the setected circle.

Setting exclude_circles

As I wrote earlier mathematical methods produce on each run the same results. One can take advantage of this. After first run one can exclude circles which were detected in the first run.

Version Previews

version 0.0.0.1

Bildschirmfoto vom 2025-02-02 22-08-34

Figure 1: Preview of workflow using the circle detection node

version 0.0.0.2

Bildschirmfoto vom 2025-02-03 20-06-43

Figure 2: Preview of workflow using the circle detection node

version 0.0.0.3

button panel

Figure 3: Preview of workflow using the circle detection node

Installation

Use the ComfyUI Manager for the installation of the node.

You can also move int the directory ComfyUI/custom_nodes

git clone https://github.com/zentrocdot/ComfyUI_Circle_Detection

Example

button panel

Figure 4: Original image

button panel

Figure 5: Image with circles detected

To-Do

Troubleshooting in the node programming and sanitizing up the code.

Remarks

The first image created is the one, where on can see, which circles are found. The seond image looks like a mask, but it is not for the moment. It is still an blank image, where the found circles are filled drawn. This changed in version 0.0.0.3.

References

[1] https://docs.opencv.org/3.4/d4/d70/tutorial_hough_circle.html

[2] https://github.com/exectails/comfyui-et_infoutils

[3] https://github.com/rgthree/rgthree-comfy

[4] https://github.com/pythongosssss/ComfyUI-Custom-Scripts

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published