How can I detect shapes in an image using an algorithm? I have heard of using edge detection and from there the shapes can be identified, but how? Also, edge detection only is effective if the shape has a high difference of contrast from its surrounding area, what would be an effective technique if the shape and its surrounding area almost have the same contrast (but, of course, the shape is still visible)? P. S. This is my first time tackling this problem, any hints or references to get me started and understand more of this field? Thank you in advance.