DenryDu / cv_circles_counter

利用OpenCV写的几个数硬币的demo,有从图片中识别硬币的,也有可以实时视频中识别的

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Coin and circle counters for python using OpenCV

A program that detects the number of coins or circles in an image

一个可以检测图片中硬币或者圆圈数量的程序

Table of Contents

Background

When studying CV basic operations, I want to use these skills to detect some thing, and that's why I made this proj
在学习计算机视觉基础操作的时候,我想利用这些技巧去检测一些东西,受到一些项目启发,做了这个项目来对图片或者实时视频中的硬币或圆形物体进行检测

Install

Just Download and Unzip the repo!

Usage

1.Find coins in an image statically
python3 coin_counter_test_to_find_good_parameter.py
graph LR
    start[start] --> load[load image]
    subgraph gray
    load -- Convert to gray scale --> grayscale[Gray Image]
    end
    grayscale -- Apply median blur --> mblur[Image Blurred]
    subgraph blur
    mblur -- Apply gaussian blur --> gblur[Image Blurred]
    end
    subgraph edge detection
    gblur -- Canny Edge Detection --> cEdge[Edges]
    end
    subgraph draw contours
    cEdge -- Find contours --> contours[Contours]
    end
    contours -- Draw and Count the contours --> stop[stop]
    
Loading
2.Find circles from video instantly
python3 Find_Circles_And_Say.py

examples:

test_1

test_2

Related Efforts

scikit image segmentation

Maintainers

@DenryDu

Contributors

License


If you find this useful, please star it! :) Denry Du 2019

About

利用OpenCV写的几个数硬币的demo,有从图片中识别硬币的,也有可以实时视频中识别的


Languages

Language:Python 100.0%