4
$\begingroup$

The Problem :

Finding the number of occurrences of a certain pattern (or shape) in an image. In my example, the problem is about finding the number of spots (in variety of sizes) in an image. See figure 1 below: figure 1 What I'm looking for here is an orientation. What class of algorithms can lead to a solution for this type of problems?

$\endgroup$
4
  • 1
    $\begingroup$ I confess that I know nothing at all about computer vision but this looks like the sort of thing that would be covered in chapter 1 of any textbook. So, what did you try? Where did you get stuck? We expect you to do a reasonable amount of research before asking others to do that for you. $\endgroup$ Apr 5, 2016 at 19:51
  • 1
    $\begingroup$ In tasks like this there are several important questions: is background always that cute? (Plain black helps), are objects overlapping? (If not, it helps). Are objects always in color scheme from example? Are you interested only in angle? What is orientation of perfect circle? Are spots regular enough to say that bounding box will give direction? $\endgroup$
    – Evil
    Apr 5, 2016 at 20:10
  • $\begingroup$ @EvilJS, I suspect here "orientation" means "please give me an overview of the area" (rather than "how do I determine the pose / direction that the blob is pointing?"). Redjimi, If that's not correct, please edit the post. $\endgroup$
    – D.W.
    Apr 5, 2016 at 20:53
  • $\begingroup$ @D.W. I thought rather about collection of {centroid, azimuth}, and about finding this overview about easier, lightweight methods - edges, contour tracing. Of course there is Hough for ellipses, but even in short version it is rather overkill, contour fill would suffice. $\endgroup$
    – Evil
    Apr 5, 2016 at 21:08

4 Answers 4

3
$\begingroup$

The best way to get an orientation is to read a textbook on computer vision or image processing. There are lots of techniques known, and that's often the best way to get an introduction to a broad topic like this.

Anyway, for some specific techniques, I would recommend that you learn about the following candidate approaches:

Your task looks pretty easy, so I imagine you should be able to find a very effective combination of techniques if you learn about them and try them out on sample images.

$\endgroup$
1
$\begingroup$

There is one book freely available worth mentioning: Computer Vision Algorithms and Applications by Richard Szeliski.

If there is possibility that background is black and elements are not overlapping the object detection eases to scan through pixels while they are black and then using modified flood fill algorithm, connecting everything that is not black an marking as visited pixels underneath.
During flood fill all pixel positions should be stored to calculate center and probably other statistics like principal component.

$\endgroup$
1
$\begingroup$

First thing, you must be clear about the pattern because computer vision has still focused on pattern specific algorithms.

If I consider your pattern is circularity if I am not wrong you are asking how to measure the number of circular instances in an image?

To solve such query, you should go for the question "How to measure the circularity?" The question will lead you towards the hough transform algorithms. There are number of algorithms based on Hough Transform.

I prefer this, and that is your answer to measure circular instances in an image. It will also give you how much circular they are.

T.J Atherton, D.J. Kerbyson. "Size invariant circle detection." Image and Vision Computing. Volume 17, Number 11, 1999, pp. 795-803.

$\endgroup$
0
$\begingroup$

If the images your problem should deal with are like the ones you show, then you must check the watershed algorithm. There is a paper by Vicent and Soille, that has a good algorithm. However prior to apply this, you should also implement, digitalization (automatic is preferable), and distance transform. Some filtering is advisable too before you apply watersheding

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.