Pergunta

I'm planning to write a program using Open-CV to count the number of objects in an image similar to the one below.

Sample image

The method I'm planning to employ is to use the histogram to threshold the image and then to use Blob detection to count the number of Blobs that are identified. This would work fine as long as the pellet like objects do not touch each other. (Overlapping is out of scope though) I've looked into the possibility of using the Watershed segmentation to identify objects that are touching each other.

What I'm not clear is, how to apply these two techniques for an image that may or may not have overlapping pellets. Provided that there is at least one instance of pellets touching each other in an image, am I to perform both the techniques? If so in what order? Or am I to perform Watershed only since there's going to be overlapping somewhere and performing Blob detection would lead to an erroneous output due to the merged blobs? Thanks in advance.

Foi útil?

Solução

You say "Provided that there is at least one instance of overlapping in an image" but also "Overlapping is out of scope though".

If the Watershed algorithm handles images with overlapping pellets, Blob detection will probably not provide any advantage (since it will merge overlapping objects).

If you really wanted to combine the approaches, you could run both of them in their own pipelines, and use a probabilistic model to combine the two. But it's best to start simple and see what sort of results you get first.

Here's an example using Matlab which performs cell segmentation using Watershed:

http://blogs.mathworks.com/steve/2006/06/02/cell-segmentation/

If you need to avoid counting objects which are only partially in view, you can use a Voronoi diagram and remove objects that connect with the edges:

http://pythonvision.org/basic-tutorial

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top