How to find shapes on image
This is not related to any language atm, only math algorithm required. I have some image, lets say this one
I need to cut tree
Probably the algorithm that your looking for is "blob detection". Here's a video example. Blob detection is implemented, for example, in OpenCV.
In general, though, as several people have pointed out in the comments, what one means by "object" needs to be defined by image properties and not image interpretation. For example, in your image, are the "objects" the tress, lions, or clouds? Trees are green blobs, clouds are white blobs, etc.
精彩评论