Extract contours with whole hierarchy using OpenCV2