Ask Your Question
0

How to detect circles with +/-5% error margin?

asked 2017-10-23 05:04:17 -0500

blackmamba591 gravatar image

updated 2017-10-23 05:06:28 -0500

Hello, I am new opencv.

I have several images which consist of blobs in them. Every image has spherical or ellipse or nearly perfect circles in them. There are around 200 files. I want to check every file and see if the image is a nearly perfect circle (with maybe +-5% error margin, or close to 2pi*radius)?

I read most of the posts, Hough Transform detects circles however it doesn't detect anything in my images as they are perfect circles. So how could I find the best fitting circle based on provided threshold or circularity I can separate them out from the ones which meet my requirement.

Also is it possible to use one as a reference and to compare with others and do matching?

Type 1: Multiple blobs

type1

Type 2: Only one blob

type 2

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2017-10-23 09:25:40 -0500

essamzaky gravatar image

You can try watershed to segment the image into pieces see the following link Watershed

edit flag offensive delete link more

Comments

Hi @essamzaky could I use something like a blob detection as given here ? However, it doesn't quite work for the above images.

blackmamba591 gravatar imageblackmamba591 ( 2017-10-24 02:11:06 -0500 )edit

Done thanks, just needed to edit the parameters. I can certainly implement the watershed now for the patch of multiple blobs i have

blackmamba591 gravatar imageblackmamba591 ( 2017-10-24 04:45:58 -0500 )edit

good to know it works with you , would you up vote the answer

essamzaky gravatar imageessamzaky ( 2017-10-25 07:22:17 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-10-23 05:04:17 -0500

Seen: 170 times

Last updated: Oct 23 '17