Circle detection using imfindcircle
显示 更早的评论

Hi to all, I'am trying to detect circle in this image using this:
[centerPoints, radius] = imfindcircles(newImage ,[2 30],'ObjectPolarity','dark','Sensitivity',0.98);
As you can see I'am in a very high Sensitivity looking for circles in this image but it won't find my circle in Wheat Color just the one in back with black line.
Also I have tried with some color enhancement but it won't work.
采纳的回答
更多回答(2 个)
Image Analyst
2017-1-16
1 个投票
You already asked this and John and I answered and you accepted John's answer. Did it not work? Or not work for this particular color?
How many circles do you want from the image? I can see 1, 2, or 3 depending on how you define a circle. The gray ring consists of two circles, an inner one and an outer one, though they're not complete.
For an alternative method, see this paper https://www.ecse.rpi.edu/homepages/qji/Papers/ellipse_det_icpr02.pdf
You haven't given the context for what you're doing. Why do you need to find circles? For example if you're looking at a 96 well plate, then simply put your plate into a jig/bracket, snap a picture of it and have a template to look in the same locations all the time. Why bother finding them if they don't move around? Just use a template/mask. For example you could take a blank shot, determine colors in the circles of the template, then take a sample image with stuff in there and compute Delta E to see how much it changed.
6 个评论
Adem Kikaj
2017-1-16
Image Analyst
2017-1-16
So pieces are identified by their shape and radius, not their color? What possible shapes can the pieces have?
But it seems like you found the game piece already and croppied it out, so what more do you need? I don't think you need diameter and centroid to subpixel accuracy, or even at all, to just determine if the player put down a piece there.
Even with shadows and lighting differences, you can find the pieces with color segmentation in combination with other methods like shape detection. It could be that a simple one line algorithm like a call to imfindcircles() is just not good enough and you'll need to develop a more sophisticated algorithm.
John BG
2017-1-17
Kika
In the context of this public forum, it's strongly recommended not to reveal work details that you may be bound not to disclose by work contract confidentiality clause.
there are various reasons why not to, the obvious one:
1.
you may have signed a legally binding contract telling you will not
2.
your employer doesn't want you to
3.
there are people who may want to copy what you do to their advantage. You don't work for them but for your employer.
Kika
is there any other question you would like to solve?
regards
John BG
John BG
2017-1-17
to IA: the function imfindcirlces would improve with an additional field allowing to direct the circles search to specific figures or axis handles, don't you agree?
John BG
Jan
2017-1-17
@John BG: A figure or axes handle would not be useful, because both can contain multiple images. Therefore an image handle could be an option instead of providing the image data directly.
I do not see the reason for your "strongly recommended not to reveal work details" comment. What is the connection to this thread?
Image Analyst
2017-1-17
Now that we know the larger context of him trying to use computer vision to determine disc placement on a Nine Men's Morris playing board, I don't know how knowing the centroid of a playing piece is relevant. Like I've said before, just use a template and determine presence or absence of a playing piece. For example if you wanted to determine occupancy of stadium seats, would you try to determine the hair color and sex of the person occupying a seat? No, it doesn't matter - all that matters is that a seat is occupied. If you had a parking vacancy program and were looking at parking spaces, do you care if the space holds a Ford or a Honda? No, it doesn't matter so don't spend time trying to figure it out. All that matters is if a space is taken or not.
Laura Achola
2022-9-19
0 个投票
Try [centerPoints, radius] = imfindcircles(newImage ,[2 30],'ObjectPolarity','bright','Sensitivity',0.98);
I think the issue is that you are using the foreground as dark instead of bright. You won't need the high sensitivity in that case.
类别
在 帮助中心 和 File Exchange 中查找有关 Just for fun 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!




