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>You should start with the "basic" contour detection based on Canny filter:
<a href="http://docs.opencv.org/2.4/doc/tutorials/imgproc/shapedescriptors/find_contours/find_contours.html" rel="nofollow">http://docs.opencv.org/2.4/doc/tutorials/imgproc/shapedescriptors/find_contours/find_contours.html</a>
This simple method will not solve your problem, but no simple methods will. Still, you have to start with something to understand the complexity of your problem. </p>

python opencv image-processing image-segmentation