Of course to some treatment should be applied to the picture to get a good contours detection. To do contours detection, OpenCV provides a function called FindContours which intent to find contours in the image.
This means that you can request outer borders of objects detected in your images. The algorithm does indeed find edges of images but also puts them in a hierarchy. Contours can do a bit more than “just” detect edges. So how is the contour is different than finding an Edge? An edge is a point in an image where there is a sharp change in the pixel colour value which doesn’t make it continuous in nature and sometimes makes it hard to determine the shape of the object. The contours are a useful tool for shape analysis and object detection and recognition. Contours detection is a process can be explained simply as a curve joining all the continuous points (along with the boundary), having same colour or intensity.