Algorithm to extract polygones with holes I have this picture and would like to extract the bones. 
First I thought of contour-Tracking, but as you can see in some bones there are holes (Like for example at the left finger, in the bone in the middle). 

What algorithm would you recommend me? To find the contour of the bones? How could I fill them? Thanks

Im also grateful for code examples.
.
You need to apply some image segmentation algorithms. You may read about A Comparison of Image Segmentation Algorithms and apply the ones that satisfies your needs better.

If you're developing with OpenCV, you can find some ready to use (implemented) algorithms that can save you lot of work as it is the case with the watershed algorithm.

Note that you can use OpenCV with the traditional programming language C/C++ but also many others such as Python and Java. Personally I experienced it with C/C++ and Python though.