简体   繁体   中英

detecting dots in image- opencv python

I have an image from a Petri dish that I want to detect black round dots (number and location), preferably in python+opencv. I tried different methods in python opencv, but no success, eg hough circle, findContours, etc.

I used How to count number of dots in an image using python and Opencv? and count colored dots in image . The problem for both methods is that they also detect the right section also as dots (outside from the dish). Therefore the number of detected dots are very high~2K 在此处输入图像描述 输入

desired output: 期望的输出

You can use Simple Blob Detector technique which is used for Detecting the round objects on image. There are many parameters which also helps you like defining the minsize of Blob(objects),filterBy Inertia,filterBy Convexity, and Filter by Color. For reference you can access the docs link( https://docs.opencv.org/3.4/d0/d7a/classcv_1_1SimpleBlobDetector.html )

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM