Coder Social home page Coder Social logo

pwwiur / hough-counter Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 3.0 24 KB

Circles counter application using computer vision hough circle transform algorithm

License: Apache License 2.0

Python 100.00%
counter-app hough-transform circle-counting hough-circles hough-circle-detector

hough-counter's Introduction

Hough circle counter

Circle counter application using computer vision hough circle transform algorithm. Another capabillity of this application is to save bounding boxes for object detection tasks for deep learning porpuses. It saves a xml file named the same as image name in opened directory for labels. The structure of the xml file inherited from labelImg project which is suitable for tensorflow. You can also open the same directory with labelImg to correct labels.

Installation

First clone project to your directory, Then install following packages:

pip install numpy opencv-python matplotlib pillow

After installation run it by this command:

python main.py

Demo

hough-counter-demo

Config

You can change default config using init function in main.py file:

config = {
    "img_default_width": 600,
    "img_default_height": 400,
    "minDist": 22,
    "minRadius": 22,
    "maxRadius": 50,
    "gaussian_default": 5,
    "median_default": 7,
    "threshold": 0
}

hough-counter's People

Contributors

pwwiur avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

hough-counter's Issues

Setting file path

I'm concerned of the proper way to add the image path ! I'm selecting the directory at first but the an error appears.
python3 main.py Exception in Tkinter callback Traceback (most recent call last): File "/usr/lib/python3.8/tkinter/__init__.py", line 1892, in __call__ return self.func(*args) File "main.py", line 135, in scales_onchange load_image() File "main.py", line 102, in load_image file_path = data_path + "/" + files[file_index] IndexError: list index out of range Exception in Tkinter callback Traceback (most recent call last): File "/usr/lib/python3.8/tkinter/__init__.py", line 1892, in __call__ return self.func(*args) File "main.py", line 135, in scales_onchange load_image() File "main.py", line 102, in load_image file_path = data_path + "/" + files[file_index] IndexError: list index out of range Exception in Tkinter callback Traceback (most recent call last): File "/usr/lib/python3.8/tkinter/__init__.py", line 1892, in __call__ return self.func(*args) File "main.py", line 135, in scales_onchange load_image() File "main.py", line 102, in load_image file_path = data_path + "/" + files[file_index] IndexError: list index out of range Exception in Tkinter callback Traceback (most recent call last): File "/usr/lib/python3.8/tkinter/__init__.py", line 1892, in __call__ return self.func(*args) File "main.py", line 135, in scales_onchange load_image() File "main.py", line 102, in load_image file_path = data_path + "/" + files[file_index] IndexError: list index out of range Exception in Tkinter callback Traceback (most recent call last): File "/usr/lib/python3.8/tkinter/__init__.py", line 1892, in __call__ return self.func(*args) File "main.py", line 135, in scales_onchange load_image() File "main.py", line 102, in load_image file_path = data_path + "/" + files[file_index] IndexError: list index out of range Loading: /home/mhalwani/ProjectiveTransformation/image.png Traceback (most recent call last): File "main.py", line 306, in <module> load_image() File "main.py", line 124, in load_image raise e File "main.py", line 118, in load_image show_info(title + " Circles found: " + (0 if circles is None else str(len(circles[0, :])))) TypeError: can only concatenate str (not "int") to str

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.