What's the best way to separate each stone in an image with many stones (some above the others)
<p>I need to make a study of the floor of a lake, and have to calculate the number and average size of the stones on the floor.</p>

<p>I have been studying morphological procedures to solve it in OpenCV but still need to find a way to try to separate the stones and make a binary image that precisely shows theirs contours.</p>

<p>I still didn't take the pictures, but the images will be something like the following:</p>

<p><a href="https://i.stack.imgur.com/tgeAf.png" rel="nofollow"><img src="https://i.stack.imgur.com/tgeAf.png" alt="enter image description here"></a></p>

<p>What is the best algorithm to separate each stone and get their contours?
And if this kind of image is too complex to properly separate the stones, what is the best method to have a size x number estimation? </p>

<p>Wathershed is probably what will give you an approximation to the solution.</p>

<p>Other thing that you may do is try labelling images with the number of flakes and particles you can count and feed it to a deep neural net and let it findout how to count the flakes, if you have enough training cases you may endup with a good result in the output</p>

<p>information on whatershed can be found at this link
<a href="http://www.pyimagesearch.com/2015/11/02/watershed-opencv/" rel="nofollow">http://www.pyimagesearch.com/2015/11/02/watershed-opencv/</a></p>

python opencv image-processing image-segmentation