Edges

How do I detect distinct objects when their edges touch each other?
Which method is used to detect the edges of surfaces and objects?How do we detect edges of items in a drawing? Which method is used to detect the ed...